mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-09 15:08:27 +01:00
8385 lines
7.9 MiB
8385 lines
7.9 MiB
/*
|
||
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
||
* This devtool is neither made for production nor for readable output files.
|
||
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
* or disable the default devtool with "devtool: false".
|
||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
*/
|
||
/******/ (() => { // webpackBootstrap
|
||
/******/ var __webpack_modules__ = ({
|
||
|
||
/***/ "./index.js":
|
||
/*!******************!*\
|
||
!*** ./index.js ***!
|
||
\******************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var monaco_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! monaco-editor */ \"./node_modules/monaco-editor/esm/vs/editor/editor.main.js\");\n\n\nself.MonacoEnvironment = {\n\tgetWorkerUrl: function (moduleId, label) {\n\t\tif (label === 'json') {\n\t\t\treturn __monaco_public_path__+'/json.worker.bundle.js';\n\t\t}\n\t\tif (label === 'css' || label === 'scss' || label === 'less') {\n\t\t\treturn __monaco_public_path__+'/css.worker.bundle.js';\n\t\t}\n\t\tif (label === 'html' || label === 'handlebars' || label === 'razor') {\n\t\t\treturn __monaco_public_path__+'/html.worker.bundle.js';\n\t\t}\n\t\tif (label === 'typescript' || label === 'javascript') {\n\t\t\treturn __monaco_public_path__+'/ts.worker.bundle.js';\n\t\t}\n\t\treturn __monaco_public_path__+'/editor.worker.bundle.js';\n\t}\n};\n\nwindow.monaco = monaco_editor__WEBPACK_IMPORTED_MODULE_0__;\n\n\n//# sourceURL=webpack://browser-esm-webpack/./index.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css":
|
||
/*!*************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css ***!
|
||
\*************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-action-bar {\\r\\n\\ttext-align: right;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .actions-container {\\r\\n\\tdisplay: flex;\\r\\n\\tmargin: 0 auto;\\r\\n\\tpadding: 0;\\r\\n\\twidth: 100%;\\r\\n\\tjustify-content: flex-end;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.vertical .actions-container {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.reverse .actions-container {\\r\\n\\tflex-direction: row-reverse;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item {\\r\\n\\tcursor: pointer;\\r\\n\\tdisplay: inline-block;\\r\\n\\ttransition: transform 50ms ease;\\r\\n\\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item.disabled {\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.animated .action-item.active {\\r\\n\\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item .icon,\\r\\n.monaco-action-bar .action-item .codicon {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item .codicon {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-label {\\r\\n\\tfont-size: 11px;\\r\\n\\tmargin-right: 4px;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item.disabled .action-label,\\r\\n.monaco-action-bar .action-item.disabled .action-label::before,\\r\\n.monaco-action-bar .action-item.disabled .action-label:hover {\\r\\n\\topacity: 0.4;\\r\\n}\\r\\n\\r\\n/* Vertical actions */\\r\\n\\r\\n.monaco-action-bar.vertical {\\r\\n\\ttext-align: left;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.vertical .action-item {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.vertical .action-label.separator {\\r\\n\\tdisplay: block;\\r\\n\\tborder-bottom: 1px solid #bbb;\\r\\n\\tpadding-top: 1px;\\r\\n\\tmargin-left: .8em;\\r\\n\\tmargin-right: .8em;\\r\\n}\\r\\n\\r\\n.monaco-action-bar.animated.vertical .action-item.active {\\r\\n\\ttransform: translate(5px, 0);\\r\\n}\\r\\n\\r\\n.secondary-actions .monaco-action-bar .action-label {\\r\\n\\tmargin-left: 6px;\\r\\n}\\r\\n\\r\\n/* Action Items */\\r\\n.monaco-action-bar .action-item.select-container {\\r\\n\\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\\r\\n\\tflex: 1;\\r\\n\\tmax-width: 170px;\\r\\n\\tmin-width: 60px;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n\\tmargin-right: 10px;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item.action-dropdown-item {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\\r\\n\\tmargin-right: 1px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css":
|
||
/*!***************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css ***!
|
||
\***************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-aria-container {\\r\\n\\tposition: absolute; /* try to hide from window but not from screen readers */\\r\\n\\tleft:-999em;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css":
|
||
/*!*******************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css ***!
|
||
\*******************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-text-button {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tdisplay: flex;\\r\\n\\twidth: 100%;\\r\\n\\tpadding: 4px;\\r\\n\\ttext-align: center;\\r\\n\\tcursor: pointer;\\r\\n\\tjustify-content: center;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.monaco-text-button:hover {\\r\\n\\ttext-decoration: none !important;\\r\\n}\\r\\n\\r\\n.monaco-button.disabled {\\r\\n\\topacity: 0.4;\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.monaco-text-button > .codicon {\\r\\n\\tmargin: 0 0.2em;\\r\\n\\tcolor: inherit !important;\\r\\n}\\r\\n\\r\\n.monaco-button-dropdown {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-button-dropdown > .monaco-dropdown-button {\\r\\n\\tmargin-left: 1px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css":
|
||
/*!***********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css ***!
|
||
\***********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-custom-checkbox {\\r\\n\\tmargin-left: 2px;\\r\\n\\tfloat: left;\\r\\n\\tcursor: pointer;\\r\\n\\toverflow: hidden;\\r\\n\\topacity: 0.7;\\r\\n\\twidth: 20px;\\r\\n\\theight: 20px;\\r\\n\\tborder: 1px solid transparent;\\r\\n\\tpadding: 1px;\\r\\n\\tbox-sizing:\\tborder-box;\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n.monaco-custom-checkbox:hover,\\r\\n.monaco-custom-checkbox.checked {\\r\\n\\topacity: 1;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-custom-checkbox {\\r\\n\\tbackground: none;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-custom-checkbox:hover {\\r\\n\\tbackground: none;\\r\\n}\\r\\n\\r\\n.monaco-custom-checkbox.monaco-simple-checkbox {\\r\\n\\theight: 18px;\\r\\n\\twidth: 18px;\\r\\n\\tborder: 1px solid transparent;\\r\\n\\tborder-radius: 3px;\\r\\n\\tmargin-right: 9px;\\r\\n\\tmargin-left: 0px;\\r\\n\\tpadding: 0px;\\r\\n\\topacity: 1;\\r\\n\\tbackground-size: 16px !important;\\r\\n}\\r\\n\\r\\n/* hide check when unchecked */\\r\\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\\r\\n\\tvisibility: hidden;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css":
|
||
/*!****************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css ***!
|
||
\****************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.codicon-wrench-subaction {\\r\\n\\topacity: 0.5;\\r\\n}\\r\\n\\r\\n@keyframes codicon-spin {\\r\\n\\t100% {\\r\\n\\t\\ttransform:rotate(360deg);\\r\\n\\t}\\r\\n}\\r\\n\\r\\n.codicon-sync.codicon-modifier-spin, .codicon-loading.codicon-modifier-spin, .codicon-gear.codicon-modifier-spin {\\r\\n\\t/* Use steps to throttle FPS to reduce CPU usage */\\r\\n\\tanimation: codicon-spin 1.5s steps(30) infinite;\\r\\n}\\r\\n\\r\\n.codicon-modifier-disabled {\\r\\n\\topacity: 0.4;\\r\\n}\\r\\n\\r\\n/* custom speed & easing for loading icon */\\r\\n.codicon-loading,\\r\\n.codicon-tree-item-loading::before {\\r\\n\\tanimation-duration: 1s !important;\\r\\n\\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css":
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css ***!
|
||
\******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/getUrl.js */ \"./node_modules/css-loader/dist/runtime/getUrl.js\");\n/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _codicon_ttf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codicon.ttf */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf\");\n// Imports\n\n\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_1___default()(_codicon_ttf__WEBPACK_IMPORTED_MODULE_2__.default);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n@font-face {\\r\\n\\tfont-family: \\\"codicon\\\";\\r\\n\\tsrc: url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"truetype\\\");\\r\\n}\\r\\n\\r\\n.codicon[class*='codicon-'] {\\r\\n\\tfont: normal normal normal 16px/1 codicon;\\r\\n\\tdisplay: inline-block;\\r\\n\\ttext-decoration: none;\\r\\n\\ttext-rendering: auto;\\r\\n\\ttext-align: center;\\r\\n\\t-webkit-font-smoothing: antialiased;\\r\\n\\t-moz-osx-font-smoothing: grayscale;\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n/* icon rules are dynamically created in codiconStyles */\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css":
|
||
/*!*****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css ***!
|
||
\*****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.context-view {\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 2500;\\r\\n}\\r\\n\\r\\n.context-view.fixed {\\r\\n\\tall: initial;\\r\\n\\tfont-family: inherit;\\r\\n\\tfont-size: 13px;\\r\\n\\tposition: fixed;\\r\\n\\tz-index: 2500;\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css":
|
||
/*!***************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css ***!
|
||
\***************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-count-badge {\\r\\n\\tpadding: 3px 6px;\\r\\n\\tborder-radius: 11px;\\r\\n\\tfont-size: 11px;\\r\\n\\tmin-width: 18px;\\r\\n\\tmin-height: 18px;\\r\\n\\tline-height: 11px;\\r\\n\\tfont-weight: normal;\\r\\n\\ttext-align: center;\\r\\n\\tdisplay: inline-block;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n.monaco-count-badge.long {\\r\\n\\tpadding: 2px 3px;\\r\\n\\tborder-radius: 2px;\\r\\n\\tmin-height: auto;\\r\\n\\tline-height: normal;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css":
|
||
/*!***********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css ***!
|
||
\***********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-dropdown {\\r\\n\\theight: 100%;\\r\\n\\tpadding: 0;\\r\\n}\\r\\n\\r\\n.monaco-dropdown > .dropdown-label {\\r\\n\\tcursor: pointer;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\\r\\n\\tcursor: default;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css":
|
||
/*!*************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css ***!
|
||
\*************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n/* ---------- Find input ---------- */\\r\\n\\r\\n.monaco-findInput {\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.monaco-findInput .monaco-inputbox {\\r\\n\\tfont-size: 13px;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-findInput > .controls {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 3px;\\r\\n\\tright: 2px;\\r\\n}\\r\\n\\r\\n.vs .monaco-findInput.disabled {\\r\\n\\tbackground-color: #E1E1E1;\\r\\n}\\r\\n\\r\\n/* Theming */\\r\\n.vs-dark .monaco-findInput.disabled {\\r\\n\\tbackground-color: #333;\\r\\n}\\r\\n\\r\\n/* Highlighting */\\r\\n.monaco-findInput.highlight-0 .controls {\\r\\n\\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\\r\\n}\\r\\n.monaco-findInput.highlight-1 .controls {\\r\\n\\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\\r\\n}\\r\\n.hc-black .monaco-findInput.highlight-0 .controls,\\r\\n.vs-dark .monaco-findInput.highlight-0 .controls {\\r\\n\\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\\r\\n}\\r\\n.hc-black .monaco-findInput.highlight-1 .controls,\\r\\n.vs-dark .monaco-findInput.highlight-1 .controls {\\r\\n\\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\\r\\n}\\r\\n\\r\\n@keyframes monaco-findInput-highlight-0 {\\r\\n\\t0% { background: rgba(253, 255, 0, 0.8); }\\r\\n\\t100% { background: transparent; }\\r\\n}\\r\\n@keyframes monaco-findInput-highlight-1 {\\r\\n\\t0% { background: rgba(253, 255, 0, 0.8); }\\r\\n\\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\\r\\n\\t99% { background: transparent; }\\r\\n}\\r\\n\\r\\n@keyframes monaco-findInput-highlight-dark-0 {\\r\\n\\t0% { background: rgba(255, 255, 255, 0.44); }\\r\\n\\t100% { background: transparent; }\\r\\n}\\r\\n@keyframes monaco-findInput-highlight-dark-1 {\\r\\n\\t0% { background: rgba(255, 255, 255, 0.44); }\\r\\n\\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\\r\\n\\t99% { background: transparent; }\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css":
|
||
/*!*****************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css ***!
|
||
\*****************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-hover {\\r\\n\\tcursor: default;\\r\\n\\tposition: absolute;\\r\\n\\toverflow: hidden;\\r\\n\\tz-index: 50;\\r\\n\\tuser-select: text;\\r\\n\\t-webkit-user-select: text;\\r\\n\\t-ms-user-select: text;\\r\\n\\tbox-sizing: initial;\\r\\n\\tanimation: fadein 100ms linear;\\r\\n\\tline-height: 1.5em;\\r\\n}\\r\\n\\r\\n.monaco-hover.hidden {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-contents {\\r\\n\\tpadding: 4px 8px;\\r\\n}\\r\\n\\r\\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\\r\\n\\tmax-width: 500px;\\r\\n\\tword-wrap: break-word;\\r\\n}\\r\\n\\r\\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\\r\\n\\t/* This is a strange rule but it avoids https://github.com/microsoft/vscode/issues/96795, just 100vw on its own caused the actual hover width to increase */\\r\\n\\tmin-width: calc(100% + 100vw);\\r\\n}\\r\\n\\r\\n.monaco-hover p,\\r\\n.monaco-hover .code,\\r\\n.monaco-hover ul {\\r\\n\\tmargin: 8px 0;\\r\\n}\\r\\n\\r\\n.monaco-hover code {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\\r\\n.monaco-hover hr {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tborder-left: 0px;\\r\\n\\tborder-right: 0px;\\r\\n\\tmargin-top: 4px;\\r\\n\\tmargin-bottom: -4px;\\r\\n\\tmargin-left: -8px;\\r\\n\\tmargin-right: -8px;\\r\\n\\theight: 1px;\\r\\n}\\r\\n\\r\\n.monaco-hover p:first-child,\\r\\n.monaco-hover .code:first-child,\\r\\n.monaco-hover ul:first-child {\\r\\n\\tmargin-top: 0;\\r\\n}\\r\\n\\r\\n.monaco-hover p:last-child,\\r\\n.monaco-hover .code:last-child,\\r\\n.monaco-hover ul:last-child {\\r\\n\\tmargin-bottom: 0;\\r\\n}\\r\\n\\r\\n/* MarkupContent Layout */\\r\\n.monaco-hover ul {\\r\\n\\tpadding-left: 20px;\\r\\n}\\r\\n.monaco-hover ol {\\r\\n\\tpadding-left: 20px;\\r\\n}\\r\\n\\r\\n.monaco-hover li > p {\\r\\n\\tmargin-bottom: 0;\\r\\n}\\r\\n\\r\\n.monaco-hover li > ul {\\r\\n\\tmargin-top: 0;\\r\\n}\\r\\n\\r\\n.monaco-hover code {\\r\\n\\tborder-radius: 3px;\\r\\n\\tpadding: 0 0.4em;\\r\\n}\\r\\n\\r\\n.monaco-hover .monaco-tokenized-source {\\r\\n\\twhite-space: pre-wrap;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-row.status-bar {\\r\\n\\tfont-size: 12px;\\r\\n\\tline-height: 22px;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-row.status-bar .actions {\\r\\n\\tdisplay: flex;\\r\\n\\tpadding: 0px 8px;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-row.status-bar .actions .action-container {\\r\\n\\tmargin-right: 16px;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\\r\\n\\tpadding-right: 4px;\\r\\n}\\r\\n\\r\\n.monaco-hover .markdown-hover .hover-contents .codicon {\\r\\n\\tcolor: inherit;\\r\\n\\tfont-size: inherit;\\r\\n\\tvertical-align: middle;\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-contents a.code-link:before {\\r\\n\\tcontent: '(';\\r\\n}\\r\\n.monaco-hover .hover-contents a.code-link:after {\\r\\n\\tcontent: ')';\\r\\n}\\r\\n\\r\\n.monaco-hover .hover-contents a.code-link {\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n.monaco-hover .hover-contents a.code-link > span {\\r\\n\\ttext-decoration: underline;\\r\\n\\t/** Hack to force underline to show **/\\r\\n\\tborder-bottom: 1px solid transparent;\\r\\n\\ttext-underline-position: under;\\r\\n}\\r\\n\\r\\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\\r\\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span {\\r\\n\\tmargin-bottom: 4px;\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css":
|
||
/*!*************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css ***!
|
||
\*************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* ---------- Icon label ---------- */\\r\\n\\r\\n.monaco-icon-label {\\r\\n\\tdisplay: flex; /* required for icons support :before rule */\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-icon-label::before {\\r\\n\\r\\n\\t/* svg icons rendered as background image */\\r\\n\\tbackground-size: 16px;\\r\\n\\tbackground-position: left center;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tpadding-right: 6px;\\r\\n\\twidth: 16px;\\r\\n\\theight: 22px;\\r\\n\\tline-height: inherit !important;\\r\\n\\tdisplay: inline-block;\\r\\n\\r\\n\\t/* fonts icons */\\r\\n\\t-webkit-font-smoothing: antialiased;\\r\\n\\t-moz-osx-font-smoothing: grayscale;\\r\\n\\tvertical-align: top;\\r\\n\\r\\n\\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\\r\\n}\\r\\n\\r\\n.monaco-icon-label > .monaco-icon-label-container {\\r\\n\\tmin-width: 0;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\\r\\n\\tcolor: inherit;\\r\\n\\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\\r\\n}\\r\\n\\r\\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\\r\\n\\tmargin: 0 2px;\\r\\n\\topacity: 0.5;\\r\\n}\\r\\n\\r\\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\\r\\n\\topacity: .7;\\r\\n\\tmargin-left: 0.5em;\\r\\n\\tfont-size: 0.9em;\\r\\n\\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\\r\\n}\\r\\n\\r\\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\\r\\n\\twhite-space: nowrap\\r\\n}\\r\\n\\r\\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\\r\\n\\topacity: .95;\\r\\n}\\r\\n\\r\\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\\r\\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\\r\\n\\tfont-style: italic;\\r\\n}\\r\\n\\r\\n.monaco-icon-label.deprecated {\\r\\n\\ttext-decoration: line-through;\\r\\n\\topacity: 0.66;\\r\\n}\\r\\n\\r\\n/* make sure apply italic font style to decorations as well */\\r\\n.monaco-icon-label.italic::after {\\r\\n\\tfont-style: italic;\\r\\n}\\r\\n\\r\\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\\r\\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\\r\\n\\ttext-decoration: line-through;\\r\\n}\\r\\n\\r\\n.monaco-icon-label::after {\\r\\n\\topacity: 0.75;\\r\\n\\tfont-size: 90%;\\r\\n\\tfont-weight: 600;\\r\\n\\tpadding: 0 16px 0 5px;\\r\\n\\ttext-align: center;\\r\\n}\\r\\n\\r\\n/* make sure selection color wins when a label is being selected */\\r\\n.monaco-list:focus .selected .monaco-icon-label, /* list */\\r\\n.monaco-list:focus .selected .monaco-icon-label::after\\r\\n{\\r\\n\\tcolor: inherit !important;\\r\\n}\\r\\n\\r\\n.monaco-list-row.focused.selected .label-description,\\r\\n.monaco-list-row.selected .label-description {\\r\\n\\topacity: .8;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css":
|
||
/*!***********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css ***!
|
||
\***********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-inputbox {\\r\\n\\tposition: relative;\\r\\n\\tdisplay: block;\\r\\n\\tpadding: 0;\\r\\n\\tbox-sizing:\\tborder-box;\\r\\n\\r\\n\\t/* Customizable */\\r\\n\\tfont-size: inherit;\\r\\n}\\r\\n\\r\\n.monaco-inputbox.idle {\\r\\n\\tborder: 1px solid transparent;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > .input,\\r\\n.monaco-inputbox > .ibwrapper > .mirror {\\r\\n\\r\\n\\t/* Customizable */\\r\\n\\tpadding: 4px;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper {\\r\\n\\tposition: relative;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > .input {\\r\\n\\tdisplay: inline-block;\\r\\n\\tbox-sizing:\\tborder-box;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n\\tline-height: inherit;\\r\\n\\tborder: none;\\r\\n\\tfont-family: inherit;\\r\\n\\tfont-size: inherit;\\r\\n\\tresize: none;\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > input {\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > textarea.input {\\r\\n\\tdisplay: block;\\r\\n\\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\\r\\n\\tscrollbar-width: none; /* Firefox: hide scrollbars */\\r\\n\\toutline: none;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\\r\\n\\tdisplay: none; /* Chrome + Safari: hide scrollbar */\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-inputbox > .ibwrapper > .mirror {\\r\\n\\tposition: absolute;\\r\\n\\tdisplay: inline-block;\\r\\n\\twidth: 100%;\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n\\tbox-sizing: border-box;\\r\\n\\twhite-space: pre-wrap;\\r\\n\\tvisibility: hidden;\\r\\n\\tword-wrap: break-word;\\r\\n}\\r\\n\\r\\n/* Context view */\\r\\n\\r\\n.monaco-inputbox-container {\\r\\n\\ttext-align: right;\\r\\n}\\r\\n\\r\\n.monaco-inputbox-container .monaco-inputbox-message {\\r\\n\\tdisplay: inline-block;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-align: left;\\r\\n\\twidth: 100%;\\r\\n\\tbox-sizing:\\tborder-box;\\r\\n\\tpadding: 0.4em;\\r\\n\\tfont-size: 12px;\\r\\n\\tline-height: 17px;\\r\\n\\tmargin-top: -1px;\\r\\n\\tword-wrap: break-word;\\r\\n}\\r\\n\\r\\n/* Action bar support */\\r\\n.monaco-inputbox .monaco-action-bar {\\r\\n\\tposition: absolute;\\r\\n\\tright: 2px;\\r\\n\\ttop: 4px;\\r\\n}\\r\\n\\r\\n.monaco-inputbox .monaco-action-bar .action-item {\\r\\n\\tmargin-left: 2px;\\r\\n}\\r\\n\\r\\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\twidth: 16px;\\r\\n\\theight: 16px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css":
|
||
/*!*************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css ***!
|
||
\*************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-keybinding {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tline-height: 10px;\\r\\n}\\r\\n\\r\\n.monaco-keybinding > .monaco-keybinding-key {\\r\\n\\tdisplay: inline-block;\\r\\n\\tborder: solid 1px rgba(204, 204, 204, 0.4);\\r\\n\\tborder-bottom-color: rgba(187, 187, 187, 0.4);\\r\\n\\tborder-radius: 3px;\\r\\n\\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\\r\\n\\tbackground-color: rgba(221, 221, 221, 0.4);\\r\\n\\tvertical-align: middle;\\r\\n\\tcolor: #555;\\r\\n\\tfont-size: 11px;\\r\\n\\tpadding: 3px 5px;\\r\\n\\tmargin: 0 2px;\\r\\n}\\r\\n\\r\\n.monaco-keybinding > .monaco-keybinding-key:first-child {\\r\\n\\tmargin-left: 0;\\r\\n}\\r\\n\\r\\n.monaco-keybinding > .monaco-keybinding-key:last-child {\\r\\n\\tmargin-right: 0;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\\r\\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\\r\\n\\tbackground-color: rgba(128, 128, 128, 0.17);\\r\\n\\tcolor: #ccc;\\r\\n\\tborder: solid 1px rgba(51, 51, 51, 0.6);\\r\\n\\tborder-bottom-color: rgba(68, 68, 68, 0.6);\\r\\n\\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\\r\\n}\\r\\n\\r\\n.monaco-keybinding > .monaco-keybinding-key-separator {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\\r\\n\\twidth: 6px;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css":
|
||
/*!***************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css ***!
|
||
\***************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-list {\\r\\n\\tposition: relative;\\r\\n\\theight: 100%;\\r\\n\\twidth: 100%;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-list.mouse-support {\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n.monaco-list > .monaco-scrollable-element {\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-list-rows {\\r\\n\\tposition: relative;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-list.horizontal-scrolling .monaco-list-rows {\\r\\n\\twidth: auto;\\r\\n\\tmin-width: 100%;\\r\\n}\\r\\n\\r\\n.monaco-list-row {\\r\\n\\tposition: absolute;\\r\\n\\tbox-sizing: border-box;\\r\\n\\toverflow: hidden;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-list.mouse-support .monaco-list-row {\\r\\n\\tcursor: pointer;\\r\\n\\ttouch-action: none;\\r\\n}\\r\\n\\r\\n/* for OS X ballistic scrolling */\\r\\n.monaco-list-row.scrolling {\\r\\n\\tdisplay: none !important;\\r\\n}\\r\\n\\r\\n/* Focus */\\r\\n.monaco-list.element-focused,\\r\\n.monaco-list.selection-single,\\r\\n.monaco-list.selection-multiple {\\r\\n\\toutline: 0 !important;\\r\\n}\\r\\n\\r\\n.monaco-list:focus .monaco-list-row.selected .codicon {\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\\r\\n/* Dnd */\\r\\n.monaco-drag-image {\\r\\n\\tdisplay: inline-block;\\r\\n\\tpadding: 1px 7px;\\r\\n\\tborder-radius: 10px;\\r\\n\\tfont-size: 12px;\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 1000;\\r\\n}\\r\\n\\r\\n/* Type filter */\\r\\n\\r\\n.monaco-list-type-filter {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tposition: absolute;\\r\\n\\tborder-radius: 2px;\\r\\n\\tpadding: 0px 3px;\\r\\n\\tmax-width: calc(100% - 10px);\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-align: right;\\r\\n\\tbox-sizing: border-box;\\r\\n\\tcursor: all-scroll;\\r\\n\\tfont-size: 13px;\\r\\n\\tline-height: 18px;\\r\\n\\theight: 20px;\\r\\n\\tz-index: 1;\\r\\n\\ttop: 4px;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter.dragging {\\r\\n\\ttransition: top 0.2s, left 0.2s;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter.ne {\\r\\n\\tright: 4px;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter.nw {\\r\\n\\tleft: 4px;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter > .controls {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tbox-sizing: border-box;\\r\\n\\ttransition: width 0.2s;\\r\\n\\twidth: 0;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter.dragging > .controls,\\r\\n.monaco-list-type-filter:hover > .controls {\\r\\n\\twidth: 36px;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter > .controls > * {\\r\\n\\tborder: none;\\r\\n\\tbox-sizing: border-box;\\r\\n\\t-webkit-appearance: none;\\r\\n\\t-moz-appearance: none;\\r\\n\\tbackground: none;\\r\\n\\twidth: 16px;\\r\\n\\theight: 16px;\\r\\n\\tflex-shrink: 0;\\r\\n\\tmargin: 0;\\r\\n\\tpadding: 0;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter > .controls > .filter {\\r\\n\\tmargin-left: 4px;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter-message {\\r\\n\\tposition: absolute;\\r\\n\\tbox-sizing: border-box;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n\\tpadding: 40px 1em 1em 1em;\\r\\n\\ttext-align: center;\\r\\n\\twhite-space: normal;\\r\\n\\topacity: 0.7;\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter-message:empty {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n/* Electron */\\r\\n\\r\\n.monaco-list-type-filter {\\r\\n\\tcursor: grab;\\r\\n}\\r\\n\\r\\n.monaco-list-type-filter.dragging {\\r\\n\\tcursor: grabbing;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css":
|
||
/*!*****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css ***!
|
||
\*****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-mouse-cursor-text {\\r\\n\\tcursor: text;\\r\\n}\\r\\n\\r\\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\\r\\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\\r\\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\\r\\n\\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css":
|
||
/*!*****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css ***!
|
||
\*****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-progress-container {\\r\\n\\twidth: 100%;\\r\\n\\theight: 5px;\\r\\n\\toverflow: hidden; /* keep progress bit in bounds */\\r\\n}\\r\\n\\r\\n.monaco-progress-container .progress-bit {\\r\\n\\twidth: 2%;\\r\\n\\theight: 5px;\\r\\n\\tposition: absolute;\\r\\n\\tleft: 0;\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-progress-container.active .progress-bit {\\r\\n\\tdisplay: inherit;\\r\\n}\\r\\n\\r\\n.monaco-progress-container.discrete .progress-bit {\\r\\n\\tleft: 0;\\r\\n\\ttransition: width 100ms linear;\\r\\n}\\r\\n\\r\\n.monaco-progress-container.discrete.done .progress-bit {\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-progress-container.infinite .progress-bit {\\r\\n\\tanimation-name: progress;\\r\\n\\tanimation-duration: 4s;\\r\\n\\tanimation-iteration-count: infinite;\\r\\n\\tanimation-timing-function: linear;\\r\\n\\ttransform: translate3d(0px, 0px, 0px);\\r\\n}\\r\\n\\r\\n/**\\r\\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\\r\\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\\r\\n * its relative size to the parent container:\\r\\n * parent width: 5000%\\r\\n * bit width: 100%\\r\\n * translateX should be as follow:\\r\\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\\r\\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\\r\\n */\\r\\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css":
|
||
/*!***************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css ***!
|
||
\***************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n:root {\\r\\n\\t--sash-size: 4px;\\r\\n}\\r\\n\\r\\n.monaco-sash {\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 35;\\r\\n\\ttouch-action: none;\\r\\n}\\r\\n\\r\\n.monaco-sash.disabled {\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\\r\\n.monaco-sash.mac.vertical {\\r\\n\\tcursor: col-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.vertical.minimum {\\r\\n\\tcursor: e-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.vertical.maximum {\\r\\n\\tcursor: w-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.mac.horizontal {\\r\\n\\tcursor: row-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.horizontal.minimum {\\r\\n\\tcursor: s-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.horizontal.maximum {\\r\\n\\tcursor: n-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.disabled {\\r\\n\\tcursor: default !important;\\r\\n\\tpointer-events: none !important;\\r\\n}\\r\\n\\r\\n.monaco-sash.vertical {\\r\\n\\tcursor: ew-resize;\\r\\n\\ttop: 0;\\r\\n\\twidth: var(--sash-size);\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-sash.horizontal {\\r\\n\\tcursor: ns-resize;\\r\\n\\tleft: 0;\\r\\n\\twidth: 100%;\\r\\n\\theight: var(--sash-size);\\r\\n}\\r\\n\\r\\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\\r\\n\\tcontent: \\\" \\\";\\r\\n\\theight: calc(var(--sash-size) * 2);\\r\\n\\twidth: calc(var(--sash-size) * 2);\\r\\n\\tz-index: 100;\\r\\n\\tdisplay: block;\\r\\n\\tcursor: all-scroll;\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\\r\\n\\t> .orthogonal-drag-handle.start,\\r\\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\\r\\n\\t> .orthogonal-drag-handle.end {\\r\\n\\tcursor: nwse-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\\r\\n\\t> .orthogonal-drag-handle.end,\\r\\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\\r\\n\\t> .orthogonal-drag-handle.start {\\r\\n\\tcursor: nesw-resize;\\r\\n}\\r\\n\\r\\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\\r\\n\\tleft: calc(var(--sash-size) * -0.5);\\r\\n\\ttop: calc(var(--sash-size) * -1);\\r\\n}\\r\\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\\r\\n\\tleft: calc(var(--sash-size) * -0.5);\\r\\n\\tbottom: calc(var(--sash-size) * -1);\\r\\n}\\r\\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\\r\\n\\ttop: calc(var(--sash-size) * -0.5);\\r\\n\\tleft: calc(var(--sash-size) * -1);\\r\\n}\\r\\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\\r\\n\\ttop: calc(var(--sash-size) * -0.5);\\r\\n\\tright: calc(var(--sash-size) * -1);\\r\\n}\\r\\n\\r\\n.monaco-sash {\\r\\n\\ttransition: background-color 0.1s ease-out;\\r\\n\\tbackground: transparent;\\r\\n}\\r\\n\\r\\n/** Debug **/\\r\\n\\r\\n.monaco-sash.debug {\\r\\n\\tbackground: cyan;\\r\\n}\\r\\n\\r\\n.monaco-sash.debug.disabled {\\r\\n\\tbackground: rgba(0, 255, 255, 0.2);\\r\\n}\\r\\n\\r\\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\\r\\n\\tbackground: red;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css":
|
||
/*!********************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css ***!
|
||
\********************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* Arrows */\\r\\n.monaco-scrollable-element > .scrollbar > .scra {\\r\\n\\tcursor: pointer;\\r\\n\\tfont-size: 11px !important;\\r\\n}\\r\\n\\r\\n.monaco-scrollable-element > .visible {\\r\\n\\topacity: 1;\\r\\n\\r\\n\\t/* Background rule added for IE9 - to allow clicks on dom node */\\r\\n\\tbackground:rgba(0,0,0,0);\\r\\n\\r\\n\\ttransition: opacity 100ms linear;\\r\\n}\\r\\n.monaco-scrollable-element > .invisible {\\r\\n\\topacity: 0;\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n.monaco-scrollable-element > .invisible.fade {\\r\\n\\ttransition: opacity 800ms linear;\\r\\n}\\r\\n\\r\\n/* Scrollable Content Inset Shadow */\\r\\n.monaco-scrollable-element > .shadow {\\r\\n\\tposition: absolute;\\r\\n\\tdisplay: none;\\r\\n}\\r\\n.monaco-scrollable-element > .shadow.top {\\r\\n\\tdisplay: block;\\r\\n\\ttop: 0;\\r\\n\\tleft: 3px;\\r\\n\\theight: 3px;\\r\\n\\twidth: 100%;\\r\\n\\tbox-shadow: #DDD 0 6px 6px -6px inset;\\r\\n}\\r\\n.monaco-scrollable-element > .shadow.left {\\r\\n\\tdisplay: block;\\r\\n\\ttop: 3px;\\r\\n\\tleft: 0;\\r\\n\\theight: 100%;\\r\\n\\twidth: 3px;\\r\\n\\tbox-shadow: #DDD 6px 0 6px -6px inset;\\r\\n}\\r\\n.monaco-scrollable-element > .shadow.top-left-corner {\\r\\n\\tdisplay: block;\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n\\theight: 3px;\\r\\n\\twidth: 3px;\\r\\n}\\r\\n.monaco-scrollable-element > .shadow.top.left {\\r\\n\\tbox-shadow: #DDD 6px 6px 6px -6px inset;\\r\\n}\\r\\n\\r\\n/* ---------- Default Style ---------- */\\r\\n\\r\\n.vs .monaco-scrollable-element > .scrollbar > .slider {\\r\\n\\tbackground: rgba(100, 100, 100, .4);\\r\\n}\\r\\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\\r\\n\\tbackground: rgba(121, 121, 121, .4);\\r\\n}\\r\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\\r\\n\\tbackground: rgba(111, 195, 223, .6);\\r\\n}\\r\\n\\r\\n.monaco-scrollable-element > .scrollbar > .slider:hover {\\r\\n\\tbackground: rgba(100, 100, 100, .7);\\r\\n}\\r\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\\r\\n\\tbackground: rgba(111, 195, 223, .8);\\r\\n}\\r\\n\\r\\n.monaco-scrollable-element > .scrollbar > .slider.active {\\r\\n\\tbackground: rgba(0, 0, 0, .6);\\r\\n}\\r\\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\\r\\n\\tbackground: rgba(191, 191, 191, .4);\\r\\n}\\r\\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\\r\\n\\tbackground: rgba(111, 195, 223, 1);\\r\\n}\\r\\n\\r\\n.vs-dark .monaco-scrollable-element .shadow.top {\\r\\n\\tbox-shadow: none;\\r\\n}\\r\\n\\r\\n.vs-dark .monaco-scrollable-element .shadow.left {\\r\\n\\tbox-shadow: #000 6px 0 6px -6px inset;\\r\\n}\\r\\n\\r\\n.vs-dark .monaco-scrollable-element .shadow.top.left {\\r\\n\\tbox-shadow: #000 6px 6px 6px -6px inset;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-scrollable-element .shadow.top {\\r\\n\\tbox-shadow: none;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-scrollable-element .shadow.left {\\r\\n\\tbox-shadow: none;\\r\\n}\\r\\n\\r\\n.hc-black .monaco-scrollable-element .shadow.top.left {\\r\\n\\tbox-shadow: none;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css":
|
||
/*!*************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css ***!
|
||
\*************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-split-view2 {\\r\\n\\tposition: relative;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .sash-container {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .sash-container > .monaco-sash {\\r\\n\\tpointer-events: initial;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .monaco-scrollable-element {\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n\\twhite-space: nowrap;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\\r\\n\\twhite-space: initial;\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\\r\\n\\tcontent: ' ';\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n\\tz-index: 5;\\r\\n\\tpointer-events: none;\\r\\n\\tbackground-color: var(--separator-border);\\r\\n}\\r\\n\\r\\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\\r\\n\\theight: 100%;\\r\\n\\twidth: 1px;\\r\\n}\\r\\n\\r\\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\\r\\n\\theight: 1px;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css":
|
||
/*!*****************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css ***!
|
||
\*****************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-table {\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\tposition: relative;\\r\\n\\theight: 100%;\\r\\n\\twidth: 100%;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-table > .monaco-split-view2 {\\r\\n\\tborder-bottom: 1px solid transparent;\\r\\n}\\r\\n\\r\\n.monaco-table > .monaco-list {\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.monaco-table-tr {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-table-th {\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n\\tfont-weight: bold;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-table-th,\\r\\n.monaco-table-td {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tpadding-left: 10px;\\r\\n\\tflex-shrink: 0;\\r\\n\\toverflow: hidden;\\r\\n\\twhite-space: nowrap;\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-table-th[data-col-index=\\\"0\\\"],\\r\\n.monaco-table-td[data-col-index=\\\"0\\\"] {\\r\\n\\tpadding-left: 20px;\\r\\n}\\r\\n\\r\\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\\r\\n\\tcontent: \\\"\\\";\\r\\n\\tposition: absolute;\\r\\n\\tleft: calc(var(--sash-size) / 2);\\r\\n\\twidth: 0;\\r\\n\\tborder-left: 1px solid transparent;\\r\\n}\\r\\n\\r\\n.monaco-table > .monaco-split-view2,\\r\\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\\r\\n\\ttransition: border-color 0.2s ease-out;\\r\\n}\\r\\n/*\\r\\n.monaco-table:hover > .monaco-split-view2,\\r\\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\\r\\n\\tborder-color: rgba(204, 204, 204, 0.2);\\r\\n} */\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css":
|
||
/*!*********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css ***!
|
||
\*********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-tl-row {\\r\\n\\tdisplay: flex;\\r\\n\\theight: 100%;\\r\\n\\talign-items: center;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.monaco-tl-indent {\\r\\n\\theight: 100%;\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft: 16px;\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\\r\\n.hide-arrows .monaco-tl-indent {\\r\\n\\tleft: 12px;\\r\\n}\\r\\n\\r\\n.monaco-tl-indent > .indent-guide {\\r\\n\\tdisplay: inline-block;\\r\\n\\tbox-sizing: border-box;\\r\\n\\theight: 100%;\\r\\n\\tborder-left: 1px solid transparent;\\r\\n}\\r\\n\\r\\n.monaco-tl-indent > .indent-guide {\\r\\n\\ttransition: border-color 0.1s linear;\\r\\n}\\r\\n\\r\\n.monaco-tl-twistie,\\r\\n.monaco-tl-contents {\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-tl-twistie {\\r\\n\\tfont-size: 10px;\\r\\n\\ttext-align: right;\\r\\n\\tpadding-right: 6px;\\r\\n\\tflex-shrink: 0;\\r\\n\\twidth: 16px;\\r\\n\\tdisplay: flex !important;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n\\tcolor: inherit !important;\\r\\n\\ttransform: translateX(3px);\\r\\n}\\r\\n\\r\\n.monaco-tl-contents {\\r\\n\\tflex: 1;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.monaco-tl-twistie::before {\\r\\n\\tborder-radius: 20px;\\r\\n}\\r\\n\\r\\n.monaco-tl-twistie.collapsed::before {\\r\\n\\ttransform: rotate(-90deg);\\r\\n}\\r\\n\\r\\n.monaco-tl-twistie.codicon-tree-item-loading::before {\\r\\n\\t/* Use steps to throttle FPS to reduce CPU usage */\\r\\n\\tanimation: codicon-spin 1.25s steps(30) infinite;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css":
|
||
/*!************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css ***!
|
||
\************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.quick-input-widget {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 600px;\\r\\n\\tz-index: 2000;\\r\\n\\tpadding-bottom: 6px;\\r\\n\\tleft: 50%;\\r\\n\\tmargin-left: -300px;\\r\\n}\\r\\n\\r\\n.quick-input-titlebar {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.quick-input-left-action-bar {\\r\\n\\tdisplay: flex;\\r\\n\\tmargin-left: 4px;\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.quick-input-left-action-bar.monaco-action-bar .actions-container {\\r\\n\\tjustify-content: flex-start;\\r\\n}\\r\\n\\r\\n.quick-input-title {\\r\\n\\tpadding: 3px 0px;\\r\\n\\ttext-align: center;\\r\\n}\\r\\n\\r\\n.quick-input-right-action-bar {\\r\\n\\tdisplay: flex;\\r\\n\\tmargin-right: 4px;\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\\r\\n\\tmargin: 0;\\r\\n\\twidth: 19px;\\r\\n\\theight: 100%;\\r\\n\\tbackground-position: center;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n}\\r\\n\\r\\n.quick-input-description {\\r\\n\\tmargin: 6px;\\r\\n}\\r\\n\\r\\n.quick-input-header .quick-input-description {\\r\\n\\tmargin: 4px 2px;\\r\\n}\\r\\n\\r\\n.quick-input-header {\\r\\n\\tdisplay: flex;\\r\\n\\tpadding: 6px 6px 0px 6px;\\r\\n\\tmargin-bottom: -2px;\\r\\n}\\r\\n\\r\\n.quick-input-widget.hidden-input .quick-input-header {\\r\\n\\t/* reduce margins and paddings when input box hidden */\\r\\n\\tpadding: 0;\\r\\n\\tmargin-bottom: 0;\\r\\n}\\r\\n\\r\\n.quick-input-and-message {\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\tflex-grow: 1;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.quick-input-check-all {\\r\\n\\talign-self: center;\\r\\n\\tmargin: 0;\\r\\n}\\r\\n\\r\\n.quick-input-filter {\\r\\n\\tflex-grow: 1;\\r\\n\\tdisplay: flex;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.quick-input-box {\\r\\n\\tflex-grow: 1;\\r\\n}\\r\\n\\r\\n.quick-input-widget.show-checkboxes .quick-input-box,\\r\\n.quick-input-widget.show-checkboxes .quick-input-message {\\r\\n\\tmargin-left: 5px;\\r\\n}\\r\\n\\r\\n.quick-input-visible-count {\\r\\n\\tposition: absolute;\\r\\n\\tleft: -10000px;\\r\\n}\\r\\n\\r\\n.quick-input-count {\\r\\n\\talign-self: center;\\r\\n\\tposition: absolute;\\r\\n\\tright: 4px;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.quick-input-count .monaco-count-badge {\\r\\n\\tvertical-align: middle;\\r\\n\\tpadding: 2px 4px;\\r\\n\\tborder-radius: 2px;\\r\\n\\tmin-height: auto;\\r\\n\\tline-height: normal;\\r\\n}\\r\\n\\r\\n.quick-input-action {\\r\\n\\tmargin-left: 6px;\\r\\n}\\r\\n\\r\\n.quick-input-action .monaco-text-button {\\r\\n\\tfont-size: 11px;\\r\\n\\tpadding: 0 6px;\\r\\n\\tdisplay: flex;\\r\\n\\theight: 27.5px;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.quick-input-message {\\r\\n\\tmargin-top: -1px;\\r\\n\\tpadding: 5px 5px 2px 5px;\\r\\n}\\r\\n\\r\\n.quick-input-message > .codicon {\\r\\n\\tmargin: 0 0.2em;\\r\\n\\tvertical-align: text-bottom;\\r\\n}\\r\\n\\r\\n.quick-input-progress.monaco-progress-container {\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.quick-input-progress.monaco-progress-container,\\r\\n.quick-input-progress.monaco-progress-container .progress-bit {\\r\\n\\theight: 2px;\\r\\n}\\r\\n\\r\\n.quick-input-list {\\r\\n\\tline-height: 22px;\\r\\n\\tmargin-top: 6px;\\r\\n}\\r\\n\\r\\n.quick-input-widget.hidden-input .quick-input-list {\\r\\n\\tmargin-top: 0; /* reduce margins when input box hidden */\\r\\n}\\r\\n\\r\\n.quick-input-list .monaco-list {\\r\\n\\toverflow: hidden;\\r\\n\\tmax-height: calc(20 * 22px);\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry {\\r\\n\\tbox-sizing: border-box;\\r\\n\\toverflow: hidden;\\r\\n\\tdisplay: flex;\\r\\n\\theight: 100%;\\r\\n\\tpadding: 0 6px;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\\r\\n\\tborder-top-width: 1px;\\r\\n\\tborder-top-style: solid;\\r\\n}\\r\\n\\r\\n.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border {\\r\\n\\tborder-top-style: none;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-label {\\r\\n\\toverflow: hidden;\\r\\n\\tdisplay: flex;\\r\\n\\theight: 100%;\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-checkbox {\\r\\n\\talign-self: center;\\r\\n\\tmargin: 0;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-rows {\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\theight: 100%;\\r\\n\\tflex: 1;\\r\\n\\tmargin-left: 5px;\\r\\n}\\r\\n\\r\\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\\r\\n\\tmargin-left: 10px;\\r\\n}\\r\\n\\r\\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\\r\\n\\tdisplay: inline;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\\r\\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\\r\\n\\tflex: 1; /* make sure the icon label grows within the row */\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\\r\\n\\tvertical-align: sub;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\\r\\n\\topacity: 1;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\\r\\n\\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-label-meta {\\r\\n\\topacity: 0.7;\\r\\n\\tline-height: normal;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.quick-input-list .monaco-highlighted-label .highlight {\\r\\n\\tfont-weight: bold;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\\r\\n\\tmargin-right: 8px; /* separate from keybindings or actions */\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar {\\r\\n\\tdisplay: flex;\\r\\n\\tflex: 0;\\r\\n\\toverflow: visible;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\\r\\n\\t/*\\r\\n\\t * By default, actions in the quick input action bar are hidden\\r\\n\\t * until hovered over them or selected.\\r\\n\\t */\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\\r\\n\\tmargin: 0;\\r\\n\\theight: 100%;\\r\\n\\tpadding: 0 2px;\\r\\n\\tvertical-align: middle;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar {\\r\\n\\tmargin-top: 1px;\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar {\\r\\n\\tmargin-right: 4px; /* separate from scrollbar */\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\\r\\n\\tmargin-right: 4px; /* separate actions */\\r\\n}\\r\\n\\r\\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\\r\\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\\r\\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css":
|
||
/*!*******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css ***!
|
||
\*******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .inputarea {\\r\\n\\tmin-width: 0;\\r\\n\\tmin-height: 0;\\r\\n\\tmargin: 0;\\r\\n\\tpadding: 0;\\r\\n\\tposition: absolute;\\r\\n\\toutline: none !important;\\r\\n\\tresize: none;\\r\\n\\tborder: none;\\r\\n\\toverflow: hidden;\\r\\n\\tcolor: transparent;\\r\\n\\tbackground-color: transparent;\\r\\n}\\r\\n/*.monaco-editor .inputarea {\\r\\n\\tposition: fixed !important;\\r\\n\\twidth: 800px !important;\\r\\n\\theight: 500px !important;\\r\\n\\ttop: initial !important;\\r\\n\\tleft: initial !important;\\r\\n\\tbottom: 0 !important;\\r\\n\\tright: 0 !important;\\r\\n\\tcolor: black !important;\\r\\n\\tbackground: white !important;\\r\\n\\tline-height: 15px !important;\\r\\n\\tfont-size: 14px !important;\\r\\n}*/\\r\\n.monaco-editor .inputarea.ime-input {\\r\\n\\tz-index: 10;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css":
|
||
/*!********************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css ***!
|
||
\********************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .view-overlays .current-line {\\r\\n\\tdisplay: block;\\r\\n\\tposition: absolute;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n.monaco-editor .margin-view-overlays .current-line {\\r\\n\\tdisplay: block;\\r\\n\\tposition: absolute;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\\r\\n\\tborder-right: 0;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css":
|
||
/*!**************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css ***!
|
||
\**************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcdr = core decorations rendering (div)\\r\\n*/\\r\\n.monaco-editor .lines-content .cdr {\\r\\n\\tposition: absolute;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css":
|
||
/*!**************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css ***!
|
||
\**************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .glyph-margin {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcgmr = core glyph margin rendering (div)\\r\\n*/\\r\\n.monaco-editor .margin-view-overlays .cgmr {\\r\\n\\tposition: absolute;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css":
|
||
/*!****************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css ***!
|
||
\****************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcigr = core ident guides rendering (div)\\r\\n*/\\r\\n.monaco-editor .lines-content .cigr {\\r\\n\\tposition: absolute;\\r\\n}\\r\\n.monaco-editor .lines-content .cigra {\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css":
|
||
/*!**************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css ***!
|
||
\**************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .margin-view-overlays .line-numbers {\\r\\n\\tfont-variant-numeric: tabular-nums;\\r\\n\\tposition: absolute;\\r\\n\\ttext-align: right;\\r\\n\\tdisplay: inline-block;\\r\\n\\tvertical-align: middle;\\r\\n\\tbox-sizing: border-box;\\r\\n\\tcursor: default;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .relative-current-line-number {\\r\\n\\ttext-align: left;\\r\\n\\tdisplay: inline-block;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\\r\\n\\tmargin-top: 1px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css":
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css ***!
|
||
\******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* Uncomment to see lines flashing when they're painted */\\r\\n/*.monaco-editor .view-lines > .view-line {\\r\\n\\tbackground-color: none;\\r\\n\\tanimation-name: flash-background;\\r\\n\\tanimation-duration: 800ms;\\r\\n}\\r\\n@keyframes flash-background {\\r\\n\\t0% { background-color: lightgreen; }\\r\\n\\t100% { background-color: none }\\r\\n}*/\\r\\n\\r\\n.monaco-editor.no-user-select .lines-content,\\r\\n.monaco-editor.no-user-select .view-line,\\r\\n.monaco-editor.no-user-select .view-lines {\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .view-lines {\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .view-line {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .mtkz {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n/* TODO@tokenization bootstrap fix */\\r\\n/*.monaco-editor .view-line > span > span {\\r\\n\\tfloat: none;\\r\\n\\tmin-height: inherit;\\r\\n\\tmargin-left: inherit;\\r\\n}*/\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css":
|
||
/*!************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css ***!
|
||
\************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n.monaco-editor .lines-decorations {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tbackground: white;\\r\\n}\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcldr = core lines decorations rendering (div)\\r\\n*/\\r\\n.monaco-editor .margin-view-overlays .cldr {\\r\\n\\tposition: absolute;\\r\\n\\theight: 100%;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css":
|
||
/*!**************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css ***!
|
||
\**************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcmdr = core margin decorations rendering (div)\\r\\n*/\\r\\n.monaco-editor .margin-view-overlays .cmdr {\\r\\n\\tposition: absolute;\\r\\n\\tleft: 0;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css":
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***!
|
||
\******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* START cover the case that slider is visible on mouseover */\\r\\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\\r\\n\\topacity: 0;\\r\\n\\ttransition: opacity 100ms linear;\\r\\n}\\r\\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\\r\\n\\topacity: 1;\\r\\n}\\r\\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\\r\\n\\topacity: 1;\\r\\n}\\r\\n/* END cover the case that slider is visible on mouseover */\\r\\n\\r\\n.monaco-editor .minimap-shadow-hidden {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 0;\\r\\n}\\r\\n.monaco-editor .minimap-shadow-visible {\\r\\n\\tposition: absolute;\\r\\n\\tleft: -6px;\\r\\n\\twidth: 6px;\\r\\n}\\r\\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\\r\\n\\tposition: absolute;\\r\\n\\tleft: -1px;\\r\\n\\twidth: 1px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css":
|
||
/*!********************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css ***!
|
||
\********************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n.monaco-editor .overlayWidgets {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft:0;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .view-ruler {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css":
|
||
/*!************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css ***!
|
||
\************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .scroll-decoration {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n\\theight: 6px;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css":
|
||
/*!************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css ***!
|
||
\************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/*\\r\\n\\tKeeping name short for faster parsing.\\r\\n\\tcslr = core selections layer rendering (div)\\r\\n*/\\r\\n.monaco-editor .lines-content .cslr {\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.monaco-editor\\t\\t\\t.top-left-radius\\t\\t{ border-top-left-radius: 3px; }\\r\\n.monaco-editor\\t\\t\\t.bottom-left-radius\\t\\t{ border-bottom-left-radius: 3px; }\\r\\n.monaco-editor\\t\\t\\t.top-right-radius\\t\\t{ border-top-right-radius: 3px; }\\r\\n.monaco-editor\\t\\t\\t.bottom-right-radius\\t{ border-bottom-right-radius: 3px; }\\r\\n\\r\\n.monaco-editor.hc-black .top-left-radius\\t\\t{ border-top-left-radius: 0; }\\r\\n.monaco-editor.hc-black .bottom-left-radius\\t\\t{ border-bottom-left-radius: 0; }\\r\\n.monaco-editor.hc-black .top-right-radius\\t\\t{ border-top-right-radius: 0; }\\r\\n.monaco-editor.hc-black .bottom-right-radius\\t{ border-bottom-right-radius: 0; }\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css":
|
||
/*!**************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css ***!
|
||
\**************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n.monaco-editor .cursors-layer {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .cursors-layer > .cursor {\\r\\n\\tposition: absolute;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n/* -- smooth-caret-animation -- */\\r\\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\\r\\n\\ttransition: all 80ms;\\r\\n}\\r\\n\\r\\n/* -- block-outline-style -- */\\r\\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tbackground: transparent !important;\\r\\n\\tborder-style: solid;\\r\\n\\tborder-width: 1px;\\r\\n}\\r\\n\\r\\n/* -- underline-style -- */\\r\\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\\r\\n\\tborder-bottom-width: 2px;\\r\\n\\tborder-bottom-style: solid;\\r\\n\\tbackground: transparent !important;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n/* -- underline-thin-style -- */\\r\\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\\r\\n\\tborder-bottom-width: 1px;\\r\\n\\tborder-bottom-style: solid;\\r\\n\\tbackground: transparent !important;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n@keyframes monaco-cursor-smooth {\\r\\n\\t0%,\\r\\n\\t20% {\\r\\n\\t\\topacity: 1;\\r\\n\\t}\\r\\n\\t60%,\\r\\n\\t100% {\\r\\n\\t\\topacity: 0;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n@keyframes monaco-cursor-phase {\\r\\n\\t0%,\\r\\n\\t20% {\\r\\n\\t\\topacity: 1;\\r\\n\\t}\\r\\n\\t90%,\\r\\n\\t100% {\\r\\n\\t\\topacity: 0;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n@keyframes monaco-cursor-expand {\\r\\n\\t0%,\\r\\n\\t20% {\\r\\n\\t\\ttransform: scaleY(1);\\r\\n\\t}\\r\\n\\t80%,\\r\\n\\t100% {\\r\\n\\t\\ttransform: scaleY(0);\\r\\n\\t}\\r\\n}\\r\\n\\r\\n.cursor-smooth {\\r\\n\\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\\r\\n}\\r\\n\\r\\n.cursor-phase {\\r\\n\\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\\r\\n}\\r\\n\\r\\n.cursor-expand > .cursor {\\r\\n\\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n/* ---------- DiffEditor ---------- */\\r\\n\\r\\n.monaco-diff-editor .diffOverview {\\r\\n\\tz-index: 9;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diffOverview .diffViewport {\\r\\n\\tz-index: 10;\\r\\n}\\r\\n\\r\\n/* colors not externalized: using transparancy on background */\\r\\n.monaco-diff-editor.vs\\t\\t\\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\\r\\n.monaco-diff-editor.vs-dark\\t\\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\\r\\n\\r\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\\t\\t.scrollbar { background: rgba(0,0,0,0); }\\r\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\\t.scrollbar { background: rgba(0,0,0,0); }\\r\\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\\t.scrollbar { background: none; }\\r\\n\\r\\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\\r\\n\\tz-index: 10;\\r\\n}\\r\\n.modified-in-monaco-diff-editor\\t\\t\\t\\t.slider.active { background: rgba(171, 171, 171, .4); }\\r\\n.modified-in-monaco-diff-editor.hc-black\\t.slider.active { background: none; }\\r\\n\\r\\n/* ---------- Diff ---------- */\\r\\n\\r\\n.monaco-editor .insert-sign,\\r\\n.monaco-diff-editor .insert-sign,\\r\\n.monaco-editor .delete-sign,\\r\\n.monaco-diff-editor .delete-sign {\\r\\n\\tfont-size: 11px !important;\\r\\n\\topacity: 0.7 !important;\\r\\n\\tdisplay: flex !important;\\r\\n\\talign-items: center;\\r\\n}\\r\\n.monaco-editor.hc-black .insert-sign,\\r\\n.monaco-diff-editor.hc-black .insert-sign,\\r\\n.monaco-editor.hc-black .delete-sign,\\r\\n.monaco-diff-editor.hc-black .delete-sign {\\r\\n\\topacity: 1;\\r\\n}\\r\\n\\r\\n.monaco-editor .inline-deleted-margin-view-zone {\\r\\n\\ttext-align: right;\\r\\n}\\r\\n.monaco-editor .inline-added-margin-view-zone {\\r\\n\\ttext-align: right;\\r\\n}\\r\\n\\r\\n/* ---------- Inline Diff ---------- */\\r\\n\\r\\n.monaco-editor .view-zones .view-lines .view-line span {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-diff-editor .diff-review-line-number {\\r\\n\\ttext-align: right;\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review {\\r\\n\\tposition: absolute;\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-summary {\\r\\n\\tpadding-left: 10px;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-shadow {\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-row {\\r\\n\\twhite-space: pre;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-table {\\r\\n\\tdisplay: table;\\r\\n\\tmin-width: 100%;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-row {\\r\\n\\tdisplay: table-row;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-spacer {\\r\\n\\tdisplay: inline-block;\\r\\n\\twidth: 10px;\\r\\n\\tvertical-align: middle;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-spacer > .codicon {\\r\\n\\tfont-size: 9px !important;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-actions {\\r\\n\\tdisplay: inline-block;\\r\\n\\tposition: absolute;\\r\\n\\tright: 10px;\\r\\n\\ttop: 2px;\\r\\n}\\r\\n\\r\\n.monaco-diff-editor .diff-review-actions .action-label {\\r\\n\\twidth: 16px;\\r\\n\\theight: 16px;\\r\\n\\tmargin: 2px 0;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css":
|
||
/*!************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css ***!
|
||
\************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* -------------------- IE10 remove auto clear button -------------------- */\\r\\n\\r\\n::-ms-clear {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n/* All widgets */\\r\\n/* I am not a big fan of this rule */\\r\\n.monaco-editor .editor-widget input {\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\\r\\n/* -------------------- Editor -------------------- */\\r\\n\\r\\n.monaco-editor {\\r\\n\\tposition: relative;\\r\\n\\toverflow: visible;\\r\\n\\t-webkit-text-size-adjust: 100%;\\r\\n}\\r\\n\\r\\n/* -------------------- Misc -------------------- */\\r\\n\\r\\n.monaco-editor .overflow-guard {\\r\\n\\tposition: relative;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.monaco-editor .view-overlays {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n/*\\r\\n.monaco-editor .auto-closed-character {\\r\\n\\topacity: 0.3;\\r\\n}\\r\\n*/\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css":
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css ***!
|
||
\******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .selection-anchor {\\r\\n\\tbackground-color: #007ACC;\\r\\n\\twidth: 2px !important;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css":
|
||
/*!************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css ***!
|
||
\************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .bracket-match {\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css":
|
||
/*!*******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css ***!
|
||
\*******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .contentWidgets .codicon-light-bulb,\\r\\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\\r\\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .codelens-decoration {\\r\\n\\toverflow: hidden;\\r\\n\\tdisplay: inline-block;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration > span,\\r\\n.monaco-editor .codelens-decoration > a {\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n\\twhite-space: nowrap;\\r\\n\\tvertical-align: sub;\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration > a {\\r\\n\\ttext-decoration: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration > a:hover {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration .codicon {\\r\\n\\tvertical-align: middle;\\r\\n\\tcolor: currentColor !important;\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n@keyframes fadein {\\r\\n\\t0% { opacity: 0; visibility: visible;}\\r\\n\\t100% { opacity: 1; }\\r\\n}\\r\\n\\r\\n.monaco-editor .codelens-decoration.fadein {\\r\\n\\tanimation: fadein 0.1s linear;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.colorpicker-widget {\\r\\n\\theight: 190px;\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .colorpicker-hover:focus {\\r\\n\\toutline: none;\\r\\n}\\r\\n\\r\\n\\r\\n/* Header */\\r\\n\\r\\n.colorpicker-header {\\r\\n\\tdisplay: flex;\\r\\n\\theight: 24px;\\r\\n\\tposition: relative;\\r\\n\\tbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\\\");\\r\\n\\tbackground-size: 9px 9px;\\r\\n\\timage-rendering: pixelated;\\r\\n}\\r\\n\\r\\n.colorpicker-header .picked-color {\\r\\n\\twidth: 216px;\\r\\n\\ttext-align: center;\\r\\n\\tline-height: 24px;\\r\\n\\tcursor: pointer;\\r\\n\\tcolor: white;\\r\\n\\tflex: 1;\\r\\n\\ttext-align: center;\\r\\n}\\r\\n\\r\\n.colorpicker-header .picked-color.light {\\r\\n\\tcolor: black;\\r\\n}\\r\\n\\r\\n.colorpicker-header .original-color {\\r\\n\\twidth: 74px;\\r\\n\\tz-index: inherit;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n\\r\\n/* Body */\\r\\n\\r\\n.colorpicker-body {\\r\\n\\tdisplay: flex;\\r\\n\\tpadding: 8px;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.colorpicker-body .saturation-wrap {\\r\\n\\toverflow: hidden;\\r\\n\\theight: 150px;\\r\\n\\tposition: relative;\\r\\n\\tmin-width: 220px;\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.colorpicker-body .saturation-box {\\r\\n\\theight: 150px;\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.colorpicker-body .saturation-selection {\\r\\n\\twidth: 9px;\\r\\n\\theight: 9px;\\r\\n\\tmargin: -5px 0 0 -5px;\\r\\n\\tborder: 1px solid rgb(255, 255, 255);\\r\\n\\tborder-radius: 100%;\\r\\n\\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.colorpicker-body .strip {\\r\\n\\twidth: 25px;\\r\\n\\theight: 150px;\\r\\n}\\r\\n\\r\\n.colorpicker-body .hue-strip {\\r\\n\\tposition: relative;\\r\\n\\tmargin-left: 8px;\\r\\n\\tcursor: grab;\\r\\n\\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\\r\\n}\\r\\n\\r\\n.colorpicker-body .opacity-strip {\\r\\n\\tposition: relative;\\r\\n\\tmargin-left: 8px;\\r\\n\\tcursor: grab;\\r\\n\\tbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\\\");\\r\\n\\tbackground-size: 9px 9px;\\r\\n\\timage-rendering: pixelated;\\r\\n}\\r\\n\\r\\n.colorpicker-body .strip.grabbing {\\r\\n\\tcursor: grabbing;\\r\\n}\\r\\n\\r\\n.colorpicker-body .slider {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft: -2px;\\r\\n\\twidth: calc(100% + 4px);\\r\\n\\theight: 4px;\\r\\n\\tbox-sizing: border-box;\\r\\n\\tborder: 1px solid rgba(255, 255, 255, 0.71);\\r\\n\\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\\r\\n}\\r\\n\\r\\n.colorpicker-body .strip .overlay {\\r\\n\\theight: 150px;\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css":
|
||
/*!************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css ***!
|
||
\************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor.vs .dnd-target {\\r\\n\\tborder-right: 2px dotted black;\\r\\n\\tcolor: white; /* opposite of black */\\r\\n}\\r\\n.monaco-editor.vs-dark .dnd-target {\\r\\n\\tborder-right: 2px dotted #AEAFAD;\\r\\n\\tcolor: #51504f; /* opposite of #AEAFAD */\\r\\n}\\r\\n.monaco-editor.hc-black .dnd-target {\\r\\n\\tborder-right: 2px dotted #fff;\\r\\n\\tcolor: #000; /* opposite of #fff */\\r\\n}\\r\\n\\r\\n.monaco-editor.mouse-default .view-lines,\\r\\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\\r\\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\\r\\n\\tcursor: default;\\r\\n}\\r\\n.monaco-editor.mouse-copy .view-lines,\\r\\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\\r\\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\\r\\n\\tcursor: copy;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css":
|
||
/*!********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css ***!
|
||
\********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* Find widget */\\r\\n.monaco-editor .find-widget {\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 50;\\r\\n\\theight: 33px;\\r\\n\\toverflow: hidden;\\r\\n\\tline-height: 19px;\\r\\n\\ttransition: transform 200ms linear;\\r\\n\\tpadding: 0 4px;\\r\\n\\tbox-sizing: border-box;\\r\\n\\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget textarea {\\r\\n\\tmargin: 0px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget.hiddenEditor {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n/* Find widget when replace is toggled on */\\r\\n.monaco-editor .find-widget.replaceToggled > .replace-part {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget.visible {\\r\\n\\ttransform: translateY(0);\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\\r\\n\\toutline: 1px solid -webkit-focus-ring-color;\\r\\n\\toutline-offset: -1px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-inputbox .input {\\r\\n\\tbackground-color: transparent;\\r\\n\\tmin-height: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-findInput .input {\\r\\n\\tfont-size: 13px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .find-part,\\r\\n.monaco-editor .find-widget > .replace-part {\\r\\n\\tmargin: 4px 0 0 17px;\\r\\n\\tfont-size: 12px;\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\\r\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\\r\\n\\tmin-height: 25px;\\r\\n}\\r\\n\\r\\n\\r\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\\r\\n\\tpadding-right: 22px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\\r\\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\\r\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\\r\\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\\r\\n\\tpadding-top: 2px;\\r\\n\\tpadding-bottom: 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .find-part .find-actions {\\r\\n\\theight: 25px;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .replace-part .replace-actions {\\r\\n\\theight: 25px;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-findInput {\\r\\n\\tvertical-align: middle;\\r\\n\\tdisplay: flex;\\r\\n\\tflex:1;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\\r\\n\\t/* Make sure textarea inherits the width correctly */\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\\r\\n\\t/* Hide vertical scrollbar */\\r\\n\\topacity: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .matchesCount {\\r\\n\\tdisplay: flex;\\r\\n\\tflex: initial;\\r\\n\\tmargin: 0 0 0 3px;\\r\\n\\tpadding: 2px 0 0 2px;\\r\\n\\theight: 25px;\\r\\n\\tvertical-align: middle;\\r\\n\\tbox-sizing: border-box;\\r\\n\\ttext-align: center;\\r\\n\\tline-height: 23px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .button {\\r\\n\\twidth: 20px;\\r\\n\\theight: 20px;\\r\\n\\tdisplay: flex;\\r\\n\\tflex: initial;\\r\\n\\tmargin-left: 3px;\\r\\n\\tbackground-position: center center;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tcursor: pointer;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .button.left {\\r\\n\\tmargin-left: 0;\\r\\n\\tmargin-right: 3px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .button.wide {\\r\\n\\twidth: auto;\\r\\n\\tpadding: 1px 6px;\\r\\n\\ttop: -1px;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .button.toggle {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tleft: 3px;\\r\\n\\twidth: 18px;\\r\\n\\theight: 100%;\\r\\n\\tbox-sizing: border-box;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .button.toggle.disabled {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .disabled {\\r\\n\\topacity: 0.3;\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .replace-part {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\\r\\n\\tposition: relative;\\r\\n\\tdisplay: flex;\\r\\n\\tvertical-align: middle;\\r\\n\\tflex: auto;\\r\\n\\tflex-grow: 0;\\r\\n\\tflex-shrink: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 3px;\\r\\n\\tright: 2px;\\r\\n}\\r\\n\\r\\n/* REDUCED */\\r\\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\\r\\n\\tdisplay:none;\\r\\n}\\r\\n\\r\\n/* NARROW (SMALLER THAN REDUCED) */\\r\\n.monaco-editor .find-widget.narrow-find-widget {\\r\\n\\tmax-width: 257px !important;\\r\\n}\\r\\n\\r\\n/* COLLAPSED (SMALLER THAN NARROW) */\\r\\n.monaco-editor .find-widget.collapsed-find-widget {\\r\\n\\tmax-width: 170px !important;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\\r\\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\\r\\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\\r\\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\\r\\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\\r\\n\\tdisplay:none;\\r\\n}\\r\\n\\r\\n.monaco-editor .findMatch {\\r\\n\\tanimation-duration: 0;\\r\\n\\tanimation-name: inherit !important;\\r\\n}\\r\\n\\r\\n.monaco-editor .find-widget .monaco-sash {\\r\\n\\tleft: 0 !important;\\r\\n}\\r\\n\\r\\n.monaco-editor.hc-black .find-widget .button:before {\\r\\n\\tposition: relative;\\r\\n\\ttop: 1px;\\r\\n\\tleft: 2px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css":
|
||
/*!********************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css ***!
|
||
\********************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\\r\\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\\r\\n\\tcursor: pointer;\\r\\n\\topacity: 0;\\r\\n\\ttransition: opacity 0.5s;\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tjustify-content: center;\\r\\n\\tfont-size: 140%;\\r\\n\\tmargin-left: 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .margin-view-overlays:hover .codicon,\\r\\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\\r\\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\\r\\n\\topacity: 1;\\r\\n}\\r\\n\\r\\n.monaco-editor .inline-folded:after {\\r\\n\\tcolor: grey;\\r\\n\\tmargin: 0.1em 0.2em 0 0.2em;\\r\\n\\tcontent: \\\"⋯\\\";\\r\\n\\tdisplay: inline;\\r\\n\\tline-height: 1em;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css":
|
||
/*!************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css ***!
|
||
\************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* marker zone */\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\\r\\n\\tdisplay: inline-block;\\r\\n\\tvertical-align: text-top;\\r\\n\\tmargin-right: 4px;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget {\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget > .stale {\\r\\n\\topacity: 0.6;\\r\\n\\tfont-style: italic;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .title {\\r\\n\\tdisplay: inline-block;\\r\\n\\tpadding-right: 5px;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer {\\r\\n\\tposition: absolute;\\r\\n\\twhite-space: pre;\\r\\n\\tuser-select: text;\\r\\n\\t-webkit-user-select: text;\\r\\n\\t-ms-user-select: text;\\r\\n\\tpadding: 8px 12px 0 20px;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message {\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\\r\\n\\tpadding-left: 6px;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\\r\\n\\topacity: 0.6;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\\r\\n\\topacity: 0.6;\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\\r\\n\\tcontent: '(';\\r\\n}\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\\r\\n\\tcontent: ')';\\r\\n}\\r\\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\\r\\n\\ttext-decoration: underline;\\r\\n\\t/** Hack to force underline to show **/\\r\\n\\tborder-bottom: 1px solid transparent;\\r\\n\\ttext-underline-position: under;\\r\\n}\\r\\n\\r\\n.monaco-editor .marker-widget .descriptioncontainer .filename {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css":
|
||
/*!*********************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css ***!
|
||
\*********************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .goto-definition-link {\\r\\n\\ttext-decoration: underline;\\r\\n\\tcursor: pointer;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css":
|
||
/*!*************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css ***!
|
||
\*************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* -- zone widget */\\r\\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\\r\\n\\tborder-top-width: 1px;\\r\\n\\tborder-bottom-width: 1px;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .inline {\\r\\n\\tdisplay: inline-block;\\r\\n\\tvertical-align: top;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .messages {\\r\\n\\theight: 100%;\\r\\n\\twidth: 100%;\\r\\n\\ttext-align: center;\\r\\n\\tpadding: 3em 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .ref-tree {\\r\\n\\tline-height: 23px;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .ref-tree .reference {\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\\r\\n\\tdisplay: inline-flex;\\r\\n\\twidth: 100%;\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\\r\\n\\tcolor: inherit !important;\\r\\n}\\r\\n\\r\\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\\r\\n\\tmargin-right: 12px;\\r\\n\\tmargin-left: auto;\\r\\n}\\r\\n\\r\\n/* High Contrast Theming */\\r\\n\\r\\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\\r\\n\\tfont-weight: bold;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css":
|
||
/*!****************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css ***!
|
||
\****************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n.monaco-editor .detected-link,\\r\\n.monaco-editor .detected-link-active {\\r\\n\\ttext-decoration: underline;\\r\\n\\ttext-underline-position: under;\\r\\n}\\r\\n\\r\\n.monaco-editor .detected-link-active {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css":
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css ***!
|
||
\******************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage {\\r\\n\\tpadding-bottom: 8px;\\r\\n\\tz-index: 10000;\\r\\n}\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage.below {\\r\\n\\tpadding-bottom: 0;\\r\\n\\tpadding-top: 8px;\\r\\n\\tz-index: 10000;\\r\\n}\\r\\n\\r\\n@keyframes fadeIn {\\r\\n\\tfrom { opacity: 0; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\\r\\n\\tanimation: fadeIn 150ms ease-out;\\r\\n}\\r\\n\\r\\n@keyframes fadeOut {\\r\\n\\tfrom { opacity: 1; }\\r\\n\\tto { opacity: 0; }\\r\\n}\\r\\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\\r\\n\\tanimation: fadeOut 100ms ease-out;\\r\\n}\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage .message {\\r\\n\\tpadding: 1px 4px;\\r\\n}\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage .anchor {\\r\\n\\twidth: 0 !important;\\r\\n\\theight: 0 !important;\\r\\n\\tborder-color: transparent;\\r\\n\\tborder-style: solid;\\r\\n\\tz-index: 1000;\\r\\n\\tborder-width: 8px;\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\\r\\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\\r\\n\\tdisplay: inherit;\\r\\n\\ttop: -8px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css":
|
||
/*!**********************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css ***!
|
||
\**********************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .parameter-hints-widget {\\r\\n\\tz-index: 10;\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\tline-height: 1.5em;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget > .phwrapper {\\r\\n\\tmax-width: 440px;\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: row;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget.multiple {\\r\\n\\tmin-height: 3.3em;\\r\\n\\tpadding: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget.visible {\\r\\n\\ttransition: left .05s ease-in-out;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget p,\\r\\n.monaco-editor .parameter-hints-widget ul {\\r\\n\\tmargin: 8px 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\\r\\n.monaco-editor .parameter-hints-widget .body {\\r\\n\\tdisplay: flex;\\r\\n\\tflex: 1;\\r\\n\\tflex-direction: column;\\r\\n\\tmin-height: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .signature {\\r\\n\\tpadding: 4px 5px;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs {\\r\\n\\tpadding: 0 10px 0 5px;\\r\\n\\twhite-space: pre-wrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs.empty {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\\r\\n\\twhite-space: initial;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs .code {\\r\\n\\twhite-space: pre-wrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .docs code {\\r\\n\\tborder-radius: 3px;\\r\\n\\tpadding: 0 0.4em;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .controls {\\r\\n\\tdisplay: none;\\r\\n\\tflex-direction: column;\\r\\n\\talign-items: center;\\r\\n\\tmin-width: 22px;\\r\\n\\tjustify-content: flex-end;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget.multiple .controls {\\r\\n\\tdisplay: flex;\\r\\n\\tpadding: 0 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget.multiple .button {\\r\\n\\twidth: 16px;\\r\\n\\theight: 16px;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .button.previous {\\r\\n\\tbottom: 24px;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .overloads {\\r\\n\\ttext-align: center;\\r\\n\\theight: 12px;\\r\\n\\tline-height: 12px;\\r\\n\\topacity: 0.5;\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\\r\\n\\tfont-weight: bold;\\r\\n\\ttext-decoration: underline;\\r\\n}\\r\\n\\r\\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\\r\\n\\tfont-weight: bold;\\r\\n\\tmargin-right: 0.5em;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css":
|
||
/*!**********************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css ***!
|
||
\**********************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .peekview-widget .head {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tfont-size: 13px;\\r\\n\\tmargin-left: 20px;\\r\\n\\tcursor: pointer;\\r\\n\\tmin-width: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\\r\\n\\tfont-size: 0.9em;\\r\\n\\tmargin-left: 0.5em;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .meta {\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .filename {\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\\r\\n\\tcontent: '-';\\r\\n\\tpadding: 0 0.3em;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions {\\r\\n\\tflex: 1;\\r\\n\\ttext-align: right;\\r\\n\\tpadding-right: 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\\r\\n\\tmargin-left: 4px;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\\r\\n\\twidth: 16px;\\r\\n\\theight: 100%;\\r\\n\\tmargin: 0;\\r\\n\\tline-height: inherit;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tbackground-position: center center;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.codicon {\\r\\n\\tmargin: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget > .body {\\r\\n\\tborder-top: 1px solid;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\\r\\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\\r\\n\\tmargin-right: 4px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css":
|
||
/*!****************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css ***!
|
||
\****************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .rename-box {\\r\\n\\tz-index: 100;\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\\r\\n.monaco-editor .rename-box.preview {\\r\\n\\tpadding: 3px 3px 0 3px;\\r\\n}\\r\\n\\r\\n.monaco-editor .rename-box .rename-input {\\r\\n\\tpadding: 3px;\\r\\n\\twidth: calc(100% - 6px);\\r\\n}\\r\\n\\r\\n.monaco-editor .rename-box .rename-label {\\r\\n\\tdisplay: none;\\r\\n\\topacity: .8;\\r\\n}\\r\\n\\r\\n.monaco-editor .rename-box.preview .rename-label {\\r\\n\\tdisplay: inherit;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css":
|
||
/*!***************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css ***!
|
||
\***************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .snippet-placeholder {\\r\\n\\tmin-width: 2px;\\r\\n\\toutline-style: solid;\\r\\n\\toutline-width: 1px;\\r\\n}\\r\\n\\r\\n.monaco-editor .finish-snippet-placeholder {\\r\\n\\toutline-style: solid;\\r\\n\\toutline-width: 1px;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css":
|
||
/*!**************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css ***!
|
||
\**************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n/* Suggest widget*/\\r\\n\\r\\n.monaco-editor .suggest-widget {\\r\\n\\twidth: 430px;\\r\\n\\tz-index: 40;\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.message {\\r\\n\\tflex-direction: row;\\r\\n\\talign-items: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget,\\r\\n.monaco-editor .suggest-details {\\r\\n\\tflex: 0 1 auto;\\r\\n\\twidth: 100%;\\r\\n\\tborder-style: solid;\\r\\n\\tborder-width: 1px;\\r\\n}\\r\\n\\r\\n.monaco-editor.hc-black .suggest-widget,\\r\\n.monaco-editor.hc-black .suggest-details {\\r\\n\\tborder-width: 2px;\\r\\n}\\r\\n\\r\\n/* Styles for status bar part */\\r\\n\\r\\n\\r\\n.monaco-editor .suggest-widget .suggest-status-bar {\\r\\n\\tbox-sizing: border-box;\\r\\n\\tdisplay: none;\\r\\n\\tflex-flow: row nowrap;\\r\\n\\tjustify-content: space-between;\\r\\n\\twidth: 100%;\\r\\n\\tfont-size: 80%;\\r\\n\\tpadding: 0 4px 0 4px;\\r\\n\\tborder-top: 1px solid transparent;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .suggest-status-bar .left {\\r\\n\\tpadding-right: 8px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\\r\\n\\topacity: 0.5;\\r\\n\\tcolor: inherit;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\\r\\n\\tmargin-right: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\\r\\n\\tcontent: ', ';\\r\\n\\tmargin-right: 0.3em;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\\r\\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n/* Styles for Message element for when widget is loading or is empty */\\r\\n\\r\\n.monaco-editor .suggest-widget>.message {\\r\\n\\tpadding-left: 22px;\\r\\n}\\r\\n\\r\\n/** Styles for the list element **/\\r\\n\\r\\n.monaco-editor .suggest-widget>.tree {\\r\\n\\theight: 100%;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list {\\r\\n\\tuser-select: none;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n}\\r\\n\\r\\n/** Styles for each row in the list element **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\\r\\n\\tdisplay: flex;\\r\\n\\t-mox-box-sizing: border-box;\\r\\n\\tbox-sizing: border-box;\\r\\n\\tpadding-right: 10px;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tbackground-position: 2px 2px;\\r\\n\\twhite-space: nowrap;\\r\\n\\tcursor: pointer;\\r\\n\\ttouch-action: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\\r\\n\\tflex: 1;\\r\\n\\theight: 100%;\\r\\n\\toverflow: hidden;\\r\\n\\tpadding-left: 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\\r\\n\\tdisplay: flex;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\twhite-space: pre;\\r\\n\\tjustify-content: space-between;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\\r\\n\\tdisplay: flex;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\\r\\n\\tfont-weight: bold;\\r\\n}\\r\\n\\r\\n/** ReadMore Icon styles **/\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\\r\\n\\tcolor: inherit;\\r\\n\\topacity: 1;\\r\\n\\tfont-size: 14px;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 6px;\\r\\n\\tright: 2px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\\r\\n\\topacity: 1;\\r\\n}\\r\\n\\r\\n/** signature, qualifier, type/details opacity **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label,\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label,\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\\r\\n\\topacity: 0.7;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\\r\\n\\tmargin-left: 4px;\\r\\n\\topacity: 0.4;\\r\\n\\tfont-size: 90%;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\toverflow: hidden;\\r\\n\\talign-self: center;\\r\\n}\\r\\n\\r\\n/** Type Info and icon next to the label in the focused completion item **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\\r\\n\\tmargin-left: 1.1em;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\twhite-space: nowrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\\r\\n\\tdisplay: inline;\\r\\n}\\r\\n\\r\\n/** Details: if using CompletionItem#details, show on focus **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\\r\\n\\tdisplay: inline;\\r\\n}\\r\\n\\r\\n/** Details: if using CompletionItemLabel#details, always show **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\\r\\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\\r\\n\\tdisplay: inline;\\r\\n}\\r\\n\\r\\n/** Ellipsis on hover **/\\r\\n\\r\\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\\r\\n\\twidth: calc(100% - 26px);\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\\r\\n\\tflex-shrink: 1;\\r\\n\\tflex-grow: 1;\\r\\n\\toverflow: hidden;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\\r\\n\\tflex-shrink: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\\r\\n\\tmax-width: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\\r\\n\\tflex-shrink: 1;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\\r\\n\\toverflow: hidden;\\r\\n\\tflex-shrink: 4;\\r\\n\\tmax-width: 70%;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: inline-block;\\r\\n\\tposition: absolute;\\r\\n\\tright: 10px;\\r\\n\\twidth: 18px;\\r\\n\\theight: 18px;\\r\\n\\tvisibility: hidden;\\r\\n}\\r\\n\\r\\n/** Do NOT display ReadMore when docs is side/below **/\\r\\n\\r\\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: none !important;\\r\\n}\\r\\n\\r\\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n/** Focused item can show ReadMore, but can't when docs is side/below **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\\r\\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\\r\\n\\tvisibility: visible;\\r\\n}\\r\\n\\r\\n/** Styles for each row in the list **/\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\\r\\n\\topacity: 0.66;\\r\\n\\ttext-decoration: unset;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\\r\\n\\ttext-decoration: line-through;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\\r\\n\\theight: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\\r\\n\\tdisplay: block;\\r\\n\\theight: 16px;\\r\\n\\twidth: 16px;\\r\\n\\tmargin-left: 2px;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tbackground-size: 80%;\\r\\n\\tbackground-position: center;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\\r\\n\\tdisplay: flex;\\r\\n\\talign-items: center;\\r\\n\\tmargin-right: 4px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\\r\\n\\tmargin: 0 0 0 0.3em;\\r\\n\\tborder: 0.1em solid #000;\\r\\n\\twidth: 0.7em;\\r\\n\\theight: 0.7em;\\r\\n\\tdisplay: inline-block;\\r\\n}\\r\\n\\r\\n/** Styles for the docs of the completion item in focus **/\\r\\n\\r\\n.monaco-editor .suggest-details-container {\\r\\n\\tz-index: 41;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details {\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details.no-docs {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element {\\r\\n\\tflex: 1;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\\r\\n\\tbox-sizing: border-box;\\r\\n\\theight: 100%;\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\\r\\n\\tflex: 2;\\r\\n\\toverflow: hidden;\\r\\n\\ttext-overflow: ellipsis;\\r\\n\\topacity: 0.7;\\r\\n\\twhite-space: pre;\\r\\n\\tmargin: 0 24px 0 0;\\r\\n\\tpadding: 4px 0 12px 5px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\\r\\n\\twhite-space: normal;\\r\\n\\tword-break: break-all;\\r\\n}\\r\\n\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\\r\\n\\tmargin: 0;\\r\\n\\tpadding: 4px 5px;\\r\\n\\twhite-space: pre-wrap;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\\r\\n\\tmargin-right: 24px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\\r\\n\\tpadding: 0;\\r\\n\\twhite-space: initial;\\r\\n\\tmin-height: calc(1rem + 8px);\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\\r\\n\\tpadding: 4px 5px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\\r\\n\\tmargin-top: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\\r\\n\\tmargin-bottom: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\\r\\n\\twhite-space: pre-wrap;\\r\\n\\tword-wrap: break-word;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\\r\\n\\tvertical-align: sub;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details code {\\r\\n\\tborder-radius: 3px;\\r\\n\\tpadding: 0 0.4em;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details ul {\\r\\n\\tpadding-left: 20px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details ol {\\r\\n\\tpadding-left: 20px;\\r\\n}\\r\\n\\r\\n.monaco-editor .suggest-details p code {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css":
|
||
/*!**************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css ***!
|
||
\**************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n.monaco-editor .zone-widget {\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 10;\\r\\n}\\r\\n\\r\\n\\r\\n.monaco-editor .zone-widget .zone-widget-container {\\r\\n\\tborder-top-style: solid;\\r\\n\\tborder-bottom-style: solid;\\r\\n\\tborder-top-width: 0;\\r\\n\\tborder-bottom-width: 0;\\r\\n\\tposition: relative;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css":
|
||
/*!***************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css ***!
|
||
\***************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .accessibilityHelpWidget {\\r\\n\\tpadding: 10px;\\r\\n\\tvertical-align: middle;\\r\\n\\toverflow: scroll;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css":
|
||
/*!*************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***!
|
||
\*************************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .iPadShowKeyboard {\\r\\n\\twidth: 58px;\\r\\n\\tmin-width: 0;\\r\\n\\theight: 36px;\\r\\n\\tmin-height: 0;\\r\\n\\tmargin: 0;\\r\\n\\tpadding: 0;\\r\\n\\tposition: absolute;\\r\\n\\tresize: none;\\r\\n\\toverflow: hidden;\\r\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiM0MjQyNDIiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\\\") center center no-repeat;\\r\\n\\tborder: 4px solid #F6F6F6;\\r\\n\\tborder-radius: 4px;\\r\\n}\\r\\n\\r\\n.monaco-editor.vs-dark .iPadShowKeyboard {\\r\\n\\tbackground: url(\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiNDNUM1QzUiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\\\") center center no-repeat;\\r\\n\\tborder: 4px solid #252526;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css":
|
||
/*!*******************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css ***!
|
||
\*******************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget {\\r\\n\\tz-index: 50;\\r\\n\\tuser-select: text;\\r\\n\\t-webkit-user-select: text;\\r\\n\\t-ms-user-select: text;\\r\\n\\tpadding: 10px;\\r\\n}\\r\\n\\r\\n.tokens-inspect-separator {\\r\\n\\theight: 1px;\\r\\n\\tborder: 0;\\r\\n}\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget .tm-token {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget .tm-token-length {\\r\\n\\tfont-weight: normal;\\r\\n\\tfont-size: 60%;\\r\\n\\tfloat: right;\\r\\n}\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\\r\\n\\twidth: 100%;\\r\\n}\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n\\ttext-align: right;\\r\\n}\\r\\n\\r\\n.monaco-editor .tokens-inspect-widget .tm-token-type {\\r\\n\\tfont-family: var(--monaco-monospace-font);\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css":
|
||
/*!***********************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css ***!
|
||
\***********************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.quick-input-widget {\\r\\n\\tfont-size: 13px;\\r\\n}\\r\\n\\r\\n.quick-input-widget .monaco-highlighted-label .highlight,\\r\\n.quick-input-widget .monaco-highlighted-label .highlight {\\r\\n\\tcolor: #0066BF;\\r\\n}\\r\\n\\r\\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\\r\\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\\r\\n\\tcolor: #0097fb;\\r\\n}\\r\\n\\r\\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\\r\\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\\r\\n\\tcolor: #F38518;\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css":
|
||
/*!*********************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css ***!
|
||
\*********************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n\\r\\n/* Default standalone editor fonts */\\r\\n.monaco-editor {\\r\\n\\tfont-family: -apple-system, BlinkMacSystemFont, \\\"Segoe WPC\\\", \\\"Segoe UI\\\", \\\"HelveticaNeue-Light\\\", system-ui, \\\"Ubuntu\\\", \\\"Droid Sans\\\", sans-serif;\\r\\n\\t--monaco-monospace-font: \\\"SF Mono\\\", Monaco, Menlo, Consolas, \\\"Ubuntu Mono\\\", \\\"Liberation Mono\\\", \\\"DejaVu Sans Mono\\\", \\\"Courier New\\\", monospace;\\r\\n}\\r\\n\\r\\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\\r\\n\\tstroke-width: 1.2px;\\r\\n}\\r\\n\\r\\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\\r\\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\\r\\n\\tstroke-width: 1.2px;\\r\\n}\\r\\n\\r\\n.monaco-hover p {\\r\\n\\tmargin: 0;\\r\\n}\\r\\n\\r\\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\\r\\n.monaco-aria-container {\\r\\n\\tposition: absolute !important;\\r\\n\\theight: 1px;\\r\\n\\twidth: 1px;\\r\\n\\tmargin: -1px;\\r\\n\\toverflow: hidden;\\r\\n\\tpadding: 0;\\r\\n\\tclip: rect(1px, 1px, 1px, 1px);\\r\\n\\tclip-path: inset(50%);\\r\\n}\\r\\n\\r\\n/* The hc-black theme is already high contrast optimized */\\r\\n.monaco-editor.hc-black {\\r\\n\\t-ms-high-contrast-adjust: none;\\r\\n}\\r\\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\\r\\n@media screen and (-ms-high-contrast:active) {\\r\\n\\r\\n\\t/* current line highlight */\\r\\n\\t.monaco-editor.vs .view-overlays .current-line,\\r\\n\\t.monaco-editor.vs-dark .view-overlays .current-line {\\r\\n\\t\\tborder-color: windowtext !important;\\r\\n\\t\\tborder-left: 0;\\r\\n\\t\\tborder-right: 0;\\r\\n\\t}\\r\\n\\r\\n\\t/* view cursors */\\r\\n\\t.monaco-editor.vs .cursor,\\r\\n\\t.monaco-editor.vs-dark .cursor {\\r\\n\\t\\tbackground-color: windowtext !important;\\r\\n\\t}\\r\\n\\t/* dnd target */\\r\\n\\t.monaco-editor.vs .dnd-target,\\r\\n\\t.monaco-editor.vs-dark .dnd-target {\\r\\n\\t\\tborder-color: windowtext !important;\\r\\n\\t}\\r\\n\\r\\n\\t/* selected text background */\\r\\n\\t.monaco-editor.vs .selected-text,\\r\\n\\t.monaco-editor.vs-dark .selected-text {\\r\\n\\t\\tbackground-color: highlight !important;\\r\\n\\t}\\r\\n\\r\\n\\t/* allow the text to have a transparent background. */\\r\\n\\t.monaco-editor.vs .view-line,\\r\\n\\t.monaco-editor.vs-dark .view-line {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t}\\r\\n\\r\\n\\t/* text color */\\r\\n\\t.monaco-editor.vs .view-line span,\\r\\n\\t.monaco-editor.vs-dark .view-line span {\\r\\n\\t\\tcolor: windowtext !important;\\r\\n\\t}\\r\\n\\t/* selected text color */\\r\\n\\t.monaco-editor.vs .view-line span.inline-selected-text,\\r\\n\\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\\r\\n\\t\\tcolor: highlighttext !important;\\r\\n\\t}\\r\\n\\r\\n\\t/* allow decorations */\\r\\n\\t.monaco-editor.vs .view-overlays,\\r\\n\\t.monaco-editor.vs-dark .view-overlays {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t}\\r\\n\\r\\n\\t/* various decorations */\\r\\n\\t.monaco-editor.vs .selectionHighlight,\\r\\n\\t.monaco-editor.vs-dark .selectionHighlight,\\r\\n\\t.monaco-editor.vs .wordHighlight,\\r\\n\\t.monaco-editor.vs-dark .wordHighlight,\\r\\n\\t.monaco-editor.vs .wordHighlightStrong,\\r\\n\\t.monaco-editor.vs-dark .wordHighlightStrong,\\r\\n\\t.monaco-editor.vs .reference-decoration,\\r\\n\\t.monaco-editor.vs-dark .reference-decoration {\\r\\n\\t\\tborder: 2px dotted highlight !important;\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .rangeHighlight,\\r\\n\\t.monaco-editor.vs-dark .rangeHighlight {\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tborder: 1px dotted activeborder !important;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .bracket-match,\\r\\n\\t.monaco-editor.vs-dark .bracket-match {\\r\\n\\t\\tborder-color: windowtext !important;\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t}\\r\\n\\r\\n\\t/* find widget */\\r\\n\\t.monaco-editor.vs .findMatch,\\r\\n\\t.monaco-editor.vs-dark .findMatch,\\r\\n\\t.monaco-editor.vs .currentFindMatch,\\r\\n\\t.monaco-editor.vs-dark .currentFindMatch {\\r\\n\\t\\tborder: 2px dotted activeborder !important;\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .find-widget,\\r\\n\\t.monaco-editor.vs-dark .find-widget {\\r\\n\\t\\tborder: 1px solid windowtext;\\r\\n\\t}\\r\\n\\r\\n\\t/* list - used by suggest widget */\\r\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row,\\r\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t\\tcolor: windowtext !important;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\\r\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\\r\\n\\t\\tcolor: highlighttext !important;\\r\\n\\t\\tbackground-color: highlight !important;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\\r\\n\\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tborder: 1px solid highlight;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\r\\n\\t/* scrollbars */\\r\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\\r\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t\\tbackground: background !important;\\r\\n\\t\\tborder: 1px solid windowtext;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\\r\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\\r\\n\\t\\tbackground: windowtext !important;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\\r\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\\r\\n\\t\\tbackground: highlight !important;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\\r\\n\\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\\r\\n\\t\\tbackground: highlight !important;\\r\\n\\t}\\r\\n\\r\\n\\t/* overview ruler */\\r\\n\\t.monaco-editor.vs .decorationsOverviewRuler,\\r\\n\\t.monaco-editor.vs-dark .decorationsOverviewRuler {\\r\\n\\t\\topacity: 0;\\r\\n\\t}\\r\\n\\r\\n\\t/* minimap */\\r\\n\\t.monaco-editor.vs .minimap,\\r\\n\\t.monaco-editor.vs-dark .minimap {\\r\\n\\t\\tdisplay: none;\\r\\n\\t}\\r\\n\\r\\n\\t/* squiggles */\\r\\n\\t.monaco-editor.vs .squiggly-d-error,\\r\\n\\t.monaco-editor.vs-dark .squiggly-d-error {\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tborder-bottom: 4px double #E47777;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .squiggly-c-warning,\\r\\n\\t.monaco-editor.vs-dark .squiggly-c-warning {\\r\\n\\t\\tborder-bottom: 4px double #71B771;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .squiggly-b-info,\\r\\n\\t.monaco-editor.vs-dark .squiggly-b-info {\\r\\n\\t\\tborder-bottom: 4px double #71B771;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .squiggly-a-hint,\\r\\n\\t.monaco-editor.vs-dark .squiggly-a-hint {\\r\\n\\t\\tborder-bottom: 4px double #6c6c6c;\\r\\n\\t}\\r\\n\\r\\n\\t/* contextmenu */\\r\\n\\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\\r\\n\\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t\\tcolor: highlighttext !important;\\r\\n\\t\\tbackground-color: highlight !important;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\\r\\n\\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\\r\\n\\t\\t-ms-high-contrast-adjust: none;\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tborder: 1px solid highlight;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\r\\n\\t/* diff editor */\\r\\n\\t.monaco-diff-editor.vs .diffOverviewRuler,\\r\\n\\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\\r\\n\\t\\tdisplay: none;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .line-insert,\\r\\n\\t.monaco-editor.vs-dark .line-insert,\\r\\n\\t.monaco-editor.vs .line-delete,\\r\\n\\t.monaco-editor.vs-dark .line-delete {\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t\\tborder: 1px solid highlight !important;\\r\\n\\t\\tbox-sizing: border-box;\\r\\n\\t}\\r\\n\\t.monaco-editor.vs .char-insert,\\r\\n\\t.monaco-editor.vs-dark .char-insert,\\r\\n\\t.monaco-editor.vs .char-delete,\\r\\n\\t.monaco-editor.vs-dark .char-delete {\\r\\n\\t\\tbackground: transparent !important;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n/*.monaco-editor.vs [tabindex=\\\"0\\\"]:focus {\\r\\n\\toutline: 1px solid rgba(0, 122, 204, 0.4);\\r\\n\\toutline-offset: -1px;\\r\\n\\topacity: 1 !important;\\r\\n}\\r\\n\\r\\n.monaco-editor.vs-dark [tabindex=\\\"0\\\"]:focus {\\r\\n\\toutline: 1px solid rgba(14, 99, 156, 0.6);\\r\\n\\toutline-offset: -1px;\\r\\n\\topacity: 1 !important;\\r\\n}*/\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css":
|
||
/*!**************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css ***!
|
||
\**************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.monaco-action-bar .action-item.menu-entry .action-label {\\r\\n\\tbackground-image: var(--menu-entry-icon-light);\\r\\n}\\r\\n\\r\\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\\r\\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\\r\\n\\tbackground-image: var(--menu-entry-icon-dark);\\r\\n}\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css":
|
||
/*!*************************************************************************************************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css ***!
|
||
\*************************************************************************************************************************************/
|
||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/*---------------------------------------------------------------------------------------------\\r\\n * Copyright (c) Microsoft Corporation. All rights reserved.\\r\\n * Licensed under the MIT License. See License.txt in the project root for license information.\\r\\n *--------------------------------------------------------------------------------------------*/\\r\\n\\r\\n.context-view .monaco-menu {\\r\\n\\tmin-width: 130px;\\r\\n}\\r\\n\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css?./node_modules/css-loader/dist/cjs.js");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/runtime/api.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
||
\*****************************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === \"string\") {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, \"\"]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/css-loader/dist/runtime/api.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/css-loader/dist/runtime/getUrl.js":
|
||
/*!********************************************************!*\
|
||
!*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
|
||
\********************************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
eval("\n\nmodule.exports = function (url, options) {\n if (!options) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n url = url && url.__esModule ? url.default : url;\n\n if (typeof url !== \"string\") {\n return url;\n } // If url is already wrapped in quotes, remove them\n\n\n if (/^['\"].*['\"]$/.test(url)) {\n // eslint-disable-next-line no-param-reassign\n url = url.slice(1, -1);\n }\n\n if (options.hash) {\n // eslint-disable-next-line no-param-reassign\n url += options.hash;\n } // Should url be wrapped?\n // See https://drafts.csswg.org/css-values-3/#urls\n\n\n if (/[\"'() \\t\\n]/.test(url) || options.needQuotes) {\n return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, \"\\\\n\"), \"\\\"\");\n }\n\n return url;\n};\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/css-loader/dist/runtime/getUrl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__.p + \"74d8acf8740a672d680194959e476053.ttf\");\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/browser.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getZoomLevel\": () => (/* binding */ getZoomLevel),\n/* harmony export */ \"getTimeSinceLastZoomLevelChanged\": () => (/* binding */ getTimeSinceLastZoomLevelChanged),\n/* harmony export */ \"onDidChangeZoomLevel\": () => (/* binding */ onDidChangeZoomLevel),\n/* harmony export */ \"getZoomFactor\": () => (/* binding */ getZoomFactor),\n/* harmony export */ \"getPixelRatio\": () => (/* binding */ getPixelRatio),\n/* harmony export */ \"isFirefox\": () => (/* binding */ isFirefox),\n/* harmony export */ \"isWebKit\": () => (/* binding */ isWebKit),\n/* harmony export */ \"isChrome\": () => (/* binding */ isChrome),\n/* harmony export */ \"isSafari\": () => (/* binding */ isSafari),\n/* harmony export */ \"isWebkitWebView\": () => (/* binding */ isWebkitWebView),\n/* harmony export */ \"isIPad\": () => (/* binding */ isIPad),\n/* harmony export */ \"isEdgeLegacyWebView\": () => (/* binding */ isEdgeLegacyWebView),\n/* harmony export */ \"isElectron\": () => (/* binding */ isElectron),\n/* harmony export */ \"isAndroid\": () => (/* binding */ isAndroid),\n/* harmony export */ \"isStandalone\": () => (/* binding */ isStandalone)\n/* harmony export */ });\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass WindowManager {\r\n constructor() {\r\n // --- Zoom Level\r\n this._zoomLevel = 0;\r\n this._lastZoomLevelChangeTime = 0;\r\n this._onDidChangeZoomLevel = new _common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event;\r\n // --- Zoom Factor\r\n this._zoomFactor = 1;\r\n }\r\n getZoomLevel() {\r\n return this._zoomLevel;\r\n }\r\n getTimeSinceLastZoomLevelChanged() {\r\n return Date.now() - this._lastZoomLevelChangeTime;\r\n }\r\n getZoomFactor() {\r\n return this._zoomFactor;\r\n }\r\n // --- Pixel Ratio\r\n getPixelRatio() {\r\n let ctx = document.createElement('canvas').getContext('2d');\r\n let dpr = window.devicePixelRatio || 1;\r\n let bsr = ctx.webkitBackingStorePixelRatio ||\r\n ctx.mozBackingStorePixelRatio ||\r\n ctx.msBackingStorePixelRatio ||\r\n ctx.oBackingStorePixelRatio ||\r\n ctx.backingStorePixelRatio || 1;\r\n return dpr / bsr;\r\n }\r\n}\r\nWindowManager.INSTANCE = new WindowManager();\r\nfunction getZoomLevel() {\r\n return WindowManager.INSTANCE.getZoomLevel();\r\n}\r\n/** Returns the time (in ms) since the zoom level was changed */\r\nfunction getTimeSinceLastZoomLevelChanged() {\r\n return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged();\r\n}\r\nfunction onDidChangeZoomLevel(callback) {\r\n return WindowManager.INSTANCE.onDidChangeZoomLevel(callback);\r\n}\r\n/** The zoom scale for an index, e.g. 1, 1.2, 1.4 */\r\nfunction getZoomFactor() {\r\n return WindowManager.INSTANCE.getZoomFactor();\r\n}\r\nfunction getPixelRatio() {\r\n return WindowManager.INSTANCE.getPixelRatio();\r\n}\r\nconst userAgent = navigator.userAgent;\r\nconst isFirefox = (userAgent.indexOf('Firefox') >= 0);\r\nconst isWebKit = (userAgent.indexOf('AppleWebKit') >= 0);\r\nconst isChrome = (userAgent.indexOf('Chrome') >= 0);\r\nconst isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0));\r\nconst isWebkitWebView = (!isChrome && !isSafari && isWebKit);\r\nconst isIPad = (userAgent.indexOf('iPad') >= 0 || (isSafari && navigator.maxTouchPoints > 0));\r\nconst isEdgeLegacyWebView = (userAgent.indexOf('Edge/') >= 0) && (userAgent.indexOf('WebView/') >= 0);\r\nconst isElectron = (userAgent.indexOf('Electron/') >= 0);\r\nconst isAndroid = (userAgent.indexOf('Android') >= 0);\r\nconst isStandalone = (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/browser.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BrowserFeatures\": () => (/* binding */ BrowserFeatures)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/**\r\n * Browser feature we can support in current platform, browser and environment.\r\n */\r\nconst BrowserFeatures = {\r\n clipboard: {\r\n writeText: (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isNative\r\n || (document.queryCommandSupported && document.queryCommandSupported('copy'))\r\n || !!(navigator && navigator.clipboard && navigator.clipboard.writeText)),\r\n readText: (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isNative\r\n || !!(navigator && navigator.clipboard && navigator.clipboard.readText))\r\n },\r\n keyboard: (() => {\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isNative || _browser_js__WEBPACK_IMPORTED_MODULE_0__.isStandalone) {\r\n return 0 /* Always */;\r\n }\r\n if (navigator.keyboard || _browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari) {\r\n return 1 /* FullScreen */;\r\n }\r\n return 2 /* None */;\r\n })(),\r\n // 'ontouchstart' in window always evaluates to true with typescript's modern typings. This causes `window` to be\r\n // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast\r\n touch: 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0,\r\n pointerEvents: window.PointerEvent && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0)\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DataTransfers\": () => (/* binding */ DataTransfers),\n/* harmony export */ \"DragAndDropData\": () => (/* binding */ DragAndDropData),\n/* harmony export */ \"StaticDND\": () => (/* binding */ StaticDND)\n/* harmony export */ });\n// Common data transfers\r\nconst DataTransfers = {\r\n /**\r\n * Application specific resource transfer type\r\n */\r\n RESOURCES: 'ResourceURLs',\r\n /**\r\n * Browser specific transfer type to download\r\n */\r\n DOWNLOAD_URL: 'DownloadURL',\r\n /**\r\n * Browser specific transfer type for files\r\n */\r\n FILES: 'Files',\r\n /**\r\n * Typically transfer type for copy/paste transfers.\r\n */\r\n TEXT: 'text/plain'\r\n};\r\nclass DragAndDropData {\r\n constructor(data) {\r\n this.data = data;\r\n }\r\n update() {\r\n // noop\r\n }\r\n getData() {\r\n return this.data;\r\n }\r\n}\r\nconst StaticDND = {\r\n CurrentDragAndDropData: undefined\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/dnd.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/dom.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"clearNode\": () => (/* binding */ clearNode),\n/* harmony export */ \"isInDOM\": () => (/* binding */ isInDOM),\n/* harmony export */ \"addDisposableListener\": () => (/* binding */ addDisposableListener),\n/* harmony export */ \"addStandardDisposableListener\": () => (/* binding */ addStandardDisposableListener),\n/* harmony export */ \"addStandardDisposableGenericMouseDownListner\": () => (/* binding */ addStandardDisposableGenericMouseDownListner),\n/* harmony export */ \"addDisposableGenericMouseDownListner\": () => (/* binding */ addDisposableGenericMouseDownListner),\n/* harmony export */ \"addDisposableGenericMouseUpListner\": () => (/* binding */ addDisposableGenericMouseUpListner),\n/* harmony export */ \"addDisposableNonBubblingMouseOutListener\": () => (/* binding */ addDisposableNonBubblingMouseOutListener),\n/* harmony export */ \"addDisposableNonBubblingPointerOutListener\": () => (/* binding */ addDisposableNonBubblingPointerOutListener),\n/* harmony export */ \"runAtThisOrScheduleAtNextAnimationFrame\": () => (/* binding */ runAtThisOrScheduleAtNextAnimationFrame),\n/* harmony export */ \"scheduleAtNextAnimationFrame\": () => (/* binding */ scheduleAtNextAnimationFrame),\n/* harmony export */ \"addDisposableThrottledListener\": () => (/* binding */ addDisposableThrottledListener),\n/* harmony export */ \"getComputedStyle\": () => (/* binding */ getComputedStyle),\n/* harmony export */ \"getClientArea\": () => (/* binding */ getClientArea),\n/* harmony export */ \"Dimension\": () => (/* binding */ Dimension),\n/* harmony export */ \"getTopLeftOffset\": () => (/* binding */ getTopLeftOffset),\n/* harmony export */ \"size\": () => (/* binding */ size),\n/* harmony export */ \"getDomNodePagePosition\": () => (/* binding */ getDomNodePagePosition),\n/* harmony export */ \"StandardWindow\": () => (/* binding */ StandardWindow),\n/* harmony export */ \"getTotalWidth\": () => (/* binding */ getTotalWidth),\n/* harmony export */ \"getContentWidth\": () => (/* binding */ getContentWidth),\n/* harmony export */ \"getContentHeight\": () => (/* binding */ getContentHeight),\n/* harmony export */ \"getTotalHeight\": () => (/* binding */ getTotalHeight),\n/* harmony export */ \"isAncestor\": () => (/* binding */ isAncestor),\n/* harmony export */ \"findParentWithClass\": () => (/* binding */ findParentWithClass),\n/* harmony export */ \"hasParentWithClass\": () => (/* binding */ hasParentWithClass),\n/* harmony export */ \"isShadowRoot\": () => (/* binding */ isShadowRoot),\n/* harmony export */ \"isInShadowDOM\": () => (/* binding */ isInShadowDOM),\n/* harmony export */ \"getShadowRoot\": () => (/* binding */ getShadowRoot),\n/* harmony export */ \"getActiveElement\": () => (/* binding */ getActiveElement),\n/* harmony export */ \"createStyleSheet\": () => (/* binding */ createStyleSheet),\n/* harmony export */ \"createCSSRule\": () => (/* binding */ createCSSRule),\n/* harmony export */ \"removeCSSRulesContainingSelector\": () => (/* binding */ removeCSSRulesContainingSelector),\n/* harmony export */ \"isHTMLElement\": () => (/* binding */ isHTMLElement),\n/* harmony export */ \"EventType\": () => (/* binding */ EventType),\n/* harmony export */ \"EventHelper\": () => (/* binding */ EventHelper),\n/* harmony export */ \"saveParentsScrollTop\": () => (/* binding */ saveParentsScrollTop),\n/* harmony export */ \"restoreParentsScrollTop\": () => (/* binding */ restoreParentsScrollTop),\n/* harmony export */ \"trackFocus\": () => (/* binding */ trackFocus),\n/* harmony export */ \"append\": () => (/* binding */ append),\n/* harmony export */ \"reset\": () => (/* binding */ reset),\n/* harmony export */ \"Namespace\": () => (/* binding */ Namespace),\n/* harmony export */ \"$\": () => (/* binding */ $),\n/* harmony export */ \"show\": () => (/* binding */ show),\n/* harmony export */ \"hide\": () => (/* binding */ hide),\n/* harmony export */ \"getElementsByTagName\": () => (/* binding */ getElementsByTagName),\n/* harmony export */ \"computeScreenAwareSize\": () => (/* binding */ computeScreenAwareSize),\n/* harmony export */ \"windowOpenNoOpener\": () => (/* binding */ windowOpenNoOpener),\n/* harmony export */ \"animate\": () => (/* binding */ animate),\n/* harmony export */ \"asCSSUrl\": () => (/* binding */ asCSSUrl),\n/* harmony export */ \"asCSSPropertyValue\": () => (/* binding */ asCSSPropertyValue),\n/* harmony export */ \"ModifierKeyEmitter\": () => (/* binding */ ModifierKeyEmitter)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_network_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./canIUse.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction clearNode(node) {\r\n while (node.firstChild) {\r\n node.firstChild.remove();\r\n }\r\n}\r\n/**\r\n * @deprecated Use node.isConnected directly\r\n */\r\nfunction isInDOM(node) {\r\n var _a;\r\n return (_a = node === null || node === void 0 ? void 0 : node.isConnected) !== null && _a !== void 0 ? _a : false;\r\n}\r\nclass DomListener {\r\n constructor(node, type, handler, options) {\r\n this._node = node;\r\n this._type = type;\r\n this._handler = handler;\r\n this._options = (options || false);\r\n this._node.addEventListener(this._type, this._handler, this._options);\r\n }\r\n dispose() {\r\n if (!this._handler) {\r\n // Already disposed\r\n return;\r\n }\r\n this._node.removeEventListener(this._type, this._handler, this._options);\r\n // Prevent leakers from holding on to the dom or handler func\r\n this._node = null;\r\n this._handler = null;\r\n }\r\n}\r\nfunction addDisposableListener(node, type, handler, useCaptureOrOptions) {\r\n return new DomListener(node, type, handler, useCaptureOrOptions);\r\n}\r\nfunction _wrapAsStandardMouseEvent(handler) {\r\n return function (e) {\r\n return handler(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__.StandardMouseEvent(e));\r\n };\r\n}\r\nfunction _wrapAsStandardKeyboardEvent(handler) {\r\n return function (e) {\r\n return handler(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardKeyboardEvent(e));\r\n };\r\n}\r\nlet addStandardDisposableListener = function addStandardDisposableListener(node, type, handler, useCapture) {\r\n let wrapHandler = handler;\r\n if (type === 'click' || type === 'mousedown') {\r\n wrapHandler = _wrapAsStandardMouseEvent(handler);\r\n }\r\n else if (type === 'keydown' || type === 'keypress' || type === 'keyup') {\r\n wrapHandler = _wrapAsStandardKeyboardEvent(handler);\r\n }\r\n return addDisposableListener(node, type, wrapHandler, useCapture);\r\n};\r\nlet addStandardDisposableGenericMouseDownListner = function addStandardDisposableListener(node, handler, useCapture) {\r\n let wrapHandler = _wrapAsStandardMouseEvent(handler);\r\n return addDisposableGenericMouseDownListner(node, wrapHandler, useCapture);\r\n};\r\nfunction addDisposableGenericMouseDownListner(node, handler, useCapture) {\r\n return addDisposableListener(node, _common_platform_js__WEBPACK_IMPORTED_MODULE_8__.isIOS && _canIUse_js__WEBPACK_IMPORTED_MODULE_10__.BrowserFeatures.pointerEvents ? EventType.POINTER_DOWN : EventType.MOUSE_DOWN, handler, useCapture);\r\n}\r\nfunction addDisposableGenericMouseUpListner(node, handler, useCapture) {\r\n return addDisposableListener(node, _common_platform_js__WEBPACK_IMPORTED_MODULE_8__.isIOS && _canIUse_js__WEBPACK_IMPORTED_MODULE_10__.BrowserFeatures.pointerEvents ? EventType.POINTER_UP : EventType.MOUSE_UP, handler, useCapture);\r\n}\r\nfunction addDisposableNonBubblingMouseOutListener(node, handler) {\r\n return addDisposableListener(node, 'mouseout', (e) => {\r\n // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements\r\n let toElement = (e.relatedTarget);\r\n while (toElement && toElement !== node) {\r\n toElement = toElement.parentNode;\r\n }\r\n if (toElement === node) {\r\n return;\r\n }\r\n handler(e);\r\n });\r\n}\r\nfunction addDisposableNonBubblingPointerOutListener(node, handler) {\r\n return addDisposableListener(node, 'pointerout', (e) => {\r\n // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements\r\n let toElement = (e.relatedTarget);\r\n while (toElement && toElement !== node) {\r\n toElement = toElement.parentNode;\r\n }\r\n if (toElement === node) {\r\n return;\r\n }\r\n handler(e);\r\n });\r\n}\r\nlet _animationFrame = null;\r\nfunction doRequestAnimationFrame(callback) {\r\n if (!_animationFrame) {\r\n const emulatedRequestAnimationFrame = (callback) => {\r\n return setTimeout(() => callback(new Date().getTime()), 0);\r\n };\r\n _animationFrame = (self.requestAnimationFrame\r\n || self.msRequestAnimationFrame\r\n || self.webkitRequestAnimationFrame\r\n || self.mozRequestAnimationFrame\r\n || self.oRequestAnimationFrame\r\n || emulatedRequestAnimationFrame);\r\n }\r\n return _animationFrame.call(self, callback);\r\n}\r\n/**\r\n * Schedule a callback to be run at the next animation frame.\r\n * This allows multiple parties to register callbacks that should run at the next animation frame.\r\n * If currently in an animation frame, `runner` will be executed immediately.\r\n * @return token that can be used to cancel the scheduled runner (only if `runner` was not executed immediately).\r\n */\r\nlet runAtThisOrScheduleAtNextAnimationFrame;\r\n/**\r\n * Schedule a callback to be run at the next animation frame.\r\n * This allows multiple parties to register callbacks that should run at the next animation frame.\r\n * If currently in an animation frame, `runner` will be executed at the next animation frame.\r\n * @return token that can be used to cancel the scheduled runner.\r\n */\r\nlet scheduleAtNextAnimationFrame;\r\nclass AnimationFrameQueueItem {\r\n constructor(runner, priority = 0) {\r\n this._runner = runner;\r\n this.priority = priority;\r\n this._canceled = false;\r\n }\r\n dispose() {\r\n this._canceled = true;\r\n }\r\n execute() {\r\n if (this._canceled) {\r\n return;\r\n }\r\n try {\r\n this._runner();\r\n }\r\n catch (e) {\r\n (0,_common_errors_js__WEBPACK_IMPORTED_MODULE_5__.onUnexpectedError)(e);\r\n }\r\n }\r\n // Sort by priority (largest to lowest)\r\n static sort(a, b) {\r\n return b.priority - a.priority;\r\n }\r\n}\r\n(function () {\r\n /**\r\n * The runners scheduled at the next animation frame\r\n */\r\n let NEXT_QUEUE = [];\r\n /**\r\n * The runners scheduled at the current animation frame\r\n */\r\n let CURRENT_QUEUE = null;\r\n /**\r\n * A flag to keep track if the native requestAnimationFrame was already called\r\n */\r\n let animFrameRequested = false;\r\n /**\r\n * A flag to indicate if currently handling a native requestAnimationFrame callback\r\n */\r\n let inAnimationFrameRunner = false;\r\n let animationFrameRunner = () => {\r\n animFrameRequested = false;\r\n CURRENT_QUEUE = NEXT_QUEUE;\r\n NEXT_QUEUE = [];\r\n inAnimationFrameRunner = true;\r\n while (CURRENT_QUEUE.length > 0) {\r\n CURRENT_QUEUE.sort(AnimationFrameQueueItem.sort);\r\n let top = CURRENT_QUEUE.shift();\r\n top.execute();\r\n }\r\n inAnimationFrameRunner = false;\r\n };\r\n scheduleAtNextAnimationFrame = (runner, priority = 0) => {\r\n let item = new AnimationFrameQueueItem(runner, priority);\r\n NEXT_QUEUE.push(item);\r\n if (!animFrameRequested) {\r\n animFrameRequested = true;\r\n doRequestAnimationFrame(animationFrameRunner);\r\n }\r\n return item;\r\n };\r\n runAtThisOrScheduleAtNextAnimationFrame = (runner, priority) => {\r\n if (inAnimationFrameRunner) {\r\n let item = new AnimationFrameQueueItem(runner, priority);\r\n CURRENT_QUEUE.push(item);\r\n return item;\r\n }\r\n else {\r\n return scheduleAtNextAnimationFrame(runner, priority);\r\n }\r\n };\r\n})();\r\nconst MINIMUM_TIME_MS = 8;\r\nconst DEFAULT_EVENT_MERGER = function (lastEvent, currentEvent) {\r\n return currentEvent;\r\n};\r\nclass TimeoutThrottledDomListener extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(node, type, handler, eventMerger = DEFAULT_EVENT_MERGER, minimumTimeMs = MINIMUM_TIME_MS) {\r\n super();\r\n let lastEvent = null;\r\n let lastHandlerTime = 0;\r\n let timeout = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_4__.TimeoutTimer());\r\n let invokeHandler = () => {\r\n lastHandlerTime = (new Date()).getTime();\r\n handler(lastEvent);\r\n lastEvent = null;\r\n };\r\n this._register(addDisposableListener(node, type, (e) => {\r\n lastEvent = eventMerger(lastEvent, e);\r\n let elapsedTime = (new Date()).getTime() - lastHandlerTime;\r\n if (elapsedTime >= minimumTimeMs) {\r\n timeout.cancel();\r\n invokeHandler();\r\n }\r\n else {\r\n timeout.setIfNotSet(invokeHandler, minimumTimeMs - elapsedTime);\r\n }\r\n }));\r\n }\r\n}\r\nfunction addDisposableThrottledListener(node, type, handler, eventMerger, minimumTimeMs) {\r\n return new TimeoutThrottledDomListener(node, type, handler, eventMerger, minimumTimeMs);\r\n}\r\nfunction getComputedStyle(el) {\r\n return document.defaultView.getComputedStyle(el, null);\r\n}\r\nfunction getClientArea(element) {\r\n // Try with DOM clientWidth / clientHeight\r\n if (element !== document.body) {\r\n return new Dimension(element.clientWidth, element.clientHeight);\r\n }\r\n // If visual view port exits and it's on mobile, it should be used instead of window innerWidth / innerHeight, or document.body.clientWidth / document.body.clientHeight\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_8__.isIOS && window.visualViewport) {\r\n const width = window.visualViewport.width;\r\n const height = window.visualViewport.height - (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isStandalone\r\n // in PWA mode, the visual viewport always includes the safe-area-inset-bottom (which is for the home indicator)\r\n // even when you are using the onscreen monitor, the visual viewport will include the area between system statusbar and the onscreen keyboard\r\n // plus the area between onscreen keyboard and the bottom bezel, which is 20px on iOS.\r\n ? (20 + 4) // + 4px for body margin\r\n : 0);\r\n return new Dimension(width, height);\r\n }\r\n // Try innerWidth / innerHeight\r\n if (window.innerWidth && window.innerHeight) {\r\n return new Dimension(window.innerWidth, window.innerHeight);\r\n }\r\n // Try with document.body.clientWidth / document.body.clientHeight\r\n if (document.body && document.body.clientWidth && document.body.clientHeight) {\r\n return new Dimension(document.body.clientWidth, document.body.clientHeight);\r\n }\r\n // Try with document.documentElement.clientWidth / document.documentElement.clientHeight\r\n if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight) {\r\n return new Dimension(document.documentElement.clientWidth, document.documentElement.clientHeight);\r\n }\r\n throw new Error('Unable to figure out browser width and height');\r\n}\r\nclass SizeUtils {\r\n // Adapted from WinJS\r\n // Converts a CSS positioning string for the specified element to pixels.\r\n static convertToPixels(element, value) {\r\n return parseFloat(value) || 0;\r\n }\r\n static getDimension(element, cssPropertyName, jsPropertyName) {\r\n let computedStyle = getComputedStyle(element);\r\n let value = '0';\r\n if (computedStyle) {\r\n if (computedStyle.getPropertyValue) {\r\n value = computedStyle.getPropertyValue(cssPropertyName);\r\n }\r\n else {\r\n // IE8\r\n value = computedStyle.getAttribute(jsPropertyName);\r\n }\r\n }\r\n return SizeUtils.convertToPixels(element, value);\r\n }\r\n static getBorderLeftWidth(element) {\r\n return SizeUtils.getDimension(element, 'border-left-width', 'borderLeftWidth');\r\n }\r\n static getBorderRightWidth(element) {\r\n return SizeUtils.getDimension(element, 'border-right-width', 'borderRightWidth');\r\n }\r\n static getBorderTopWidth(element) {\r\n return SizeUtils.getDimension(element, 'border-top-width', 'borderTopWidth');\r\n }\r\n static getBorderBottomWidth(element) {\r\n return SizeUtils.getDimension(element, 'border-bottom-width', 'borderBottomWidth');\r\n }\r\n static getPaddingLeft(element) {\r\n return SizeUtils.getDimension(element, 'padding-left', 'paddingLeft');\r\n }\r\n static getPaddingRight(element) {\r\n return SizeUtils.getDimension(element, 'padding-right', 'paddingRight');\r\n }\r\n static getPaddingTop(element) {\r\n return SizeUtils.getDimension(element, 'padding-top', 'paddingTop');\r\n }\r\n static getPaddingBottom(element) {\r\n return SizeUtils.getDimension(element, 'padding-bottom', 'paddingBottom');\r\n }\r\n static getMarginLeft(element) {\r\n return SizeUtils.getDimension(element, 'margin-left', 'marginLeft');\r\n }\r\n static getMarginTop(element) {\r\n return SizeUtils.getDimension(element, 'margin-top', 'marginTop');\r\n }\r\n static getMarginRight(element) {\r\n return SizeUtils.getDimension(element, 'margin-right', 'marginRight');\r\n }\r\n static getMarginBottom(element) {\r\n return SizeUtils.getDimension(element, 'margin-bottom', 'marginBottom');\r\n }\r\n}\r\nclass Dimension {\r\n constructor(width, height) {\r\n this.width = width;\r\n this.height = height;\r\n }\r\n with(width = this.width, height = this.height) {\r\n if (width !== this.width || height !== this.height) {\r\n return new Dimension(width, height);\r\n }\r\n else {\r\n return this;\r\n }\r\n }\r\n static is(obj) {\r\n return typeof obj === 'object' && typeof obj.height === 'number' && typeof obj.width === 'number';\r\n }\r\n static lift(obj) {\r\n if (obj instanceof Dimension) {\r\n return obj;\r\n }\r\n else {\r\n return new Dimension(obj.width, obj.height);\r\n }\r\n }\r\n static equals(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n return a.width === b.width && a.height === b.height;\r\n }\r\n}\r\nfunction getTopLeftOffset(element) {\r\n // Adapted from WinJS.Utilities.getPosition\r\n // and added borders to the mix\r\n let offsetParent = element.offsetParent;\r\n let top = element.offsetTop;\r\n let left = element.offsetLeft;\r\n while ((element = element.parentNode) !== null\r\n && element !== document.body\r\n && element !== document.documentElement) {\r\n top -= element.scrollTop;\r\n const c = isShadowRoot(element) ? null : getComputedStyle(element);\r\n if (c) {\r\n left -= c.direction !== 'rtl' ? element.scrollLeft : -element.scrollLeft;\r\n }\r\n if (element === offsetParent) {\r\n left += SizeUtils.getBorderLeftWidth(element);\r\n top += SizeUtils.getBorderTopWidth(element);\r\n top += element.offsetTop;\r\n left += element.offsetLeft;\r\n offsetParent = element.offsetParent;\r\n }\r\n }\r\n return {\r\n left: left,\r\n top: top\r\n };\r\n}\r\nfunction size(element, width, height) {\r\n if (typeof width === 'number') {\r\n element.style.width = `${width}px`;\r\n }\r\n if (typeof height === 'number') {\r\n element.style.height = `${height}px`;\r\n }\r\n}\r\n/**\r\n * Returns the position of a dom node relative to the entire page.\r\n */\r\nfunction getDomNodePagePosition(domNode) {\r\n let bb = domNode.getBoundingClientRect();\r\n return {\r\n left: bb.left + StandardWindow.scrollX,\r\n top: bb.top + StandardWindow.scrollY,\r\n width: bb.width,\r\n height: bb.height\r\n };\r\n}\r\nconst StandardWindow = new class {\r\n get scrollX() {\r\n if (typeof window.scrollX === 'number') {\r\n // modern browsers\r\n return window.scrollX;\r\n }\r\n else {\r\n return document.body.scrollLeft + document.documentElement.scrollLeft;\r\n }\r\n }\r\n get scrollY() {\r\n if (typeof window.scrollY === 'number') {\r\n // modern browsers\r\n return window.scrollY;\r\n }\r\n else {\r\n return document.body.scrollTop + document.documentElement.scrollTop;\r\n }\r\n }\r\n};\r\n// Adapted from WinJS\r\n// Gets the width of the element, including margins.\r\nfunction getTotalWidth(element) {\r\n let margin = SizeUtils.getMarginLeft(element) + SizeUtils.getMarginRight(element);\r\n return element.offsetWidth + margin;\r\n}\r\nfunction getContentWidth(element) {\r\n let border = SizeUtils.getBorderLeftWidth(element) + SizeUtils.getBorderRightWidth(element);\r\n let padding = SizeUtils.getPaddingLeft(element) + SizeUtils.getPaddingRight(element);\r\n return element.offsetWidth - border - padding;\r\n}\r\n// Adapted from WinJS\r\n// Gets the height of the content of the specified element. The content height does not include borders or padding.\r\nfunction getContentHeight(element) {\r\n let border = SizeUtils.getBorderTopWidth(element) + SizeUtils.getBorderBottomWidth(element);\r\n let padding = SizeUtils.getPaddingTop(element) + SizeUtils.getPaddingBottom(element);\r\n return element.offsetHeight - border - padding;\r\n}\r\n// Adapted from WinJS\r\n// Gets the height of the element, including its margins.\r\nfunction getTotalHeight(element) {\r\n let margin = SizeUtils.getMarginTop(element) + SizeUtils.getMarginBottom(element);\r\n return element.offsetHeight + margin;\r\n}\r\n// ----------------------------------------------------------------------------------------\r\nfunction isAncestor(testChild, testAncestor) {\r\n while (testChild) {\r\n if (testChild === testAncestor) {\r\n return true;\r\n }\r\n testChild = testChild.parentNode;\r\n }\r\n return false;\r\n}\r\nfunction findParentWithClass(node, clazz, stopAtClazzOrNode) {\r\n while (node && node.nodeType === node.ELEMENT_NODE) {\r\n if (node.classList.contains(clazz)) {\r\n return node;\r\n }\r\n if (stopAtClazzOrNode) {\r\n if (typeof stopAtClazzOrNode === 'string') {\r\n if (node.classList.contains(stopAtClazzOrNode)) {\r\n return null;\r\n }\r\n }\r\n else {\r\n if (node === stopAtClazzOrNode) {\r\n return null;\r\n }\r\n }\r\n }\r\n node = node.parentNode;\r\n }\r\n return null;\r\n}\r\nfunction hasParentWithClass(node, clazz, stopAtClazzOrNode) {\r\n return !!findParentWithClass(node, clazz, stopAtClazzOrNode);\r\n}\r\nfunction isShadowRoot(node) {\r\n return (node && !!node.host && !!node.mode);\r\n}\r\nfunction isInShadowDOM(domNode) {\r\n return !!getShadowRoot(domNode);\r\n}\r\nfunction getShadowRoot(domNode) {\r\n while (domNode.parentNode) {\r\n if (domNode === document.body) {\r\n // reached the body\r\n return null;\r\n }\r\n domNode = domNode.parentNode;\r\n }\r\n return isShadowRoot(domNode) ? domNode : null;\r\n}\r\nfunction getActiveElement() {\r\n let result = document.activeElement;\r\n while (result === null || result === void 0 ? void 0 : result.shadowRoot) {\r\n result = result.shadowRoot.activeElement;\r\n }\r\n return result;\r\n}\r\nfunction createStyleSheet(container = document.getElementsByTagName('head')[0]) {\r\n let style = document.createElement('style');\r\n style.type = 'text/css';\r\n style.media = 'screen';\r\n container.appendChild(style);\r\n return style;\r\n}\r\nlet _sharedStyleSheet = null;\r\nfunction getSharedStyleSheet() {\r\n if (!_sharedStyleSheet) {\r\n _sharedStyleSheet = createStyleSheet();\r\n }\r\n return _sharedStyleSheet;\r\n}\r\nfunction getDynamicStyleSheetRules(style) {\r\n var _a, _b;\r\n if ((_a = style === null || style === void 0 ? void 0 : style.sheet) === null || _a === void 0 ? void 0 : _a.rules) {\r\n // Chrome, IE\r\n return style.sheet.rules;\r\n }\r\n if ((_b = style === null || style === void 0 ? void 0 : style.sheet) === null || _b === void 0 ? void 0 : _b.cssRules) {\r\n // FF\r\n return style.sheet.cssRules;\r\n }\r\n return [];\r\n}\r\nfunction createCSSRule(selector, cssText, style = getSharedStyleSheet()) {\r\n if (!style || !cssText) {\r\n return;\r\n }\r\n style.sheet.insertRule(selector + '{' + cssText + '}', 0);\r\n}\r\nfunction removeCSSRulesContainingSelector(ruleName, style = getSharedStyleSheet()) {\r\n if (!style) {\r\n return;\r\n }\r\n let rules = getDynamicStyleSheetRules(style);\r\n let toDelete = [];\r\n for (let i = 0; i < rules.length; i++) {\r\n let rule = rules[i];\r\n if (rule.selectorText.indexOf(ruleName) !== -1) {\r\n toDelete.push(i);\r\n }\r\n }\r\n for (let i = toDelete.length - 1; i >= 0; i--) {\r\n style.sheet.deleteRule(toDelete[i]);\r\n }\r\n}\r\nfunction isHTMLElement(o) {\r\n if (typeof HTMLElement === 'object') {\r\n return o instanceof HTMLElement;\r\n }\r\n return o && typeof o === 'object' && o.nodeType === 1 && typeof o.nodeName === 'string';\r\n}\r\nconst EventType = {\r\n // Mouse\r\n CLICK: 'click',\r\n AUXCLICK: 'auxclick',\r\n DBLCLICK: 'dblclick',\r\n MOUSE_UP: 'mouseup',\r\n MOUSE_DOWN: 'mousedown',\r\n MOUSE_OVER: 'mouseover',\r\n MOUSE_MOVE: 'mousemove',\r\n MOUSE_OUT: 'mouseout',\r\n MOUSE_ENTER: 'mouseenter',\r\n MOUSE_LEAVE: 'mouseleave',\r\n MOUSE_WHEEL: 'wheel',\r\n POINTER_UP: 'pointerup',\r\n POINTER_DOWN: 'pointerdown',\r\n POINTER_MOVE: 'pointermove',\r\n CONTEXT_MENU: 'contextmenu',\r\n WHEEL: 'wheel',\r\n // Keyboard\r\n KEY_DOWN: 'keydown',\r\n KEY_PRESS: 'keypress',\r\n KEY_UP: 'keyup',\r\n // HTML Document\r\n LOAD: 'load',\r\n BEFORE_UNLOAD: 'beforeunload',\r\n UNLOAD: 'unload',\r\n ABORT: 'abort',\r\n ERROR: 'error',\r\n RESIZE: 'resize',\r\n SCROLL: 'scroll',\r\n FULLSCREEN_CHANGE: 'fullscreenchange',\r\n WK_FULLSCREEN_CHANGE: 'webkitfullscreenchange',\r\n // Form\r\n SELECT: 'select',\r\n CHANGE: 'change',\r\n SUBMIT: 'submit',\r\n RESET: 'reset',\r\n FOCUS: 'focus',\r\n FOCUS_IN: 'focusin',\r\n FOCUS_OUT: 'focusout',\r\n BLUR: 'blur',\r\n INPUT: 'input',\r\n // Local Storage\r\n STORAGE: 'storage',\r\n // Drag\r\n DRAG_START: 'dragstart',\r\n DRAG: 'drag',\r\n DRAG_ENTER: 'dragenter',\r\n DRAG_LEAVE: 'dragleave',\r\n DRAG_OVER: 'dragover',\r\n DROP: 'drop',\r\n DRAG_END: 'dragend',\r\n // Animation\r\n ANIMATION_START: _browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit ? 'webkitAnimationStart' : 'animationstart',\r\n ANIMATION_END: _browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit ? 'webkitAnimationEnd' : 'animationend',\r\n ANIMATION_ITERATION: _browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit ? 'webkitAnimationIteration' : 'animationiteration'\r\n};\r\nconst EventHelper = {\r\n stop: function (e, cancelBubble) {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n else {\r\n // IE8\r\n e.returnValue = false;\r\n }\r\n if (cancelBubble) {\r\n if (e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n else {\r\n // IE8\r\n e.cancelBubble = true;\r\n }\r\n }\r\n }\r\n};\r\nfunction saveParentsScrollTop(node) {\r\n let r = [];\r\n for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\r\n r[i] = node.scrollTop;\r\n node = node.parentNode;\r\n }\r\n return r;\r\n}\r\nfunction restoreParentsScrollTop(node, state) {\r\n for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) {\r\n if (node.scrollTop !== state[i]) {\r\n node.scrollTop = state[i];\r\n }\r\n node = node.parentNode;\r\n }\r\n}\r\nclass FocusTracker extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(element) {\r\n super();\r\n this._onDidFocus = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidFocus = this._onDidFocus.event;\r\n this._onDidBlur = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidBlur = this._onDidBlur.event;\r\n let hasFocus = isAncestor(document.activeElement, element);\r\n let loosingFocus = false;\r\n const onFocus = () => {\r\n loosingFocus = false;\r\n if (!hasFocus) {\r\n hasFocus = true;\r\n this._onDidFocus.fire();\r\n }\r\n };\r\n const onBlur = () => {\r\n if (hasFocus) {\r\n loosingFocus = true;\r\n window.setTimeout(() => {\r\n if (loosingFocus) {\r\n loosingFocus = false;\r\n hasFocus = false;\r\n this._onDidBlur.fire();\r\n }\r\n }, 0);\r\n }\r\n };\r\n this._refreshStateHandler = () => {\r\n let currentNodeHasFocus = isAncestor(document.activeElement, element);\r\n if (currentNodeHasFocus !== hasFocus) {\r\n if (hasFocus) {\r\n onBlur();\r\n }\r\n else {\r\n onFocus();\r\n }\r\n }\r\n };\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(element, EventType.FOCUS, true)(onFocus));\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(element, EventType.BLUR, true)(onBlur));\r\n }\r\n}\r\nfunction trackFocus(element) {\r\n return new FocusTracker(element);\r\n}\r\nfunction append(parent, ...children) {\r\n parent.append(...children);\r\n if (children.length === 1 && typeof children[0] !== 'string') {\r\n return children[0];\r\n }\r\n}\r\n/**\r\n * Removes all children from `parent` and appends `children`\r\n */\r\nfunction reset(parent, ...children) {\r\n parent.innerText = '';\r\n append(parent, ...children);\r\n}\r\nconst SELECTOR_REGEX = /([\\w\\-]+)?(#([\\w\\-]+))?((\\.([\\w\\-]+))*)/;\r\nvar Namespace;\r\n(function (Namespace) {\r\n Namespace[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\r\n Namespace[\"SVG\"] = \"http://www.w3.org/2000/svg\";\r\n})(Namespace || (Namespace = {}));\r\nfunction _$(namespace, description, attrs, ...children) {\r\n let match = SELECTOR_REGEX.exec(description);\r\n if (!match) {\r\n throw new Error('Bad use of emmet');\r\n }\r\n attrs = Object.assign({}, (attrs || {}));\r\n let tagName = match[1] || 'div';\r\n let result;\r\n if (namespace !== Namespace.HTML) {\r\n result = document.createElementNS(namespace, tagName);\r\n }\r\n else {\r\n result = document.createElement(tagName);\r\n }\r\n if (match[3]) {\r\n result.id = match[3];\r\n }\r\n if (match[4]) {\r\n result.className = match[4].replace(/\\./g, ' ').trim();\r\n }\r\n Object.keys(attrs).forEach(name => {\r\n const value = attrs[name];\r\n if (typeof value === 'undefined') {\r\n return;\r\n }\r\n if (/^on\\w+$/.test(name)) {\r\n result[name] = value;\r\n }\r\n else if (name === 'selected') {\r\n if (value) {\r\n result.setAttribute(name, 'true');\r\n }\r\n }\r\n else {\r\n result.setAttribute(name, value);\r\n }\r\n });\r\n result.append(...children);\r\n return result;\r\n}\r\nfunction $(description, attrs, ...children) {\r\n return _$(Namespace.HTML, description, attrs, ...children);\r\n}\r\n$.SVG = function (description, attrs, ...children) {\r\n return _$(Namespace.SVG, description, attrs, ...children);\r\n};\r\nfunction show(...elements) {\r\n for (let element of elements) {\r\n element.style.display = '';\r\n element.removeAttribute('aria-hidden');\r\n }\r\n}\r\nfunction hide(...elements) {\r\n for (let element of elements) {\r\n element.style.display = 'none';\r\n element.setAttribute('aria-hidden', 'true');\r\n }\r\n}\r\nfunction getElementsByTagName(tag) {\r\n return Array.prototype.slice.call(document.getElementsByTagName(tag), 0);\r\n}\r\n/**\r\n * Find a value usable for a dom node size such that the likelihood that it would be\r\n * displayed with constant screen pixels size is as high as possible.\r\n *\r\n * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio\r\n * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/\"snaps\"\r\n * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels.\r\n */\r\nfunction computeScreenAwareSize(cssPx) {\r\n const screenPx = window.devicePixelRatio * cssPx;\r\n return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio;\r\n}\r\n/**\r\n * See https://github.com/microsoft/monaco-editor/issues/601\r\n * To protect against malicious code in the linked site, particularly phishing attempts,\r\n * the window.opener should be set to null to prevent the linked site from having access\r\n * to change the location of the current page.\r\n * See https://mathiasbynens.github.io/rel-noopener/\r\n */\r\nfunction windowOpenNoOpener(url) {\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isElectron || _browser_js__WEBPACK_IMPORTED_MODULE_0__.isEdgeLegacyWebView) {\r\n // In VSCode, window.open() always returns null...\r\n // The same is true for a WebView (see https://github.com/microsoft/monaco-editor/issues/628)\r\n // Also call directly window.open in sandboxed Electron (see https://github.com/microsoft/monaco-editor/issues/2220)\r\n window.open(url);\r\n }\r\n else {\r\n let newTab = window.open();\r\n if (newTab) {\r\n newTab.opener = null;\r\n newTab.location.href = url;\r\n }\r\n }\r\n}\r\nfunction animate(fn) {\r\n const step = () => {\r\n fn();\r\n stepDisposable = scheduleAtNextAnimationFrame(step);\r\n };\r\n let stepDisposable = scheduleAtNextAnimationFrame(step);\r\n return (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.toDisposable)(() => stepDisposable.dispose());\r\n}\r\n_common_network_js__WEBPACK_IMPORTED_MODULE_9__.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href) ? 'https' : 'http');\r\n/**\r\n * returns url('...')\r\n */\r\nfunction asCSSUrl(uri) {\r\n if (!uri) {\r\n return `url('')`;\r\n }\r\n return `url('${_common_network_js__WEBPACK_IMPORTED_MODULE_9__.FileAccess.asBrowserUri(uri).toString(true).replace(/'/g, '%27')}')`;\r\n}\r\nfunction asCSSPropertyValue(value) {\r\n return `'${value.replace(/'/g, '%27')}'`;\r\n}\r\nclass ModifierKeyEmitter extends _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter {\r\n constructor() {\r\n super();\r\n this._subscriptions = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore();\r\n this._keyStatus = {\r\n altKey: false,\r\n shiftKey: false,\r\n ctrlKey: false,\r\n metaKey: false\r\n };\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(window, 'keydown', true)(e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardKeyboardEvent(e);\r\n // If Alt-key keydown event is repeated, ignore it #112347\r\n // Only known to be necessary for Alt-Key at the moment #115810\r\n if (event.keyCode === 6 /* Alt */ && e.repeat) {\r\n return;\r\n }\r\n if (e.altKey && !this._keyStatus.altKey) {\r\n this._keyStatus.lastKeyPressed = 'alt';\r\n }\r\n else if (e.ctrlKey && !this._keyStatus.ctrlKey) {\r\n this._keyStatus.lastKeyPressed = 'ctrl';\r\n }\r\n else if (e.metaKey && !this._keyStatus.metaKey) {\r\n this._keyStatus.lastKeyPressed = 'meta';\r\n }\r\n else if (e.shiftKey && !this._keyStatus.shiftKey) {\r\n this._keyStatus.lastKeyPressed = 'shift';\r\n }\r\n else if (event.keyCode !== 6 /* Alt */) {\r\n this._keyStatus.lastKeyPressed = undefined;\r\n }\r\n else {\r\n return;\r\n }\r\n this._keyStatus.altKey = e.altKey;\r\n this._keyStatus.ctrlKey = e.ctrlKey;\r\n this._keyStatus.metaKey = e.metaKey;\r\n this._keyStatus.shiftKey = e.shiftKey;\r\n if (this._keyStatus.lastKeyPressed) {\r\n this._keyStatus.event = e;\r\n this.fire(this._keyStatus);\r\n }\r\n }));\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(window, 'keyup', true)(e => {\r\n if (!e.altKey && this._keyStatus.altKey) {\r\n this._keyStatus.lastKeyReleased = 'alt';\r\n }\r\n else if (!e.ctrlKey && this._keyStatus.ctrlKey) {\r\n this._keyStatus.lastKeyReleased = 'ctrl';\r\n }\r\n else if (!e.metaKey && this._keyStatus.metaKey) {\r\n this._keyStatus.lastKeyReleased = 'meta';\r\n }\r\n else if (!e.shiftKey && this._keyStatus.shiftKey) {\r\n this._keyStatus.lastKeyReleased = 'shift';\r\n }\r\n else {\r\n this._keyStatus.lastKeyReleased = undefined;\r\n }\r\n if (this._keyStatus.lastKeyPressed !== this._keyStatus.lastKeyReleased) {\r\n this._keyStatus.lastKeyPressed = undefined;\r\n }\r\n this._keyStatus.altKey = e.altKey;\r\n this._keyStatus.ctrlKey = e.ctrlKey;\r\n this._keyStatus.metaKey = e.metaKey;\r\n this._keyStatus.shiftKey = e.shiftKey;\r\n if (this._keyStatus.lastKeyReleased) {\r\n this._keyStatus.event = e;\r\n this.fire(this._keyStatus);\r\n }\r\n }));\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(document.body, 'mousedown', true)(e => {\r\n this._keyStatus.lastKeyPressed = undefined;\r\n }));\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(document.body, 'mouseup', true)(e => {\r\n this._keyStatus.lastKeyPressed = undefined;\r\n }));\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(document.body, 'mousemove', true)(e => {\r\n if (e.buttons) {\r\n this._keyStatus.lastKeyPressed = undefined;\r\n }\r\n }));\r\n this._subscriptions.add((0,_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(window, 'blur')(e => {\r\n this.resetKeyStatus();\r\n }));\r\n }\r\n get keyStatus() {\r\n return this._keyStatus;\r\n }\r\n /**\r\n * Allows to explicitly reset the key status based on more knowledge (#109062)\r\n */\r\n resetKeyStatus() {\r\n this.doResetKeyStatus();\r\n this.fire(this._keyStatus);\r\n }\r\n doResetKeyStatus() {\r\n this._keyStatus = {\r\n altKey: false,\r\n shiftKey: false,\r\n ctrlKey: false,\r\n metaKey: false\r\n };\r\n }\r\n static getInstance() {\r\n if (!ModifierKeyEmitter.instance) {\r\n ModifierKeyEmitter.instance = new ModifierKeyEmitter();\r\n }\r\n return ModifierKeyEmitter.instance;\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._subscriptions.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/dom.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/event.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/event.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"domEvent\": () => (/* binding */ domEvent),\n/* harmony export */ \"stopEvent\": () => (/* binding */ stopEvent),\n/* harmony export */ \"stop\": () => (/* binding */ stop)\n/* harmony export */ });\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst domEvent = (element, type, useCapture) => {\r\n const fn = (e) => emitter.fire(e);\r\n const emitter = new _common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter({\r\n onFirstListenerAdd: () => {\r\n element.addEventListener(type, fn, useCapture);\r\n },\r\n onLastListenerRemove: () => {\r\n element.removeEventListener(type, fn, useCapture);\r\n }\r\n });\r\n return emitter.event;\r\n};\r\nfunction stopEvent(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return event;\r\n}\r\nfunction stop(event) {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_0__.Event.map(event, stopEvent);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/event.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FastDomNode\": () => (/* binding */ FastDomNode),\n/* harmony export */ \"createFastDomNode\": () => (/* binding */ createFastDomNode)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass FastDomNode {\r\n constructor(domNode) {\r\n this.domNode = domNode;\r\n this._maxWidth = -1;\r\n this._width = -1;\r\n this._height = -1;\r\n this._top = -1;\r\n this._left = -1;\r\n this._bottom = -1;\r\n this._right = -1;\r\n this._fontFamily = '';\r\n this._fontWeight = '';\r\n this._fontSize = -1;\r\n this._fontFeatureSettings = '';\r\n this._lineHeight = -1;\r\n this._letterSpacing = -100;\r\n this._className = '';\r\n this._display = '';\r\n this._position = '';\r\n this._visibility = '';\r\n this._backgroundColor = '';\r\n this._layerHint = false;\r\n this._contain = 'none';\r\n this._boxShadow = '';\r\n }\r\n setMaxWidth(maxWidth) {\r\n if (this._maxWidth === maxWidth) {\r\n return;\r\n }\r\n this._maxWidth = maxWidth;\r\n this.domNode.style.maxWidth = this._maxWidth + 'px';\r\n }\r\n setWidth(width) {\r\n if (this._width === width) {\r\n return;\r\n }\r\n this._width = width;\r\n this.domNode.style.width = this._width + 'px';\r\n }\r\n setHeight(height) {\r\n if (this._height === height) {\r\n return;\r\n }\r\n this._height = height;\r\n this.domNode.style.height = this._height + 'px';\r\n }\r\n setTop(top) {\r\n if (this._top === top) {\r\n return;\r\n }\r\n this._top = top;\r\n this.domNode.style.top = this._top + 'px';\r\n }\r\n unsetTop() {\r\n if (this._top === -1) {\r\n return;\r\n }\r\n this._top = -1;\r\n this.domNode.style.top = '';\r\n }\r\n setLeft(left) {\r\n if (this._left === left) {\r\n return;\r\n }\r\n this._left = left;\r\n this.domNode.style.left = this._left + 'px';\r\n }\r\n setBottom(bottom) {\r\n if (this._bottom === bottom) {\r\n return;\r\n }\r\n this._bottom = bottom;\r\n this.domNode.style.bottom = this._bottom + 'px';\r\n }\r\n setRight(right) {\r\n if (this._right === right) {\r\n return;\r\n }\r\n this._right = right;\r\n this.domNode.style.right = this._right + 'px';\r\n }\r\n setFontFamily(fontFamily) {\r\n if (this._fontFamily === fontFamily) {\r\n return;\r\n }\r\n this._fontFamily = fontFamily;\r\n this.domNode.style.fontFamily = this._fontFamily;\r\n }\r\n setFontWeight(fontWeight) {\r\n if (this._fontWeight === fontWeight) {\r\n return;\r\n }\r\n this._fontWeight = fontWeight;\r\n this.domNode.style.fontWeight = this._fontWeight;\r\n }\r\n setFontSize(fontSize) {\r\n if (this._fontSize === fontSize) {\r\n return;\r\n }\r\n this._fontSize = fontSize;\r\n this.domNode.style.fontSize = this._fontSize + 'px';\r\n }\r\n setFontFeatureSettings(fontFeatureSettings) {\r\n if (this._fontFeatureSettings === fontFeatureSettings) {\r\n return;\r\n }\r\n this._fontFeatureSettings = fontFeatureSettings;\r\n this.domNode.style.fontFeatureSettings = this._fontFeatureSettings;\r\n }\r\n setLineHeight(lineHeight) {\r\n if (this._lineHeight === lineHeight) {\r\n return;\r\n }\r\n this._lineHeight = lineHeight;\r\n this.domNode.style.lineHeight = this._lineHeight + 'px';\r\n }\r\n setLetterSpacing(letterSpacing) {\r\n if (this._letterSpacing === letterSpacing) {\r\n return;\r\n }\r\n this._letterSpacing = letterSpacing;\r\n this.domNode.style.letterSpacing = this._letterSpacing + 'px';\r\n }\r\n setClassName(className) {\r\n if (this._className === className) {\r\n return;\r\n }\r\n this._className = className;\r\n this.domNode.className = this._className;\r\n }\r\n toggleClassName(className, shouldHaveIt) {\r\n this.domNode.classList.toggle(className, shouldHaveIt);\r\n this._className = this.domNode.className;\r\n }\r\n setDisplay(display) {\r\n if (this._display === display) {\r\n return;\r\n }\r\n this._display = display;\r\n this.domNode.style.display = this._display;\r\n }\r\n setPosition(position) {\r\n if (this._position === position) {\r\n return;\r\n }\r\n this._position = position;\r\n this.domNode.style.position = this._position;\r\n }\r\n setVisibility(visibility) {\r\n if (this._visibility === visibility) {\r\n return;\r\n }\r\n this._visibility = visibility;\r\n this.domNode.style.visibility = this._visibility;\r\n }\r\n setBackgroundColor(backgroundColor) {\r\n if (this._backgroundColor === backgroundColor) {\r\n return;\r\n }\r\n this._backgroundColor = backgroundColor;\r\n this.domNode.style.backgroundColor = this._backgroundColor;\r\n }\r\n setLayerHinting(layerHint) {\r\n if (this._layerHint === layerHint) {\r\n return;\r\n }\r\n this._layerHint = layerHint;\r\n this.domNode.style.transform = this._layerHint ? 'translate3d(0px, 0px, 0px)' : '';\r\n }\r\n setBoxShadow(boxShadow) {\r\n if (this._boxShadow === boxShadow) {\r\n return;\r\n }\r\n this._boxShadow = boxShadow;\r\n this.domNode.style.boxShadow = boxShadow;\r\n }\r\n setContain(contain) {\r\n if (this._contain === contain) {\r\n return;\r\n }\r\n this._contain = contain;\r\n this.domNode.style.contain = this._contain;\r\n }\r\n setAttribute(name, value) {\r\n this.domNode.setAttribute(name, value);\r\n }\r\n removeAttribute(name) {\r\n this.domNode.removeAttribute(name);\r\n }\r\n appendChild(child) {\r\n this.domNode.appendChild(child.domNode);\r\n }\r\n removeChild(child) {\r\n this.domNode.removeChild(child.domNode);\r\n }\r\n}\r\nfunction createFastDomNode(domNode) {\r\n return new FastDomNode(domNode);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"renderText\": () => (/* binding */ renderText),\n/* harmony export */ \"renderFormattedText\": () => (/* binding */ renderFormattedText),\n/* harmony export */ \"createElement\": () => (/* binding */ createElement)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction renderText(text, options = {}) {\r\n const element = createElement(options);\r\n element.textContent = text;\r\n return element;\r\n}\r\nfunction renderFormattedText(formattedText, options = {}) {\r\n const element = createElement(options);\r\n _renderFormattedText(element, parseFormattedText(formattedText), options.actionHandler);\r\n return element;\r\n}\r\nfunction createElement(options) {\r\n const tagName = options.inline ? 'span' : 'div';\r\n const element = document.createElement(tagName);\r\n if (options.className) {\r\n element.className = options.className;\r\n }\r\n return element;\r\n}\r\nclass StringStream {\r\n constructor(source) {\r\n this.source = source;\r\n this.index = 0;\r\n }\r\n eos() {\r\n return this.index >= this.source.length;\r\n }\r\n next() {\r\n const next = this.peek();\r\n this.advance();\r\n return next;\r\n }\r\n peek() {\r\n return this.source[this.index];\r\n }\r\n advance() {\r\n this.index++;\r\n }\r\n}\r\nfunction _renderFormattedText(element, treeNode, actionHandler) {\r\n let child;\r\n if (treeNode.type === 2 /* Text */) {\r\n child = document.createTextNode(treeNode.content || '');\r\n }\r\n else if (treeNode.type === 3 /* Bold */) {\r\n child = document.createElement('b');\r\n }\r\n else if (treeNode.type === 4 /* Italics */) {\r\n child = document.createElement('i');\r\n }\r\n else if (treeNode.type === 5 /* Action */ && actionHandler) {\r\n const a = document.createElement('a');\r\n a.href = '#';\r\n actionHandler.disposeables.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addStandardDisposableListener(a, 'click', (event) => {\r\n actionHandler.callback(String(treeNode.index), event);\r\n }));\r\n child = a;\r\n }\r\n else if (treeNode.type === 7 /* NewLine */) {\r\n child = document.createElement('br');\r\n }\r\n else if (treeNode.type === 1 /* Root */) {\r\n child = element;\r\n }\r\n if (child && element !== child) {\r\n element.appendChild(child);\r\n }\r\n if (child && Array.isArray(treeNode.children)) {\r\n treeNode.children.forEach((nodeChild) => {\r\n _renderFormattedText(child, nodeChild, actionHandler);\r\n });\r\n }\r\n}\r\nfunction parseFormattedText(content) {\r\n const root = {\r\n type: 1 /* Root */,\r\n children: []\r\n };\r\n let actionViewItemIndex = 0;\r\n let current = root;\r\n const stack = [];\r\n const stream = new StringStream(content);\r\n while (!stream.eos()) {\r\n let next = stream.next();\r\n const isEscapedFormatType = (next === '\\\\' && formatTagType(stream.peek()) !== 0 /* Invalid */);\r\n if (isEscapedFormatType) {\r\n next = stream.next(); // unread the backslash if it escapes a format tag type\r\n }\r\n if (!isEscapedFormatType && isFormatTag(next) && next === stream.peek()) {\r\n stream.advance();\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n const type = formatTagType(next);\r\n if (current.type === type || (current.type === 5 /* Action */ && type === 6 /* ActionClose */)) {\r\n current = stack.pop();\r\n }\r\n else {\r\n const newCurrent = {\r\n type: type,\r\n children: []\r\n };\r\n if (type === 5 /* Action */) {\r\n newCurrent.index = actionViewItemIndex;\r\n actionViewItemIndex++;\r\n }\r\n current.children.push(newCurrent);\r\n stack.push(current);\r\n current = newCurrent;\r\n }\r\n }\r\n else if (next === '\\n') {\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n current.children.push({\r\n type: 7 /* NewLine */\r\n });\r\n }\r\n else {\r\n if (current.type !== 2 /* Text */) {\r\n const textCurrent = {\r\n type: 2 /* Text */,\r\n content: next\r\n };\r\n current.children.push(textCurrent);\r\n stack.push(current);\r\n current = textCurrent;\r\n }\r\n else {\r\n current.content += next;\r\n }\r\n }\r\n }\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n if (stack.length) {\r\n // incorrectly formatted string literal\r\n }\r\n return root;\r\n}\r\nfunction isFormatTag(char) {\r\n return formatTagType(char) !== 0 /* Invalid */;\r\n}\r\nfunction formatTagType(char) {\r\n switch (char) {\r\n case '*':\r\n return 3 /* Bold */;\r\n case '_':\r\n return 4 /* Italics */;\r\n case '[':\r\n return 5 /* Action */;\r\n case ']':\r\n return 6 /* ActionClose */;\r\n default:\r\n return 0 /* Invalid */;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"standardMouseMoveMerger\": () => (/* binding */ standardMouseMoveMerger),\n/* harmony export */ \"GlobalMouseMoveMonitor\": () => (/* binding */ GlobalMouseMoveMonitor)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iframe.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/iframe.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nfunction standardMouseMoveMerger(lastEvent, currentEvent) {\r\n let ev = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(currentEvent);\r\n ev.preventDefault();\r\n return {\r\n leftButton: ev.leftButton,\r\n buttons: ev.buttons,\r\n posx: ev.posx,\r\n posy: ev.posy\r\n };\r\n}\r\nclass GlobalMouseMoveMonitor {\r\n constructor() {\r\n this._hooks = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._mouseMoveEventMerger = null;\r\n this._mouseMoveCallback = null;\r\n this._onStopCallback = null;\r\n }\r\n dispose() {\r\n this.stopMonitoring(false);\r\n this._hooks.dispose();\r\n }\r\n stopMonitoring(invokeStopCallback, browserEvent) {\r\n if (!this.isMonitoring()) {\r\n // Not monitoring\r\n return;\r\n }\r\n // Unhook\r\n this._hooks.clear();\r\n this._mouseMoveEventMerger = null;\r\n this._mouseMoveCallback = null;\r\n const onStopCallback = this._onStopCallback;\r\n this._onStopCallback = null;\r\n if (invokeStopCallback && onStopCallback) {\r\n onStopCallback(browserEvent);\r\n }\r\n }\r\n isMonitoring() {\r\n return !!this._mouseMoveEventMerger;\r\n }\r\n startMonitoring(initialElement, initialButtons, mouseMoveEventMerger, mouseMoveCallback, onStopCallback) {\r\n if (this.isMonitoring()) {\r\n // I am already hooked\r\n return;\r\n }\r\n this._mouseMoveEventMerger = mouseMoveEventMerger;\r\n this._mouseMoveCallback = mouseMoveCallback;\r\n this._onStopCallback = onStopCallback;\r\n const windowChain = _iframe_js__WEBPACK_IMPORTED_MODULE_1__.IframeUtils.getSameOriginWindowChain();\r\n const mouseMove = 'mousemove';\r\n const mouseUp = 'mouseup';\r\n const listenTo = windowChain.map(element => element.window.document);\r\n const shadowRoot = _dom_js__WEBPACK_IMPORTED_MODULE_0__.getShadowRoot(initialElement);\r\n if (shadowRoot) {\r\n listenTo.unshift(shadowRoot);\r\n }\r\n for (const element of listenTo) {\r\n this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableThrottledListener(element, mouseMove, (data) => {\r\n if (data.buttons !== initialButtons) {\r\n // Buttons state has changed in the meantime\r\n this.stopMonitoring(true);\r\n return;\r\n }\r\n this._mouseMoveCallback(data);\r\n }, (lastEvent, currentEvent) => this._mouseMoveEventMerger(lastEvent, currentEvent)));\r\n this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(element, mouseUp, (e) => this.stopMonitoring(true)));\r\n }\r\n if (_iframe_js__WEBPACK_IMPORTED_MODULE_1__.IframeUtils.hasDifferentOriginAncestor()) {\r\n let lastSameOriginAncestor = windowChain[windowChain.length - 1];\r\n // We might miss a mouse up if it happens outside the iframe\r\n // This one is for Chrome\r\n this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', (browserEvent) => {\r\n let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(browserEvent);\r\n if (e.target.tagName.toLowerCase() === 'html') {\r\n this.stopMonitoring(true);\r\n }\r\n }));\r\n // This one is for FF\r\n this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', (browserEvent) => {\r\n let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(browserEvent);\r\n if (e.target.tagName.toLowerCase() === 'html') {\r\n this.stopMonitoring(true);\r\n }\r\n }));\r\n // This one is for IE\r\n this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent) => {\r\n this.stopMonitoring(true);\r\n }));\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/iframe.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IframeUtils\": () => (/* binding */ IframeUtils)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nlet hasDifferentOriginAncestorFlag = false;\r\nlet sameOriginWindowChainCache = null;\r\nfunction getParentWindowIfSameOrigin(w) {\r\n if (!w.parent || w.parent === w) {\r\n return null;\r\n }\r\n // Cannot really tell if we have access to the parent window unless we try to access something in it\r\n try {\r\n let location = w.location;\r\n let parentLocation = w.parent.location;\r\n if (location.origin !== 'null' && parentLocation.origin !== 'null') {\r\n if (location.protocol !== parentLocation.protocol || location.hostname !== parentLocation.hostname || location.port !== parentLocation.port) {\r\n hasDifferentOriginAncestorFlag = true;\r\n return null;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n hasDifferentOriginAncestorFlag = true;\r\n return null;\r\n }\r\n return w.parent;\r\n}\r\nclass IframeUtils {\r\n /**\r\n * Returns a chain of embedded windows with the same origin (which can be accessed programmatically).\r\n * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin.\r\n * To distinguish if at one point the current execution environment is running inside a window with a different origin, see hasDifferentOriginAncestor()\r\n */\r\n static getSameOriginWindowChain() {\r\n if (!sameOriginWindowChainCache) {\r\n sameOriginWindowChainCache = [];\r\n let w = window;\r\n let parent;\r\n do {\r\n parent = getParentWindowIfSameOrigin(w);\r\n if (parent) {\r\n sameOriginWindowChainCache.push({\r\n window: w,\r\n iframeElement: w.frameElement || null\r\n });\r\n }\r\n else {\r\n sameOriginWindowChainCache.push({\r\n window: w,\r\n iframeElement: null\r\n });\r\n }\r\n w = parent;\r\n } while (w);\r\n }\r\n return sameOriginWindowChainCache.slice(0);\r\n }\r\n /**\r\n * Returns true if the current execution environment is chained in a list of iframes which at one point ends in a window with a different origin.\r\n * Returns false if the current execution environment is not running inside an iframe or if the entire chain of iframes have the same origin.\r\n */\r\n static hasDifferentOriginAncestor() {\r\n if (!sameOriginWindowChainCache) {\r\n this.getSameOriginWindowChain();\r\n }\r\n return hasDifferentOriginAncestorFlag;\r\n }\r\n /**\r\n * Returns the position of `childWindow` relative to `ancestorWindow`\r\n */\r\n static getPositionOfChildWindowRelativeToAncestorWindow(childWindow, ancestorWindow) {\r\n if (!ancestorWindow || childWindow === ancestorWindow) {\r\n return {\r\n top: 0,\r\n left: 0\r\n };\r\n }\r\n let top = 0, left = 0;\r\n let windowChain = this.getSameOriginWindowChain();\r\n for (const windowChainEl of windowChain) {\r\n top += windowChainEl.window.scrollY;\r\n left += windowChainEl.window.scrollX;\r\n if (windowChainEl.window === ancestorWindow) {\r\n break;\r\n }\r\n if (!windowChainEl.iframeElement) {\r\n break;\r\n }\r\n let boundingRect = windowChainEl.iframeElement.getBoundingClientRect();\r\n top += boundingRect.top;\r\n left += boundingRect.left;\r\n }\r\n return {\r\n top: top,\r\n left: left\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/iframe.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandardKeyboardEvent\": () => (/* binding */ StandardKeyboardEvent)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nlet KEY_CODE_MAP = new Array(230);\r\nlet INVERSE_KEY_CODE_MAP = new Array(112 /* MAX_VALUE */);\r\n(function () {\r\n for (let i = 0; i < INVERSE_KEY_CODE_MAP.length; i++) {\r\n INVERSE_KEY_CODE_MAP[i] = -1;\r\n }\r\n function define(code, keyCode) {\r\n KEY_CODE_MAP[code] = keyCode;\r\n INVERSE_KEY_CODE_MAP[keyCode] = code;\r\n }\r\n define(3, 7 /* PauseBreak */); // VK_CANCEL 0x03 Control-break processing\r\n define(8, 1 /* Backspace */);\r\n define(9, 2 /* Tab */);\r\n define(13, 3 /* Enter */);\r\n define(16, 4 /* Shift */);\r\n define(17, 5 /* Ctrl */);\r\n define(18, 6 /* Alt */);\r\n define(19, 7 /* PauseBreak */);\r\n define(20, 8 /* CapsLock */);\r\n define(27, 9 /* Escape */);\r\n define(32, 10 /* Space */);\r\n define(33, 11 /* PageUp */);\r\n define(34, 12 /* PageDown */);\r\n define(35, 13 /* End */);\r\n define(36, 14 /* Home */);\r\n define(37, 15 /* LeftArrow */);\r\n define(38, 16 /* UpArrow */);\r\n define(39, 17 /* RightArrow */);\r\n define(40, 18 /* DownArrow */);\r\n define(45, 19 /* Insert */);\r\n define(46, 20 /* Delete */);\r\n define(48, 21 /* KEY_0 */);\r\n define(49, 22 /* KEY_1 */);\r\n define(50, 23 /* KEY_2 */);\r\n define(51, 24 /* KEY_3 */);\r\n define(52, 25 /* KEY_4 */);\r\n define(53, 26 /* KEY_5 */);\r\n define(54, 27 /* KEY_6 */);\r\n define(55, 28 /* KEY_7 */);\r\n define(56, 29 /* KEY_8 */);\r\n define(57, 30 /* KEY_9 */);\r\n define(65, 31 /* KEY_A */);\r\n define(66, 32 /* KEY_B */);\r\n define(67, 33 /* KEY_C */);\r\n define(68, 34 /* KEY_D */);\r\n define(69, 35 /* KEY_E */);\r\n define(70, 36 /* KEY_F */);\r\n define(71, 37 /* KEY_G */);\r\n define(72, 38 /* KEY_H */);\r\n define(73, 39 /* KEY_I */);\r\n define(74, 40 /* KEY_J */);\r\n define(75, 41 /* KEY_K */);\r\n define(76, 42 /* KEY_L */);\r\n define(77, 43 /* KEY_M */);\r\n define(78, 44 /* KEY_N */);\r\n define(79, 45 /* KEY_O */);\r\n define(80, 46 /* KEY_P */);\r\n define(81, 47 /* KEY_Q */);\r\n define(82, 48 /* KEY_R */);\r\n define(83, 49 /* KEY_S */);\r\n define(84, 50 /* KEY_T */);\r\n define(85, 51 /* KEY_U */);\r\n define(86, 52 /* KEY_V */);\r\n define(87, 53 /* KEY_W */);\r\n define(88, 54 /* KEY_X */);\r\n define(89, 55 /* KEY_Y */);\r\n define(90, 56 /* KEY_Z */);\r\n define(93, 58 /* ContextMenu */);\r\n define(96, 93 /* NUMPAD_0 */);\r\n define(97, 94 /* NUMPAD_1 */);\r\n define(98, 95 /* NUMPAD_2 */);\r\n define(99, 96 /* NUMPAD_3 */);\r\n define(100, 97 /* NUMPAD_4 */);\r\n define(101, 98 /* NUMPAD_5 */);\r\n define(102, 99 /* NUMPAD_6 */);\r\n define(103, 100 /* NUMPAD_7 */);\r\n define(104, 101 /* NUMPAD_8 */);\r\n define(105, 102 /* NUMPAD_9 */);\r\n define(106, 103 /* NUMPAD_MULTIPLY */);\r\n define(107, 104 /* NUMPAD_ADD */);\r\n define(108, 105 /* NUMPAD_SEPARATOR */);\r\n define(109, 106 /* NUMPAD_SUBTRACT */);\r\n define(110, 107 /* NUMPAD_DECIMAL */);\r\n define(111, 108 /* NUMPAD_DIVIDE */);\r\n define(112, 59 /* F1 */);\r\n define(113, 60 /* F2 */);\r\n define(114, 61 /* F3 */);\r\n define(115, 62 /* F4 */);\r\n define(116, 63 /* F5 */);\r\n define(117, 64 /* F6 */);\r\n define(118, 65 /* F7 */);\r\n define(119, 66 /* F8 */);\r\n define(120, 67 /* F9 */);\r\n define(121, 68 /* F10 */);\r\n define(122, 69 /* F11 */);\r\n define(123, 70 /* F12 */);\r\n define(124, 71 /* F13 */);\r\n define(125, 72 /* F14 */);\r\n define(126, 73 /* F15 */);\r\n define(127, 74 /* F16 */);\r\n define(128, 75 /* F17 */);\r\n define(129, 76 /* F18 */);\r\n define(130, 77 /* F19 */);\r\n define(144, 78 /* NumLock */);\r\n define(145, 79 /* ScrollLock */);\r\n define(186, 80 /* US_SEMICOLON */);\r\n define(187, 81 /* US_EQUAL */);\r\n define(188, 82 /* US_COMMA */);\r\n define(189, 83 /* US_MINUS */);\r\n define(190, 84 /* US_DOT */);\r\n define(191, 85 /* US_SLASH */);\r\n define(192, 86 /* US_BACKTICK */);\r\n define(193, 110 /* ABNT_C1 */);\r\n define(194, 111 /* ABNT_C2 */);\r\n define(219, 87 /* US_OPEN_SQUARE_BRACKET */);\r\n define(220, 88 /* US_BACKSLASH */);\r\n define(221, 89 /* US_CLOSE_SQUARE_BRACKET */);\r\n define(222, 90 /* US_QUOTE */);\r\n define(223, 91 /* OEM_8 */);\r\n define(226, 92 /* OEM_102 */);\r\n /**\r\n * https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\r\n * If an Input Method Editor is processing key input and the event is keydown, return 229.\r\n */\r\n define(229, 109 /* KEY_IN_COMPOSITION */);\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox) {\r\n define(59, 80 /* US_SEMICOLON */);\r\n define(107, 81 /* US_EQUAL */);\r\n define(109, 83 /* US_MINUS */);\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n define(224, 57 /* Meta */);\r\n }\r\n }\r\n else if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit) {\r\n define(91, 57 /* Meta */);\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n // the two meta keys in the Mac have different key codes (91 and 93)\r\n define(93, 57 /* Meta */);\r\n }\r\n else {\r\n define(92, 57 /* Meta */);\r\n }\r\n }\r\n})();\r\nfunction extractKeyCode(e) {\r\n if (e.charCode) {\r\n // \"keypress\" events mostly\r\n let char = String.fromCharCode(e.charCode).toUpperCase();\r\n return _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.KeyCodeUtils.fromString(char);\r\n }\r\n return KEY_CODE_MAP[e.keyCode] || 0 /* Unknown */;\r\n}\r\nconst ctrlKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */);\r\nconst altKeyMod = 512 /* Alt */;\r\nconst shiftKeyMod = 1024 /* Shift */;\r\nconst metaKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh ? 2048 /* CtrlCmd */ : 256 /* WinCtrl */);\r\nclass StandardKeyboardEvent {\r\n constructor(source) {\r\n this._standardKeyboardEventBrand = true;\r\n let e = source;\r\n this.browserEvent = e;\r\n this.target = e.target;\r\n this.ctrlKey = e.ctrlKey;\r\n this.shiftKey = e.shiftKey;\r\n this.altKey = e.altKey;\r\n this.metaKey = e.metaKey;\r\n this.keyCode = extractKeyCode(e);\r\n this.code = e.code;\r\n // console.info(e.type + \": keyCode: \" + e.keyCode + \", which: \" + e.which + \", charCode: \" + e.charCode + \", detail: \" + e.detail + \" ====> \" + this.keyCode + ' -- ' + KeyCode[this.keyCode]);\r\n this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* Ctrl */;\r\n this.altKey = this.altKey || this.keyCode === 6 /* Alt */;\r\n this.shiftKey = this.shiftKey || this.keyCode === 4 /* Shift */;\r\n this.metaKey = this.metaKey || this.keyCode === 57 /* Meta */;\r\n this._asKeybinding = this._computeKeybinding();\r\n this._asRuntimeKeybinding = this._computeRuntimeKeybinding();\r\n // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`);\r\n }\r\n preventDefault() {\r\n if (this.browserEvent && this.browserEvent.preventDefault) {\r\n this.browserEvent.preventDefault();\r\n }\r\n }\r\n stopPropagation() {\r\n if (this.browserEvent && this.browserEvent.stopPropagation) {\r\n this.browserEvent.stopPropagation();\r\n }\r\n }\r\n toKeybinding() {\r\n return this._asRuntimeKeybinding;\r\n }\r\n equals(other) {\r\n return this._asKeybinding === other;\r\n }\r\n _computeKeybinding() {\r\n let key = 0 /* Unknown */;\r\n if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) {\r\n key = this.keyCode;\r\n }\r\n let result = 0;\r\n if (this.ctrlKey) {\r\n result |= ctrlKeyMod;\r\n }\r\n if (this.altKey) {\r\n result |= altKeyMod;\r\n }\r\n if (this.shiftKey) {\r\n result |= shiftKeyMod;\r\n }\r\n if (this.metaKey) {\r\n result |= metaKeyMod;\r\n }\r\n result |= key;\r\n return result;\r\n }\r\n _computeRuntimeKeybinding() {\r\n let key = 0 /* Unknown */;\r\n if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) {\r\n key = this.keyCode;\r\n }\r\n return new _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.SimpleKeybinding(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"renderMarkdown\": () => (/* binding */ renderMarkdown)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formattedTextRenderer.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js\");\n/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/idGenerator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js\");\n/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/marked/marked.js */ \"./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js\");\n/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/insane/insane.js */ \"./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js\");\n/* harmony import */ var _common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/marshalling.js */ \"./node_modules/monaco-editor/esm/vs/base/common/marshalling.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_uri_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_network_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _common_iconLabels_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js\");\n/* harmony import */ var _common_resources_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/iconLabel/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst _ttpInsane = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('insane', {\r\n createHTML(value, options) {\r\n return (0,_common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__.insane)(value, options);\r\n }\r\n});\r\n/**\r\n * Low-level way create a html element from a markdown string.\r\n *\r\n * **Note** that for most cases you should be using [`MarkdownRenderer`](./src/vs/editor/browser/core/markdownRenderer.ts)\r\n * which comes with support for pretty code block rendering and which uses the default way of handling links.\r\n */\r\nfunction renderMarkdown(markdown, options = {}, markedOptions = {}) {\r\n var _a;\r\n const element = (0,_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(options);\r\n const _uriMassage = function (part) {\r\n let data;\r\n try {\r\n data = (0,_common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__.parse)(decodeURIComponent(part));\r\n }\r\n catch (e) {\r\n // ignore\r\n }\r\n if (!data) {\r\n return part;\r\n }\r\n data = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_8__.cloneAndChange)(data, value => {\r\n if (markdown.uris && markdown.uris[value]) {\r\n return _common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.revive(markdown.uris[value]);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n return encodeURIComponent(JSON.stringify(data));\r\n };\r\n const _href = function (href, isDomUri) {\r\n const data = markdown.uris && markdown.uris[href];\r\n if (!data) {\r\n return href; // no uri exists\r\n }\r\n let uri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.revive(data);\r\n if (_common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.parse(href).toString() === uri.toString()) {\r\n return href; // no tranformation performed\r\n }\r\n if (isDomUri) {\r\n // this URI will end up as \"src\"-attribute of a dom node\r\n // and because of that special rewriting needs to be done\r\n // so that the URI uses a protocol that's understood by\r\n // browsers (like http or https)\r\n return _common_network_js__WEBPACK_IMPORTED_MODULE_11__.FileAccess.asBrowserUri(uri).toString(true);\r\n }\r\n if (uri.query) {\r\n uri = uri.with({ query: _uriMassage(uri.query) });\r\n }\r\n return uri.toString();\r\n };\r\n // signal to code-block render that the\r\n // element has been created\r\n let signalInnerHTML;\r\n const withInnerHTML = new Promise(c => signalInnerHTML = c);\r\n const renderer = new _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__.Renderer();\r\n renderer.image = (href, title, text) => {\r\n let dimensions = [];\r\n let attributes = [];\r\n if (href) {\r\n ({ href, dimensions } = (0,_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__.parseHrefAndDimensions)(href));\r\n href = _href(href, true);\r\n try {\r\n const hrefAsUri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.parse(href);\r\n if (options.baseUrl && hrefAsUri.scheme === _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.file) { // absolute or relative local path, or file: uri\r\n href = (0,_common_resources_js__WEBPACK_IMPORTED_MODULE_13__.resolvePath)(options.baseUrl, href).toString();\r\n }\r\n }\r\n catch (err) { }\r\n attributes.push(`src=\"${href}\"`);\r\n }\r\n if (text) {\r\n attributes.push(`alt=\"${text}\"`);\r\n }\r\n if (title) {\r\n attributes.push(`title=\"${title}\"`);\r\n }\r\n if (dimensions.length) {\r\n attributes = attributes.concat(dimensions);\r\n }\r\n return '<img ' + attributes.join(' ') + '>';\r\n };\r\n renderer.link = (href, title, text) => {\r\n // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829\r\n if (href === text) { // raw link case\r\n text = (0,_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__.removeMarkdownEscapes)(text);\r\n }\r\n href = _href(href, false);\r\n if (options.baseUrl) {\r\n const hasScheme = /^\\w[\\w\\d+.-]*:/.test(href);\r\n if (!hasScheme) {\r\n href = (0,_common_resources_js__WEBPACK_IMPORTED_MODULE_13__.resolvePath)(options.baseUrl, href).toString();\r\n }\r\n }\r\n title = (0,_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__.removeMarkdownEscapes)(title);\r\n href = (0,_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__.removeMarkdownEscapes)(href);\r\n if (!href\r\n || href.match(/^data:|javascript:/i)\r\n || (href.match(/^command:/i) && !markdown.isTrusted)\r\n || href.match(/^command:(\\/\\/\\/)?_workbench\\.downloadResource/i)) {\r\n // drop the link\r\n return text;\r\n }\r\n else {\r\n // HTML Encode href\r\n href = href.replace(/&/g, '&')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''');\r\n return `<a href=\"#\" data-href=\"${href}\" title=\"${title || href}\">${text}</a>`;\r\n }\r\n };\r\n renderer.paragraph = (text) => {\r\n if (markdown.supportThemeIcons) {\r\n const elements = (0,_ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_15__.renderLabelWithIcons)(text);\r\n text = elements.map(e => typeof e === 'string' ? e : e.outerHTML).join('');\r\n }\r\n return `<p>${text}</p>`;\r\n };\r\n if (options.codeBlockRenderer) {\r\n renderer.code = (code, lang) => {\r\n const value = options.codeBlockRenderer(lang, code);\r\n // when code-block rendering is async we return sync\r\n // but update the node with the real result later.\r\n const id = _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__.defaultGenerator.nextId();\r\n const promise = Promise.all([value, withInnerHTML]).then(values => {\r\n const span = element.querySelector(`div[data-code=\"${id}\"]`);\r\n if (span) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_0__.reset(span, values[0]);\r\n }\r\n }).catch(_err => {\r\n // ignore\r\n });\r\n if (options.asyncRenderCallback) {\r\n promise.then(options.asyncRenderCallback);\r\n }\r\n return `<div class=\"code\" data-code=\"${id}\">${(0,_common_strings_js__WEBPACK_IMPORTED_MODULE_9__.escape)(code)}</div>`;\r\n };\r\n }\r\n if (options.actionHandler) {\r\n options.actionHandler.disposeables.add(_common_event_js__WEBPACK_IMPORTED_MODULE_16__.Event.any((0,_event_js__WEBPACK_IMPORTED_MODULE_17__.domEvent)(element, 'click'), (0,_event_js__WEBPACK_IMPORTED_MODULE_17__.domEvent)(element, 'auxclick'))(e => {\r\n const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__.StandardMouseEvent(e);\r\n if (!mouseEvent.leftButton && !mouseEvent.middleButton) {\r\n return;\r\n }\r\n let target = mouseEvent.target;\r\n if (target.tagName !== 'A') {\r\n target = target.parentElement;\r\n if (!target || target.tagName !== 'A') {\r\n return;\r\n }\r\n }\r\n try {\r\n const href = target.dataset['href'];\r\n if (href) {\r\n options.actionHandler.callback(href, mouseEvent);\r\n }\r\n }\r\n catch (err) {\r\n (0,_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedError)(err);\r\n }\r\n finally {\r\n mouseEvent.preventDefault();\r\n }\r\n }));\r\n }\r\n // Use our own sanitizer so that we can let through only spans.\r\n // Otherwise, we'd be letting all html be rendered.\r\n // If we want to allow markdown permitted tags, then we can delete sanitizer and sanitize.\r\n // We always pass the output through insane after this so that we don't rely on\r\n // marked for sanitization.\r\n markedOptions.sanitizer = (html) => {\r\n const match = markdown.isTrusted ? html.match(/^(<span[^>]+>)|(<\\/\\s*span>)$/) : undefined;\r\n return match ? html : '';\r\n };\r\n markedOptions.sanitize = true;\r\n markedOptions.silent = true;\r\n markedOptions.renderer = renderer;\r\n // values that are too long will freeze the UI\r\n let value = (_a = markdown.value) !== null && _a !== void 0 ? _a : '';\r\n if (value.length > 100000) {\r\n value = `${value.substr(0, 100000)}…`;\r\n }\r\n // escape theme icons\r\n if (markdown.supportThemeIcons) {\r\n value = (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_12__.markdownEscapeEscapedIcons)(value);\r\n }\r\n const renderedMarkdown = _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__.parse(value, markedOptions);\r\n // sanitize with insane\r\n element.innerHTML = sanitizeRenderedMarkdown(markdown, renderedMarkdown);\r\n // signal that async code blocks can be now be inserted\r\n signalInnerHTML();\r\n // signal size changes for image tags\r\n if (options.asyncRenderCallback) {\r\n for (const img of element.getElementsByTagName('img')) {\r\n const listener = _dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(img, 'load', () => {\r\n listener.dispose();\r\n options.asyncRenderCallback();\r\n });\r\n }\r\n }\r\n return element;\r\n}\r\nfunction sanitizeRenderedMarkdown(options, renderedMarkdown) {\r\n var _a;\r\n const insaneOptions = getInsaneOptions(options);\r\n return (_a = _ttpInsane === null || _ttpInsane === void 0 ? void 0 : _ttpInsane.createHTML(renderedMarkdown, insaneOptions)) !== null && _a !== void 0 ? _a : (0,_common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__.insane)(renderedMarkdown, insaneOptions);\r\n}\r\nfunction getInsaneOptions(options) {\r\n const allowedSchemes = [\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.http,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.https,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.mailto,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.data,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.file,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.vscodeRemote,\r\n _common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.vscodeRemoteResource,\r\n ];\r\n if (options.isTrusted) {\r\n allowedSchemes.push(_common_network_js__WEBPACK_IMPORTED_MODULE_11__.Schemas.command);\r\n }\r\n return {\r\n allowedSchemes,\r\n // allowedTags should included everything that markdown renders to.\r\n // Since we have our own sanitize function for marked, it's possible we missed some tag so let insane make sure.\r\n // HTML tags that can result from markdown are from reading https://spec.commonmark.org/0.29/\r\n // HTML table tags that can result from markdown are from https://github.github.com/gfm/#tables-extension-\r\n allowedTags: ['ul', 'li', 'p', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span'],\r\n allowedAttributes: {\r\n 'a': ['href', 'name', 'target', 'data-href'],\r\n 'img': ['src', 'title', 'alt', 'width', 'height'],\r\n 'div': ['class', 'data-code'],\r\n 'span': ['class', 'style'],\r\n // https://github.com/microsoft/vscode/issues/95937\r\n 'th': ['align'],\r\n 'td': ['align']\r\n },\r\n filter(token) {\r\n if (token.tag === 'span' && options.isTrusted) {\r\n if (token.attrs['style'] && (Object.keys(token.attrs).length === 1)) {\r\n return !!token.attrs['style'].match(/^(color\\:#[0-9a-fA-F]+;)?(background-color\\:#[0-9a-fA-F]+;)?$/);\r\n }\r\n else if (token.attrs['class']) {\r\n // The class should match codicon rendering in src\\vs\\base\\common\\codicons.ts\r\n return !!token.attrs['class'].match(/^codicon codicon-[a-z\\-]+( codicon-modifier-[a-z\\-]+)?$/);\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandardMouseEvent\": () => (/* binding */ StandardMouseEvent),\n/* harmony export */ \"StandardWheelEvent\": () => (/* binding */ StandardWheelEvent)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iframe.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/iframe.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass StandardMouseEvent {\r\n constructor(e) {\r\n this.timestamp = Date.now();\r\n this.browserEvent = e;\r\n this.leftButton = e.button === 0;\r\n this.middleButton = e.button === 1;\r\n this.rightButton = e.button === 2;\r\n this.buttons = e.buttons;\r\n this.target = e.target;\r\n this.detail = e.detail || 1;\r\n if (e.type === 'dblclick') {\r\n this.detail = 2;\r\n }\r\n this.ctrlKey = e.ctrlKey;\r\n this.shiftKey = e.shiftKey;\r\n this.altKey = e.altKey;\r\n this.metaKey = e.metaKey;\r\n if (typeof e.pageX === 'number') {\r\n this.posx = e.pageX;\r\n this.posy = e.pageY;\r\n }\r\n else {\r\n // Probably hit by MSGestureEvent\r\n this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\r\n this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;\r\n }\r\n // Find the position of the iframe this code is executing in relative to the iframe where the event was captured.\r\n let iframeOffsets = _iframe_js__WEBPACK_IMPORTED_MODULE_1__.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self, e.view);\r\n this.posx -= iframeOffsets.left;\r\n this.posy -= iframeOffsets.top;\r\n }\r\n preventDefault() {\r\n this.browserEvent.preventDefault();\r\n }\r\n stopPropagation() {\r\n this.browserEvent.stopPropagation();\r\n }\r\n}\r\nclass StandardWheelEvent {\r\n constructor(e, deltaX = 0, deltaY = 0) {\r\n this.browserEvent = e || null;\r\n this.target = e ? (e.target || e.targetNode || e.srcElement) : null;\r\n this.deltaY = deltaY;\r\n this.deltaX = deltaX;\r\n if (e) {\r\n // Old (deprecated) wheel events\r\n let e1 = e;\r\n let e2 = e;\r\n // vertical delta scroll\r\n if (typeof e1.wheelDeltaY !== 'undefined') {\r\n this.deltaY = e1.wheelDeltaY / 120;\r\n }\r\n else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) {\r\n this.deltaY = -e2.detail / 3;\r\n }\r\n else if (e.type === 'wheel') {\r\n // Modern wheel event\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\r\n const ev = e;\r\n if (ev.deltaMode === ev.DOM_DELTA_LINE) {\r\n // the deltas are expressed in lines\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n this.deltaY = -e.deltaY / 3;\r\n }\r\n else {\r\n this.deltaY = -e.deltaY;\r\n }\r\n }\r\n else {\r\n this.deltaY = -e.deltaY / 40;\r\n }\r\n }\r\n // horizontal delta scroll\r\n if (typeof e1.wheelDeltaX !== 'undefined') {\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari && _common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWindows) {\r\n this.deltaX = -(e1.wheelDeltaX / 120);\r\n }\r\n else {\r\n this.deltaX = e1.wheelDeltaX / 120;\r\n }\r\n }\r\n else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) {\r\n this.deltaX = -e.detail / 3;\r\n }\r\n else if (e.type === 'wheel') {\r\n // Modern wheel event\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\r\n const ev = e;\r\n if (ev.deltaMode === ev.DOM_DELTA_LINE) {\r\n // the deltas are expressed in lines\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n this.deltaX = -e.deltaX / 3;\r\n }\r\n else {\r\n this.deltaX = -e.deltaX;\r\n }\r\n }\r\n else {\r\n this.deltaX = -e.deltaX / 40;\r\n }\r\n }\r\n // Assume a vertical scroll if nothing else worked\r\n if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) {\r\n this.deltaY = e.wheelDelta / 120;\r\n }\r\n }\r\n }\r\n preventDefault() {\r\n if (this.browserEvent) {\r\n this.browserEvent.preventDefault();\r\n }\r\n }\r\n stopPropagation() {\r\n if (this.browserEvent) {\r\n this.browserEvent.stopPropagation();\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/touch.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EventType\": () => (/* binding */ EventType),\n/* harmony export */ \"Gesture\": () => (/* binding */ Gesture)\n/* harmony export */ });\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/decorators.js */ \"./node_modules/monaco-editor/esm/vs/base/common/decorators.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\n\r\n\r\n\r\n\r\nvar EventType;\r\n(function (EventType) {\r\n EventType.Tap = '-monaco-gesturetap';\r\n EventType.Change = '-monaco-gesturechange';\r\n EventType.Start = '-monaco-gesturestart';\r\n EventType.End = '-monaco-gesturesend';\r\n EventType.Contextmenu = '-monaco-gesturecontextmenu';\r\n})(EventType || (EventType = {}));\r\nclass Gesture extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super();\r\n this.dispatched = false;\r\n this.activeTouches = {};\r\n this.handle = null;\r\n this.targets = [];\r\n this.ignoreTargets = [];\r\n this._lastSetTapCountTime = 0;\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(document, 'touchstart', (e) => this.onTouchStart(e), { passive: false }));\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(document, 'touchend', (e) => this.onTouchEnd(e)));\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(document, 'touchmove', (e) => this.onTouchMove(e), { passive: false }));\r\n }\r\n static addTarget(element) {\r\n if (!Gesture.isTouchDevice()) {\r\n return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n if (!Gesture.INSTANCE) {\r\n Gesture.INSTANCE = new Gesture();\r\n }\r\n Gesture.INSTANCE.targets.push(element);\r\n return {\r\n dispose: () => {\r\n Gesture.INSTANCE.targets = Gesture.INSTANCE.targets.filter(t => t !== element);\r\n }\r\n };\r\n }\r\n static ignoreTarget(element) {\r\n if (!Gesture.isTouchDevice()) {\r\n return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n if (!Gesture.INSTANCE) {\r\n Gesture.INSTANCE = new Gesture();\r\n }\r\n Gesture.INSTANCE.ignoreTargets.push(element);\r\n return {\r\n dispose: () => {\r\n Gesture.INSTANCE.ignoreTargets = Gesture.INSTANCE.ignoreTargets.filter(t => t !== element);\r\n }\r\n };\r\n }\r\n static isTouchDevice() {\r\n // `'ontouchstart' in window` always evaluates to true with typescript's modern typings. This causes `window` to be\r\n // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast\r\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0;\r\n }\r\n dispose() {\r\n if (this.handle) {\r\n this.handle.dispose();\r\n this.handle = null;\r\n }\r\n super.dispose();\r\n }\r\n onTouchStart(e) {\r\n let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\r\n if (this.handle) {\r\n this.handle.dispose();\r\n this.handle = null;\r\n }\r\n for (let i = 0, len = e.targetTouches.length; i < len; i++) {\r\n let touch = e.targetTouches.item(i);\r\n this.activeTouches[touch.identifier] = {\r\n id: touch.identifier,\r\n initialTarget: touch.target,\r\n initialTimeStamp: timestamp,\r\n initialPageX: touch.pageX,\r\n initialPageY: touch.pageY,\r\n rollingTimestamps: [timestamp],\r\n rollingPageX: [touch.pageX],\r\n rollingPageY: [touch.pageY]\r\n };\r\n let evt = this.newGestureEvent(EventType.Start, touch.target);\r\n evt.pageX = touch.pageX;\r\n evt.pageY = touch.pageY;\r\n this.dispatchEvent(evt);\r\n }\r\n if (this.dispatched) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.dispatched = false;\r\n }\r\n }\r\n onTouchEnd(e) {\r\n let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\r\n let activeTouchCount = Object.keys(this.activeTouches).length;\r\n for (let i = 0, len = e.changedTouches.length; i < len; i++) {\r\n let touch = e.changedTouches.item(i);\r\n if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) {\r\n console.warn('move of an UNKNOWN touch', touch);\r\n continue;\r\n }\r\n let data = this.activeTouches[touch.identifier], holdTime = Date.now() - data.initialTimeStamp;\r\n if (holdTime < Gesture.HOLD_DELAY\r\n && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX)) < 30\r\n && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY)) < 30) {\r\n let evt = this.newGestureEvent(EventType.Tap, data.initialTarget);\r\n evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX);\r\n evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY);\r\n this.dispatchEvent(evt);\r\n }\r\n else if (holdTime >= Gesture.HOLD_DELAY\r\n && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX)) < 30\r\n && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY)) < 30) {\r\n let evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget);\r\n evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX);\r\n evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY);\r\n this.dispatchEvent(evt);\r\n }\r\n else if (activeTouchCount === 1) {\r\n let finalX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX);\r\n let finalY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY);\r\n let deltaT = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingTimestamps) - data.rollingTimestamps[0];\r\n let deltaX = finalX - data.rollingPageX[0];\r\n let deltaY = finalY - data.rollingPageY[0];\r\n // We need to get all the dispatch targets on the start of the inertia event\r\n const dispatchTo = this.targets.filter(t => data.initialTarget instanceof Node && t.contains(data.initialTarget));\r\n this.inertia(dispatchTo, timestamp, // time now\r\n Math.abs(deltaX) / deltaT, // speed\r\n deltaX > 0 ? 1 : -1, // x direction\r\n finalX, // x now\r\n Math.abs(deltaY) / deltaT, // y speed\r\n deltaY > 0 ? 1 : -1, // y direction\r\n finalY // y now\r\n );\r\n }\r\n this.dispatchEvent(this.newGestureEvent(EventType.End, data.initialTarget));\r\n // forget about this touch\r\n delete this.activeTouches[touch.identifier];\r\n }\r\n if (this.dispatched) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.dispatched = false;\r\n }\r\n }\r\n newGestureEvent(type, initialTarget) {\r\n let event = document.createEvent('CustomEvent');\r\n event.initEvent(type, false, true);\r\n event.initialTarget = initialTarget;\r\n event.tapCount = 0;\r\n return event;\r\n }\r\n dispatchEvent(event) {\r\n if (event.type === EventType.Tap) {\r\n const currentTime = (new Date()).getTime();\r\n let setTapCount = 0;\r\n if (currentTime - this._lastSetTapCountTime > Gesture.CLEAR_TAP_COUNT_TIME) {\r\n setTapCount = 1;\r\n }\r\n else {\r\n setTapCount = 2;\r\n }\r\n this._lastSetTapCountTime = currentTime;\r\n event.tapCount = setTapCount;\r\n }\r\n else if (event.type === EventType.Change || event.type === EventType.Contextmenu) {\r\n // tap is canceled by scrolling or context menu\r\n this._lastSetTapCountTime = 0;\r\n }\r\n for (let i = 0; i < this.ignoreTargets.length; i++) {\r\n if (event.initialTarget instanceof Node && this.ignoreTargets[i].contains(event.initialTarget)) {\r\n return;\r\n }\r\n }\r\n this.targets.forEach(target => {\r\n if (event.initialTarget instanceof Node && target.contains(event.initialTarget)) {\r\n target.dispatchEvent(event);\r\n this.dispatched = true;\r\n }\r\n });\r\n }\r\n inertia(dispatchTo, t1, vX, dirX, x, vY, dirY, y) {\r\n this.handle = _dom_js__WEBPACK_IMPORTED_MODULE_2__.scheduleAtNextAnimationFrame(() => {\r\n let now = Date.now();\r\n // velocity: old speed + accel_over_time\r\n let deltaT = now - t1, delta_pos_x = 0, delta_pos_y = 0, stopped = true;\r\n vX += Gesture.SCROLL_FRICTION * deltaT;\r\n vY += Gesture.SCROLL_FRICTION * deltaT;\r\n if (vX > 0) {\r\n stopped = false;\r\n delta_pos_x = dirX * vX * deltaT;\r\n }\r\n if (vY > 0) {\r\n stopped = false;\r\n delta_pos_y = dirY * vY * deltaT;\r\n }\r\n // dispatch translation event\r\n let evt = this.newGestureEvent(EventType.Change);\r\n evt.translationX = delta_pos_x;\r\n evt.translationY = delta_pos_y;\r\n dispatchTo.forEach(d => d.dispatchEvent(evt));\r\n if (!stopped) {\r\n this.inertia(dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y);\r\n }\r\n });\r\n }\r\n onTouchMove(e) {\r\n let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based.\r\n for (let i = 0, len = e.changedTouches.length; i < len; i++) {\r\n let touch = e.changedTouches.item(i);\r\n if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) {\r\n console.warn('end of an UNKNOWN touch', touch);\r\n continue;\r\n }\r\n let data = this.activeTouches[touch.identifier];\r\n let evt = this.newGestureEvent(EventType.Change, data.initialTarget);\r\n evt.translationX = touch.pageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageX);\r\n evt.translationY = touch.pageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.tail(data.rollingPageY);\r\n evt.pageX = touch.pageX;\r\n evt.pageY = touch.pageY;\r\n this.dispatchEvent(evt);\r\n // only keep a few data points, to average the final speed\r\n if (data.rollingPageX.length > 3) {\r\n data.rollingPageX.shift();\r\n data.rollingPageY.shift();\r\n data.rollingTimestamps.shift();\r\n }\r\n data.rollingPageX.push(touch.pageX);\r\n data.rollingPageY.push(touch.pageY);\r\n data.rollingTimestamps.push(timestamp);\r\n }\r\n if (this.dispatched) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.dispatched = false;\r\n }\r\n }\r\n}\r\nGesture.SCROLL_FRICTION = -0.005;\r\nGesture.HOLD_DELAY = 700;\r\nGesture.CLEAR_TAP_COUNT_TIME = 400; // ms\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__.memoize\r\n], Gesture, \"isTouchDevice\", null);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/touch.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseActionViewItem\": () => (/* binding */ BaseActionViewItem),\n/* harmony export */ \"ActionViewItem\": () => (/* binding */ ActionViewItem)\n/* harmony export */ });\n/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dnd.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dnd.js\");\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass BaseActionViewItem extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(context, action, options = {}) {\r\n super();\r\n this.options = options;\r\n this._context = context || this;\r\n this._action = action;\r\n if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_4__.Action) {\r\n this._register(action.onDidChange(event => {\r\n if (!this.element) {\r\n // we have not been rendered yet, so there\r\n // is no point in updating the UI\r\n return;\r\n }\r\n this.handleActionChangeEvent(event);\r\n }));\r\n }\r\n }\r\n handleActionChangeEvent(event) {\r\n if (event.enabled !== undefined) {\r\n this.updateEnabled();\r\n }\r\n if (event.checked !== undefined) {\r\n this.updateChecked();\r\n }\r\n if (event.class !== undefined) {\r\n this.updateClass();\r\n }\r\n if (event.label !== undefined) {\r\n this.updateLabel();\r\n this.updateTooltip();\r\n }\r\n if (event.tooltip !== undefined) {\r\n this.updateTooltip();\r\n }\r\n }\r\n get actionRunner() {\r\n if (!this._actionRunner) {\r\n this._actionRunner = this._register(new _common_actions_js__WEBPACK_IMPORTED_MODULE_4__.ActionRunner());\r\n }\r\n return this._actionRunner;\r\n }\r\n set actionRunner(actionRunner) {\r\n this._actionRunner = actionRunner;\r\n }\r\n getAction() {\r\n return this._action;\r\n }\r\n isEnabled() {\r\n return this._action.enabled;\r\n }\r\n setActionContext(newContext) {\r\n this._context = newContext;\r\n }\r\n render(container) {\r\n const element = this.element = container;\r\n this._register(_touch_js__WEBPACK_IMPORTED_MODULE_6__.Gesture.addTarget(container));\r\n const enableDragging = this.options && this.options.draggable;\r\n if (enableDragging) {\r\n container.draggable = true;\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_8__.isFirefox) {\r\n // Firefox: requires to set a text data transfer to get going\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(container, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.DRAG_START, e => { var _a; return (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_7__.DataTransfers.TEXT, this._action.label); }));\r\n }\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, _touch_js__WEBPACK_IMPORTED_MODULE_6__.EventType.Tap, e => this.onClick(e)));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.MOUSE_DOWN, e => {\r\n if (!enableDragging) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventHelper.stop(e, true); // do not run when dragging is on because that would disable it\r\n }\r\n if (this._action.enabled && e.button === 0) {\r\n element.classList.add('active');\r\n }\r\n }));\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh) {\r\n // macOS: allow to trigger the button when holding Ctrl+key and pressing the\r\n // main mouse button. This is for scenarios where e.g. some interaction forces\r\n // the Ctrl+key to be pressed and hold but the user still wants to interact\r\n // with the actions (for example quick access in quick navigation mode).\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.CONTEXT_MENU, e => {\r\n if (e.button === 0 && e.ctrlKey === true) {\r\n this.onClick(e);\r\n }\r\n }));\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.CLICK, e => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventHelper.stop(e, true);\r\n // menus do not use the click event\r\n if (!(this.options && this.options.isMenu)) {\r\n _common_platform_js__WEBPACK_IMPORTED_MODULE_1__.setImmediate(() => this.onClick(e));\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.DBLCLICK, e => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventHelper.stop(e, true);\r\n }));\r\n [_dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.MOUSE_UP, _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventType.MOUSE_OUT].forEach(event => {\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.addDisposableListener)(element, event, e => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventHelper.stop(e);\r\n element.classList.remove('active');\r\n }));\r\n });\r\n }\r\n onClick(event) {\r\n var _a;\r\n _dom_js__WEBPACK_IMPORTED_MODULE_9__.EventHelper.stop(event, true);\r\n const context = _common_types_js__WEBPACK_IMPORTED_MODULE_5__.isUndefinedOrNull(this._context) ? ((_a = this.options) === null || _a === void 0 ? void 0 : _a.useEventAsContext) ? event : undefined : this._context;\r\n this.actionRunner.run(this._action, context);\r\n }\r\n // Only set the tabIndex on the element once it is about to get focused\r\n // That way this element wont be a tab stop when it is not needed #106441\r\n focus() {\r\n if (this.element) {\r\n this.element.tabIndex = 0;\r\n this.element.focus();\r\n this.element.classList.add('focused');\r\n }\r\n }\r\n blur() {\r\n if (this.element) {\r\n this.element.blur();\r\n this.element.tabIndex = -1;\r\n this.element.classList.remove('focused');\r\n }\r\n }\r\n setFocusable(focusable) {\r\n if (this.element) {\r\n this.element.tabIndex = focusable ? 0 : -1;\r\n }\r\n }\r\n get trapsArrowNavigation() {\r\n return false;\r\n }\r\n updateEnabled() {\r\n // implement in subclass\r\n }\r\n updateLabel() {\r\n // implement in subclass\r\n }\r\n updateTooltip() {\r\n // implement in subclass\r\n }\r\n updateClass() {\r\n // implement in subclass\r\n }\r\n updateChecked() {\r\n // implement in subclass\r\n }\r\n dispose() {\r\n if (this.element) {\r\n this.element.remove();\r\n this.element = undefined;\r\n }\r\n super.dispose();\r\n }\r\n}\r\nclass ActionViewItem extends BaseActionViewItem {\r\n constructor(context, action, options = {}) {\r\n super(context, action, options);\r\n this.options = options;\r\n this.options.icon = options.icon !== undefined ? options.icon : false;\r\n this.options.label = options.label !== undefined ? options.label : true;\r\n this.cssClass = '';\r\n }\r\n render(container) {\r\n super.render(container);\r\n if (this.element) {\r\n this.label = (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.append)(this.element, (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.$)('a.action-label'));\r\n }\r\n if (this.label) {\r\n if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_4__.Separator.ID) {\r\n this.label.setAttribute('role', 'presentation'); // A separator is a presentation item\r\n }\r\n else {\r\n if (this.options.isMenu) {\r\n this.label.setAttribute('role', 'menuitem');\r\n }\r\n else {\r\n this.label.setAttribute('role', 'button');\r\n }\r\n }\r\n }\r\n if (this.options.label && this.options.keybinding && this.element) {\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.append)(this.element, (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.$)('span.keybinding')).textContent = this.options.keybinding;\r\n }\r\n this.updateClass();\r\n this.updateLabel();\r\n this.updateTooltip();\r\n this.updateEnabled();\r\n this.updateChecked();\r\n }\r\n // Only set the tabIndex on the element once it is about to get focused\r\n // That way this element wont be a tab stop when it is not needed #106441\r\n focus() {\r\n if (this.label) {\r\n this.label.tabIndex = 0;\r\n this.label.focus();\r\n }\r\n }\r\n blur() {\r\n if (this.label) {\r\n this.label.tabIndex = -1;\r\n }\r\n }\r\n setFocusable(focusable) {\r\n if (this.label) {\r\n this.label.tabIndex = focusable ? 0 : -1;\r\n }\r\n }\r\n updateLabel() {\r\n if (this.options.label && this.label) {\r\n this.label.textContent = this.getAction().label;\r\n }\r\n }\r\n updateTooltip() {\r\n let title = null;\r\n if (this.getAction().tooltip) {\r\n title = this.getAction().tooltip;\r\n }\r\n else if (!this.options.label && this.getAction().label && this.options.icon) {\r\n title = this.getAction().label;\r\n if (this.options.keybinding) {\r\n title = _nls_js__WEBPACK_IMPORTED_MODULE_2__.localize({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, \"{0} ({1})\", title, this.options.keybinding);\r\n }\r\n }\r\n if (title && this.label) {\r\n this.label.title = title;\r\n }\r\n }\r\n updateClass() {\r\n if (this.cssClass && this.label) {\r\n this.label.classList.remove(...this.cssClass.split(' '));\r\n }\r\n if (this.options.icon) {\r\n this.cssClass = this.getAction().class;\r\n if (this.label) {\r\n this.label.classList.add('codicon');\r\n if (this.cssClass) {\r\n this.label.classList.add(...this.cssClass.split(' '));\r\n }\r\n }\r\n this.updateEnabled();\r\n }\r\n else {\r\n if (this.label) {\r\n this.label.classList.remove('codicon');\r\n }\r\n }\r\n }\r\n updateEnabled() {\r\n if (this.getAction().enabled) {\r\n if (this.label) {\r\n this.label.removeAttribute('aria-disabled');\r\n this.label.classList.remove('disabled');\r\n }\r\n if (this.element) {\r\n this.element.classList.remove('disabled');\r\n }\r\n }\r\n else {\r\n if (this.label) {\r\n this.label.setAttribute('aria-disabled', 'true');\r\n this.label.classList.add('disabled');\r\n }\r\n if (this.element) {\r\n this.element.classList.add('disabled');\r\n }\r\n }\r\n }\r\n updateChecked() {\r\n if (this.label) {\r\n if (this.getAction().checked) {\r\n this.label.classList.add('checked');\r\n }\r\n else {\r\n this.label.classList.remove('checked');\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ActionBar\": () => (/* binding */ ActionBar)\n/* harmony export */ });\n/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actionViewItems.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ActionBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(container, options = {}) {\r\n var _a, _b, _c, _d, _e, _f;\r\n super();\r\n // Trigger Key Tracking\r\n this.triggerKeyDown = false;\r\n this.focusable = true;\r\n this._onDidBlur = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidBlur = this._onDidBlur.event;\r\n this._onDidCancel = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter({ onFirstListenerAdd: () => this.cancelHasListener = true }));\r\n this.onDidCancel = this._onDidCancel.event;\r\n this.cancelHasListener = false;\r\n this._onDidRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidRun = this._onDidRun.event;\r\n this._onBeforeRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onBeforeRun = this._onBeforeRun.event;\r\n this.options = options;\r\n this._context = (_a = options.context) !== null && _a !== void 0 ? _a : null;\r\n this._orientation = (_b = this.options.orientation) !== null && _b !== void 0 ? _b : 0 /* HORIZONTAL */;\r\n this._triggerKeys = {\r\n keyDown: (_d = (_c = this.options.triggerKeys) === null || _c === void 0 ? void 0 : _c.keyDown) !== null && _d !== void 0 ? _d : false,\r\n keys: (_f = (_e = this.options.triggerKeys) === null || _e === void 0 ? void 0 : _e.keys) !== null && _f !== void 0 ? _f : [3 /* Enter */, 10 /* Space */]\r\n };\r\n if (this.options.actionRunner) {\r\n this._actionRunner = this.options.actionRunner;\r\n }\r\n else {\r\n this._actionRunner = new _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.ActionRunner();\r\n this._register(this._actionRunner);\r\n }\r\n this._register(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\r\n this._register(this._actionRunner.onBeforeRun(e => this._onBeforeRun.fire(e)));\r\n this._actionIds = [];\r\n this.viewItems = [];\r\n this.focusedItem = undefined;\r\n this.domNode = document.createElement('div');\r\n this.domNode.className = 'monaco-action-bar';\r\n if (options.animated !== false) {\r\n this.domNode.classList.add('animated');\r\n }\r\n let previousKeys;\r\n let nextKeys;\r\n switch (this._orientation) {\r\n case 0 /* HORIZONTAL */:\r\n previousKeys = [15 /* LeftArrow */];\r\n nextKeys = [17 /* RightArrow */];\r\n break;\r\n case 1 /* HORIZONTAL_REVERSE */:\r\n previousKeys = [17 /* RightArrow */];\r\n nextKeys = [15 /* LeftArrow */];\r\n this.domNode.className += ' reverse';\r\n break;\r\n case 2 /* VERTICAL */:\r\n previousKeys = [16 /* UpArrow */];\r\n nextKeys = [18 /* DownArrow */];\r\n this.domNode.className += ' vertical';\r\n break;\r\n case 3 /* VERTICAL_REVERSE */:\r\n previousKeys = [18 /* DownArrow */];\r\n nextKeys = [16 /* UpArrow */];\r\n this.domNode.className += ' vertical reverse';\r\n break;\r\n }\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener(this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.KEY_DOWN, e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n let eventHandled = true;\r\n const focusedItem = typeof this.focusedItem === 'number' ? this.viewItems[this.focusedItem] : undefined;\r\n if (previousKeys && (event.equals(previousKeys[0]) || event.equals(previousKeys[1]))) {\r\n eventHandled = this.focusPrevious();\r\n }\r\n else if (nextKeys && (event.equals(nextKeys[0]) || event.equals(nextKeys[1]))) {\r\n eventHandled = this.focusNext();\r\n }\r\n else if (event.equals(9 /* Escape */) && this.cancelHasListener) {\r\n this._onDidCancel.fire();\r\n }\r\n else if (event.equals(2 /* Tab */) && focusedItem instanceof _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__.BaseActionViewItem && focusedItem.trapsArrowNavigation) {\r\n this.focusNext();\r\n }\r\n else if (this.isTriggerKeyEvent(event)) {\r\n // Staying out of the else branch even if not triggered\r\n if (this._triggerKeys.keyDown) {\r\n this.doTrigger(event);\r\n }\r\n else {\r\n this.triggerKeyDown = true;\r\n }\r\n }\r\n else {\r\n eventHandled = false;\r\n }\r\n if (eventHandled) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n }));\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener(this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.KEY_UP, e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n // Run action on Enter/Space\r\n if (this.isTriggerKeyEvent(event)) {\r\n if (!this._triggerKeys.keyDown && this.triggerKeyDown) {\r\n this.triggerKeyDown = false;\r\n this.doTrigger(event);\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n // Recompute focused item\r\n else if (event.equals(2 /* Tab */) || event.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n this.updateFocusedItem();\r\n }\r\n }));\r\n this.focusTracker = this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__.trackFocus(this.domNode));\r\n this._register(this.focusTracker.onDidBlur(() => {\r\n if (_dom_js__WEBPACK_IMPORTED_MODULE_3__.getActiveElement() === this.domNode || !_dom_js__WEBPACK_IMPORTED_MODULE_3__.isAncestor(_dom_js__WEBPACK_IMPORTED_MODULE_3__.getActiveElement(), this.domNode)) {\r\n this._onDidBlur.fire();\r\n this.focusedItem = undefined;\r\n this.triggerKeyDown = false;\r\n }\r\n }));\r\n this._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem()));\r\n this.actionsList = document.createElement('ul');\r\n this.actionsList.className = 'actions-container';\r\n this.actionsList.setAttribute('role', 'toolbar');\r\n if (this.options.ariaLabel) {\r\n this.actionsList.setAttribute('aria-label', this.options.ariaLabel);\r\n }\r\n this.domNode.appendChild(this.actionsList);\r\n container.appendChild(this.domNode);\r\n }\r\n isTriggerKeyEvent(event) {\r\n let ret = false;\r\n this._triggerKeys.keys.forEach(keyCode => {\r\n ret = ret || event.equals(keyCode);\r\n });\r\n return ret;\r\n }\r\n updateFocusedItem() {\r\n for (let i = 0; i < this.actionsList.children.length; i++) {\r\n const elem = this.actionsList.children[i];\r\n if (_dom_js__WEBPACK_IMPORTED_MODULE_3__.isAncestor(_dom_js__WEBPACK_IMPORTED_MODULE_3__.getActiveElement(), elem)) {\r\n this.focusedItem = i;\r\n break;\r\n }\r\n }\r\n }\r\n get context() {\r\n return this._context;\r\n }\r\n set context(context) {\r\n this._context = context;\r\n this.viewItems.forEach(i => i.setActionContext(context));\r\n }\r\n get actionRunner() {\r\n return this._actionRunner;\r\n }\r\n set actionRunner(actionRunner) {\r\n if (actionRunner) {\r\n this._actionRunner = actionRunner;\r\n this.viewItems.forEach(item => item.actionRunner = actionRunner);\r\n }\r\n }\r\n getContainer() {\r\n return this.domNode;\r\n }\r\n push(arg, options = {}) {\r\n const actions = Array.isArray(arg) ? arg : [arg];\r\n let index = _common_types_js__WEBPACK_IMPORTED_MODULE_4__.isNumber(options.index) ? options.index : null;\r\n actions.forEach((action) => {\r\n const actionViewItemElement = document.createElement('li');\r\n actionViewItemElement.className = 'action-item';\r\n actionViewItemElement.setAttribute('role', 'presentation');\r\n // Prevent native context menu on actions\r\n if (!this.options.allowContextMenu) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener(actionViewItemElement, _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.CONTEXT_MENU, (e) => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventHelper.stop(e, true);\r\n }));\r\n }\r\n let item;\r\n if (this.options.actionViewItemProvider) {\r\n item = this.options.actionViewItemProvider(action);\r\n }\r\n if (!item) {\r\n item = new _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__.ActionViewItem(this.context, action, options);\r\n }\r\n item.actionRunner = this._actionRunner;\r\n item.setActionContext(this.context);\r\n item.render(actionViewItemElement);\r\n if (this.focusable && item instanceof _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__.BaseActionViewItem && this.viewItems.length === 0) {\r\n // We need to allow for the first enabled item to be focused on using tab navigation #106441\r\n item.setFocusable(true);\r\n }\r\n if (index === null || index < 0 || index >= this.actionsList.children.length) {\r\n this.actionsList.appendChild(actionViewItemElement);\r\n this.viewItems.push(item);\r\n this._actionIds.push(action.id);\r\n }\r\n else {\r\n this.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]);\r\n this.viewItems.splice(index, 0, item);\r\n this._actionIds.splice(index, 0, action.id);\r\n index++;\r\n }\r\n });\r\n if (typeof this.focusedItem === 'number') {\r\n // After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128\r\n this.focus(this.focusedItem);\r\n }\r\n }\r\n clear() {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.viewItems);\r\n this.viewItems = [];\r\n this._actionIds = [];\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.clearNode(this.actionsList);\r\n }\r\n focus(arg) {\r\n let selectFirst = false;\r\n let index = undefined;\r\n if (arg === undefined) {\r\n selectFirst = true;\r\n }\r\n else if (typeof arg === 'number') {\r\n index = arg;\r\n }\r\n else if (typeof arg === 'boolean') {\r\n selectFirst = arg;\r\n }\r\n if (selectFirst && typeof this.focusedItem === 'undefined') {\r\n const firstEnabled = this.viewItems.findIndex(item => item.isEnabled());\r\n // Focus the first enabled item\r\n this.focusedItem = firstEnabled === -1 ? undefined : firstEnabled;\r\n this.updateFocus();\r\n }\r\n else {\r\n if (index !== undefined) {\r\n this.focusedItem = index;\r\n }\r\n this.updateFocus();\r\n }\r\n }\r\n focusNext() {\r\n if (typeof this.focusedItem === 'undefined') {\r\n this.focusedItem = this.viewItems.length - 1;\r\n }\r\n const startIndex = this.focusedItem;\r\n let item;\r\n do {\r\n if (this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) {\r\n this.focusedItem = startIndex;\r\n return false;\r\n }\r\n this.focusedItem = (this.focusedItem + 1) % this.viewItems.length;\r\n item = this.viewItems[this.focusedItem];\r\n } while (this.focusedItem !== startIndex && this.options.focusOnlyEnabledItems && !item.isEnabled());\r\n this.updateFocus();\r\n return true;\r\n }\r\n focusPrevious() {\r\n if (typeof this.focusedItem === 'undefined') {\r\n this.focusedItem = 0;\r\n }\r\n const startIndex = this.focusedItem;\r\n let item;\r\n do {\r\n this.focusedItem = this.focusedItem - 1;\r\n if (this.focusedItem < 0) {\r\n if (this.options.preventLoopNavigation) {\r\n this.focusedItem = startIndex;\r\n return false;\r\n }\r\n this.focusedItem = this.viewItems.length - 1;\r\n }\r\n item = this.viewItems[this.focusedItem];\r\n } while (this.focusedItem !== startIndex && this.options.focusOnlyEnabledItems && !item.isEnabled());\r\n this.updateFocus(true);\r\n return true;\r\n }\r\n updateFocus(fromRight, preventScroll) {\r\n if (typeof this.focusedItem === 'undefined') {\r\n this.actionsList.focus({ preventScroll });\r\n }\r\n for (let i = 0; i < this.viewItems.length; i++) {\r\n const item = this.viewItems[i];\r\n const actionViewItem = item;\r\n if (i === this.focusedItem) {\r\n let focusItem = true;\r\n if (!_common_types_js__WEBPACK_IMPORTED_MODULE_4__.isFunction(actionViewItem.focus)) {\r\n focusItem = false;\r\n }\r\n if (this.options.focusOnlyEnabledItems && _common_types_js__WEBPACK_IMPORTED_MODULE_4__.isFunction(item.isEnabled) && !item.isEnabled()) {\r\n focusItem = false;\r\n }\r\n if (focusItem) {\r\n actionViewItem.focus(fromRight);\r\n }\r\n else {\r\n this.actionsList.focus({ preventScroll });\r\n }\r\n }\r\n else {\r\n if (_common_types_js__WEBPACK_IMPORTED_MODULE_4__.isFunction(actionViewItem.blur)) {\r\n actionViewItem.blur();\r\n }\r\n }\r\n }\r\n }\r\n doTrigger(event) {\r\n if (typeof this.focusedItem === 'undefined') {\r\n return; //nothing to focus\r\n }\r\n // trigger action\r\n const actionViewItem = this.viewItems[this.focusedItem];\r\n if (actionViewItem instanceof _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__.BaseActionViewItem) {\r\n const context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context;\r\n this.run(actionViewItem._action, context);\r\n }\r\n }\r\n run(action, context) {\r\n return this._actionRunner.run(action, context);\r\n }\r\n dispose() {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.viewItems);\r\n this.viewItems = [];\r\n this._actionIds = [];\r\n this.getContainer().remove();\r\n super.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"setARIAContainer\": () => (/* binding */ setARIAContainer),\n/* harmony export */ \"alert\": () => (/* binding */ alert),\n/* harmony export */ \"status\": () => (/* binding */ status)\n/* harmony export */ });\n/* harmony import */ var _aria_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aria.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n// Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233\r\nconst MAX_MESSAGE_LENGTH = 20000;\r\nlet ariaContainer;\r\nlet alertContainer;\r\nlet alertContainer2;\r\nlet statusContainer;\r\nlet statusContainer2;\r\nfunction setARIAContainer(parent) {\r\n ariaContainer = document.createElement('div');\r\n ariaContainer.className = 'monaco-aria-container';\r\n const createAlertContainer = () => {\r\n const element = document.createElement('div');\r\n element.className = 'monaco-alert';\r\n element.setAttribute('role', 'alert');\r\n element.setAttribute('aria-atomic', 'true');\r\n ariaContainer.appendChild(element);\r\n return element;\r\n };\r\n alertContainer = createAlertContainer();\r\n alertContainer2 = createAlertContainer();\r\n const createStatusContainer = () => {\r\n const element = document.createElement('div');\r\n element.className = 'monaco-status';\r\n element.setAttribute('role', 'complementary');\r\n element.setAttribute('aria-live', 'polite');\r\n element.setAttribute('aria-atomic', 'true');\r\n ariaContainer.appendChild(element);\r\n return element;\r\n };\r\n statusContainer = createStatusContainer();\r\n statusContainer2 = createStatusContainer();\r\n parent.appendChild(ariaContainer);\r\n}\r\n/**\r\n * Given the provided message, will make sure that it is read as alert to screen readers.\r\n */\r\nfunction alert(msg) {\r\n if (!ariaContainer) {\r\n return;\r\n }\r\n // Use alternate containers such that duplicated messages get read out by screen readers #99466\r\n if (alertContainer.textContent !== msg) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(alertContainer2);\r\n insertMessage(alertContainer, msg);\r\n }\r\n else {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(alertContainer);\r\n insertMessage(alertContainer2, msg);\r\n }\r\n}\r\n/**\r\n * Given the provided message, will make sure that it is read as status to screen readers.\r\n */\r\nfunction status(msg) {\r\n if (!ariaContainer) {\r\n return;\r\n }\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh) {\r\n alert(msg); // VoiceOver does not seem to support status role\r\n }\r\n else {\r\n if (statusContainer.textContent !== msg) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(statusContainer2);\r\n insertMessage(statusContainer, msg);\r\n }\r\n else {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(statusContainer);\r\n insertMessage(statusContainer2, msg);\r\n }\r\n }\r\n}\r\nfunction insertMessage(target, msg) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(target);\r\n if (msg.length > MAX_MESSAGE_LENGTH) {\r\n msg = msg.substr(0, MAX_MESSAGE_LENGTH);\r\n }\r\n target.textContent = msg;\r\n // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/\r\n target.style.visibility = 'hidden';\r\n target.style.visibility = 'visible';\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Button\": () => (/* binding */ Button)\n/* harmony export */ });\n/* harmony import */ var _button_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../iconLabel/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst defaultOptions = {\r\n buttonBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#0E639C'),\r\n buttonHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#006BB3'),\r\n buttonForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.white\r\n};\r\nclass Button extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.Disposable {\r\n constructor(container, options) {\r\n super();\r\n this._onDidClick = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter());\r\n this.options = options || Object.create(null);\r\n (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.mixin)(this.options, defaultOptions, false);\r\n this.buttonForeground = this.options.buttonForeground;\r\n this.buttonBackground = this.options.buttonBackground;\r\n this.buttonHoverBackground = this.options.buttonHoverBackground;\r\n this.buttonSecondaryForeground = this.options.buttonSecondaryForeground;\r\n this.buttonSecondaryBackground = this.options.buttonSecondaryBackground;\r\n this.buttonSecondaryHoverBackground = this.options.buttonSecondaryHoverBackground;\r\n this.buttonBorder = this.options.buttonBorder;\r\n this._element = document.createElement('a');\r\n this._element.classList.add('monaco-button');\r\n this._element.tabIndex = 0;\r\n this._element.setAttribute('role', 'button');\r\n container.appendChild(this._element);\r\n this._register(_touch_js__WEBPACK_IMPORTED_MODULE_6__.Gesture.addTarget(this._element));\r\n [_dom_js__WEBPACK_IMPORTED_MODULE_8__.EventType.CLICK, _touch_js__WEBPACK_IMPORTED_MODULE_6__.EventType.Tap].forEach(eventType => {\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.addDisposableListener)(this._element, eventType, e => {\r\n if (!this.enabled) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_8__.EventHelper.stop(e);\r\n return;\r\n }\r\n this._onDidClick.fire(e);\r\n }));\r\n });\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.addDisposableListener)(this._element, _dom_js__WEBPACK_IMPORTED_MODULE_8__.EventType.KEY_DOWN, e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__.StandardKeyboardEvent(e);\r\n let eventHandled = false;\r\n if (this.enabled && (event.equals(3 /* Enter */) || event.equals(10 /* Space */))) {\r\n this._onDidClick.fire(e);\r\n eventHandled = true;\r\n }\r\n else if (event.equals(9 /* Escape */)) {\r\n this._element.blur();\r\n eventHandled = true;\r\n }\r\n if (eventHandled) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_8__.EventHelper.stop(event, true);\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.addDisposableListener)(this._element, _dom_js__WEBPACK_IMPORTED_MODULE_8__.EventType.MOUSE_OVER, e => {\r\n if (!this._element.classList.contains('disabled')) {\r\n this.setHoverBackground();\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.addDisposableListener)(this._element, _dom_js__WEBPACK_IMPORTED_MODULE_8__.EventType.MOUSE_OUT, e => {\r\n this.applyStyles(); // restore standard styles\r\n }));\r\n // Also set hover background when button is focused for feedback\r\n this.focusTracker = this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.trackFocus)(this._element));\r\n this._register(this.focusTracker.onDidFocus(() => this.setHoverBackground()));\r\n this._register(this.focusTracker.onDidBlur(() => this.applyStyles())); // restore standard styles\r\n this.applyStyles();\r\n }\r\n get onDidClick() { return this._onDidClick.event; }\r\n setHoverBackground() {\r\n let hoverBackground;\r\n if (this.options.secondary) {\r\n hoverBackground = this.buttonSecondaryHoverBackground ? this.buttonSecondaryHoverBackground.toString() : null;\r\n }\r\n else {\r\n hoverBackground = this.buttonHoverBackground ? this.buttonHoverBackground.toString() : null;\r\n }\r\n if (hoverBackground) {\r\n this._element.style.backgroundColor = hoverBackground;\r\n }\r\n }\r\n style(styles) {\r\n this.buttonForeground = styles.buttonForeground;\r\n this.buttonBackground = styles.buttonBackground;\r\n this.buttonHoverBackground = styles.buttonHoverBackground;\r\n this.buttonSecondaryForeground = styles.buttonSecondaryForeground;\r\n this.buttonSecondaryBackground = styles.buttonSecondaryBackground;\r\n this.buttonSecondaryHoverBackground = styles.buttonSecondaryHoverBackground;\r\n this.buttonBorder = styles.buttonBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this._element) {\r\n let background, foreground;\r\n if (this.options.secondary) {\r\n foreground = this.buttonSecondaryForeground ? this.buttonSecondaryForeground.toString() : '';\r\n background = this.buttonSecondaryBackground ? this.buttonSecondaryBackground.toString() : '';\r\n }\r\n else {\r\n foreground = this.buttonForeground ? this.buttonForeground.toString() : '';\r\n background = this.buttonBackground ? this.buttonBackground.toString() : '';\r\n }\r\n const border = this.buttonBorder ? this.buttonBorder.toString() : '';\r\n this._element.style.color = foreground;\r\n this._element.style.backgroundColor = background;\r\n this._element.style.borderWidth = border ? '1px' : '';\r\n this._element.style.borderStyle = border ? 'solid' : '';\r\n this._element.style.borderColor = border;\r\n }\r\n }\r\n get element() {\r\n return this._element;\r\n }\r\n set label(value) {\r\n this._element.classList.add('monaco-text-button');\r\n if (this.options.supportIcons) {\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.reset)(this._element, ...(0,_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_7__.renderLabelWithIcons)(value));\r\n }\r\n else {\r\n this._element.textContent = value;\r\n }\r\n if (typeof this.options.title === 'string') {\r\n this._element.title = this.options.title;\r\n }\r\n else if (this.options.title) {\r\n this._element.title = value;\r\n }\r\n }\r\n set enabled(value) {\r\n if (value) {\r\n this._element.classList.remove('disabled');\r\n this._element.setAttribute('aria-disabled', String(false));\r\n this._element.tabIndex = 0;\r\n }\r\n else {\r\n this._element.classList.add('disabled');\r\n this._element.setAttribute('aria-disabled', String(true));\r\n }\r\n }\r\n get enabled() {\r\n return !this._element.classList.contains('disabled');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Checkbox\": () => (/* binding */ Checkbox)\n/* harmony export */ });\n/* harmony import */ var _checkbox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkbox.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst defaultOpts = {\r\n inputActiveOptionBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#007ACC00'),\r\n inputActiveOptionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#FFFFFF'),\r\n inputActiveOptionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#0E639C50')\r\n};\r\nclass Checkbox extends _widget_js__WEBPACK_IMPORTED_MODULE_1__.Widget {\r\n constructor(opts) {\r\n super();\r\n this._onChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onChange = this._onChange.event;\r\n this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._opts = Object.assign(Object.assign({}, defaultOpts), opts);\r\n this._checked = this._opts.isChecked;\r\n const classes = ['monaco-custom-checkbox'];\r\n if (this._opts.icon) {\r\n classes.push(..._common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.CSSIcon.asClassNameArray(this._opts.icon));\r\n }\r\n if (this._opts.actionClassName) {\r\n classes.push(...this._opts.actionClassName.split(' '));\r\n }\r\n if (this._checked) {\r\n classes.push('checked');\r\n }\r\n this.domNode = document.createElement('div');\r\n this.domNode.title = this._opts.title;\r\n this.domNode.classList.add(...classes);\r\n if (!this._opts.notFocusable) {\r\n this.domNode.tabIndex = 0;\r\n }\r\n this.domNode.setAttribute('role', 'checkbox');\r\n this.domNode.setAttribute('aria-checked', String(this._checked));\r\n this.domNode.setAttribute('aria-label', this._opts.title);\r\n this.applyStyles();\r\n this.onclick(this.domNode, (ev) => {\r\n this.checked = !this._checked;\r\n this._onChange.fire(false);\r\n ev.preventDefault();\r\n });\r\n this.ignoreGesture(this.domNode);\r\n this.onkeydown(this.domNode, (keyboardEvent) => {\r\n if (keyboardEvent.keyCode === 10 /* Space */ || keyboardEvent.keyCode === 3 /* Enter */) {\r\n this.checked = !this._checked;\r\n this._onChange.fire(true);\r\n keyboardEvent.preventDefault();\r\n return;\r\n }\r\n this._onKeyDown.fire(keyboardEvent);\r\n });\r\n }\r\n get enabled() {\r\n return this.domNode.getAttribute('aria-disabled') !== 'true';\r\n }\r\n focus() {\r\n this.domNode.focus();\r\n }\r\n get checked() {\r\n return this._checked;\r\n }\r\n set checked(newIsChecked) {\r\n this._checked = newIsChecked;\r\n this.domNode.setAttribute('aria-checked', String(this._checked));\r\n this.domNode.classList.toggle('checked', this._checked);\r\n this.applyStyles();\r\n }\r\n width() {\r\n return 2 /*marginleft*/ + 2 /*border*/ + 2 /*padding*/ + 16 /* icon width */;\r\n }\r\n style(styles) {\r\n if (styles.inputActiveOptionBorder) {\r\n this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n }\r\n if (styles.inputActiveOptionForeground) {\r\n this._opts.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n }\r\n if (styles.inputActiveOptionBackground) {\r\n this._opts.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n }\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent';\r\n this.domNode.style.color = this._checked && this._opts.inputActiveOptionForeground ? this._opts.inputActiveOptionForeground.toString() : 'inherit';\r\n this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : 'transparent';\r\n }\r\n }\r\n enable() {\r\n this.domNode.setAttribute('aria-disabled', String(false));\r\n }\r\n disable() {\r\n this.domNode.setAttribute('aria-disabled', String(true));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"formatRule\": () => (/* binding */ formatRule)\n/* harmony export */ });\n/* harmony import */ var _codicon_codicon_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codicon/codicon.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css\");\n/* harmony import */ var _codicon_codicon_modifiers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codicon/codicon-modifiers.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nfunction formatRule(c) {\r\n let def = c.definition;\r\n while (def instanceof _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__.Codicon) {\r\n def = def.definition;\r\n }\r\n return `.codicon-${c.id}:before { content: '${def.fontCharacter}'; }`;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LayoutAnchorMode\": () => (/* binding */ LayoutAnchorMode),\n/* harmony export */ \"layout\": () => (/* binding */ layout),\n/* harmony export */ \"ContextView\": () => (/* binding */ ContextView)\n/* harmony export */ });\n/* harmony import */ var _contextview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextview.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ \"./node_modules/monaco-editor/esm/vs/base/common/range.js\");\n/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../canIUse.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar LayoutAnchorMode;\r\n(function (LayoutAnchorMode) {\r\n LayoutAnchorMode[LayoutAnchorMode[\"AVOID\"] = 0] = \"AVOID\";\r\n LayoutAnchorMode[LayoutAnchorMode[\"ALIGN\"] = 1] = \"ALIGN\";\r\n})(LayoutAnchorMode || (LayoutAnchorMode = {}));\r\n/**\r\n * Lays out a one dimensional view next to an anchor in a viewport.\r\n *\r\n * @returns The view offset within the viewport.\r\n */\r\nfunction layout(viewportSize, viewSize, anchor) {\r\n const layoutAfterAnchorBoundary = anchor.mode === LayoutAnchorMode.ALIGN ? anchor.offset : anchor.offset + anchor.size;\r\n const layoutBeforeAnchorBoundary = anchor.mode === LayoutAnchorMode.ALIGN ? anchor.offset + anchor.size : anchor.offset;\r\n if (anchor.position === 0 /* Before */) {\r\n if (viewSize <= viewportSize - layoutAfterAnchorBoundary) {\r\n return layoutAfterAnchorBoundary; // happy case, lay it out after the anchor\r\n }\r\n if (viewSize <= layoutBeforeAnchorBoundary) {\r\n return layoutBeforeAnchorBoundary - viewSize; // ok case, lay it out before the anchor\r\n }\r\n return Math.max(viewportSize - viewSize, 0); // sad case, lay it over the anchor\r\n }\r\n else {\r\n if (viewSize <= layoutBeforeAnchorBoundary) {\r\n return layoutBeforeAnchorBoundary - viewSize; // happy case, lay it out before the anchor\r\n }\r\n if (viewSize <= viewportSize - layoutAfterAnchorBoundary) {\r\n return layoutAfterAnchorBoundary; // ok case, lay it out after the anchor\r\n }\r\n return 0; // sad case, lay it over the anchor\r\n }\r\n}\r\nclass ContextView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(container, domPosition) {\r\n super();\r\n this.container = null;\r\n this.delegate = null;\r\n this.toDisposeOnClean = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable.None;\r\n this.toDisposeOnSetContainer = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable.None;\r\n this.shadowRoot = null;\r\n this.shadowRootHostElement = null;\r\n this.view = _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.context-view');\r\n this.useFixedPosition = false;\r\n this.useShadowDOM = false;\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this.view);\r\n this.setContainer(container, domPosition);\r\n this._register((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.toDisposable)(() => this.setContainer(null, 1 /* ABSOLUTE */)));\r\n }\r\n setContainer(container, domPosition) {\r\n var _a;\r\n if (this.container) {\r\n this.toDisposeOnSetContainer.dispose();\r\n if (this.shadowRoot) {\r\n this.shadowRoot.removeChild(this.view);\r\n this.shadowRoot = null;\r\n (_a = this.shadowRootHostElement) === null || _a === void 0 ? void 0 : _a.remove();\r\n this.shadowRootHostElement = null;\r\n }\r\n else {\r\n this.container.removeChild(this.view);\r\n }\r\n this.container = null;\r\n }\r\n if (container) {\r\n this.container = container;\r\n this.useFixedPosition = domPosition !== 1 /* ABSOLUTE */;\r\n this.useShadowDOM = domPosition === 3 /* FIXED_SHADOW */;\r\n if (this.useShadowDOM) {\r\n this.shadowRootHostElement = _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.shadow-root-host');\r\n this.container.appendChild(this.shadowRootHostElement);\r\n this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });\r\n const style = document.createElement('style');\r\n style.textContent = SHADOW_ROOT_CSS;\r\n this.shadowRoot.appendChild(style);\r\n this.shadowRoot.appendChild(this.view);\r\n this.shadowRoot.appendChild(_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('slot'));\r\n }\r\n else {\r\n this.container.appendChild(this.view);\r\n }\r\n const toDisposeOnSetContainer = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n ContextView.BUBBLE_UP_EVENTS.forEach(event => {\r\n toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this.container, event, (e) => {\r\n this.onDOMEvent(e, false);\r\n }));\r\n });\r\n ContextView.BUBBLE_DOWN_EVENTS.forEach(event => {\r\n toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this.container, event, (e) => {\r\n this.onDOMEvent(e, true);\r\n }, true));\r\n });\r\n this.toDisposeOnSetContainer = toDisposeOnSetContainer;\r\n }\r\n }\r\n show(delegate) {\r\n if (this.isVisible()) {\r\n this.hide();\r\n }\r\n // Show static box\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.clearNode(this.view);\r\n this.view.className = 'context-view';\r\n this.view.style.top = '0px';\r\n this.view.style.left = '0px';\r\n this.view.style.zIndex = '2500';\r\n this.view.style.position = this.useFixedPosition ? 'fixed' : 'absolute';\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.show(this.view);\r\n // Render content\r\n this.toDisposeOnClean = delegate.render(this.view) || _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable.None;\r\n // Set active delegate\r\n this.delegate = delegate;\r\n // Layout\r\n this.doLayout();\r\n // Focus\r\n if (this.delegate.focus) {\r\n this.delegate.focus();\r\n }\r\n }\r\n getViewElement() {\r\n return this.view;\r\n }\r\n layout() {\r\n if (!this.isVisible()) {\r\n return;\r\n }\r\n if (this.delegate.canRelayout === false && !(_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isIOS && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__.BrowserFeatures.pointerEvents)) {\r\n this.hide();\r\n return;\r\n }\r\n if (this.delegate.layout) {\r\n this.delegate.layout();\r\n }\r\n this.doLayout();\r\n }\r\n doLayout() {\r\n // Check that we still have a delegate - this.delegate.layout may have hidden\r\n if (!this.isVisible()) {\r\n return;\r\n }\r\n // Get anchor\r\n let anchor = this.delegate.getAnchor();\r\n // Compute around\r\n let around;\r\n // Get the element's position and size (to anchor the view)\r\n if (_dom_js__WEBPACK_IMPORTED_MODULE_1__.isHTMLElement(anchor)) {\r\n let elementPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(anchor);\r\n around = {\r\n top: elementPosition.top,\r\n left: elementPosition.left,\r\n width: elementPosition.width,\r\n height: elementPosition.height\r\n };\r\n }\r\n else {\r\n around = {\r\n top: anchor.y,\r\n left: anchor.x,\r\n width: anchor.width || 1,\r\n height: anchor.height || 2\r\n };\r\n }\r\n const viewSizeWidth = _dom_js__WEBPACK_IMPORTED_MODULE_1__.getTotalWidth(this.view);\r\n const viewSizeHeight = _dom_js__WEBPACK_IMPORTED_MODULE_1__.getTotalHeight(this.view);\r\n const anchorPosition = this.delegate.anchorPosition || 0 /* BELOW */;\r\n const anchorAlignment = this.delegate.anchorAlignment || 0 /* LEFT */;\r\n const anchorAxisAlignment = this.delegate.anchorAxisAlignment || 0 /* VERTICAL */;\r\n let top;\r\n let left;\r\n if (anchorAxisAlignment === 0 /* VERTICAL */) {\r\n const verticalAnchor = { offset: around.top - window.pageYOffset, size: around.height, position: anchorPosition === 0 /* BELOW */ ? 0 /* Before */ : 1 /* After */ };\r\n const horizontalAnchor = { offset: around.left, size: around.width, position: anchorAlignment === 0 /* LEFT */ ? 0 /* Before */ : 1 /* After */, mode: LayoutAnchorMode.ALIGN };\r\n top = layout(window.innerHeight, viewSizeHeight, verticalAnchor) + window.pageYOffset;\r\n // if view intersects vertically with anchor, we must avoid the anchor\r\n if (_common_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.intersects({ start: top, end: top + viewSizeHeight }, { start: verticalAnchor.offset, end: verticalAnchor.offset + verticalAnchor.size })) {\r\n horizontalAnchor.mode = LayoutAnchorMode.AVOID;\r\n }\r\n left = layout(window.innerWidth, viewSizeWidth, horizontalAnchor);\r\n }\r\n else {\r\n const horizontalAnchor = { offset: around.left, size: around.width, position: anchorAlignment === 0 /* LEFT */ ? 0 /* Before */ : 1 /* After */ };\r\n const verticalAnchor = { offset: around.top, size: around.height, position: anchorPosition === 0 /* BELOW */ ? 0 /* Before */ : 1 /* After */, mode: LayoutAnchorMode.ALIGN };\r\n left = layout(window.innerWidth, viewSizeWidth, horizontalAnchor);\r\n // if view intersects horizontally with anchor, we must avoid the anchor\r\n if (_common_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.intersects({ start: left, end: left + viewSizeWidth }, { start: horizontalAnchor.offset, end: horizontalAnchor.offset + horizontalAnchor.size })) {\r\n verticalAnchor.mode = LayoutAnchorMode.AVOID;\r\n }\r\n top = layout(window.innerHeight, viewSizeHeight, verticalAnchor) + window.pageYOffset;\r\n }\r\n this.view.classList.remove('top', 'bottom', 'left', 'right');\r\n this.view.classList.add(anchorPosition === 0 /* BELOW */ ? 'bottom' : 'top');\r\n this.view.classList.add(anchorAlignment === 0 /* LEFT */ ? 'left' : 'right');\r\n this.view.classList.toggle('fixed', this.useFixedPosition);\r\n const containerPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this.container);\r\n this.view.style.top = `${top - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this.view).top : containerPosition.top)}px`;\r\n this.view.style.left = `${left - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this.view).left : containerPosition.left)}px`;\r\n this.view.style.width = 'initial';\r\n }\r\n hide(data) {\r\n const delegate = this.delegate;\r\n this.delegate = null;\r\n if (delegate === null || delegate === void 0 ? void 0 : delegate.onHide) {\r\n delegate.onHide(data);\r\n }\r\n this.toDisposeOnClean.dispose();\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this.view);\r\n }\r\n isVisible() {\r\n return !!this.delegate;\r\n }\r\n onDOMEvent(e, onCapture) {\r\n if (this.delegate) {\r\n if (this.delegate.onDOMEvent) {\r\n this.delegate.onDOMEvent(e, document.activeElement);\r\n }\r\n else if (onCapture && !_dom_js__WEBPACK_IMPORTED_MODULE_1__.isAncestor(e.target, this.container)) {\r\n this.hide();\r\n }\r\n }\r\n }\r\n dispose() {\r\n this.hide();\r\n super.dispose();\r\n }\r\n}\r\nContextView.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur'];\r\nContextView.BUBBLE_DOWN_EVENTS = ['click'];\r\nlet SHADOW_ROOT_CSS = /* css */ `\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: \"codicon\";\n\t\tsrc: url(\"./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6\") format(\"truetype\");\n\t}\n\n\t.codicon[class*='codicon-'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"HelveticaNeue-Light\", system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, \"PingFang SC\", \"Hiragino Sans GB\", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, \"PingFang TC\", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, \"Hiragino Kaku Gothic Pro\", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, \"Nanum Gothic\", \"Apple SD Gothic Neo\", \"AppleGothic\", sans-serif; }\n\n\t:host-context(.windows) { font-family: \"Segoe WPC\", \"Segoe UI\", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: \"Segoe WPC\", \"Segoe UI\", \"Microsoft YaHei\", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: \"Segoe WPC\", \"Segoe UI\", \"Microsoft Jhenghei\", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: \"Segoe WPC\", \"Segoe UI\", \"Yu Gothic UI\", \"Meiryo UI\", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: \"Segoe WPC\", \"Segoe UI\", \"Malgun Gothic\", \"Dotom\", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, \"Ubuntu\", \"Droid Sans\", \"Source Han Sans SC\", \"Source Han Sans CN\", \"Source Han Sans\", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, \"Ubuntu\", \"Droid Sans\", \"Source Han Sans TC\", \"Source Han Sans TW\", \"Source Han Sans\", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, \"Ubuntu\", \"Droid Sans\", \"Source Han Sans J\", \"Source Han Sans JP\", \"Source Han Sans\", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, \"Ubuntu\", \"Droid Sans\", \"Source Han Sans K\", \"Source Han Sans JR\", \"Source Han Sans\", \"UnDotum\", \"FBaekmuk Gulim\", sans-serif; }\n`;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CountBadge\": () => (/* binding */ CountBadge)\n/* harmony export */ });\n/* harmony import */ var _countBadge_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./countBadge.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst defaultOpts = {\r\n badgeBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__.Color.fromHex('#4D4D4D'),\r\n badgeForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__.Color.fromHex('#FFFFFF')\r\n};\r\nclass CountBadge {\r\n constructor(container, options) {\r\n this.count = 0;\r\n this.options = options || Object.create(null);\r\n (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_4__.mixin)(this.options, defaultOpts, false);\r\n this.badgeBackground = this.options.badgeBackground;\r\n this.badgeForeground = this.options.badgeForeground;\r\n this.badgeBorder = this.options.badgeBorder;\r\n this.element = (0,_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('.monaco-count-badge'));\r\n this.countFormat = this.options.countFormat || '{0}';\r\n this.titleFormat = this.options.titleFormat || '';\r\n this.setCount(this.options.count || 0);\r\n }\r\n setCount(count) {\r\n this.count = count;\r\n this.render();\r\n }\r\n setTitleFormat(titleFormat) {\r\n this.titleFormat = titleFormat;\r\n this.render();\r\n }\r\n render() {\r\n this.element.textContent = (0,_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format)(this.countFormat, this.count);\r\n this.element.title = (0,_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format)(this.titleFormat, this.count);\r\n this.applyStyles();\r\n }\r\n style(styles) {\r\n this.badgeBackground = styles.badgeBackground;\r\n this.badgeForeground = styles.badgeForeground;\r\n this.badgeBorder = styles.badgeBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.element) {\r\n const background = this.badgeBackground ? this.badgeBackground.toString() : '';\r\n const foreground = this.badgeForeground ? this.badgeForeground.toString() : '';\r\n const border = this.badgeBorder ? this.badgeBorder.toString() : '';\r\n this.element.style.backgroundColor = background;\r\n this.element.style.color = foreground;\r\n this.element.style.borderWidth = border ? '1px' : '';\r\n this.element.style.borderStyle = border ? 'solid' : '';\r\n this.element.style.borderColor = border;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseDropdown\": () => (/* binding */ BaseDropdown),\n/* harmony export */ \"DropdownMenu\": () => (/* binding */ DropdownMenu)\n/* harmony export */ });\n/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass BaseDropdown extends _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.ActionRunner {\r\n constructor(container, options) {\r\n super();\r\n this._onDidChangeVisibility = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onDidChangeVisibility = this._onDidChangeVisibility.event;\r\n this._element = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.monaco-dropdown'));\r\n this._label = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(this._element, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.dropdown-label'));\r\n let labelRenderer = options.labelRenderer;\r\n if (!labelRenderer) {\r\n labelRenderer = (container) => {\r\n container.textContent = options.label || '';\r\n return null;\r\n };\r\n }\r\n for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.CLICK, _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__.EventType.Tap]) {\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener)(this.element, event, e => _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventHelper.stop(e, true))); // prevent default click behaviour to trigger\r\n }\r\n for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__.EventType.Tap]) {\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener)(this._label, event, e => {\r\n if (e instanceof MouseEvent && e.detail > 1) {\r\n return; // prevent multiple clicks to open multiple context menus (https://github.com/microsoft/vscode/issues/41363)\r\n }\r\n if (this.visible) {\r\n this.hide();\r\n }\r\n else {\r\n this.show();\r\n }\r\n }));\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.addDisposableListener)(this._label, _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventType.KEY_UP, e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__.StandardKeyboardEvent(e);\r\n if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.EventHelper.stop(e, true); // https://github.com/microsoft/vscode/issues/57997\r\n if (this.visible) {\r\n this.hide();\r\n }\r\n else {\r\n this.show();\r\n }\r\n }\r\n }));\r\n const cleanupFn = labelRenderer(this._label);\r\n if (cleanupFn) {\r\n this._register(cleanupFn);\r\n }\r\n this._register(_touch_js__WEBPACK_IMPORTED_MODULE_1__.Gesture.addTarget(this._label));\r\n }\r\n get element() {\r\n return this._element;\r\n }\r\n show() {\r\n if (!this.visible) {\r\n this.visible = true;\r\n this._onDidChangeVisibility.fire(true);\r\n }\r\n }\r\n hide() {\r\n if (this.visible) {\r\n this.visible = false;\r\n this._onDidChangeVisibility.fire(false);\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.hide();\r\n if (this.boxContainer) {\r\n this.boxContainer.remove();\r\n this.boxContainer = undefined;\r\n }\r\n if (this.contents) {\r\n this.contents.remove();\r\n this.contents = undefined;\r\n }\r\n if (this._label) {\r\n this._label.remove();\r\n this._label = undefined;\r\n }\r\n }\r\n}\r\nclass DropdownMenu extends BaseDropdown {\r\n constructor(container, options) {\r\n super(container, options);\r\n this._actions = [];\r\n this._contextMenuProvider = options.contextMenuProvider;\r\n this.actions = options.actions || [];\r\n this.actionProvider = options.actionProvider;\r\n this.menuClassName = options.menuClassName || '';\r\n this.menuAsChild = !!options.menuAsChild;\r\n }\r\n set menuOptions(options) {\r\n this._menuOptions = options;\r\n }\r\n get menuOptions() {\r\n return this._menuOptions;\r\n }\r\n get actions() {\r\n if (this.actionProvider) {\r\n return this.actionProvider.getActions();\r\n }\r\n return this._actions;\r\n }\r\n set actions(actions) {\r\n this._actions = actions;\r\n }\r\n show() {\r\n super.show();\r\n this.element.classList.add('active');\r\n this._contextMenuProvider.showContextMenu({\r\n getAnchor: () => this.element,\r\n getActions: () => this.actions,\r\n getActionsContext: () => this.menuOptions ? this.menuOptions.context : null,\r\n getActionViewItem: action => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(action) : undefined,\r\n getKeyBinding: action => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(action) : undefined,\r\n getMenuClassName: () => this.menuClassName,\r\n onHide: () => this.onHide(),\r\n actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined,\r\n anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0 /* LEFT */,\r\n domForShadowRoot: this.menuAsChild ? this.element : undefined\r\n });\r\n }\r\n hide() {\r\n super.hide();\r\n }\r\n onHide() {\r\n this.hide();\r\n this.element.classList.remove('active');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DropdownMenuActionViewItem\": () => (/* binding */ DropdownMenuActionViewItem)\n/* harmony export */ });\n/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js\");\n/* harmony import */ var _dropdown_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass DropdownMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__.BaseActionViewItem {\r\n constructor(action, menuActionsOrProvider, contextMenuProvider, options = {}) {\r\n super(null, action, options);\r\n this.options = options;\r\n this.actionItem = null;\r\n this._onDidChangeVisibility = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.menuActionsOrProvider = menuActionsOrProvider;\r\n this.contextMenuProvider = contextMenuProvider;\r\n if (this.options.actionRunner) {\r\n this.actionRunner = this.options.actionRunner;\r\n }\r\n }\r\n render(container) {\r\n this.actionItem = container;\r\n const labelRenderer = (el) => {\r\n this.element = (0,_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('a.action-label'));\r\n let classNames = [];\r\n if (typeof this.options.classNames === 'string') {\r\n classNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\r\n }\r\n else if (this.options.classNames) {\r\n classNames = this.options.classNames;\r\n }\r\n // todo@aeschli: remove codicon, should come through `this.options.classNames`\r\n if (!classNames.find(c => c === 'icon')) {\r\n classNames.push('codicon');\r\n }\r\n this.element.classList.add(...classNames);\r\n this.element.setAttribute('role', 'button');\r\n this.element.setAttribute('aria-haspopup', 'true');\r\n this.element.setAttribute('aria-expanded', 'false');\r\n this.element.title = this._action.label || '';\r\n return null;\r\n };\r\n const isActionsArray = Array.isArray(this.menuActionsOrProvider);\r\n const options = {\r\n contextMenuProvider: this.contextMenuProvider,\r\n labelRenderer: labelRenderer,\r\n menuAsChild: this.options.menuAsChild,\r\n actions: isActionsArray ? this.menuActionsOrProvider : undefined,\r\n actionProvider: isActionsArray ? undefined : this.menuActionsOrProvider\r\n };\r\n this.dropdownMenu = this._register(new _dropdown_js__WEBPACK_IMPORTED_MODULE_4__.DropdownMenu(container, options));\r\n this._register(this.dropdownMenu.onDidChangeVisibility(visible => {\r\n var _a;\r\n (_a = this.element) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', `${visible}`);\r\n this._onDidChangeVisibility.fire(visible);\r\n }));\r\n this.dropdownMenu.menuOptions = {\r\n actionViewItemProvider: this.options.actionViewItemProvider,\r\n actionRunner: this.actionRunner,\r\n getKeyBinding: this.options.keybindingProvider,\r\n context: this._context\r\n };\r\n if (this.options.anchorAlignmentProvider) {\r\n const that = this;\r\n this.dropdownMenu.menuOptions = Object.assign(Object.assign({}, this.dropdownMenu.menuOptions), { get anchorAlignment() {\r\n return that.options.anchorAlignmentProvider();\r\n } });\r\n }\r\n this.updateEnabled();\r\n }\r\n setActionContext(newContext) {\r\n super.setActionContext(newContext);\r\n if (this.dropdownMenu) {\r\n if (this.dropdownMenu.menuOptions) {\r\n this.dropdownMenu.menuOptions.context = newContext;\r\n }\r\n else {\r\n this.dropdownMenu.menuOptions = { context: newContext };\r\n }\r\n }\r\n }\r\n updateEnabled() {\r\n var _a, _b;\r\n const disabled = !this.getAction().enabled;\r\n (_a = this.actionItem) === null || _a === void 0 ? void 0 : _a.classList.toggle('disabled', disabled);\r\n (_b = this.element) === null || _b === void 0 ? void 0 : _b.classList.toggle('disabled', disabled);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FindInput\": () => (/* binding */ FindInput)\n/* harmony export */ });\n/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./findInputCheckboxes.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('defaultLabel', \"input\");\r\nclass FindInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__.Widget {\r\n constructor(parent, contextViewProvider, _showOptionButtons, options) {\r\n super();\r\n this._showOptionButtons = _showOptionButtons;\r\n this.fixFocusOnOptionClickEnabled = true;\r\n this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidOptionChange = this._onDidOptionChange.event;\r\n this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseDown = this._onMouseDown.event;\r\n this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this._onCaseSensitiveKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onCaseSensitiveKeyDown = this._onCaseSensitiveKeyDown.event;\r\n this._onRegexKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onRegexKeyDown = this._onRegexKeyDown.event;\r\n this._lastHighlightFindOptions = 0;\r\n this.contextViewProvider = contextViewProvider;\r\n this.placeholder = options.placeholder || '';\r\n this.validation = options.validation;\r\n this.label = options.label || NLS_DEFAULT_LABEL;\r\n this.inputActiveOptionBorder = options.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = options.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = options.inputActiveOptionBackground;\r\n this.inputBackground = options.inputBackground;\r\n this.inputForeground = options.inputForeground;\r\n this.inputBorder = options.inputBorder;\r\n this.inputValidationInfoBorder = options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = options.inputValidationErrorForeground;\r\n const appendCaseSensitiveLabel = options.appendCaseSensitiveLabel || '';\r\n const appendWholeWordsLabel = options.appendWholeWordsLabel || '';\r\n const appendRegexLabel = options.appendRegexLabel || '';\r\n const history = options.history || [];\r\n const flexibleHeight = !!options.flexibleHeight;\r\n const flexibleWidth = !!options.flexibleWidth;\r\n const flexibleMaxHeight = options.flexibleMaxHeight;\r\n this.domNode = document.createElement('div');\r\n this.domNode.classList.add('monaco-findInput');\r\n this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__.HistoryInputBox(this.domNode, this.contextViewProvider, {\r\n placeholder: this.placeholder || '',\r\n ariaLabel: this.label || '',\r\n validationOptions: {\r\n validation: this.validation\r\n },\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder,\r\n history,\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight\r\n }));\r\n this.regex = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__.RegexCheckbox({\r\n appendTitle: appendRegexLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.regex.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.regex.onKeyDown(e => {\r\n this._onRegexKeyDown.fire(e);\r\n }));\r\n this.wholeWords = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__.WholeWordsCheckbox({\r\n appendTitle: appendWholeWordsLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.wholeWords.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this.caseSensitive = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__.CaseSensitiveCheckbox({\r\n appendTitle: appendCaseSensitiveLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.caseSensitive.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.caseSensitive.onKeyDown(e => {\r\n this._onCaseSensitiveKeyDown.fire(e);\r\n }));\r\n if (this._showOptionButtons) {\r\n this.inputBox.paddingRight = this.caseSensitive.width() + this.wholeWords.width() + this.regex.width();\r\n }\r\n // Arrow-Key support to navigate between options\r\n let indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode];\r\n this.onkeydown(this.domNode, (event) => {\r\n if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) {\r\n let index = indexes.indexOf(document.activeElement);\r\n if (index >= 0) {\r\n let newIndex = -1;\r\n if (event.equals(17 /* RightArrow */)) {\r\n newIndex = (index + 1) % indexes.length;\r\n }\r\n else if (event.equals(15 /* LeftArrow */)) {\r\n if (index === 0) {\r\n newIndex = indexes.length - 1;\r\n }\r\n else {\r\n newIndex = index - 1;\r\n }\r\n }\r\n if (event.equals(9 /* Escape */)) {\r\n indexes[index].blur();\r\n this.inputBox.focus();\r\n }\r\n else if (newIndex >= 0) {\r\n indexes[newIndex].focus();\r\n }\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n }\r\n }\r\n });\r\n let controls = document.createElement('div');\r\n controls.className = 'controls';\r\n controls.style.display = this._showOptionButtons ? 'block' : 'none';\r\n controls.appendChild(this.caseSensitive.domNode);\r\n controls.appendChild(this.wholeWords.domNode);\r\n controls.appendChild(this.regex.domNode);\r\n this.domNode.appendChild(controls);\r\n if (parent) {\r\n parent.appendChild(this.domNode);\r\n }\r\n this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e));\r\n this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e));\r\n this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire());\r\n this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e));\r\n }\r\n enable() {\r\n this.domNode.classList.remove('disabled');\r\n this.inputBox.enable();\r\n this.regex.enable();\r\n this.wholeWords.enable();\r\n this.caseSensitive.enable();\r\n }\r\n disable() {\r\n this.domNode.classList.add('disabled');\r\n this.inputBox.disable();\r\n this.regex.disable();\r\n this.wholeWords.disable();\r\n this.caseSensitive.disable();\r\n }\r\n setFocusInputOnOptionClick(value) {\r\n this.fixFocusOnOptionClickEnabled = value;\r\n }\r\n setEnabled(enabled) {\r\n if (enabled) {\r\n this.enable();\r\n }\r\n else {\r\n this.disable();\r\n }\r\n }\r\n getValue() {\r\n return this.inputBox.value;\r\n }\r\n setValue(value) {\r\n if (this.inputBox.value !== value) {\r\n this.inputBox.value = value;\r\n }\r\n }\r\n style(styles) {\r\n this.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n const checkBoxStyles = {\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n };\r\n this.regex.style(checkBoxStyles);\r\n this.wholeWords.style(checkBoxStyles);\r\n this.caseSensitive.style(checkBoxStyles);\r\n const inputBoxStyles = {\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder\r\n };\r\n this.inputBox.style(inputBoxStyles);\r\n }\r\n }\r\n select() {\r\n this.inputBox.select();\r\n }\r\n focus() {\r\n this.inputBox.focus();\r\n }\r\n getCaseSensitive() {\r\n return this.caseSensitive.checked;\r\n }\r\n setCaseSensitive(value) {\r\n this.caseSensitive.checked = value;\r\n }\r\n getWholeWords() {\r\n return this.wholeWords.checked;\r\n }\r\n setWholeWords(value) {\r\n this.wholeWords.checked = value;\r\n }\r\n getRegex() {\r\n return this.regex.checked;\r\n }\r\n setRegex(value) {\r\n this.regex.checked = value;\r\n this.validate();\r\n }\r\n focusOnCaseSensitive() {\r\n this.caseSensitive.focus();\r\n }\r\n highlightFindOptions() {\r\n this.domNode.classList.remove('highlight-' + (this._lastHighlightFindOptions));\r\n this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions;\r\n this.domNode.classList.add('highlight-' + (this._lastHighlightFindOptions));\r\n }\r\n validate() {\r\n this.inputBox.validate();\r\n }\r\n clearMessage() {\r\n this.inputBox.hideMessage();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CaseSensitiveCheckbox\": () => (/* binding */ CaseSensitiveCheckbox),\n/* harmony export */ \"WholeWordsCheckbox\": () => (/* binding */ WholeWordsCheckbox),\n/* harmony export */ \"RegexCheckbox\": () => (/* binding */ RegexCheckbox)\n/* harmony export */ });\n/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../checkbox/checkbox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst NLS_CASE_SENSITIVE_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('caseDescription', \"Match Case\");\r\nconst NLS_WHOLE_WORD_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('wordsDescription', \"Match Whole Word\");\r\nconst NLS_REGEX_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('regexDescription', \"Use Regular Expression\");\r\nclass CaseSensitiveCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__.Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__.Codicon.caseSensitive,\r\n title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nclass WholeWordsCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__.Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__.Codicon.wholeWord,\r\n title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nclass RegexCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__.Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__.Codicon.regex,\r\n title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PreserveCaseCheckbox\": () => (/* binding */ PreserveCaseCheckbox),\n/* harmony export */ \"ReplaceInput\": () => (/* binding */ ReplaceInput)\n/* harmony export */ });\n/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../checkbox/checkbox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('defaultLabel', \"input\");\r\nconst NLS_PRESERVE_CASE_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.preserveCaseCheckbox', \"Preserve Case\");\r\nclass PreserveCaseCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__.Checkbox {\r\n constructor(opts) {\r\n super({\r\n // TODO: does this need its own icon?\r\n icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__.Codicon.preserveCase,\r\n title: NLS_PRESERVE_CASE_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nclass ReplaceInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__.Widget {\r\n constructor(parent, contextViewProvider, _showOptionButtons, options) {\r\n super();\r\n this._showOptionButtons = _showOptionButtons;\r\n this.fixFocusOnOptionClickEnabled = true;\r\n this.cachedOptionsWidth = 0;\r\n this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidOptionChange = this._onDidOptionChange.event;\r\n this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this._onPreserveCaseKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onPreserveCaseKeyDown = this._onPreserveCaseKeyDown.event;\r\n this.contextViewProvider = contextViewProvider;\r\n this.placeholder = options.placeholder || '';\r\n this.validation = options.validation;\r\n this.label = options.label || NLS_DEFAULT_LABEL;\r\n this.inputActiveOptionBorder = options.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = options.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = options.inputActiveOptionBackground;\r\n this.inputBackground = options.inputBackground;\r\n this.inputForeground = options.inputForeground;\r\n this.inputBorder = options.inputBorder;\r\n this.inputValidationInfoBorder = options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = options.inputValidationErrorForeground;\r\n const appendPreserveCaseLabel = options.appendPreserveCaseLabel || '';\r\n const history = options.history || [];\r\n const flexibleHeight = !!options.flexibleHeight;\r\n const flexibleWidth = !!options.flexibleWidth;\r\n const flexibleMaxHeight = options.flexibleMaxHeight;\r\n this.domNode = document.createElement('div');\r\n this.domNode.classList.add('monaco-findInput');\r\n this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__.HistoryInputBox(this.domNode, this.contextViewProvider, {\r\n ariaLabel: this.label || '',\r\n placeholder: this.placeholder || '',\r\n validationOptions: {\r\n validation: this.validation\r\n },\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder,\r\n history,\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight\r\n }));\r\n this.preserveCase = this._register(new PreserveCaseCheckbox({\r\n appendTitle: appendPreserveCaseLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n }));\r\n this._register(this.preserveCase.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.preserveCase.onKeyDown(e => {\r\n this._onPreserveCaseKeyDown.fire(e);\r\n }));\r\n if (this._showOptionButtons) {\r\n this.cachedOptionsWidth = this.preserveCase.width();\r\n }\r\n else {\r\n this.cachedOptionsWidth = 0;\r\n }\r\n // Arrow-Key support to navigate between options\r\n let indexes = [this.preserveCase.domNode];\r\n this.onkeydown(this.domNode, (event) => {\r\n if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) {\r\n let index = indexes.indexOf(document.activeElement);\r\n if (index >= 0) {\r\n let newIndex = -1;\r\n if (event.equals(17 /* RightArrow */)) {\r\n newIndex = (index + 1) % indexes.length;\r\n }\r\n else if (event.equals(15 /* LeftArrow */)) {\r\n if (index === 0) {\r\n newIndex = indexes.length - 1;\r\n }\r\n else {\r\n newIndex = index - 1;\r\n }\r\n }\r\n if (event.equals(9 /* Escape */)) {\r\n indexes[index].blur();\r\n this.inputBox.focus();\r\n }\r\n else if (newIndex >= 0) {\r\n indexes[newIndex].focus();\r\n }\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n }\r\n }\r\n });\r\n let controls = document.createElement('div');\r\n controls.className = 'controls';\r\n controls.style.display = this._showOptionButtons ? 'block' : 'none';\r\n controls.appendChild(this.preserveCase.domNode);\r\n this.domNode.appendChild(controls);\r\n if (parent) {\r\n parent.appendChild(this.domNode);\r\n }\r\n this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e));\r\n this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e));\r\n this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire());\r\n this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e));\r\n }\r\n enable() {\r\n this.domNode.classList.remove('disabled');\r\n this.inputBox.enable();\r\n this.preserveCase.enable();\r\n }\r\n disable() {\r\n this.domNode.classList.add('disabled');\r\n this.inputBox.disable();\r\n this.preserveCase.disable();\r\n }\r\n setEnabled(enabled) {\r\n if (enabled) {\r\n this.enable();\r\n }\r\n else {\r\n this.disable();\r\n }\r\n }\r\n style(styles) {\r\n this.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n const checkBoxStyles = {\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n };\r\n this.preserveCase.style(checkBoxStyles);\r\n const inputBoxStyles = {\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder\r\n };\r\n this.inputBox.style(inputBoxStyles);\r\n }\r\n }\r\n select() {\r\n this.inputBox.select();\r\n }\r\n focus() {\r\n this.inputBox.focus();\r\n }\r\n getPreserveCase() {\r\n return this.preserveCase.checked;\r\n }\r\n setPreserveCase(value) {\r\n this.preserveCase.checked = value;\r\n }\r\n focusOnPreserve() {\r\n this.preserveCase.focus();\r\n }\r\n validate() {\r\n if (this.inputBox) {\r\n this.inputBox.validate();\r\n }\r\n }\r\n set width(newWidth) {\r\n this.inputBox.paddingRight = this.cachedOptionsWidth;\r\n this.inputBox.width = newWidth;\r\n this.domNode.style.width = newWidth + 'px';\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HighlightedLabel\": () => (/* binding */ HighlightedLabel)\n/* harmony export */ });\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../iconLabel/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass HighlightedLabel {\r\n constructor(container, supportIcons) {\r\n this.supportIcons = supportIcons;\r\n this.text = '';\r\n this.title = '';\r\n this.highlights = [];\r\n this.didEverRender = false;\r\n this.domNode = document.createElement('span');\r\n this.domNode.className = 'monaco-highlighted-label';\r\n container.appendChild(this.domNode);\r\n }\r\n get element() {\r\n return this.domNode;\r\n }\r\n set(text, highlights = [], title = '', escapeNewLines) {\r\n if (!text) {\r\n text = '';\r\n }\r\n if (escapeNewLines) {\r\n // adjusts highlights inplace\r\n text = HighlightedLabel.escapeNewLines(text, highlights);\r\n }\r\n if (this.didEverRender && this.text === text && this.title === title && _common_objects_js__WEBPACK_IMPORTED_MODULE_0__.equals(this.highlights, highlights)) {\r\n return;\r\n }\r\n this.text = text;\r\n this.title = title;\r\n this.highlights = highlights;\r\n this.render();\r\n }\r\n render() {\r\n const children = [];\r\n let pos = 0;\r\n for (const highlight of this.highlights) {\r\n if (highlight.end === highlight.start) {\r\n continue;\r\n }\r\n if (pos < highlight.start) {\r\n const substring = this.text.substring(pos, highlight.start);\r\n children.push(_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span', undefined, ...this.supportIcons ? (0,_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_2__.renderLabelWithIcons)(substring) : [substring]));\r\n pos = highlight.end;\r\n }\r\n const substring = this.text.substring(highlight.start, highlight.end);\r\n const element = _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.highlight', undefined, ...this.supportIcons ? (0,_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_2__.renderLabelWithIcons)(substring) : [substring]);\r\n if (highlight.extraClasses) {\r\n element.classList.add(highlight.extraClasses);\r\n }\r\n children.push(element);\r\n pos = highlight.end;\r\n }\r\n if (pos < this.text.length) {\r\n const substring = this.text.substring(pos);\r\n children.push(_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span', undefined, ...this.supportIcons ? (0,_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_2__.renderLabelWithIcons)(substring) : [substring]));\r\n }\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.reset(this.domNode, ...children);\r\n if (this.title) {\r\n this.domNode.title = this.title;\r\n }\r\n else {\r\n this.domNode.removeAttribute('title');\r\n }\r\n this.didEverRender = true;\r\n }\r\n static escapeNewLines(text, highlights) {\r\n let total = 0;\r\n let extra = 0;\r\n return text.replace(/\\r\\n|\\r|\\n/g, (match, offset) => {\r\n extra = match === '\\r\\n' ? -1 : 0;\r\n offset += total;\r\n for (const highlight of highlights) {\r\n if (highlight.end <= offset) {\r\n continue;\r\n }\r\n if (highlight.start >= offset) {\r\n highlight.start += extra;\r\n }\r\n if (highlight.end >= offset) {\r\n highlight.end += extra;\r\n }\r\n }\r\n total += extra;\r\n return '\\u23CE';\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HoverWidget\": () => (/* binding */ HoverWidget),\n/* harmony export */ \"renderHoverAction\": () => (/* binding */ renderHoverAction)\n/* harmony export */ });\n/* harmony import */ var _hover_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hover.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nconst $ = _dom_js__WEBPACK_IMPORTED_MODULE_1__.$;\r\nclass HoverWidget extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor() {\r\n super();\r\n this.containerDomNode = document.createElement('div');\r\n this.containerDomNode.className = 'monaco-hover';\r\n this.containerDomNode.tabIndex = 0;\r\n this.containerDomNode.setAttribute('role', 'tooltip');\r\n this.contentsDomNode = document.createElement('div');\r\n this.contentsDomNode.className = 'monaco-hover-content';\r\n this._scrollbar = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__.DomScrollableElement(this.contentsDomNode, {\r\n consumeMouseWheelIfScrollbarIsNeeded: true\r\n }));\r\n this.containerDomNode.appendChild(this._scrollbar.getDomNode());\r\n }\r\n onContentsChanged() {\r\n this._scrollbar.scanDomNode();\r\n }\r\n}\r\nfunction renderHoverAction(parent, actionOptions, keybindingLabel) {\r\n const actionContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(parent, $('div.action-container'));\r\n const action = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(actionContainer, $('a.action'));\r\n action.setAttribute('href', '#');\r\n action.setAttribute('role', 'button');\r\n if (actionOptions.iconClass) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(action, $(`span.icon.${actionOptions.iconClass}`));\r\n }\r\n const label = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(action, $('span'));\r\n label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label;\r\n return _dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(actionContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.CLICK, e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n actionOptions.run(actionContainer);\r\n });\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IconLabel\": () => (/* binding */ IconLabel)\n/* harmony export */ });\n/* harmony import */ var _iconlabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iconlabel.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../highlightedlabel/highlightedLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ \"./node_modules/monaco-editor/esm/vs/base/common/range.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass FastLabelNode {\r\n constructor(_element) {\r\n this._element = _element;\r\n }\r\n get element() {\r\n return this._element;\r\n }\r\n set textContent(content) {\r\n if (this.disposed || content === this._textContent) {\r\n return;\r\n }\r\n this._textContent = content;\r\n this._element.textContent = content;\r\n }\r\n set className(className) {\r\n if (this.disposed || className === this._className) {\r\n return;\r\n }\r\n this._className = className;\r\n this._element.className = className;\r\n }\r\n set empty(empty) {\r\n if (this.disposed || empty === this._empty) {\r\n return;\r\n }\r\n this._empty = empty;\r\n this._element.style.marginLeft = empty ? '0' : '';\r\n }\r\n dispose() {\r\n this.disposed = true;\r\n }\r\n}\r\nclass IconLabel extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(container, options) {\r\n super();\r\n this.hoverDelegate = undefined;\r\n this.customHovers = new Map();\r\n this.domNode = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(container, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.monaco-icon-label'))));\r\n this.labelContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.domNode.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.monaco-icon-label-container'));\r\n const nameContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.monaco-icon-name-container'));\r\n this.descriptionContainer = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.monaco-icon-description-container'))));\r\n if (options === null || options === void 0 ? void 0 : options.supportHighlights) {\r\n this.nameNode = new LabelWithHighlights(nameContainer, !!options.supportIcons);\r\n }\r\n else {\r\n this.nameNode = new Label(nameContainer);\r\n }\r\n if (options === null || options === void 0 ? void 0 : options.supportDescriptionHighlights) {\r\n this.descriptionNodeFactory = () => new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__.HighlightedLabel(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.label-description')), !!options.supportIcons);\r\n }\r\n else {\r\n this.descriptionNodeFactory = () => this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.label-description'))));\r\n }\r\n if (options === null || options === void 0 ? void 0 : options.hoverDelegate) {\r\n this.hoverDelegate = options.hoverDelegate;\r\n }\r\n }\r\n setLabel(label, description, options) {\r\n const classes = ['monaco-icon-label'];\r\n if (options) {\r\n if (options.extraClasses) {\r\n classes.push(...options.extraClasses);\r\n }\r\n if (options.italic) {\r\n classes.push('italic');\r\n }\r\n if (options.strikethrough) {\r\n classes.push('strikethrough');\r\n }\r\n }\r\n this.domNode.className = classes.join(' ');\r\n this.setupHover(this.labelContainer, options === null || options === void 0 ? void 0 : options.title);\r\n this.nameNode.setLabel(label, options);\r\n if (description || this.descriptionNode) {\r\n if (!this.descriptionNode) {\r\n this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand\r\n }\r\n if (this.descriptionNode instanceof _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__.HighlightedLabel) {\r\n this.descriptionNode.set(description || '', options ? options.descriptionMatches : undefined);\r\n this.setupHover(this.descriptionNode.element, options === null || options === void 0 ? void 0 : options.descriptionTitle);\r\n }\r\n else {\r\n this.descriptionNode.textContent = description || '';\r\n this.setupHover(this.descriptionNode.element, (options === null || options === void 0 ? void 0 : options.descriptionTitle) || '');\r\n this.descriptionNode.empty = !description;\r\n }\r\n }\r\n }\r\n setupHover(htmlElement, tooltip) {\r\n const previousCustomHover = this.customHovers.get(htmlElement);\r\n if (previousCustomHover) {\r\n previousCustomHover.dispose();\r\n this.customHovers.delete(htmlElement);\r\n }\r\n if (!tooltip) {\r\n htmlElement.removeAttribute('title');\r\n return;\r\n }\r\n if (!this.hoverDelegate) {\r\n return this.setupNativeHover(htmlElement, tooltip);\r\n }\r\n else {\r\n return this.setupCustomHover(this.hoverDelegate, htmlElement, tooltip);\r\n }\r\n }\r\n static adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering) {\r\n if (hoverOptions && isHovering) {\r\n if (mouseX !== undefined) {\r\n hoverOptions.target.x = mouseX + 10;\r\n }\r\n return hoverDelegate.showHover(hoverOptions);\r\n }\r\n return undefined;\r\n }\r\n getTooltipForCustom(markdownTooltip) {\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_7__.isString)(markdownTooltip)) {\r\n return () => __awaiter(this, void 0, void 0, function* () { return markdownTooltip; });\r\n }\r\n else if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_7__.isFunction)(markdownTooltip.markdown)) {\r\n return markdownTooltip.markdown;\r\n }\r\n else {\r\n const markdown = markdownTooltip.markdown;\r\n return () => __awaiter(this, void 0, void 0, function* () { return markdown; });\r\n }\r\n }\r\n setupCustomHover(hoverDelegate, htmlElement, markdownTooltip) {\r\n htmlElement.setAttribute('title', '');\r\n htmlElement.removeAttribute('title');\r\n let tooltip = this.getTooltipForCustom(markdownTooltip);\r\n // Testing has indicated that on Windows and Linux 500 ms matches the native hovers most closely.\r\n // On Mac, the delay is 1500.\r\n const hoverDelay = _common_platform_js__WEBPACK_IMPORTED_MODULE_6__.isMacintosh ? 1500 : 500;\r\n let hoverOptions;\r\n let mouseX;\r\n let isHovering = false;\r\n let tokenSource;\r\n let hoverDisposable;\r\n function mouseOver(e) {\r\n if (isHovering) {\r\n return;\r\n }\r\n tokenSource = new _common_cancellation_js__WEBPACK_IMPORTED_MODULE_10__.CancellationTokenSource();\r\n function mouseLeaveOrDown(e) {\r\n if ((e.type === _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_DOWN) || e.fromElement === htmlElement) {\r\n hoverDisposable === null || hoverDisposable === void 0 ? void 0 : hoverDisposable.dispose();\r\n hoverDisposable = undefined;\r\n isHovering = false;\r\n hoverOptions = undefined;\r\n tokenSource.dispose(true);\r\n mouseLeaveDisposable.dispose();\r\n mouseDownDisposable.dispose();\r\n }\r\n }\r\n const mouseLeaveDisposable = (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(htmlElement, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_LEAVE, true)(mouseLeaveOrDown.bind(htmlElement));\r\n const mouseDownDisposable = (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(htmlElement, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_DOWN, true)(mouseLeaveOrDown.bind(htmlElement));\r\n isHovering = true;\r\n function mouseMove(e) {\r\n mouseX = e.x;\r\n }\r\n const mouseMoveDisposable = (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(htmlElement, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_MOVE, true)(mouseMove.bind(htmlElement));\r\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\r\n var _a;\r\n if (isHovering && tooltip) {\r\n // Re-use the already computed hover options if they exist.\r\n if (!hoverOptions) {\r\n const target = {\r\n targetElements: [this],\r\n dispose: () => { }\r\n };\r\n hoverOptions = {\r\n text: (0,_nls_js__WEBPACK_IMPORTED_MODULE_9__.localize)('iconLabel.loading', \"Loading...\"),\r\n target,\r\n anchorPosition: 0 /* BELOW */\r\n };\r\n hoverDisposable = IconLabel.adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering);\r\n const resolvedTooltip = (_a = (yield tooltip(tokenSource.token))) !== null && _a !== void 0 ? _a : (!(0,_common_types_js__WEBPACK_IMPORTED_MODULE_7__.isString)(markdownTooltip) ? markdownTooltip.markdownNotSupportedFallback : undefined);\r\n if (resolvedTooltip) {\r\n hoverOptions = {\r\n text: resolvedTooltip,\r\n target,\r\n anchorPosition: 0 /* BELOW */\r\n };\r\n // awaiting the tooltip could take a while. Make sure we're still hovering.\r\n hoverDisposable = IconLabel.adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering);\r\n }\r\n else if (hoverDisposable) {\r\n hoverDisposable.dispose();\r\n hoverDisposable = undefined;\r\n }\r\n }\r\n }\r\n mouseMoveDisposable.dispose();\r\n }), hoverDelay);\r\n }\r\n const mouseOverDisposable = this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(htmlElement, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_OVER, true)(mouseOver.bind(htmlElement)));\r\n this.customHovers.set(htmlElement, mouseOverDisposable);\r\n }\r\n setupNativeHover(htmlElement, tooltip) {\r\n let stringTooltip = '';\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_7__.isString)(tooltip)) {\r\n stringTooltip = tooltip;\r\n }\r\n else if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.markdownNotSupportedFallback) {\r\n stringTooltip = tooltip.markdownNotSupportedFallback;\r\n }\r\n htmlElement.title = stringTooltip;\r\n }\r\n}\r\nclass Label {\r\n constructor(container) {\r\n this.container = container;\r\n this.label = undefined;\r\n this.singleLabel = undefined;\r\n }\r\n setLabel(label, options) {\r\n if (this.label === label && (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_5__.equals)(this.options, options)) {\r\n return;\r\n }\r\n this.label = label;\r\n this.options = options;\r\n if (typeof label === 'string') {\r\n if (!this.singleLabel) {\r\n this.container.innerText = '';\r\n this.container.classList.remove('multiple');\r\n this.singleLabel = _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId }));\r\n }\r\n this.singleLabel.textContent = label;\r\n }\r\n else {\r\n this.container.innerText = '';\r\n this.container.classList.add('multiple');\r\n this.singleLabel = undefined;\r\n for (let i = 0; i < label.length; i++) {\r\n const l = label[i];\r\n const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`;\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }, l));\r\n if (i < label.length - 1) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.label-separator', undefined, (options === null || options === void 0 ? void 0 : options.separator) || '/'));\r\n }\r\n }\r\n }\r\n }\r\n}\r\nfunction splitMatches(labels, separator, matches) {\r\n if (!matches) {\r\n return undefined;\r\n }\r\n let labelStart = 0;\r\n return labels.map(label => {\r\n const labelRange = { start: labelStart, end: labelStart + label.length };\r\n const result = matches\r\n .map(match => _common_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.intersect(labelRange, match))\r\n .filter(range => !_common_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.isEmpty(range))\r\n .map(({ start, end }) => ({ start: start - labelStart, end: end - labelStart }));\r\n labelStart = labelRange.end + separator.length;\r\n return result;\r\n });\r\n}\r\nclass LabelWithHighlights {\r\n constructor(container, supportIcons) {\r\n this.container = container;\r\n this.supportIcons = supportIcons;\r\n this.label = undefined;\r\n this.singleLabel = undefined;\r\n }\r\n setLabel(label, options) {\r\n if (this.label === label && (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_5__.equals)(this.options, options)) {\r\n return;\r\n }\r\n this.label = label;\r\n this.options = options;\r\n if (typeof label === 'string') {\r\n if (!this.singleLabel) {\r\n this.container.innerText = '';\r\n this.container.classList.remove('multiple');\r\n this.singleLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__.HighlightedLabel(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })), this.supportIcons);\r\n }\r\n this.singleLabel.set(label, options === null || options === void 0 ? void 0 : options.matches, undefined, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines);\r\n }\r\n else {\r\n this.container.innerText = '';\r\n this.container.classList.add('multiple');\r\n this.singleLabel = undefined;\r\n const separator = (options === null || options === void 0 ? void 0 : options.separator) || '/';\r\n const matches = splitMatches(label, separator, options === null || options === void 0 ? void 0 : options.matches);\r\n for (let i = 0; i < label.length; i++) {\r\n const l = label[i];\r\n const m = matches ? matches[i] : undefined;\r\n const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`;\r\n const name = _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' });\r\n const highlightedLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__.HighlightedLabel(_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.container, name), this.supportIcons);\r\n highlightedLabel.set(l, m, undefined, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines);\r\n if (i < label.length - 1) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_1__.append(name, _dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.label-separator', undefined, separator));\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"renderLabelWithIcons\": () => (/* binding */ renderLabelWithIcons),\n/* harmony export */ \"renderIcon\": () => (/* binding */ renderIcon)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst labelWithIconsRegex = new RegExp(`(\\\\\\\\)?\\\\$\\\\((${_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__.CSSIcon.iconNameExpression}(?:${_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__.CSSIcon.iconModifierExpression})?)\\\\)`, 'g');\r\nfunction renderLabelWithIcons(text) {\r\n const elements = new Array();\r\n let match;\r\n let textStart = 0, textStop = 0;\r\n while ((match = labelWithIconsRegex.exec(text)) !== null) {\r\n textStop = match.index || 0;\r\n elements.push(text.substring(textStart, textStop));\r\n textStart = (match.index || 0) + match[0].length;\r\n const [, escaped, codicon] = match;\r\n elements.push(escaped ? `$(${codicon})` : renderIcon({ id: codicon }));\r\n }\r\n if (textStart < text.length) {\r\n elements.push(text.substring(textStart));\r\n }\r\n return elements;\r\n}\r\nfunction renderIcon(icon) {\r\n const node = _dom_js__WEBPACK_IMPORTED_MODULE_0__.$(`span`);\r\n node.classList.add(..._common_codicons_js__WEBPACK_IMPORTED_MODULE_1__.CSSIcon.asClassNameArray(icon));\r\n return node;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InputBox\": () => (/* binding */ InputBox),\n/* harmony export */ \"HistoryInputBox\": () => (/* binding */ HistoryInputBox)\n/* harmony export */ });\n/* harmony import */ var _inputBox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inputBox.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../formattedTextRenderer.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js\");\n/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_history_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/history.js */ \"./node_modules/monaco-editor/esm/vs/base/common/history.js\");\n/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _dom_js__WEBPACK_IMPORTED_MODULE_2__.$;\r\nconst defaultOpts = {\r\n inputBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#3C3C3C'),\r\n inputForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#CCCCCC'),\r\n inputValidationInfoBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#55AAFF'),\r\n inputValidationInfoBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#063B49'),\r\n inputValidationWarningBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#B89500'),\r\n inputValidationWarningBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#352A05'),\r\n inputValidationErrorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#BE1100'),\r\n inputValidationErrorBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.fromHex('#5A1D1D')\r\n};\r\nclass InputBox extends _widget_js__WEBPACK_IMPORTED_MODULE_7__.Widget {\r\n constructor(container, contextViewProvider, options) {\r\n super();\r\n this.state = 'idle';\r\n this.maxHeight = Number.POSITIVE_INFINITY;\r\n this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._onDidHeightChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidHeightChange = this._onDidHeightChange.event;\r\n this.contextViewProvider = contextViewProvider;\r\n this.options = options || Object.create(null);\r\n (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_9__.mixin)(this.options, defaultOpts, false);\r\n this.message = null;\r\n this.placeholder = this.options.placeholder || '';\r\n this.ariaLabel = this.options.ariaLabel || '';\r\n this.inputBackground = this.options.inputBackground;\r\n this.inputForeground = this.options.inputForeground;\r\n this.inputBorder = this.options.inputBorder;\r\n this.inputValidationInfoBorder = this.options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = this.options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = this.options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = this.options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = this.options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = this.options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = this.options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = this.options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = this.options.inputValidationErrorForeground;\r\n if (this.options.validationOptions) {\r\n this.validation = this.options.validationOptions.validation;\r\n }\r\n this.element = _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.monaco-inputbox.idle'));\r\n let tagName = this.options.flexibleHeight ? 'textarea' : 'input';\r\n let wrapper = _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.element, $('.ibwrapper'));\r\n this.input = _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(wrapper, $(tagName + '.input.empty'));\r\n this.input.setAttribute('autocorrect', 'off');\r\n this.input.setAttribute('autocapitalize', 'off');\r\n this.input.setAttribute('spellcheck', 'false');\r\n this.onfocus(this.input, () => this.element.classList.add('synthetic-focus'));\r\n this.onblur(this.input, () => this.element.classList.remove('synthetic-focus'));\r\n if (this.options.flexibleHeight) {\r\n this.maxHeight = typeof this.options.flexibleMaxHeight === 'number' ? this.options.flexibleMaxHeight : Number.POSITIVE_INFINITY;\r\n this.mirror = _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(wrapper, $('div.mirror'));\r\n this.mirror.innerText = '\\u00a0';\r\n this.scrollableElement = new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__.ScrollableElement(this.element, { vertical: 1 /* Auto */ });\r\n if (this.options.flexibleWidth) {\r\n this.input.setAttribute('wrap', 'off');\r\n this.mirror.style.whiteSpace = 'pre';\r\n this.mirror.style.wordWrap = 'initial';\r\n }\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, this.scrollableElement.getDomNode());\r\n this._register(this.scrollableElement);\r\n // from ScrollableElement to DOM\r\n this._register(this.scrollableElement.onScroll(e => this.input.scrollTop = e.scrollTop));\r\n const onSelectionChange = _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Event.filter((0,_event_js__WEBPACK_IMPORTED_MODULE_12__.domEvent)(document, 'selectionchange'), () => {\r\n const selection = document.getSelection();\r\n return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === wrapper;\r\n });\r\n // from DOM to ScrollableElement\r\n this._register(onSelectionChange(this.updateScrollDimensions, this));\r\n this._register(this.onDidHeightChange(this.updateScrollDimensions, this));\r\n }\r\n else {\r\n this.input.type = this.options.type || 'text';\r\n this.input.setAttribute('wrap', 'off');\r\n }\r\n if (this.ariaLabel) {\r\n this.input.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n if (this.placeholder) {\r\n this.setPlaceHolder(this.placeholder);\r\n }\r\n this.oninput(this.input, () => this.onValueChange());\r\n this.onblur(this.input, () => this.onBlur());\r\n this.onfocus(this.input, () => this.onFocus());\r\n this.ignoreGesture(this.input);\r\n setTimeout(() => this.updateMirror(), 0);\r\n // Support actions\r\n if (this.options.actions) {\r\n this.actionbar = this._register(new _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__.ActionBar(this.element));\r\n this.actionbar.push(this.options.actions, { icon: true, label: false });\r\n }\r\n this.applyStyles();\r\n }\r\n onBlur() {\r\n this._hideMessage();\r\n }\r\n onFocus() {\r\n this._showMessage();\r\n }\r\n setPlaceHolder(placeHolder) {\r\n this.placeholder = placeHolder;\r\n this.input.setAttribute('placeholder', placeHolder);\r\n this.input.title = placeHolder;\r\n }\r\n setAriaLabel(label) {\r\n this.ariaLabel = label;\r\n if (label) {\r\n this.input.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n else {\r\n this.input.removeAttribute('aria-label');\r\n }\r\n }\r\n getAriaLabel() {\r\n return this.ariaLabel;\r\n }\r\n get inputElement() {\r\n return this.input;\r\n }\r\n get value() {\r\n return this.input.value;\r\n }\r\n set value(newValue) {\r\n if (this.input.value !== newValue) {\r\n this.input.value = newValue;\r\n this.onValueChange();\r\n }\r\n }\r\n get height() {\r\n return typeof this.cachedHeight === 'number' ? this.cachedHeight : _dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalHeight(this.element);\r\n }\r\n focus() {\r\n this.input.focus();\r\n }\r\n blur() {\r\n this.input.blur();\r\n }\r\n hasFocus() {\r\n return document.activeElement === this.input;\r\n }\r\n select(range = null) {\r\n this.input.select();\r\n if (range) {\r\n this.input.setSelectionRange(range.start, range.end);\r\n if (range.end === this.input.value.length) {\r\n this.input.scrollLeft = this.input.scrollWidth;\r\n }\r\n }\r\n }\r\n isSelectionAtEnd() {\r\n return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd;\r\n }\r\n enable() {\r\n this.input.removeAttribute('disabled');\r\n }\r\n disable() {\r\n this.blur();\r\n this.input.disabled = true;\r\n this._hideMessage();\r\n }\r\n get width() {\r\n return _dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this.input);\r\n }\r\n set width(width) {\r\n if (this.options.flexibleHeight && this.options.flexibleWidth) {\r\n // textarea with horizontal scrolling\r\n let horizontalPadding = 0;\r\n if (this.mirror) {\r\n const paddingLeft = parseFloat(this.mirror.style.paddingLeft || '') || 0;\r\n const paddingRight = parseFloat(this.mirror.style.paddingRight || '') || 0;\r\n horizontalPadding = paddingLeft + paddingRight;\r\n }\r\n this.input.style.width = (width - horizontalPadding) + 'px';\r\n }\r\n else {\r\n this.input.style.width = width + 'px';\r\n }\r\n if (this.mirror) {\r\n this.mirror.style.width = width + 'px';\r\n }\r\n }\r\n set paddingRight(paddingRight) {\r\n if (this.options.flexibleHeight && this.options.flexibleWidth) {\r\n this.input.style.width = `calc(100% - ${paddingRight}px)`;\r\n }\r\n else {\r\n this.input.style.paddingRight = paddingRight + 'px';\r\n }\r\n if (this.mirror) {\r\n this.mirror.style.paddingRight = paddingRight + 'px';\r\n }\r\n }\r\n updateScrollDimensions() {\r\n if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number' || !this.scrollableElement) {\r\n return;\r\n }\r\n const scrollHeight = this.cachedContentHeight;\r\n const height = this.cachedHeight;\r\n const scrollTop = this.input.scrollTop;\r\n this.scrollableElement.setScrollDimensions({ scrollHeight, height });\r\n this.scrollableElement.setScrollPosition({ scrollTop });\r\n }\r\n showMessage(message, force) {\r\n this.message = message;\r\n this.element.classList.remove('idle');\r\n this.element.classList.remove('info');\r\n this.element.classList.remove('warning');\r\n this.element.classList.remove('error');\r\n this.element.classList.add(this.classForType(message.type));\r\n const styles = this.stylesForType(this.message.type);\r\n this.element.style.border = styles.border ? `1px solid ${styles.border}` : '';\r\n if (this.hasFocus() || force) {\r\n this._showMessage();\r\n }\r\n }\r\n hideMessage() {\r\n this.message = null;\r\n this.element.classList.remove('info');\r\n this.element.classList.remove('warning');\r\n this.element.classList.remove('error');\r\n this.element.classList.add('idle');\r\n this._hideMessage();\r\n this.applyStyles();\r\n }\r\n validate() {\r\n let errorMsg = null;\r\n if (this.validation) {\r\n errorMsg = this.validation(this.value);\r\n if (errorMsg) {\r\n this.inputElement.setAttribute('aria-invalid', 'true');\r\n this.showMessage(errorMsg);\r\n }\r\n else if (this.inputElement.hasAttribute('aria-invalid')) {\r\n this.inputElement.removeAttribute('aria-invalid');\r\n this.hideMessage();\r\n }\r\n }\r\n return errorMsg === null || errorMsg === void 0 ? void 0 : errorMsg.type;\r\n }\r\n stylesForType(type) {\r\n switch (type) {\r\n case 1 /* INFO */: return { border: this.inputValidationInfoBorder, background: this.inputValidationInfoBackground, foreground: this.inputValidationInfoForeground };\r\n case 2 /* WARNING */: return { border: this.inputValidationWarningBorder, background: this.inputValidationWarningBackground, foreground: this.inputValidationWarningForeground };\r\n default: return { border: this.inputValidationErrorBorder, background: this.inputValidationErrorBackground, foreground: this.inputValidationErrorForeground };\r\n }\r\n }\r\n classForType(type) {\r\n switch (type) {\r\n case 1 /* INFO */: return 'info';\r\n case 2 /* WARNING */: return 'warning';\r\n default: return 'error';\r\n }\r\n }\r\n _showMessage() {\r\n if (!this.contextViewProvider || !this.message) {\r\n return;\r\n }\r\n let div;\r\n let layout = () => div.style.width = _dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this.element) + 'px';\r\n this.contextViewProvider.showContextView({\r\n getAnchor: () => this.element,\r\n anchorAlignment: 1 /* RIGHT */,\r\n render: (container) => {\r\n if (!this.message) {\r\n return null;\r\n }\r\n div = _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.monaco-inputbox-container'));\r\n layout();\r\n const renderOptions = {\r\n inline: true,\r\n className: 'monaco-inputbox-message'\r\n };\r\n const spanElement = (this.message.formatContent\r\n ? (0,_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__.renderFormattedText)(this.message.content, renderOptions)\r\n : (0,_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__.renderText)(this.message.content, renderOptions));\r\n spanElement.classList.add(this.classForType(this.message.type));\r\n const styles = this.stylesForType(this.message.type);\r\n spanElement.style.backgroundColor = styles.background ? styles.background.toString() : '';\r\n spanElement.style.color = styles.foreground ? styles.foreground.toString() : '';\r\n spanElement.style.border = styles.border ? `1px solid ${styles.border}` : '';\r\n _dom_js__WEBPACK_IMPORTED_MODULE_2__.append(div, spanElement);\r\n return null;\r\n },\r\n onHide: () => {\r\n this.state = 'closed';\r\n },\r\n layout: layout\r\n });\r\n // ARIA Support\r\n let alertText;\r\n if (this.message.type === 3 /* ERROR */) {\r\n alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('alertErrorMessage', \"Error: {0}\", this.message.content);\r\n }\r\n else if (this.message.type === 2 /* WARNING */) {\r\n alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('alertWarningMessage', \"Warning: {0}\", this.message.content);\r\n }\r\n else {\r\n alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('alertInfoMessage', \"Info: {0}\", this.message.content);\r\n }\r\n _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.alert(alertText);\r\n this.state = 'open';\r\n }\r\n _hideMessage() {\r\n if (!this.contextViewProvider) {\r\n return;\r\n }\r\n if (this.state === 'open') {\r\n this.contextViewProvider.hideContextView();\r\n }\r\n this.state = 'idle';\r\n }\r\n onValueChange() {\r\n this._onDidChange.fire(this.value);\r\n this.validate();\r\n this.updateMirror();\r\n this.input.classList.toggle('empty', !this.value);\r\n if (this.state === 'open' && this.contextViewProvider) {\r\n this.contextViewProvider.layout();\r\n }\r\n }\r\n updateMirror() {\r\n if (!this.mirror) {\r\n return;\r\n }\r\n const value = this.value;\r\n const lastCharCode = value.charCodeAt(value.length - 1);\r\n const suffix = lastCharCode === 10 ? ' ' : '';\r\n const mirrorTextContent = value + suffix;\r\n if (mirrorTextContent) {\r\n this.mirror.textContent = value + suffix;\r\n }\r\n else {\r\n this.mirror.innerText = '\\u00a0';\r\n }\r\n this.layout();\r\n }\r\n style(styles) {\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n const background = this.inputBackground ? this.inputBackground.toString() : '';\r\n const foreground = this.inputForeground ? this.inputForeground.toString() : '';\r\n const border = this.inputBorder ? this.inputBorder.toString() : '';\r\n this.element.style.backgroundColor = background;\r\n this.element.style.color = foreground;\r\n this.input.style.backgroundColor = 'inherit';\r\n this.input.style.color = foreground;\r\n this.element.style.borderWidth = border ? '1px' : '';\r\n this.element.style.borderStyle = border ? 'solid' : '';\r\n this.element.style.borderColor = border;\r\n }\r\n layout() {\r\n if (!this.mirror) {\r\n return;\r\n }\r\n const previousHeight = this.cachedContentHeight;\r\n this.cachedContentHeight = _dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalHeight(this.mirror);\r\n if (previousHeight !== this.cachedContentHeight) {\r\n this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight);\r\n this.input.style.height = this.cachedHeight + 'px';\r\n this._onDidHeightChange.fire(this.cachedContentHeight);\r\n }\r\n }\r\n insertAtCursor(text) {\r\n const inputElement = this.inputElement;\r\n const start = inputElement.selectionStart;\r\n const end = inputElement.selectionEnd;\r\n const content = inputElement.value;\r\n if (start !== null && end !== null) {\r\n this.value = content.substr(0, start) + text + content.substr(end);\r\n inputElement.setSelectionRange(start + 1, start + 1);\r\n this.layout();\r\n }\r\n }\r\n dispose() {\r\n this._hideMessage();\r\n this.message = null;\r\n if (this.actionbar) {\r\n this.actionbar.dispose();\r\n }\r\n super.dispose();\r\n }\r\n}\r\nclass HistoryInputBox extends InputBox {\r\n constructor(container, contextViewProvider, options) {\r\n super(container, contextViewProvider, options);\r\n this.history = new _common_history_js__WEBPACK_IMPORTED_MODULE_10__.HistoryNavigator(options.history, 100);\r\n }\r\n addToHistory() {\r\n if (this.value && this.value !== this.getCurrentValue()) {\r\n this.history.add(this.value);\r\n }\r\n }\r\n showNextValue() {\r\n if (!this.history.has(this.value)) {\r\n this.addToHistory();\r\n }\r\n let next = this.getNextValue();\r\n if (next) {\r\n next = next === this.value ? this.getNextValue() : next;\r\n }\r\n if (next) {\r\n this.value = next;\r\n _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.status(this.value);\r\n }\r\n }\r\n showPreviousValue() {\r\n if (!this.history.has(this.value)) {\r\n this.addToHistory();\r\n }\r\n let previous = this.getPreviousValue();\r\n if (previous) {\r\n previous = previous === this.value ? this.getPreviousValue() : previous;\r\n }\r\n if (previous) {\r\n this.value = previous;\r\n _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.status(this.value);\r\n }\r\n }\r\n getCurrentValue() {\r\n let currentValue = this.history.current();\r\n if (!currentValue) {\r\n currentValue = this.history.last();\r\n this.history.next();\r\n }\r\n return currentValue;\r\n }\r\n getPreviousValue() {\r\n return this.history.previous() || this.history.first();\r\n }\r\n getNextValue() {\r\n return this.history.next() || this.history.last();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KeybindingLabel\": () => (/* binding */ KeybindingLabel)\n/* harmony export */ });\n/* harmony import */ var _keybindingLabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./keybindingLabel.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/keybindingLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _dom_js__WEBPACK_IMPORTED_MODULE_3__.$;\r\nclass KeybindingLabel {\r\n constructor(container, os, options) {\r\n this.os = os;\r\n this.options = options;\r\n this.domNode = _dom_js__WEBPACK_IMPORTED_MODULE_3__.append(container, $('.monaco-keybinding'));\r\n this.didEverRender = false;\r\n container.appendChild(this.domNode);\r\n }\r\n set(keybinding, matches) {\r\n if (this.didEverRender && this.keybinding === keybinding && KeybindingLabel.areSame(this.matches, matches)) {\r\n return;\r\n }\r\n this.keybinding = keybinding;\r\n this.matches = matches;\r\n this.render();\r\n }\r\n render() {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.clearNode(this.domNode);\r\n if (this.keybinding) {\r\n let [firstPart, chordPart] = this.keybinding.getParts();\r\n if (firstPart) {\r\n this.renderPart(this.domNode, firstPart, this.matches ? this.matches.firstPart : null);\r\n }\r\n if (chordPart) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.append(this.domNode, $('span.monaco-keybinding-key-chord-separator', undefined, ' '));\r\n this.renderPart(this.domNode, chordPart, this.matches ? this.matches.chordPart : null);\r\n }\r\n this.domNode.title = this.keybinding.getAriaLabel() || '';\r\n }\r\n else if (this.options && this.options.renderUnboundKeybindings) {\r\n this.renderUnbound(this.domNode);\r\n }\r\n this.didEverRender = true;\r\n }\r\n renderPart(parent, part, match) {\r\n const modifierLabels = _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__.UILabelProvider.modifierLabels[this.os];\r\n if (part.ctrlKey) {\r\n this.renderKey(parent, modifierLabels.ctrlKey, Boolean(match === null || match === void 0 ? void 0 : match.ctrlKey), modifierLabels.separator);\r\n }\r\n if (part.shiftKey) {\r\n this.renderKey(parent, modifierLabels.shiftKey, Boolean(match === null || match === void 0 ? void 0 : match.shiftKey), modifierLabels.separator);\r\n }\r\n if (part.altKey) {\r\n this.renderKey(parent, modifierLabels.altKey, Boolean(match === null || match === void 0 ? void 0 : match.altKey), modifierLabels.separator);\r\n }\r\n if (part.metaKey) {\r\n this.renderKey(parent, modifierLabels.metaKey, Boolean(match === null || match === void 0 ? void 0 : match.metaKey), modifierLabels.separator);\r\n }\r\n const keyLabel = part.keyLabel;\r\n if (keyLabel) {\r\n this.renderKey(parent, keyLabel, Boolean(match === null || match === void 0 ? void 0 : match.keyCode), '');\r\n }\r\n }\r\n renderKey(parent, label, highlight, separator) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.append(parent, $('span.monaco-keybinding-key' + (highlight ? '.highlight' : ''), undefined, label));\r\n if (separator) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.append(parent, $('span.monaco-keybinding-key-separator', undefined, separator));\r\n }\r\n }\r\n renderUnbound(parent) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_3__.append(parent, $('span.monaco-keybinding-key', undefined, (0,_nls_js__WEBPACK_IMPORTED_MODULE_4__.localize)('unbound', \"Unbound\")));\r\n }\r\n static areSame(a, b) {\r\n if (a === b || (!a && !b)) {\r\n return true;\r\n }\r\n return !!a && !!b && (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(a.firstPart, b.firstPart) && (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(a.chordPart, b.chordPart);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ListError\": () => (/* binding */ ListError)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ListError extends Error {\r\n constructor(user, message) {\r\n super(`ListError [${user}] ${message}`);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PagedList\": () => (/* binding */ PagedList)\n/* harmony export */ });\n/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _listWidget_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass PagedRenderer {\r\n constructor(renderer, modelProvider) {\r\n this.renderer = renderer;\r\n this.modelProvider = modelProvider;\r\n }\r\n get templateId() { return this.renderer.templateId; }\r\n renderTemplate(container) {\r\n const data = this.renderer.renderTemplate(container);\r\n return { data, disposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None };\r\n }\r\n renderElement(index, _, data, height) {\r\n if (data.disposable) {\r\n data.disposable.dispose();\r\n }\r\n if (!data.data) {\r\n return;\r\n }\r\n const model = this.modelProvider();\r\n if (model.isResolved(index)) {\r\n return this.renderer.renderElement(model.get(index), index, data.data, height);\r\n }\r\n const cts = new _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__.CancellationTokenSource();\r\n const promise = model.resolve(index, cts.token);\r\n data.disposable = { dispose: () => cts.cancel() };\r\n this.renderer.renderPlaceholder(index, data.data);\r\n promise.then(entry => this.renderer.renderElement(entry, index, data.data, height));\r\n }\r\n disposeTemplate(data) {\r\n if (data.disposable) {\r\n data.disposable.dispose();\r\n data.disposable = undefined;\r\n }\r\n if (data.data) {\r\n this.renderer.disposeTemplate(data.data);\r\n data.data = undefined;\r\n }\r\n }\r\n}\r\nclass PagedAccessibilityProvider {\r\n constructor(modelProvider, accessibilityProvider) {\r\n this.modelProvider = modelProvider;\r\n this.accessibilityProvider = accessibilityProvider;\r\n }\r\n getWidgetAriaLabel() {\r\n return this.accessibilityProvider.getWidgetAriaLabel();\r\n }\r\n getAriaLabel(index) {\r\n const model = this.modelProvider();\r\n if (!model.isResolved(index)) {\r\n return null;\r\n }\r\n return this.accessibilityProvider.getAriaLabel(model.get(index));\r\n }\r\n}\r\nfunction fromPagedListOptions(modelProvider, options) {\r\n return Object.assign(Object.assign({}, options), { accessibilityProvider: options.accessibilityProvider && new PagedAccessibilityProvider(modelProvider, options.accessibilityProvider) });\r\n}\r\nclass PagedList {\r\n constructor(user, container, virtualDelegate, renderers, options = {}) {\r\n const modelProvider = () => this.model;\r\n const pagedRenderers = renderers.map(r => new PagedRenderer(r, modelProvider));\r\n this.list = new _listWidget_js__WEBPACK_IMPORTED_MODULE_3__.List(user, container, virtualDelegate, pagedRenderers, fromPagedListOptions(modelProvider, options));\r\n }\r\n updateOptions(options) {\r\n this.list.updateOptions(options);\r\n }\r\n getHTMLElement() {\r\n return this.list.getHTMLElement();\r\n }\r\n get onDidFocus() {\r\n return this.list.onDidFocus;\r\n }\r\n get onDidDispose() {\r\n return this.list.onDidDispose;\r\n }\r\n get onMouseDblClick() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.list.onMouseDblClick, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent }));\r\n }\r\n get onPointer() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.list.onPointer, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent }));\r\n }\r\n get onDidChangeFocus() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.list.onDidChangeFocus, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent }));\r\n }\r\n get onDidChangeSelection() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.list.onDidChangeSelection, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent }));\r\n }\r\n get model() {\r\n return this._model;\r\n }\r\n set model(model) {\r\n this._model = model;\r\n this.list.splice(0, this.list.length, (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__.range)(model.length));\r\n }\r\n getFocus() {\r\n return this.list.getFocus();\r\n }\r\n setSelection(indexes, browserEvent) {\r\n this.list.setSelection(indexes, browserEvent);\r\n }\r\n getSelection() {\r\n return this.list.getSelection();\r\n }\r\n getSelectedElements() {\r\n return this.getSelection().map(i => this.model.get(i));\r\n }\r\n style(styles) {\r\n this.list.style(styles);\r\n }\r\n dispose() {\r\n this.list.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ElementsDragAndDropData\": () => (/* binding */ ElementsDragAndDropData),\n/* harmony export */ \"ExternalElementsDragAndDropData\": () => (/* binding */ ExternalElementsDragAndDropData),\n/* harmony export */ \"NativeDragAndDropData\": () => (/* binding */ NativeDragAndDropData),\n/* harmony export */ \"ListView\": () => (/* binding */ ListView)\n/* harmony export */ });\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/scrollable.js */ \"./node_modules/monaco-editor/esm/vs/base/common/scrollable.js\");\n/* harmony import */ var _rangeMap_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./rangeMap.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js\");\n/* harmony import */ var _rowCache_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rowCache.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js\");\n/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/decorators.js */ \"./node_modules/monaco-editor/esm/vs/base/common/decorators.js\");\n/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/range.js */ \"./node_modules/monaco-editor/esm/vs/base/common/range.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../dnd.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dnd.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst DefaultOptions = {\r\n useShadows: true,\r\n verticalScrollMode: 1 /* Auto */,\r\n setRowLineHeight: true,\r\n setRowHeight: true,\r\n supportDynamicHeights: false,\r\n dnd: {\r\n getDragElements(e) { return [e]; },\r\n getDragURI() { return null; },\r\n onDragStart() { },\r\n onDragOver() { return false; },\r\n drop() { }\r\n },\r\n horizontalScrolling: false,\r\n transformOptimization: true,\r\n alwaysConsumeMouseWheel: true,\r\n};\r\nclass ElementsDragAndDropData {\r\n constructor(elements) {\r\n this.elements = elements;\r\n }\r\n update() { }\r\n getData() {\r\n return this.elements;\r\n }\r\n}\r\nclass ExternalElementsDragAndDropData {\r\n constructor(elements) {\r\n this.elements = elements;\r\n }\r\n update() { }\r\n getData() {\r\n return this.elements;\r\n }\r\n}\r\nclass NativeDragAndDropData {\r\n constructor() {\r\n this.types = [];\r\n this.files = [];\r\n }\r\n update(dataTransfer) {\r\n if (dataTransfer.types) {\r\n this.types.splice(0, this.types.length, ...dataTransfer.types);\r\n }\r\n if (dataTransfer.files) {\r\n this.files.splice(0, this.files.length);\r\n for (let i = 0; i < dataTransfer.files.length; i++) {\r\n const file = dataTransfer.files.item(i);\r\n if (file && (file.size || file.type)) {\r\n this.files.push(file);\r\n }\r\n }\r\n }\r\n }\r\n getData() {\r\n return {\r\n types: this.types,\r\n files: this.files\r\n };\r\n }\r\n}\r\nfunction equalsDragFeedback(f1, f2) {\r\n if (Array.isArray(f1) && Array.isArray(f2)) {\r\n return (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__.equals)(f1, f2);\r\n }\r\n return f1 === f2;\r\n}\r\nclass ListViewAccessibilityProvider {\r\n constructor(accessibilityProvider) {\r\n if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getSetSize) {\r\n this.getSetSize = accessibilityProvider.getSetSize.bind(accessibilityProvider);\r\n }\r\n else {\r\n this.getSetSize = (e, i, l) => l;\r\n }\r\n if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getPosInSet) {\r\n this.getPosInSet = accessibilityProvider.getPosInSet.bind(accessibilityProvider);\r\n }\r\n else {\r\n this.getPosInSet = (e, i) => i + 1;\r\n }\r\n if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getRole) {\r\n this.getRole = accessibilityProvider.getRole.bind(accessibilityProvider);\r\n }\r\n else {\r\n this.getRole = _ => 'listitem';\r\n }\r\n if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.isChecked) {\r\n this.isChecked = accessibilityProvider.isChecked.bind(accessibilityProvider);\r\n }\r\n else {\r\n this.isChecked = _ => undefined;\r\n }\r\n }\r\n}\r\nclass ListView {\r\n constructor(container, virtualDelegate, renderers, options = DefaultOptions) {\r\n this.virtualDelegate = virtualDelegate;\r\n this.domId = `list_id_${++ListView.InstanceCount}`;\r\n this.renderers = new Map();\r\n this.renderWidth = 0;\r\n this._scrollHeight = 0;\r\n this.scrollableElementUpdateDisposable = null;\r\n this.scrollableElementWidthDelayer = new _common_async_js__WEBPACK_IMPORTED_MODULE_13__.Delayer(50);\r\n this.splicing = false;\r\n this.dragOverAnimationStopDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.dragOverMouseY = 0;\r\n this.canDrop = false;\r\n this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.onDragLeaveTimeout = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._onDidChangeContentHeight = new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this._horizontalScrolling = false;\r\n if (options.horizontalScrolling && options.supportDynamicHeights) {\r\n throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously');\r\n }\r\n this.items = [];\r\n this.itemId = 0;\r\n this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_7__.RangeMap();\r\n for (const renderer of renderers) {\r\n this.renderers.set(renderer.templateId, renderer);\r\n }\r\n this.cache = this.disposables.add(new _rowCache_js__WEBPACK_IMPORTED_MODULE_8__.RowCache(this.renderers));\r\n this.lastRenderTop = 0;\r\n this.lastRenderHeight = 0;\r\n this.domNode = document.createElement('div');\r\n this.domNode.className = 'monaco-list';\r\n this.domNode.classList.add(this.domId);\r\n this.domNode.tabIndex = 0;\r\n this.domNode.classList.toggle('mouse-support', typeof options.mouseSupport === 'boolean' ? options.mouseSupport : true);\r\n this._horizontalScrolling = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.horizontalScrolling, DefaultOptions.horizontalScrolling);\r\n this.domNode.classList.toggle('horizontal-scrolling', this._horizontalScrolling);\r\n this.additionalScrollHeight = typeof options.additionalScrollHeight === 'undefined' ? 0 : options.additionalScrollHeight;\r\n this.accessibilityProvider = new ListViewAccessibilityProvider(options.accessibilityProvider);\r\n this.rowsContainer = document.createElement('div');\r\n this.rowsContainer.className = 'monaco-list-rows';\r\n const transformOptimization = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.transformOptimization, DefaultOptions.transformOptimization);\r\n if (transformOptimization) {\r\n this.rowsContainer.style.transform = 'translate3d(0px, 0px, 0px)';\r\n }\r\n this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_2__.Gesture.addTarget(this.rowsContainer));\r\n this.scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_6__.Scrollable((0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.smoothScrolling, false) ? 125 : 0, cb => (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.scheduleAtNextAnimationFrame)(cb));\r\n this.scrollableElement = this.disposables.add(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__.SmoothScrollableElement(this.rowsContainer, {\r\n alwaysConsumeMouseWheel: (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.alwaysConsumeMouseWheel, DefaultOptions.alwaysConsumeMouseWheel),\r\n horizontal: 1 /* Auto */,\r\n vertical: (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.verticalScrollMode, DefaultOptions.verticalScrollMode),\r\n useShadows: (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.useShadows, DefaultOptions.useShadows),\r\n }, this.scrollable));\r\n this.domNode.appendChild(this.scrollableElement.getDomNode());\r\n container.appendChild(this.domNode);\r\n this.scrollableElement.onScroll(this.onScroll, this, this.disposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Change)(this.onTouchChange, this, this.disposables);\r\n // Prevent the monaco-scrollable-element from scrolling\r\n // https://github.com/microsoft/vscode/issues/44181\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.scrollableElement.getDomNode(), 'scroll')(e => e.target.scrollTop = 0, null, this.disposables);\r\n _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'dragover'), e => this.toDragEvent(e))(this.onDragOver, this, this.disposables);\r\n _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'drop'), e => this.toDragEvent(e))(this.onDrop, this, this.disposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'dragleave')(this.onDragLeave, this, this.disposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(window, 'dragend')(this.onDragEnd, this, this.disposables);\r\n this.setRowLineHeight = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight);\r\n this.setRowHeight = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.setRowHeight, DefaultOptions.setRowHeight);\r\n this.supportDynamicHeights = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.supportDynamicHeights, DefaultOptions.supportDynamicHeights);\r\n this.dnd = (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.getOrDefault)(options, o => o.dnd, DefaultOptions.dnd);\r\n this.layout();\r\n }\r\n get contentHeight() { return this.rangeMap.size; }\r\n get horizontalScrolling() { return this._horizontalScrolling; }\r\n set horizontalScrolling(value) {\r\n if (value === this._horizontalScrolling) {\r\n return;\r\n }\r\n if (value && this.supportDynamicHeights) {\r\n throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously');\r\n }\r\n this._horizontalScrolling = value;\r\n this.domNode.classList.toggle('horizontal-scrolling', this._horizontalScrolling);\r\n if (this._horizontalScrolling) {\r\n for (const item of this.items) {\r\n this.measureItemWidth(item);\r\n }\r\n this.updateScrollWidth();\r\n this.scrollableElement.setScrollDimensions({ width: (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.getContentWidth)(this.domNode) });\r\n this.rowsContainer.style.width = `${Math.max(this.scrollWidth || 0, this.renderWidth)}px`;\r\n }\r\n else {\r\n this.scrollableElementWidthDelayer.cancel();\r\n this.scrollableElement.setScrollDimensions({ width: this.renderWidth, scrollWidth: this.renderWidth });\r\n this.rowsContainer.style.width = '';\r\n }\r\n }\r\n updateOptions(options) {\r\n if (options.additionalScrollHeight !== undefined) {\r\n this.additionalScrollHeight = options.additionalScrollHeight;\r\n }\r\n if (options.smoothScrolling !== undefined) {\r\n this.scrollable.setSmoothScrollDuration(options.smoothScrolling ? 125 : 0);\r\n }\r\n if (options.horizontalScrolling !== undefined) {\r\n this.horizontalScrolling = options.horizontalScrolling;\r\n }\r\n }\r\n splice(start, deleteCount, elements = []) {\r\n if (this.splicing) {\r\n throw new Error('Can\\'t run recursive splices.');\r\n }\r\n this.splicing = true;\r\n try {\r\n return this._splice(start, deleteCount, elements);\r\n }\r\n finally {\r\n this.splicing = false;\r\n this._onDidChangeContentHeight.fire(this.contentHeight);\r\n }\r\n }\r\n _splice(start, deleteCount, elements = []) {\r\n const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\r\n const deleteRange = { start, end: start + deleteCount };\r\n const removeRange = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.intersect(previousRenderRange, deleteRange);\r\n // try to reuse rows, avoid removing them from DOM\r\n const rowsToDispose = new Map();\r\n for (let i = removeRange.start; i < removeRange.end; i++) {\r\n const item = this.items[i];\r\n item.dragStartDisposable.dispose();\r\n if (item.row) {\r\n let rows = rowsToDispose.get(item.templateId);\r\n if (!rows) {\r\n rows = [];\r\n rowsToDispose.set(item.templateId, rows);\r\n }\r\n const renderer = this.renderers.get(item.templateId);\r\n if (renderer && renderer.disposeElement) {\r\n renderer.disposeElement(item.element, i, item.row.templateData, item.size);\r\n }\r\n rows.push(item.row);\r\n }\r\n item.row = null;\r\n }\r\n const previousRestRange = { start: start + deleteCount, end: this.items.length };\r\n const previousRenderedRestRange = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.intersect(previousRestRange, previousRenderRange);\r\n const previousUnrenderedRestRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(previousRestRange, previousRenderRange);\r\n const inserted = elements.map(element => ({\r\n id: String(this.itemId++),\r\n element,\r\n templateId: this.virtualDelegate.getTemplateId(element),\r\n size: this.virtualDelegate.getHeight(element),\r\n width: undefined,\r\n hasDynamicHeight: !!this.virtualDelegate.hasDynamicHeight && this.virtualDelegate.hasDynamicHeight(element),\r\n lastDynamicHeightWidth: undefined,\r\n row: null,\r\n uri: undefined,\r\n dropTarget: false,\r\n dragStartDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None\r\n }));\r\n let deleted;\r\n // TODO@joao: improve this optimization to catch even more cases\r\n if (start === 0 && deleteCount >= this.items.length) {\r\n this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_7__.RangeMap();\r\n this.rangeMap.splice(0, 0, inserted);\r\n deleted = this.items;\r\n this.items = inserted;\r\n }\r\n else {\r\n this.rangeMap.splice(start, deleteCount, inserted);\r\n deleted = this.items.splice(start, deleteCount, ...inserted);\r\n }\r\n const delta = elements.length - deleteCount;\r\n const renderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\r\n const renderedRestRange = (0,_rangeMap_js__WEBPACK_IMPORTED_MODULE_7__.shift)(previousRenderedRestRange, delta);\r\n const updateRange = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.intersect(renderRange, renderedRestRange);\r\n for (let i = updateRange.start; i < updateRange.end; i++) {\r\n this.updateItemInDOM(this.items[i], i);\r\n }\r\n const removeRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(renderedRestRange, renderRange);\r\n for (const range of removeRanges) {\r\n for (let i = range.start; i < range.end; i++) {\r\n this.removeItemFromDOM(i);\r\n }\r\n }\r\n const unrenderedRestRanges = previousUnrenderedRestRanges.map(r => (0,_rangeMap_js__WEBPACK_IMPORTED_MODULE_7__.shift)(r, delta));\r\n const elementsRange = { start, end: start + elements.length };\r\n const insertRanges = [elementsRange, ...unrenderedRestRanges].map(r => _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.intersect(renderRange, r));\r\n const beforeElement = this.getNextToLastElement(insertRanges);\r\n for (const range of insertRanges) {\r\n for (let i = range.start; i < range.end; i++) {\r\n const item = this.items[i];\r\n const rows = rowsToDispose.get(item.templateId);\r\n const row = rows === null || rows === void 0 ? void 0 : rows.pop();\r\n this.insertItemInDOM(i, beforeElement, row);\r\n }\r\n }\r\n for (const rows of rowsToDispose.values()) {\r\n for (const row of rows) {\r\n this.cache.release(row);\r\n }\r\n }\r\n this.eventuallyUpdateScrollDimensions();\r\n if (this.supportDynamicHeights) {\r\n this._rerender(this.scrollTop, this.renderHeight);\r\n }\r\n return deleted.map(i => i.element);\r\n }\r\n eventuallyUpdateScrollDimensions() {\r\n this._scrollHeight = this.contentHeight;\r\n this.rowsContainer.style.height = `${this._scrollHeight}px`;\r\n if (!this.scrollableElementUpdateDisposable) {\r\n this.scrollableElementUpdateDisposable = (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.scheduleAtNextAnimationFrame)(() => {\r\n this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight });\r\n this.updateScrollWidth();\r\n this.scrollableElementUpdateDisposable = null;\r\n });\r\n }\r\n }\r\n eventuallyUpdateScrollWidth() {\r\n if (!this.horizontalScrolling) {\r\n this.scrollableElementWidthDelayer.cancel();\r\n return;\r\n }\r\n this.scrollableElementWidthDelayer.trigger(() => this.updateScrollWidth());\r\n }\r\n updateScrollWidth() {\r\n if (!this.horizontalScrolling) {\r\n return;\r\n }\r\n let scrollWidth = 0;\r\n for (const item of this.items) {\r\n if (typeof item.width !== 'undefined') {\r\n scrollWidth = Math.max(scrollWidth, item.width);\r\n }\r\n }\r\n this.scrollWidth = scrollWidth;\r\n this.scrollableElement.setScrollDimensions({ scrollWidth: scrollWidth === 0 ? 0 : (scrollWidth + 10) });\r\n }\r\n rerender() {\r\n if (!this.supportDynamicHeights) {\r\n return;\r\n }\r\n for (const item of this.items) {\r\n item.lastDynamicHeightWidth = undefined;\r\n }\r\n this._rerender(this.lastRenderTop, this.lastRenderHeight);\r\n }\r\n get length() {\r\n return this.items.length;\r\n }\r\n get renderHeight() {\r\n const scrollDimensions = this.scrollableElement.getScrollDimensions();\r\n return scrollDimensions.height;\r\n }\r\n element(index) {\r\n return this.items[index].element;\r\n }\r\n domElement(index) {\r\n const row = this.items[index].row;\r\n return row && row.domNode;\r\n }\r\n elementHeight(index) {\r\n return this.items[index].size;\r\n }\r\n elementTop(index) {\r\n return this.rangeMap.positionAt(index);\r\n }\r\n indexAt(position) {\r\n return this.rangeMap.indexAt(position);\r\n }\r\n indexAfter(position) {\r\n return this.rangeMap.indexAfter(position);\r\n }\r\n layout(height, width) {\r\n let scrollDimensions = {\r\n height: typeof height === 'number' ? height : (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.getContentHeight)(this.domNode)\r\n };\r\n if (this.scrollableElementUpdateDisposable) {\r\n this.scrollableElementUpdateDisposable.dispose();\r\n this.scrollableElementUpdateDisposable = null;\r\n scrollDimensions.scrollHeight = this.scrollHeight;\r\n }\r\n this.scrollableElement.setScrollDimensions(scrollDimensions);\r\n if (typeof width !== 'undefined') {\r\n this.renderWidth = width;\r\n if (this.supportDynamicHeights) {\r\n this._rerender(this.scrollTop, this.renderHeight);\r\n }\r\n if (this.horizontalScrolling) {\r\n this.scrollableElement.setScrollDimensions({\r\n width: typeof width === 'number' ? width : (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.getContentWidth)(this.domNode)\r\n });\r\n }\r\n }\r\n }\r\n // Render\r\n render(previousRenderRange, renderTop, renderHeight, renderLeft, scrollWidth, updateItemsInDOM = false) {\r\n const renderRange = this.getRenderRange(renderTop, renderHeight);\r\n const rangesToInsert = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(renderRange, previousRenderRange);\r\n const rangesToRemove = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(previousRenderRange, renderRange);\r\n const beforeElement = this.getNextToLastElement(rangesToInsert);\r\n if (updateItemsInDOM) {\r\n const rangesToUpdate = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.intersect(previousRenderRange, renderRange);\r\n for (let i = rangesToUpdate.start; i < rangesToUpdate.end; i++) {\r\n this.updateItemInDOM(this.items[i], i);\r\n }\r\n }\r\n for (const range of rangesToInsert) {\r\n for (let i = range.start; i < range.end; i++) {\r\n this.insertItemInDOM(i, beforeElement);\r\n }\r\n }\r\n for (const range of rangesToRemove) {\r\n for (let i = range.start; i < range.end; i++) {\r\n this.removeItemFromDOM(i);\r\n }\r\n }\r\n if (renderLeft !== undefined) {\r\n this.rowsContainer.style.left = `-${renderLeft}px`;\r\n }\r\n this.rowsContainer.style.top = `-${renderTop}px`;\r\n if (this.horizontalScrolling && scrollWidth !== undefined) {\r\n this.rowsContainer.style.width = `${Math.max(scrollWidth, this.renderWidth)}px`;\r\n }\r\n this.lastRenderTop = renderTop;\r\n this.lastRenderHeight = renderHeight;\r\n }\r\n // DOM operations\r\n insertItemInDOM(index, beforeElement, row) {\r\n const item = this.items[index];\r\n if (!item.row) {\r\n item.row = row !== null && row !== void 0 ? row : this.cache.alloc(item.templateId);\r\n }\r\n const role = this.accessibilityProvider.getRole(item.element) || 'listitem';\r\n item.row.domNode.setAttribute('role', role);\r\n const checked = this.accessibilityProvider.isChecked(item.element);\r\n if (typeof checked !== 'undefined') {\r\n item.row.domNode.setAttribute('aria-checked', String(!!checked));\r\n }\r\n if (!item.row.domNode.parentElement) {\r\n if (beforeElement) {\r\n this.rowsContainer.insertBefore(item.row.domNode, beforeElement);\r\n }\r\n else {\r\n this.rowsContainer.appendChild(item.row.domNode);\r\n }\r\n }\r\n this.updateItemInDOM(item, index);\r\n const renderer = this.renderers.get(item.templateId);\r\n if (!renderer) {\r\n throw new Error(`No renderer found for template id ${item.templateId}`);\r\n }\r\n if (renderer) {\r\n renderer.renderElement(item.element, index, item.row.templateData, item.size);\r\n }\r\n const uri = this.dnd.getDragURI(item.element);\r\n item.dragStartDisposable.dispose();\r\n item.row.domNode.draggable = !!uri;\r\n if (uri) {\r\n const onDragStart = (0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(item.row.domNode, 'dragstart');\r\n item.dragStartDisposable = onDragStart(event => this.onDragStart(item.element, uri, event));\r\n }\r\n if (this.horizontalScrolling) {\r\n this.measureItemWidth(item);\r\n this.eventuallyUpdateScrollWidth();\r\n }\r\n }\r\n measureItemWidth(item) {\r\n if (!item.row || !item.row.domNode) {\r\n return;\r\n }\r\n item.row.domNode.style.width = _browser_js__WEBPACK_IMPORTED_MODULE_14__.isFirefox ? '-moz-fit-content' : 'fit-content';\r\n item.width = (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.getContentWidth)(item.row.domNode);\r\n const style = window.getComputedStyle(item.row.domNode);\r\n if (style.paddingLeft) {\r\n item.width += parseFloat(style.paddingLeft);\r\n }\r\n if (style.paddingRight) {\r\n item.width += parseFloat(style.paddingRight);\r\n }\r\n item.row.domNode.style.width = '';\r\n }\r\n updateItemInDOM(item, index) {\r\n item.row.domNode.style.top = `${this.elementTop(index)}px`;\r\n if (this.setRowHeight) {\r\n item.row.domNode.style.height = `${item.size}px`;\r\n }\r\n if (this.setRowLineHeight) {\r\n item.row.domNode.style.lineHeight = `${item.size}px`;\r\n }\r\n item.row.domNode.setAttribute('data-index', `${index}`);\r\n item.row.domNode.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false');\r\n item.row.domNode.setAttribute('aria-setsize', String(this.accessibilityProvider.getSetSize(item.element, index, this.length)));\r\n item.row.domNode.setAttribute('aria-posinset', String(this.accessibilityProvider.getPosInSet(item.element, index)));\r\n item.row.domNode.setAttribute('id', this.getElementDomId(index));\r\n item.row.domNode.classList.toggle('drop-target', item.dropTarget);\r\n }\r\n removeItemFromDOM(index) {\r\n const item = this.items[index];\r\n item.dragStartDisposable.dispose();\r\n if (item.row) {\r\n const renderer = this.renderers.get(item.templateId);\r\n if (renderer && renderer.disposeElement) {\r\n renderer.disposeElement(item.element, index, item.row.templateData, item.size);\r\n }\r\n this.cache.release(item.row);\r\n item.row = null;\r\n }\r\n if (this.horizontalScrolling) {\r\n this.eventuallyUpdateScrollWidth();\r\n }\r\n }\r\n getScrollTop() {\r\n const scrollPosition = this.scrollableElement.getScrollPosition();\r\n return scrollPosition.scrollTop;\r\n }\r\n setScrollTop(scrollTop, reuseAnimation) {\r\n if (this.scrollableElementUpdateDisposable) {\r\n this.scrollableElementUpdateDisposable.dispose();\r\n this.scrollableElementUpdateDisposable = null;\r\n this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight });\r\n }\r\n this.scrollableElement.setScrollPosition({ scrollTop, reuseAnimation });\r\n }\r\n get scrollTop() {\r\n return this.getScrollTop();\r\n }\r\n set scrollTop(scrollTop) {\r\n this.setScrollTop(scrollTop);\r\n }\r\n get scrollHeight() {\r\n return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this.additionalScrollHeight;\r\n }\r\n // Events\r\n get onMouseClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'click'), e => this.toMouseEvent(e)); }\r\n get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'dblclick'), e => this.toMouseEvent(e)); }\r\n get onMouseMiddleClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.filter(_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'auxclick'), e => this.toMouseEvent(e)), e => e.browserEvent.button === 1); }\r\n get onMouseDown() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'mousedown'), e => this.toMouseEvent(e)); }\r\n get onContextMenu() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'contextmenu'), e => this.toMouseEvent(e)); }\r\n get onTouchStart() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.domNode, 'touchstart'), e => this.toTouchEvent(e)); }\r\n get onTap() { return _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_4__.domEvent)(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Tap), e => this.toGestureEvent(e)); }\r\n toMouseEvent(browserEvent) {\r\n const index = this.getItemIndexFromEventTarget(browserEvent.target || null);\r\n const item = typeof index === 'undefined' ? undefined : this.items[index];\r\n const element = item && item.element;\r\n return { browserEvent, index, element };\r\n }\r\n toTouchEvent(browserEvent) {\r\n const index = this.getItemIndexFromEventTarget(browserEvent.target || null);\r\n const item = typeof index === 'undefined' ? undefined : this.items[index];\r\n const element = item && item.element;\r\n return { browserEvent, index, element };\r\n }\r\n toGestureEvent(browserEvent) {\r\n const index = this.getItemIndexFromEventTarget(browserEvent.initialTarget || null);\r\n const item = typeof index === 'undefined' ? undefined : this.items[index];\r\n const element = item && item.element;\r\n return { browserEvent, index, element };\r\n }\r\n toDragEvent(browserEvent) {\r\n const index = this.getItemIndexFromEventTarget(browserEvent.target || null);\r\n const item = typeof index === 'undefined' ? undefined : this.items[index];\r\n const element = item && item.element;\r\n return { browserEvent, index, element };\r\n }\r\n onScroll(e) {\r\n try {\r\n const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);\r\n this.render(previousRenderRange, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth);\r\n if (this.supportDynamicHeights) {\r\n this._rerender(e.scrollTop, e.height, e.inSmoothScrolling);\r\n }\r\n }\r\n catch (err) {\r\n console.error('Got bad scroll event:', e);\r\n throw err;\r\n }\r\n }\r\n onTouchChange(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.scrollTop -= event.translationY;\r\n }\r\n // DND\r\n onDragStart(element, uri, event) {\r\n if (!event.dataTransfer) {\r\n return;\r\n }\r\n const elements = this.dnd.getDragElements(element);\r\n event.dataTransfer.effectAllowed = 'copyMove';\r\n event.dataTransfer.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_12__.DataTransfers.RESOURCES, JSON.stringify([uri]));\r\n if (event.dataTransfer.setDragImage) {\r\n let label;\r\n if (this.dnd.getDragLabel) {\r\n label = this.dnd.getDragLabel(elements, event);\r\n }\r\n if (typeof label === 'undefined') {\r\n label = String(elements.length);\r\n }\r\n const dragImage = (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.$)('.monaco-drag-image');\r\n dragImage.textContent = label;\r\n document.body.appendChild(dragImage);\r\n event.dataTransfer.setDragImage(dragImage, -10, -10);\r\n setTimeout(() => document.body.removeChild(dragImage), 0);\r\n }\r\n this.currentDragData = new ElementsDragAndDropData(elements);\r\n _dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData = new ExternalElementsDragAndDropData(elements);\r\n if (this.dnd.onDragStart) {\r\n this.dnd.onDragStart(this.currentDragData, event);\r\n }\r\n }\r\n onDragOver(event) {\r\n event.browserEvent.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)\r\n this.onDragLeaveTimeout.dispose();\r\n if (_dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData && _dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData.getData() === 'vscode-ui') {\r\n return false;\r\n }\r\n this.setupDragAndDropScrollTopAnimation(event.browserEvent);\r\n if (!event.browserEvent.dataTransfer) {\r\n return false;\r\n }\r\n // Drag over from outside\r\n if (!this.currentDragData) {\r\n if (_dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData) {\r\n // Drag over from another list\r\n this.currentDragData = _dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData;\r\n }\r\n else {\r\n // Drag over from the desktop\r\n if (!event.browserEvent.dataTransfer.types) {\r\n return false;\r\n }\r\n this.currentDragData = new NativeDragAndDropData();\r\n }\r\n }\r\n const result = this.dnd.onDragOver(this.currentDragData, event.element, event.index, event.browserEvent);\r\n this.canDrop = typeof result === 'boolean' ? result : result.accept;\r\n if (!this.canDrop) {\r\n this.currentDragFeedback = undefined;\r\n this.currentDragFeedbackDisposable.dispose();\r\n return false;\r\n }\r\n event.browserEvent.dataTransfer.dropEffect = (typeof result !== 'boolean' && result.effect === 0 /* Copy */) ? 'copy' : 'move';\r\n let feedback;\r\n if (typeof result !== 'boolean' && result.feedback) {\r\n feedback = result.feedback;\r\n }\r\n else {\r\n if (typeof event.index === 'undefined') {\r\n feedback = [-1];\r\n }\r\n else {\r\n feedback = [event.index];\r\n }\r\n }\r\n // sanitize feedback list\r\n feedback = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__.distinct)(feedback).filter(i => i >= -1 && i < this.length).sort((a, b) => a - b);\r\n feedback = feedback[0] === -1 ? [-1] : feedback;\r\n if (equalsDragFeedback(this.currentDragFeedback, feedback)) {\r\n return true;\r\n }\r\n this.currentDragFeedback = feedback;\r\n this.currentDragFeedbackDisposable.dispose();\r\n if (feedback[0] === -1) { // entire list feedback\r\n this.domNode.classList.add('drop-target');\r\n this.rowsContainer.classList.add('drop-target');\r\n this.currentDragFeedbackDisposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n this.domNode.classList.remove('drop-target');\r\n this.rowsContainer.classList.remove('drop-target');\r\n });\r\n }\r\n else {\r\n for (const index of feedback) {\r\n const item = this.items[index];\r\n item.dropTarget = true;\r\n if (item.row) {\r\n item.row.domNode.classList.add('drop-target');\r\n }\r\n }\r\n this.currentDragFeedbackDisposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n for (const index of feedback) {\r\n const item = this.items[index];\r\n item.dropTarget = false;\r\n if (item.row) {\r\n item.row.domNode.classList.remove('drop-target');\r\n }\r\n }\r\n });\r\n }\r\n return true;\r\n }\r\n onDragLeave() {\r\n this.onDragLeaveTimeout.dispose();\r\n this.onDragLeaveTimeout = (0,_common_async_js__WEBPACK_IMPORTED_MODULE_13__.disposableTimeout)(() => this.clearDragOverFeedback(), 100);\r\n }\r\n onDrop(event) {\r\n if (!this.canDrop) {\r\n return;\r\n }\r\n const dragData = this.currentDragData;\r\n this.teardownDragAndDropScrollTopAnimation();\r\n this.clearDragOverFeedback();\r\n this.currentDragData = undefined;\r\n _dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData = undefined;\r\n if (!dragData || !event.browserEvent.dataTransfer) {\r\n return;\r\n }\r\n event.browserEvent.preventDefault();\r\n dragData.update(event.browserEvent.dataTransfer);\r\n this.dnd.drop(dragData, event.element, event.index, event.browserEvent);\r\n }\r\n onDragEnd(event) {\r\n this.canDrop = false;\r\n this.teardownDragAndDropScrollTopAnimation();\r\n this.clearDragOverFeedback();\r\n this.currentDragData = undefined;\r\n _dnd_js__WEBPACK_IMPORTED_MODULE_12__.StaticDND.CurrentDragAndDropData = undefined;\r\n if (this.dnd.onDragEnd) {\r\n this.dnd.onDragEnd(event);\r\n }\r\n }\r\n clearDragOverFeedback() {\r\n this.currentDragFeedback = undefined;\r\n this.currentDragFeedbackDisposable.dispose();\r\n this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n // DND scroll top animation\r\n setupDragAndDropScrollTopAnimation(event) {\r\n if (!this.dragOverAnimationDisposable) {\r\n const viewTop = (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.getTopLeftOffset)(this.domNode).top;\r\n this.dragOverAnimationDisposable = (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.animate)(this.animateDragAndDropScrollTop.bind(this, viewTop));\r\n }\r\n this.dragOverAnimationStopDisposable.dispose();\r\n this.dragOverAnimationStopDisposable = (0,_common_async_js__WEBPACK_IMPORTED_MODULE_13__.disposableTimeout)(() => {\r\n if (this.dragOverAnimationDisposable) {\r\n this.dragOverAnimationDisposable.dispose();\r\n this.dragOverAnimationDisposable = undefined;\r\n }\r\n }, 1000);\r\n this.dragOverMouseY = event.pageY;\r\n }\r\n animateDragAndDropScrollTop(viewTop) {\r\n if (this.dragOverMouseY === undefined) {\r\n return;\r\n }\r\n const diff = this.dragOverMouseY - viewTop;\r\n const upperLimit = this.renderHeight - 35;\r\n if (diff < 35) {\r\n this.scrollTop += Math.max(-14, Math.floor(0.3 * (diff - 35)));\r\n }\r\n else if (diff > upperLimit) {\r\n this.scrollTop += Math.min(14, Math.floor(0.3 * (diff - upperLimit)));\r\n }\r\n }\r\n teardownDragAndDropScrollTopAnimation() {\r\n this.dragOverAnimationStopDisposable.dispose();\r\n if (this.dragOverAnimationDisposable) {\r\n this.dragOverAnimationDisposable.dispose();\r\n this.dragOverAnimationDisposable = undefined;\r\n }\r\n }\r\n // Util\r\n getItemIndexFromEventTarget(target) {\r\n const scrollableElement = this.scrollableElement.getDomNode();\r\n let element = target;\r\n while (element instanceof HTMLElement && element !== this.rowsContainer && scrollableElement.contains(element)) {\r\n const rawIndex = element.getAttribute('data-index');\r\n if (rawIndex) {\r\n const index = Number(rawIndex);\r\n if (!isNaN(index)) {\r\n return index;\r\n }\r\n }\r\n element = element.parentElement;\r\n }\r\n return undefined;\r\n }\r\n getRenderRange(renderTop, renderHeight) {\r\n return {\r\n start: this.rangeMap.indexAt(renderTop),\r\n end: this.rangeMap.indexAfter(renderTop + renderHeight - 1)\r\n };\r\n }\r\n /**\r\n * Given a stable rendered state, checks every rendered element whether it needs\r\n * to be probed for dynamic height. Adjusts scroll height and top if necessary.\r\n */\r\n _rerender(renderTop, renderHeight, inSmoothScrolling) {\r\n const previousRenderRange = this.getRenderRange(renderTop, renderHeight);\r\n // Let's remember the second element's position, this helps in scrolling up\r\n // and preserving a linear upwards scroll movement\r\n let anchorElementIndex;\r\n let anchorElementTopDelta;\r\n if (renderTop === this.elementTop(previousRenderRange.start)) {\r\n anchorElementIndex = previousRenderRange.start;\r\n anchorElementTopDelta = 0;\r\n }\r\n else if (previousRenderRange.end - previousRenderRange.start > 1) {\r\n anchorElementIndex = previousRenderRange.start + 1;\r\n anchorElementTopDelta = this.elementTop(anchorElementIndex) - renderTop;\r\n }\r\n let heightDiff = 0;\r\n while (true) {\r\n const renderRange = this.getRenderRange(renderTop, renderHeight);\r\n let didChange = false;\r\n for (let i = renderRange.start; i < renderRange.end; i++) {\r\n const diff = this.probeDynamicHeight(i);\r\n if (diff !== 0) {\r\n this.rangeMap.splice(i, 1, [this.items[i]]);\r\n }\r\n heightDiff += diff;\r\n didChange = didChange || diff !== 0;\r\n }\r\n if (!didChange) {\r\n if (heightDiff !== 0) {\r\n this.eventuallyUpdateScrollDimensions();\r\n }\r\n const unrenderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(previousRenderRange, renderRange);\r\n for (const range of unrenderRanges) {\r\n for (let i = range.start; i < range.end; i++) {\r\n if (this.items[i].row) {\r\n this.removeItemFromDOM(i);\r\n }\r\n }\r\n }\r\n const renderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.relativeComplement(renderRange, previousRenderRange);\r\n for (const range of renderRanges) {\r\n for (let i = range.start; i < range.end; i++) {\r\n const afterIndex = i + 1;\r\n const beforeRow = afterIndex < this.items.length ? this.items[afterIndex].row : null;\r\n const beforeElement = beforeRow ? beforeRow.domNode : null;\r\n this.insertItemInDOM(i, beforeElement);\r\n }\r\n }\r\n for (let i = renderRange.start; i < renderRange.end; i++) {\r\n if (this.items[i].row) {\r\n this.updateItemInDOM(this.items[i], i);\r\n }\r\n }\r\n if (typeof anchorElementIndex === 'number') {\r\n // To compute a destination scroll top, we need to take into account the current smooth scrolling\r\n // animation, and then reuse it with a new target (to avoid prolonging the scroll)\r\n // See https://github.com/microsoft/vscode/issues/104144\r\n // See https://github.com/microsoft/vscode/pull/104284\r\n // See https://github.com/microsoft/vscode/issues/107704\r\n const deltaScrollTop = this.scrollable.getFutureScrollPosition().scrollTop - renderTop;\r\n const newScrollTop = this.elementTop(anchorElementIndex) - anchorElementTopDelta + deltaScrollTop;\r\n this.setScrollTop(newScrollTop, inSmoothScrolling);\r\n }\r\n this._onDidChangeContentHeight.fire(this.contentHeight);\r\n return;\r\n }\r\n }\r\n }\r\n probeDynamicHeight(index) {\r\n const item = this.items[index];\r\n if (!item.hasDynamicHeight || item.lastDynamicHeightWidth === this.renderWidth) {\r\n return 0;\r\n }\r\n if (!!this.virtualDelegate.hasDynamicHeight && !this.virtualDelegate.hasDynamicHeight(item.element)) {\r\n return 0;\r\n }\r\n const size = item.size;\r\n if (!this.setRowHeight && item.row) {\r\n let newSize = item.row.domNode.offsetHeight;\r\n item.size = newSize;\r\n item.lastDynamicHeightWidth = this.renderWidth;\r\n return newSize - size;\r\n }\r\n const row = this.cache.alloc(item.templateId);\r\n row.domNode.style.height = '';\r\n this.rowsContainer.appendChild(row.domNode);\r\n const renderer = this.renderers.get(item.templateId);\r\n if (renderer) {\r\n renderer.renderElement(item.element, index, row.templateData, undefined);\r\n if (renderer.disposeElement) {\r\n renderer.disposeElement(item.element, index, row.templateData, undefined);\r\n }\r\n }\r\n item.size = row.domNode.offsetHeight;\r\n if (this.virtualDelegate.setDynamicHeight) {\r\n this.virtualDelegate.setDynamicHeight(item.element, item.size);\r\n }\r\n item.lastDynamicHeightWidth = this.renderWidth;\r\n this.rowsContainer.removeChild(row.domNode);\r\n this.cache.release(row);\r\n return item.size - size;\r\n }\r\n getNextToLastElement(ranges) {\r\n const lastRange = ranges[ranges.length - 1];\r\n if (!lastRange) {\r\n return null;\r\n }\r\n const nextToLastItem = this.items[lastRange.end];\r\n if (!nextToLastItem) {\r\n return null;\r\n }\r\n if (!nextToLastItem.row) {\r\n return null;\r\n }\r\n return nextToLastItem.row.domNode;\r\n }\r\n getElementDomId(index) {\r\n return `${this.domId}_${index}`;\r\n }\r\n // Dispose\r\n dispose() {\r\n if (this.items) {\r\n for (const item of this.items) {\r\n if (item.row) {\r\n const renderer = this.renderers.get(item.row.templateId);\r\n if (renderer) {\r\n if (renderer.disposeElement) {\r\n renderer.disposeElement(item.element, -1, item.row.templateData, undefined);\r\n }\r\n renderer.disposeTemplate(item.row.templateData);\r\n }\r\n }\r\n }\r\n this.items = [];\r\n }\r\n if (this.domNode && this.domNode.parentNode) {\r\n this.domNode.parentNode.removeChild(this.domNode);\r\n }\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.disposables);\r\n }\r\n}\r\nListView.InstanceCount = 0;\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onMouseClick\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onMouseDblClick\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onMouseMiddleClick\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onMouseDown\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onContextMenu\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onTouchStart\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], ListView.prototype, \"onTap\", null);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isInputElement\": () => (/* binding */ isInputElement),\n/* harmony export */ \"isMonacoEditor\": () => (/* binding */ isMonacoEditor),\n/* harmony export */ \"DefaultKeyboardNavigationDelegate\": () => (/* binding */ DefaultKeyboardNavigationDelegate),\n/* harmony export */ \"isSelectionSingleChangeEvent\": () => (/* binding */ isSelectionSingleChangeEvent),\n/* harmony export */ \"isSelectionRangeChangeEvent\": () => (/* binding */ isSelectionRangeChangeEvent),\n/* harmony export */ \"MouseController\": () => (/* binding */ MouseController),\n/* harmony export */ \"DefaultStyleController\": () => (/* binding */ DefaultStyleController),\n/* harmony export */ \"List\": () => (/* binding */ List)\n/* harmony export */ });\n/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/decorators.js */ \"./node_modules/monaco-editor/esm/vs/base/common/decorators.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _list_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./list.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js\");\n/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./listView.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _splice_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./splice.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js\");\n/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/numbers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/numbers.js\");\n/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TraitRenderer {\r\n constructor(trait) {\r\n this.trait = trait;\r\n this.renderedElements = [];\r\n }\r\n get templateId() {\r\n return `template:${this.trait.trait}`;\r\n }\r\n renderTemplate(container) {\r\n return container;\r\n }\r\n renderElement(element, index, templateData) {\r\n const renderedElementIndex = this.renderedElements.findIndex(el => el.templateData === templateData);\r\n if (renderedElementIndex >= 0) {\r\n const rendered = this.renderedElements[renderedElementIndex];\r\n this.trait.unrender(templateData);\r\n rendered.index = index;\r\n }\r\n else {\r\n const rendered = { index, templateData };\r\n this.renderedElements.push(rendered);\r\n }\r\n this.trait.renderIndex(index, templateData);\r\n }\r\n splice(start, deleteCount, insertCount) {\r\n const rendered = [];\r\n for (const renderedElement of this.renderedElements) {\r\n if (renderedElement.index < start) {\r\n rendered.push(renderedElement);\r\n }\r\n else if (renderedElement.index >= start + deleteCount) {\r\n rendered.push({\r\n index: renderedElement.index + insertCount - deleteCount,\r\n templateData: renderedElement.templateData\r\n });\r\n }\r\n }\r\n this.renderedElements = rendered;\r\n }\r\n renderIndexes(indexes) {\r\n for (const { index, templateData } of this.renderedElements) {\r\n if (indexes.indexOf(index) > -1) {\r\n this.trait.renderIndex(index, templateData);\r\n }\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n const index = this.renderedElements.findIndex(el => el.templateData === templateData);\r\n if (index < 0) {\r\n return;\r\n }\r\n this.renderedElements.splice(index, 1);\r\n }\r\n}\r\nclass Trait {\r\n constructor(_trait) {\r\n this._trait = _trait;\r\n this.indexes = [];\r\n this.sortedIndexes = [];\r\n this._onChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter();\r\n this.onChange = this._onChange.event;\r\n }\r\n get trait() { return this._trait; }\r\n get renderer() {\r\n return new TraitRenderer(this);\r\n }\r\n splice(start, deleteCount, elements) {\r\n const diff = elements.length - deleteCount;\r\n const end = start + deleteCount;\r\n const indexes = [\r\n ...this.sortedIndexes.filter(i => i < start),\r\n ...elements.map((hasTrait, i) => hasTrait ? i + start : -1).filter(i => i !== -1),\r\n ...this.sortedIndexes.filter(i => i >= end).map(i => i + diff)\r\n ];\r\n this.renderer.splice(start, deleteCount, elements.length);\r\n this._set(indexes, indexes);\r\n }\r\n renderIndex(index, container) {\r\n container.classList.toggle(this._trait, this.contains(index));\r\n }\r\n unrender(container) {\r\n container.classList.remove(this._trait);\r\n }\r\n /**\r\n * Sets the indexes which should have this trait.\r\n *\r\n * @param indexes Indexes which should have this trait.\r\n * @return The old indexes which had this trait.\r\n */\r\n set(indexes, browserEvent) {\r\n return this._set(indexes, [...indexes].sort(numericSort), browserEvent);\r\n }\r\n _set(indexes, sortedIndexes, browserEvent) {\r\n const result = this.indexes;\r\n const sortedResult = this.sortedIndexes;\r\n this.indexes = indexes;\r\n this.sortedIndexes = sortedIndexes;\r\n const toRender = disjunction(sortedResult, indexes);\r\n this.renderer.renderIndexes(toRender);\r\n this._onChange.fire({ indexes, browserEvent });\r\n return result;\r\n }\r\n get() {\r\n return this.indexes;\r\n }\r\n contains(index) {\r\n return (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__.binarySearch)(this.sortedIndexes, index, numericSort) >= 0;\r\n }\r\n dispose() {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this._onChange);\r\n }\r\n}\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__.memoize\r\n], Trait.prototype, \"renderer\", null);\r\nclass SelectionTrait extends Trait {\r\n constructor(setAriaSelected) {\r\n super('selected');\r\n this.setAriaSelected = setAriaSelected;\r\n }\r\n renderIndex(index, container) {\r\n super.renderIndex(index, container);\r\n if (this.setAriaSelected) {\r\n if (this.contains(index)) {\r\n container.setAttribute('aria-selected', 'true');\r\n }\r\n else {\r\n container.setAttribute('aria-selected', 'false');\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * The TraitSpliceable is used as a util class to be able\r\n * to preserve traits across splice calls, given an identity\r\n * provider.\r\n */\r\nclass TraitSpliceable {\r\n constructor(trait, view, identityProvider) {\r\n this.trait = trait;\r\n this.view = view;\r\n this.identityProvider = identityProvider;\r\n }\r\n splice(start, deleteCount, elements) {\r\n if (!this.identityProvider) {\r\n return this.trait.splice(start, deleteCount, elements.map(() => false));\r\n }\r\n const pastElementsWithTrait = this.trait.get().map(i => this.identityProvider.getId(this.view.element(i)).toString());\r\n const elementsWithTrait = elements.map(e => pastElementsWithTrait.indexOf(this.identityProvider.getId(e).toString()) > -1);\r\n this.trait.splice(start, deleteCount, elementsWithTrait);\r\n }\r\n}\r\nfunction isInputElement(e) {\r\n return e.tagName === 'INPUT' || e.tagName === 'TEXTAREA';\r\n}\r\nfunction isMonacoEditor(e) {\r\n if (e.classList.contains('monaco-editor')) {\r\n return true;\r\n }\r\n if (e.classList.contains('monaco-list')) {\r\n return false;\r\n }\r\n if (!e.parentElement) {\r\n return false;\r\n }\r\n return isMonacoEditor(e.parentElement);\r\n}\r\nclass KeyboardController {\r\n constructor(list, view, options) {\r\n this.list = list;\r\n this.view = view;\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n const multipleSelectionSupport = options.multipleSelectionSupport !== false;\r\n const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(view.domNode, 'keydown'))\r\n .filter(e => !isInputElement(e.target))\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardKeyboardEvent(e));\r\n onKeyDown.filter(e => e.keyCode === 3 /* Enter */).on(this.onEnter, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 16 /* UpArrow */).on(this.onUpArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 18 /* DownArrow */).on(this.onDownArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 11 /* PageUp */).on(this.onPageUpArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 12 /* PageDown */).on(this.onPageDownArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 9 /* Escape */).on(this.onEscape, this, this.disposables);\r\n if (multipleSelectionSupport) {\r\n onKeyDown.filter(e => (_common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === 31 /* KEY_A */).on(this.onCtrlA, this, this.disposables);\r\n }\r\n }\r\n onEnter(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.setSelection(this.list.getFocus(), e.browserEvent);\r\n }\r\n onUpArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.focusPrevious(1, false, e.browserEvent);\r\n this.list.reveal(this.list.getFocus()[0]);\r\n this.view.domNode.focus();\r\n }\r\n onDownArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.focusNext(1, false, e.browserEvent);\r\n this.list.reveal(this.list.getFocus()[0]);\r\n this.view.domNode.focus();\r\n }\r\n onPageUpArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.focusPreviousPage(e.browserEvent);\r\n this.list.reveal(this.list.getFocus()[0]);\r\n this.view.domNode.focus();\r\n }\r\n onPageDownArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.focusNextPage(e.browserEvent);\r\n this.list.reveal(this.list.getFocus()[0]);\r\n this.view.domNode.focus();\r\n }\r\n onCtrlA(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.setSelection((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__.range)(this.list.length), e.browserEvent);\r\n this.view.domNode.focus();\r\n }\r\n onEscape(e) {\r\n if (this.list.getSelection().length) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.list.setSelection([], e.browserEvent);\r\n this.view.domNode.focus();\r\n }\r\n }\r\n dispose() {\r\n this.disposables.dispose();\r\n }\r\n}\r\nvar TypeLabelControllerState;\r\n(function (TypeLabelControllerState) {\r\n TypeLabelControllerState[TypeLabelControllerState[\"Idle\"] = 0] = \"Idle\";\r\n TypeLabelControllerState[TypeLabelControllerState[\"Typing\"] = 1] = \"Typing\";\r\n})(TypeLabelControllerState || (TypeLabelControllerState = {}));\r\nconst DefaultKeyboardNavigationDelegate = new class {\r\n mightProducePrintableCharacter(event) {\r\n if (event.ctrlKey || event.metaKey || event.altKey) {\r\n return false;\r\n }\r\n return (event.keyCode >= 31 /* KEY_A */ && event.keyCode <= 56 /* KEY_Z */)\r\n || (event.keyCode >= 21 /* KEY_0 */ && event.keyCode <= 30 /* KEY_9 */)\r\n || (event.keyCode >= 93 /* NUMPAD_0 */ && event.keyCode <= 102 /* NUMPAD_9 */)\r\n || (event.keyCode >= 80 /* US_SEMICOLON */ && event.keyCode <= 90 /* US_QUOTE */);\r\n }\r\n};\r\nclass TypeLabelController {\r\n constructor(list, view, keyboardNavigationLabelProvider, delegate) {\r\n this.list = list;\r\n this.view = view;\r\n this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider;\r\n this.delegate = delegate;\r\n this.enabled = false;\r\n this.state = TypeLabelControllerState.Idle;\r\n this.automaticKeyboardNavigation = true;\r\n this.triggered = false;\r\n this.previouslyFocused = -1;\r\n this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.updateOptions(list.options);\r\n }\r\n updateOptions(options) {\r\n const enableKeyboardNavigation = typeof options.enableKeyboardNavigation === 'undefined' ? true : !!options.enableKeyboardNavigation;\r\n if (enableKeyboardNavigation) {\r\n this.enable();\r\n }\r\n else {\r\n this.disable();\r\n }\r\n if (typeof options.automaticKeyboardNavigation !== 'undefined') {\r\n this.automaticKeyboardNavigation = options.automaticKeyboardNavigation;\r\n }\r\n }\r\n enable() {\r\n if (this.enabled) {\r\n return;\r\n }\r\n const onChar = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'keydown'))\r\n .filter(e => !isInputElement(e.target))\r\n .filter(() => this.automaticKeyboardNavigation || this.triggered)\r\n .map(event => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardKeyboardEvent(event))\r\n .filter(e => this.delegate.mightProducePrintableCharacter(e))\r\n .forEach(e => { e.stopPropagation(); e.preventDefault(); })\r\n .map(event => event.browserEvent.key)\r\n .event;\r\n const onClear = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.debounce(onChar, () => null, 800);\r\n const onInput = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.reduce(_common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.any(onChar, onClear), (r, i) => i === null ? null : ((r || '') + i));\r\n onInput(this.onInput, this, this.enabledDisposables);\r\n onClear(this.onClear, this, this.enabledDisposables);\r\n this.enabled = true;\r\n this.triggered = false;\r\n }\r\n disable() {\r\n if (!this.enabled) {\r\n return;\r\n }\r\n this.enabledDisposables.clear();\r\n this.enabled = false;\r\n this.triggered = false;\r\n }\r\n onClear() {\r\n var _a;\r\n const focus = this.list.getFocus();\r\n if (focus.length > 0 && focus[0] === this.previouslyFocused) {\r\n // List: re-anounce element on typing end since typed keys will interupt aria label of focused element\r\n // Do not announce if there was a focus change at the end to prevent duplication https://github.com/microsoft/vscode/issues/95961\r\n const ariaLabel = (_a = this.list.options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getAriaLabel(this.list.element(focus[0]));\r\n if (ariaLabel) {\r\n (0,_aria_aria_js__WEBPACK_IMPORTED_MODULE_17__.alert)(ariaLabel);\r\n }\r\n }\r\n this.previouslyFocused = -1;\r\n }\r\n onInput(word) {\r\n if (!word) {\r\n this.state = TypeLabelControllerState.Idle;\r\n this.triggered = false;\r\n return;\r\n }\r\n const focus = this.list.getFocus();\r\n const start = focus.length > 0 ? focus[0] : 0;\r\n const delta = this.state === TypeLabelControllerState.Idle ? 1 : 0;\r\n this.state = TypeLabelControllerState.Typing;\r\n for (let i = 0; i < this.list.length; i++) {\r\n const index = (start + i + delta) % this.list.length;\r\n const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(index));\r\n const labelStr = label && label.toString();\r\n if (typeof labelStr === 'undefined' || (0,_common_filters_js__WEBPACK_IMPORTED_MODULE_16__.matchesPrefix)(word, labelStr)) {\r\n this.previouslyFocused = start;\r\n this.list.setFocus([index]);\r\n this.list.reveal(index);\r\n return;\r\n }\r\n }\r\n }\r\n dispose() {\r\n this.disable();\r\n this.enabledDisposables.dispose();\r\n this.disposables.dispose();\r\n }\r\n}\r\nclass DOMFocusController {\r\n constructor(list, view) {\r\n this.list = list;\r\n this.view = view;\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(view.domNode, 'keydown'))\r\n .filter(e => !isInputElement(e.target))\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardKeyboardEvent(e));\r\n onKeyDown.filter(e => e.keyCode === 2 /* Tab */ && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey)\r\n .on(this.onTab, this, this.disposables);\r\n }\r\n onTab(e) {\r\n if (e.target !== this.view.domNode) {\r\n return;\r\n }\r\n const focus = this.list.getFocus();\r\n if (focus.length === 0) {\r\n return;\r\n }\r\n const focusedDomElement = this.view.domElement(focus[0]);\r\n if (!focusedDomElement) {\r\n return;\r\n }\r\n const tabIndexElement = focusedDomElement.querySelector('[tabIndex]');\r\n if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement) || tabIndexElement.tabIndex === -1) {\r\n return;\r\n }\r\n const style = window.getComputedStyle(tabIndexElement);\r\n if (style.visibility === 'hidden' || style.display === 'none') {\r\n return;\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n tabIndexElement.focus();\r\n }\r\n dispose() {\r\n this.disposables.dispose();\r\n }\r\n}\r\nfunction isSelectionSingleChangeEvent(event) {\r\n return _common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;\r\n}\r\nfunction isSelectionRangeChangeEvent(event) {\r\n return event.browserEvent.shiftKey;\r\n}\r\nfunction isMouseRightClick(event) {\r\n return event instanceof MouseEvent && event.button === 2;\r\n}\r\nconst DefaultMultipleSelectionController = {\r\n isSelectionSingleChangeEvent,\r\n isSelectionRangeChangeEvent\r\n};\r\nclass MouseController {\r\n constructor(list) {\r\n this.list = list;\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._onPointer = new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter();\r\n this.onPointer = this._onPointer.event;\r\n this.multipleSelectionSupport = !(list.options.multipleSelectionSupport === false);\r\n if (this.multipleSelectionSupport) {\r\n this.multipleSelectionController = list.options.multipleSelectionController || DefaultMultipleSelectionController;\r\n }\r\n this.mouseSupport = typeof list.options.mouseSupport === 'undefined' || !!list.options.mouseSupport;\r\n if (this.mouseSupport) {\r\n list.onMouseDown(this.onMouseDown, this, this.disposables);\r\n list.onContextMenu(this.onContextMenu, this, this.disposables);\r\n list.onMouseDblClick(this.onDoubleClick, this, this.disposables);\r\n list.onTouchStart(this.onMouseDown, this, this.disposables);\r\n this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_6__.Gesture.addTarget(list.getHTMLElement()));\r\n }\r\n _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.any(list.onMouseClick, list.onMouseMiddleClick, list.onTap)(this.onViewPointer, this, this.disposables);\r\n }\r\n isSelectionSingleChangeEvent(event) {\r\n if (this.multipleSelectionController) {\r\n return this.multipleSelectionController.isSelectionSingleChangeEvent(event);\r\n }\r\n return _common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;\r\n }\r\n isSelectionRangeChangeEvent(event) {\r\n if (this.multipleSelectionController) {\r\n return this.multipleSelectionController.isSelectionRangeChangeEvent(event);\r\n }\r\n return event.browserEvent.shiftKey;\r\n }\r\n isSelectionChangeEvent(event) {\r\n return this.isSelectionSingleChangeEvent(event) || this.isSelectionRangeChangeEvent(event);\r\n }\r\n onMouseDown(e) {\r\n if (isMonacoEditor(e.browserEvent.target)) {\r\n return;\r\n }\r\n if (document.activeElement !== e.browserEvent.target) {\r\n this.list.domFocus();\r\n }\r\n }\r\n onContextMenu(e) {\r\n if (isMonacoEditor(e.browserEvent.target)) {\r\n return;\r\n }\r\n const focus = typeof e.index === 'undefined' ? [] : [e.index];\r\n this.list.setFocus(focus, e.browserEvent);\r\n }\r\n onViewPointer(e) {\r\n if (!this.mouseSupport) {\r\n return;\r\n }\r\n if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) {\r\n return;\r\n }\r\n let reference = this.list.getFocus()[0];\r\n const selection = this.list.getSelection();\r\n reference = reference === undefined ? selection[0] : reference;\r\n const focus = e.index;\r\n if (typeof focus === 'undefined') {\r\n this.list.setFocus([], e.browserEvent);\r\n this.list.setSelection([], e.browserEvent);\r\n return;\r\n }\r\n if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) {\r\n return this.changeSelection(e, reference);\r\n }\r\n if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {\r\n return this.changeSelection(e, reference);\r\n }\r\n this.list.setFocus([focus], e.browserEvent);\r\n if (!isMouseRightClick(e.browserEvent)) {\r\n this.list.setSelection([focus], e.browserEvent);\r\n }\r\n this._onPointer.fire(e);\r\n }\r\n onDoubleClick(e) {\r\n if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) {\r\n return;\r\n }\r\n if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {\r\n return;\r\n }\r\n const focus = this.list.getFocus();\r\n this.list.setSelection(focus, e.browserEvent);\r\n }\r\n changeSelection(e, reference) {\r\n const focus = e.index;\r\n if (this.isSelectionRangeChangeEvent(e) && reference !== undefined) {\r\n const min = Math.min(reference, focus);\r\n const max = Math.max(reference, focus);\r\n const rangeSelection = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__.range)(min, max + 1);\r\n const selection = this.list.getSelection();\r\n const contiguousRange = getContiguousRangeContaining(disjunction(selection, [reference]), reference);\r\n if (contiguousRange.length === 0) {\r\n return;\r\n }\r\n const newSelection = disjunction(rangeSelection, relativeComplement(selection, contiguousRange));\r\n this.list.setSelection(newSelection, e.browserEvent);\r\n }\r\n else if (this.isSelectionSingleChangeEvent(e)) {\r\n const selection = this.list.getSelection();\r\n const newSelection = selection.filter(i => i !== focus);\r\n this.list.setFocus([focus]);\r\n if (selection.length === newSelection.length) {\r\n this.list.setSelection([...newSelection, focus], e.browserEvent);\r\n }\r\n else {\r\n this.list.setSelection(newSelection, e.browserEvent);\r\n }\r\n }\r\n }\r\n dispose() {\r\n this.disposables.dispose();\r\n }\r\n}\r\nclass DefaultStyleController {\r\n constructor(styleElement, selectorSuffix) {\r\n this.styleElement = styleElement;\r\n this.selectorSuffix = selectorSuffix;\r\n }\r\n style(styles) {\r\n const suffix = this.selectorSuffix && `.${this.selectorSuffix}`;\r\n const content = [];\r\n if (styles.listBackground) {\r\n if (styles.listBackground.isOpaque()) {\r\n content.push(`.monaco-list${suffix} .monaco-list-rows { background: ${styles.listBackground}; }`);\r\n }\r\n else if (!_common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh) { // subpixel AA doesn't exist in macOS\r\n console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`);\r\n }\r\n }\r\n if (styles.listFocusBackground) {\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`);\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:hover { background-color: ${styles.listFocusBackground}; }`); // overwrite :hover style in this case!\r\n }\r\n if (styles.listFocusForeground) {\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`);\r\n }\r\n if (styles.listActiveSelectionBackground) {\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`);\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case!\r\n }\r\n if (styles.listActiveSelectionForeground) {\r\n content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { color: ${styles.listActiveSelectionForeground}; }`);\r\n }\r\n if (styles.listFocusAndSelectionBackground) {\r\n content.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${suffix}:focus .monaco-list-row.selected.focused { background-color: ${styles.listFocusAndSelectionBackground}; }\n\t\t\t`);\r\n }\r\n if (styles.listFocusAndSelectionForeground) {\r\n content.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${suffix}:focus .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; }\n\t\t\t`);\r\n }\r\n if (styles.listInactiveFocusForeground) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.focused { color: ${styles.listInactiveFocusForeground}; }`);\r\n content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { color: ${styles.listInactiveFocusForeground}; }`); // overwrite :hover style in this case!\r\n }\r\n if (styles.listInactiveFocusBackground) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`);\r\n content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`); // overwrite :hover style in this case!\r\n }\r\n if (styles.listInactiveSelectionBackground) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`);\r\n content.push(`.monaco-list${suffix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case!\r\n }\r\n if (styles.listInactiveSelectionForeground) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`);\r\n }\r\n if (styles.listHoverBackground) {\r\n content.push(`.monaco-list${suffix}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`);\r\n }\r\n if (styles.listHoverForeground) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`);\r\n }\r\n if (styles.listSelectionOutline) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`);\r\n }\r\n if (styles.listFocusOutline) {\r\n content.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${suffix}:focus .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);\r\n }\r\n if (styles.listInactiveFocusOutline) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row.focused { outline: 1px dotted ${styles.listInactiveFocusOutline}; outline-offset: -1px; }`);\r\n }\r\n if (styles.listHoverOutline) {\r\n content.push(`.monaco-list${suffix} .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`);\r\n }\r\n if (styles.listDropBackground) {\r\n content.push(`\n\t\t\t\t.monaco-list${suffix}.drop-target,\n\t\t\t\t.monaco-list${suffix} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${suffix} .monaco-list-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; }\n\t\t\t`);\r\n }\r\n if (styles.listFilterWidgetBackground) {\r\n content.push(`.monaco-list-type-filter { background-color: ${styles.listFilterWidgetBackground} }`);\r\n }\r\n if (styles.listFilterWidgetOutline) {\r\n content.push(`.monaco-list-type-filter { border: 1px solid ${styles.listFilterWidgetOutline}; }`);\r\n }\r\n if (styles.listFilterWidgetNoMatchesOutline) {\r\n content.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${styles.listFilterWidgetNoMatchesOutline}; }`);\r\n }\r\n if (styles.listMatchesShadow) {\r\n content.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${styles.listMatchesShadow}; }`);\r\n }\r\n if (styles.tableColumnsBorder) {\r\n content.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${styles.tableColumnsBorder};\n\t\t\t}`);\r\n }\r\n this.styleElement.textContent = content.join('\\n');\r\n }\r\n}\r\nconst defaultStyles = {\r\n listFocusBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#7FB0D0'),\r\n listActiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#0E639C'),\r\n listActiveSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#FFFFFF'),\r\n listFocusAndSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#094771'),\r\n listFocusAndSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#FFFFFF'),\r\n listInactiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#3F3F46'),\r\n listHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#2A2D2E'),\r\n listDropBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#383B3D'),\r\n treeIndentGuidesStroke: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#a9a9a9'),\r\n tableColumnsBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_12__.Color.fromHex('#cccccc').transparent(0.2)\r\n};\r\nconst DefaultOptions = {\r\n keyboardSupport: true,\r\n mouseSupport: true,\r\n multipleSelectionSupport: true,\r\n dnd: {\r\n getDragURI() { return null; },\r\n onDragStart() { },\r\n onDragOver() { return false; },\r\n drop() { }\r\n }\r\n};\r\n// TODO@Joao: move these utils into a SortedArray class\r\nfunction getContiguousRangeContaining(range, value) {\r\n const index = range.indexOf(value);\r\n if (index === -1) {\r\n return [];\r\n }\r\n const result = [];\r\n let i = index - 1;\r\n while (i >= 0 && range[i] === value - (index - i)) {\r\n result.push(range[i--]);\r\n }\r\n result.reverse();\r\n i = index;\r\n while (i < range.length && range[i] === value + (i - index)) {\r\n result.push(range[i++]);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Given two sorted collections of numbers, returns the intersection\r\n * between them (OR).\r\n */\r\nfunction disjunction(one, other) {\r\n const result = [];\r\n let i = 0, j = 0;\r\n while (i < one.length || j < other.length) {\r\n if (i >= one.length) {\r\n result.push(other[j++]);\r\n }\r\n else if (j >= other.length) {\r\n result.push(one[i++]);\r\n }\r\n else if (one[i] === other[j]) {\r\n result.push(one[i]);\r\n i++;\r\n j++;\r\n continue;\r\n }\r\n else if (one[i] < other[j]) {\r\n result.push(one[i++]);\r\n }\r\n else {\r\n result.push(other[j++]);\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Given two sorted collections of numbers, returns the relative\r\n * complement between them (XOR).\r\n */\r\nfunction relativeComplement(one, other) {\r\n const result = [];\r\n let i = 0, j = 0;\r\n while (i < one.length || j < other.length) {\r\n if (i >= one.length) {\r\n result.push(other[j++]);\r\n }\r\n else if (j >= other.length) {\r\n result.push(one[i++]);\r\n }\r\n else if (one[i] === other[j]) {\r\n i++;\r\n j++;\r\n continue;\r\n }\r\n else if (one[i] < other[j]) {\r\n result.push(one[i++]);\r\n }\r\n else {\r\n j++;\r\n }\r\n }\r\n return result;\r\n}\r\nconst numericSort = (a, b) => a - b;\r\nclass PipelineRenderer {\r\n constructor(_templateId, renderers) {\r\n this._templateId = _templateId;\r\n this.renderers = renderers;\r\n }\r\n get templateId() {\r\n return this._templateId;\r\n }\r\n renderTemplate(container) {\r\n return this.renderers.map(r => r.renderTemplate(container));\r\n }\r\n renderElement(element, index, templateData, height) {\r\n let i = 0;\r\n for (const renderer of this.renderers) {\r\n renderer.renderElement(element, index, templateData[i++], height);\r\n }\r\n }\r\n disposeElement(element, index, templateData, height) {\r\n let i = 0;\r\n for (const renderer of this.renderers) {\r\n if (renderer.disposeElement) {\r\n renderer.disposeElement(element, index, templateData[i], height);\r\n }\r\n i += 1;\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n let i = 0;\r\n for (const renderer of this.renderers) {\r\n renderer.disposeTemplate(templateData[i++]);\r\n }\r\n }\r\n}\r\nclass AccessibiltyRenderer {\r\n constructor(accessibilityProvider) {\r\n this.accessibilityProvider = accessibilityProvider;\r\n this.templateId = 'a18n';\r\n }\r\n renderTemplate(container) {\r\n return container;\r\n }\r\n renderElement(element, index, container) {\r\n const ariaLabel = this.accessibilityProvider.getAriaLabel(element);\r\n if (ariaLabel) {\r\n container.setAttribute('aria-label', ariaLabel);\r\n }\r\n else {\r\n container.removeAttribute('aria-label');\r\n }\r\n const ariaLevel = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider.getAriaLevel(element);\r\n if (typeof ariaLevel === 'number') {\r\n container.setAttribute('aria-level', `${ariaLevel}`);\r\n }\r\n else {\r\n container.removeAttribute('aria-level');\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n // noop\r\n }\r\n}\r\nclass ListViewDragAndDrop {\r\n constructor(list, dnd) {\r\n this.list = list;\r\n this.dnd = dnd;\r\n }\r\n getDragElements(element) {\r\n const selection = this.list.getSelectedElements();\r\n const elements = selection.indexOf(element) > -1 ? selection : [element];\r\n return elements;\r\n }\r\n getDragURI(element) {\r\n return this.dnd.getDragURI(element);\r\n }\r\n getDragLabel(elements, originalEvent) {\r\n if (this.dnd.getDragLabel) {\r\n return this.dnd.getDragLabel(elements, originalEvent);\r\n }\r\n return undefined;\r\n }\r\n onDragStart(data, originalEvent) {\r\n if (this.dnd.onDragStart) {\r\n this.dnd.onDragStart(data, originalEvent);\r\n }\r\n }\r\n onDragOver(data, targetElement, targetIndex, originalEvent) {\r\n return this.dnd.onDragOver(data, targetElement, targetIndex, originalEvent);\r\n }\r\n onDragEnd(originalEvent) {\r\n if (this.dnd.onDragEnd) {\r\n this.dnd.onDragEnd(originalEvent);\r\n }\r\n }\r\n drop(data, targetElement, targetIndex, originalEvent) {\r\n this.dnd.drop(data, targetElement, targetIndex, originalEvent);\r\n }\r\n}\r\nclass List {\r\n constructor(user, container, virtualDelegate, renderers, _options = DefaultOptions) {\r\n var _a;\r\n this.user = user;\r\n this._options = _options;\r\n this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.EventBufferer();\r\n this._ariaLabel = '';\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._onDidDispose = new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter();\r\n this.onDidDispose = this._onDidDispose.event;\r\n const role = this._options.accessibilityProvider && this._options.accessibilityProvider.getWidgetRole ? (_a = this._options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getWidgetRole() : 'list';\r\n this.selection = new SelectionTrait(role !== 'listbox');\r\n this.focus = new Trait('focused');\r\n (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_13__.mixin)(_options, defaultStyles, false);\r\n const baseRenderers = [this.focus.renderer, this.selection.renderer];\r\n this.accessibilityProvider = _options.accessibilityProvider;\r\n if (this.accessibilityProvider) {\r\n baseRenderers.push(new AccessibiltyRenderer(this.accessibilityProvider));\r\n if (this.accessibilityProvider.onDidChangeActiveDescendant) {\r\n this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant, this, this.disposables);\r\n }\r\n }\r\n renderers = renderers.map(r => new PipelineRenderer(r.templateId, [...baseRenderers, r]));\r\n const viewOptions = Object.assign(Object.assign({}, _options), { dnd: _options.dnd && new ListViewDragAndDrop(this, _options.dnd) });\r\n this.view = new _listView_js__WEBPACK_IMPORTED_MODULE_11__.ListView(container, virtualDelegate, renderers, viewOptions);\r\n this.view.domNode.setAttribute('role', role);\r\n if (_options.styleController) {\r\n this.styleController = _options.styleController(this.view.domId);\r\n }\r\n else {\r\n const styleElement = (0,_dom_js__WEBPACK_IMPORTED_MODULE_18__.createStyleSheet)(this.view.domNode);\r\n this.styleController = new DefaultStyleController(styleElement, this.view.domId);\r\n }\r\n this.spliceable = new _splice_js__WEBPACK_IMPORTED_MODULE_14__.CombinedSpliceable([\r\n new TraitSpliceable(this.focus, this.view, _options.identityProvider),\r\n new TraitSpliceable(this.selection, this.view, _options.identityProvider),\r\n this.view\r\n ]);\r\n this.disposables.add(this.focus);\r\n this.disposables.add(this.selection);\r\n this.disposables.add(this.view);\r\n this.disposables.add(this._onDidDispose);\r\n this.onDidFocus = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'focus', true), () => null);\r\n this.onDidBlur = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.map((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'blur', true), () => null);\r\n this.disposables.add(new DOMFocusController(this, this.view));\r\n if (typeof _options.keyboardSupport !== 'boolean' || _options.keyboardSupport) {\r\n const controller = new KeyboardController(this, this.view, _options);\r\n this.disposables.add(controller);\r\n }\r\n if (_options.keyboardNavigationLabelProvider) {\r\n const delegate = _options.keyboardNavigationDelegate || DefaultKeyboardNavigationDelegate;\r\n this.typeLabelController = new TypeLabelController(this, this.view, _options.keyboardNavigationLabelProvider, delegate);\r\n this.disposables.add(this.typeLabelController);\r\n }\r\n this.mouseController = this.createMouseController(_options);\r\n this.disposables.add(this.mouseController);\r\n this.onDidChangeFocus(this._onFocusChange, this, this.disposables);\r\n this.onDidChangeSelection(this._onSelectionChange, this, this.disposables);\r\n if (this.accessibilityProvider) {\r\n this.ariaLabel = this.accessibilityProvider.getWidgetAriaLabel();\r\n }\r\n if (_options.multipleSelectionSupport) {\r\n this.view.domNode.setAttribute('aria-multiselectable', 'true');\r\n }\r\n }\r\n get onDidChangeFocus() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange), e => this.toListEvent(e));\r\n }\r\n get onDidChangeSelection() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange), e => this.toListEvent(e));\r\n }\r\n get domId() { return this.view.domId; }\r\n get onMouseClick() { return this.view.onMouseClick; }\r\n get onMouseDblClick() { return this.view.onMouseDblClick; }\r\n get onMouseMiddleClick() { return this.view.onMouseMiddleClick; }\r\n get onPointer() { return this.mouseController.onPointer; }\r\n get onMouseDown() { return this.view.onMouseDown; }\r\n get onTouchStart() { return this.view.onTouchStart; }\r\n get onTap() { return this.view.onTap; }\r\n /**\r\n * Possible context menu trigger events:\r\n * - ContextMenu key\r\n * - Shift F10\r\n * - Ctrl Option Shift M (macOS with VoiceOver)\r\n * - Mouse right click\r\n */\r\n get onContextMenu() {\r\n let didJustPressContextMenuKey = false;\r\n const fromKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'keydown'))\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardKeyboardEvent(e))\r\n .filter(e => didJustPressContextMenuKey = e.keyCode === 58 /* ContextMenu */ || (e.shiftKey && e.keyCode === 68 /* F10 */))\r\n .map(_event_js__WEBPACK_IMPORTED_MODULE_9__.stopEvent)\r\n .filter(() => false)\r\n .event;\r\n const fromKeyUp = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'keyup'))\r\n .forEach(() => didJustPressContextMenuKey = false)\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardKeyboardEvent(e))\r\n .filter(e => e.keyCode === 58 /* ContextMenu */ || (e.shiftKey && e.keyCode === 68 /* F10 */))\r\n .map(_event_js__WEBPACK_IMPORTED_MODULE_9__.stopEvent)\r\n .map(({ browserEvent }) => {\r\n const focus = this.getFocus();\r\n const index = focus.length ? focus[0] : undefined;\r\n const element = typeof index !== 'undefined' ? this.view.element(index) : undefined;\r\n const anchor = typeof index !== 'undefined' ? this.view.domElement(index) : this.view.domNode;\r\n return { index, element, anchor, browserEvent };\r\n })\r\n .event;\r\n const fromMouse = _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.chain(this.view.onContextMenu)\r\n .filter(_ => !didJustPressContextMenuKey)\r\n .map(({ element, index, browserEvent }) => ({ element, index, anchor: { x: browserEvent.clientX + 1, y: browserEvent.clientY }, browserEvent }))\r\n .event;\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.any(fromKeyDown, fromKeyUp, fromMouse);\r\n }\r\n get onKeyDown() { return (0,_event_js__WEBPACK_IMPORTED_MODULE_9__.domEvent)(this.view.domNode, 'keydown'); }\r\n createMouseController(options) {\r\n return new MouseController(this);\r\n }\r\n updateOptions(optionsUpdate = {}) {\r\n this._options = Object.assign(Object.assign({}, this._options), optionsUpdate);\r\n if (this.typeLabelController) {\r\n this.typeLabelController.updateOptions(this._options);\r\n }\r\n this.view.updateOptions(optionsUpdate);\r\n }\r\n get options() {\r\n return this._options;\r\n }\r\n splice(start, deleteCount, elements = []) {\r\n if (start < 0 || start > this.view.length) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid start index: ${start}`);\r\n }\r\n if (deleteCount < 0) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid delete count: ${deleteCount}`);\r\n }\r\n if (deleteCount === 0 && elements.length === 0) {\r\n return;\r\n }\r\n this.eventBufferer.bufferEvents(() => this.spliceable.splice(start, deleteCount, elements));\r\n }\r\n rerender() {\r\n this.view.rerender();\r\n }\r\n element(index) {\r\n return this.view.element(index);\r\n }\r\n get length() {\r\n return this.view.length;\r\n }\r\n get contentHeight() {\r\n return this.view.contentHeight;\r\n }\r\n get scrollTop() {\r\n return this.view.getScrollTop();\r\n }\r\n set scrollTop(scrollTop) {\r\n this.view.setScrollTop(scrollTop);\r\n }\r\n get ariaLabel() {\r\n return this._ariaLabel;\r\n }\r\n set ariaLabel(value) {\r\n this._ariaLabel = value;\r\n this.view.domNode.setAttribute('aria-label', value);\r\n }\r\n domFocus() {\r\n this.view.domNode.focus({ preventScroll: true });\r\n }\r\n layout(height, width) {\r\n this.view.layout(height, width);\r\n }\r\n setSelection(indexes, browserEvent) {\r\n for (const index of indexes) {\r\n if (index < 0 || index >= this.length) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid index ${index}`);\r\n }\r\n }\r\n this.selection.set(indexes, browserEvent);\r\n }\r\n getSelection() {\r\n return this.selection.get();\r\n }\r\n getSelectedElements() {\r\n return this.getSelection().map(i => this.view.element(i));\r\n }\r\n setFocus(indexes, browserEvent) {\r\n for (const index of indexes) {\r\n if (index < 0 || index >= this.length) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid index ${index}`);\r\n }\r\n }\r\n this.focus.set(indexes, browserEvent);\r\n }\r\n focusNext(n = 1, loop = false, browserEvent, filter) {\r\n if (this.length === 0) {\r\n return;\r\n }\r\n const focus = this.focus.get();\r\n const index = this.findNextIndex(focus.length > 0 ? focus[0] + n : 0, loop, filter);\r\n if (index > -1) {\r\n this.setFocus([index], browserEvent);\r\n }\r\n }\r\n focusPrevious(n = 1, loop = false, browserEvent, filter) {\r\n if (this.length === 0) {\r\n return;\r\n }\r\n const focus = this.focus.get();\r\n const index = this.findPreviousIndex(focus.length > 0 ? focus[0] - n : 0, loop, filter);\r\n if (index > -1) {\r\n this.setFocus([index], browserEvent);\r\n }\r\n }\r\n focusNextPage(browserEvent, filter) {\r\n let lastPageIndex = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight);\r\n lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1;\r\n const lastPageElement = this.view.element(lastPageIndex);\r\n const currentlyFocusedElement = this.getFocusedElements()[0];\r\n if (currentlyFocusedElement !== lastPageElement) {\r\n const lastGoodPageIndex = this.findPreviousIndex(lastPageIndex, false, filter);\r\n if (lastGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(lastGoodPageIndex)) {\r\n this.setFocus([lastGoodPageIndex], browserEvent);\r\n }\r\n else {\r\n this.setFocus([lastPageIndex], browserEvent);\r\n }\r\n }\r\n else {\r\n const previousScrollTop = this.view.getScrollTop();\r\n this.view.setScrollTop(previousScrollTop + this.view.renderHeight - this.view.elementHeight(lastPageIndex));\r\n if (this.view.getScrollTop() !== previousScrollTop) {\r\n this.setFocus([]);\r\n // Let the scroll event listener run\r\n setTimeout(() => this.focusNextPage(browserEvent, filter), 0);\r\n }\r\n }\r\n }\r\n focusPreviousPage(browserEvent, filter) {\r\n let firstPageIndex;\r\n const scrollTop = this.view.getScrollTop();\r\n if (scrollTop === 0) {\r\n firstPageIndex = this.view.indexAt(scrollTop);\r\n }\r\n else {\r\n firstPageIndex = this.view.indexAfter(scrollTop - 1);\r\n }\r\n const firstPageElement = this.view.element(firstPageIndex);\r\n const currentlyFocusedElement = this.getFocusedElements()[0];\r\n if (currentlyFocusedElement !== firstPageElement) {\r\n const firstGoodPageIndex = this.findNextIndex(firstPageIndex, false, filter);\r\n if (firstGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(firstGoodPageIndex)) {\r\n this.setFocus([firstGoodPageIndex], browserEvent);\r\n }\r\n else {\r\n this.setFocus([firstPageIndex], browserEvent);\r\n }\r\n }\r\n else {\r\n const previousScrollTop = scrollTop;\r\n this.view.setScrollTop(scrollTop - this.view.renderHeight);\r\n if (this.view.getScrollTop() !== previousScrollTop) {\r\n this.setFocus([]);\r\n // Let the scroll event listener run\r\n setTimeout(() => this.focusPreviousPage(browserEvent, filter), 0);\r\n }\r\n }\r\n }\r\n focusLast(browserEvent, filter) {\r\n if (this.length === 0) {\r\n return;\r\n }\r\n const index = this.findPreviousIndex(this.length - 1, false, filter);\r\n if (index > -1) {\r\n this.setFocus([index], browserEvent);\r\n }\r\n }\r\n focusFirst(browserEvent, filter) {\r\n this.focusNth(0, browserEvent, filter);\r\n }\r\n focusNth(n, browserEvent, filter) {\r\n if (this.length === 0) {\r\n return;\r\n }\r\n const index = this.findNextIndex(n, false, filter);\r\n if (index > -1) {\r\n this.setFocus([index], browserEvent);\r\n }\r\n }\r\n findNextIndex(index, loop = false, filter) {\r\n for (let i = 0; i < this.length; i++) {\r\n if (index >= this.length && !loop) {\r\n return -1;\r\n }\r\n index = index % this.length;\r\n if (!filter || filter(this.element(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n return -1;\r\n }\r\n findPreviousIndex(index, loop = false, filter) {\r\n for (let i = 0; i < this.length; i++) {\r\n if (index < 0 && !loop) {\r\n return -1;\r\n }\r\n index = (this.length + (index % this.length)) % this.length;\r\n if (!filter || filter(this.element(index))) {\r\n return index;\r\n }\r\n index--;\r\n }\r\n return -1;\r\n }\r\n getFocus() {\r\n return this.focus.get();\r\n }\r\n getFocusedElements() {\r\n return this.getFocus().map(i => this.view.element(i));\r\n }\r\n reveal(index, relativeTop) {\r\n if (index < 0 || index >= this.length) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid index ${index}`);\r\n }\r\n const scrollTop = this.view.getScrollTop();\r\n const elementTop = this.view.elementTop(index);\r\n const elementHeight = this.view.elementHeight(index);\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isNumber)(relativeTop)) {\r\n // y = mx + b\r\n const m = elementHeight - this.view.renderHeight;\r\n this.view.setScrollTop(m * (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_15__.clamp)(relativeTop, 0, 1) + elementTop);\r\n }\r\n else {\r\n const viewItemBottom = elementTop + elementHeight;\r\n const wrapperBottom = scrollTop + this.view.renderHeight;\r\n if (elementTop < scrollTop && viewItemBottom >= wrapperBottom) {\r\n // The element is already overflowing the viewport, no-op\r\n }\r\n else if (elementTop < scrollTop) {\r\n this.view.setScrollTop(elementTop);\r\n }\r\n else if (viewItemBottom >= wrapperBottom) {\r\n this.view.setScrollTop(viewItemBottom - this.view.renderHeight);\r\n }\r\n }\r\n }\r\n /**\r\n * Returns the relative position of an element rendered in the list.\r\n * Returns `null` if the element isn't *entirely* in the visible viewport.\r\n */\r\n getRelativeTop(index) {\r\n if (index < 0 || index >= this.length) {\r\n throw new _list_js__WEBPACK_IMPORTED_MODULE_10__.ListError(this.user, `Invalid index ${index}`);\r\n }\r\n const scrollTop = this.view.getScrollTop();\r\n const elementTop = this.view.elementTop(index);\r\n const elementHeight = this.view.elementHeight(index);\r\n if (elementTop < scrollTop || elementTop + elementHeight > scrollTop + this.view.renderHeight) {\r\n return null;\r\n }\r\n // y = mx + b\r\n const m = elementHeight - this.view.renderHeight;\r\n return Math.abs((scrollTop - elementTop) / m);\r\n }\r\n getHTMLElement() {\r\n return this.view.domNode;\r\n }\r\n style(styles) {\r\n this.styleController.style(styles);\r\n }\r\n toListEvent({ indexes, browserEvent }) {\r\n return { indexes, elements: indexes.map(i => this.view.element(i)), browserEvent };\r\n }\r\n _onFocusChange() {\r\n const focus = this.focus.get();\r\n this.view.domNode.classList.toggle('element-focused', focus.length > 0);\r\n this.onDidChangeActiveDescendant();\r\n }\r\n onDidChangeActiveDescendant() {\r\n var _a;\r\n const focus = this.focus.get();\r\n if (focus.length > 0) {\r\n let id;\r\n if ((_a = this.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getActiveDescendantId) {\r\n id = this.accessibilityProvider.getActiveDescendantId(this.view.element(focus[0]));\r\n }\r\n this.view.domNode.setAttribute('aria-activedescendant', id || this.view.getElementDomId(focus[0]));\r\n }\r\n else {\r\n this.view.domNode.removeAttribute('aria-activedescendant');\r\n }\r\n }\r\n _onSelectionChange() {\r\n const selection = this.selection.get();\r\n this.view.domNode.classList.toggle('selection-none', selection.length === 0);\r\n this.view.domNode.classList.toggle('selection-single', selection.length === 1);\r\n this.view.domNode.classList.toggle('selection-multiple', selection.length > 1);\r\n }\r\n dispose() {\r\n this._onDidDispose.fire();\r\n this.disposables.dispose();\r\n this._onDidDispose.dispose();\r\n }\r\n}\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__.memoize\r\n], List.prototype, \"onDidChangeFocus\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__.memoize\r\n], List.prototype, \"onDidChangeSelection\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__.memoize\r\n], List.prototype, \"onContextMenu\", null);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"groupIntersect\": () => (/* binding */ groupIntersect),\n/* harmony export */ \"shift\": () => (/* binding */ shift),\n/* harmony export */ \"consolidate\": () => (/* binding */ consolidate),\n/* harmony export */ \"RangeMap\": () => (/* binding */ RangeMap)\n/* harmony export */ });\n/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/range.js */ \"./node_modules/monaco-editor/esm/vs/base/common/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * Returns the intersection between a ranged group and a range.\r\n * Returns `[]` if the intersection is empty.\r\n */\r\nfunction groupIntersect(range, groups) {\r\n const result = [];\r\n for (let r of groups) {\r\n if (range.start >= r.range.end) {\r\n continue;\r\n }\r\n if (range.end < r.range.start) {\r\n break;\r\n }\r\n const intersection = _common_range_js__WEBPACK_IMPORTED_MODULE_0__.Range.intersect(range, r.range);\r\n if (_common_range_js__WEBPACK_IMPORTED_MODULE_0__.Range.isEmpty(intersection)) {\r\n continue;\r\n }\r\n result.push({\r\n range: intersection,\r\n size: r.size\r\n });\r\n }\r\n return result;\r\n}\r\n/**\r\n * Shifts a range by that `much`.\r\n */\r\nfunction shift({ start, end }, much) {\r\n return { start: start + much, end: end + much };\r\n}\r\n/**\r\n * Consolidates a collection of ranged groups.\r\n *\r\n * Consolidation is the process of merging consecutive ranged groups\r\n * that share the same `size`.\r\n */\r\nfunction consolidate(groups) {\r\n const result = [];\r\n let previousGroup = null;\r\n for (let group of groups) {\r\n const start = group.range.start;\r\n const end = group.range.end;\r\n const size = group.size;\r\n if (previousGroup && size === previousGroup.size) {\r\n previousGroup.range.end = end;\r\n continue;\r\n }\r\n previousGroup = { range: { start, end }, size };\r\n result.push(previousGroup);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Concatenates several collections of ranged groups into a single\r\n * collection.\r\n */\r\nfunction concat(...groups) {\r\n return consolidate(groups.reduce((r, g) => r.concat(g), []));\r\n}\r\nclass RangeMap {\r\n constructor() {\r\n this.groups = [];\r\n this._size = 0;\r\n }\r\n splice(index, deleteCount, items = []) {\r\n const diff = items.length - deleteCount;\r\n const before = groupIntersect({ start: 0, end: index }, this.groups);\r\n const after = groupIntersect({ start: index + deleteCount, end: Number.POSITIVE_INFINITY }, this.groups)\r\n .map(g => ({ range: shift(g.range, diff), size: g.size }));\r\n const middle = items.map((item, i) => ({\r\n range: { start: index + i, end: index + i + 1 },\r\n size: item.size\r\n }));\r\n this.groups = concat(before, middle, after);\r\n this._size = this.groups.reduce((t, g) => t + (g.size * (g.range.end - g.range.start)), 0);\r\n }\r\n /**\r\n * Returns the number of items in the range map.\r\n */\r\n get count() {\r\n const len = this.groups.length;\r\n if (!len) {\r\n return 0;\r\n }\r\n return this.groups[len - 1].range.end;\r\n }\r\n /**\r\n * Returns the sum of the sizes of all items in the range map.\r\n */\r\n get size() {\r\n return this._size;\r\n }\r\n /**\r\n * Returns the index of the item at the given position.\r\n */\r\n indexAt(position) {\r\n if (position < 0) {\r\n return -1;\r\n }\r\n let index = 0;\r\n let size = 0;\r\n for (let group of this.groups) {\r\n const count = group.range.end - group.range.start;\r\n const newSize = size + (count * group.size);\r\n if (position < newSize) {\r\n return index + Math.floor((position - size) / group.size);\r\n }\r\n index += count;\r\n size = newSize;\r\n }\r\n return index;\r\n }\r\n /**\r\n * Returns the index of the item right after the item at the\r\n * index of the given position.\r\n */\r\n indexAfter(position) {\r\n return Math.min(this.indexAt(position) + 1, this.count);\r\n }\r\n /**\r\n * Returns the start position of the item at the given index.\r\n */\r\n positionAt(index) {\r\n if (index < 0) {\r\n return -1;\r\n }\r\n let position = 0;\r\n let count = 0;\r\n for (let group of this.groups) {\r\n const groupCount = group.range.end - group.range.start;\r\n const newCount = count + groupCount;\r\n if (index < newCount) {\r\n return position + ((index - count) * group.size);\r\n }\r\n position += groupCount * group.size;\r\n count = newCount;\r\n }\r\n return -1;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RowCache\": () => (/* binding */ RowCache)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction removeFromParent(element) {\r\n try {\r\n if (element.parentElement) {\r\n element.parentElement.removeChild(element);\r\n }\r\n }\r\n catch (e) {\r\n // this will throw if this happens due to a blur event, nasty business\r\n }\r\n}\r\nclass RowCache {\r\n constructor(renderers) {\r\n this.renderers = renderers;\r\n this.cache = new Map();\r\n }\r\n /**\r\n * Returns a row either by creating a new one or reusing\r\n * a previously released row which shares the same templateId.\r\n */\r\n alloc(templateId) {\r\n let result = this.getTemplateCache(templateId).pop();\r\n if (!result) {\r\n const domNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.$)('.monaco-list-row');\r\n const renderer = this.getRenderer(templateId);\r\n const templateData = renderer.renderTemplate(domNode);\r\n result = { domNode, templateId, templateData };\r\n }\r\n return result;\r\n }\r\n /**\r\n * Releases the row for eventual reuse.\r\n */\r\n release(row) {\r\n if (!row) {\r\n return;\r\n }\r\n this.releaseRow(row);\r\n }\r\n releaseRow(row) {\r\n const { domNode, templateId } = row;\r\n if (domNode) {\r\n domNode.classList.remove('scrolling');\r\n removeFromParent(domNode);\r\n }\r\n const cache = this.getTemplateCache(templateId);\r\n cache.push(row);\r\n }\r\n getTemplateCache(templateId) {\r\n let result = this.cache.get(templateId);\r\n if (!result) {\r\n result = [];\r\n this.cache.set(templateId, result);\r\n }\r\n return result;\r\n }\r\n dispose() {\r\n this.cache.forEach((cachedRows, templateId) => {\r\n for (const cachedRow of cachedRows) {\r\n const renderer = this.getRenderer(templateId);\r\n renderer.disposeTemplate(cachedRow.templateData);\r\n cachedRow.templateData = null;\r\n }\r\n });\r\n this.cache.clear();\r\n }\r\n getRenderer(templateId) {\r\n const renderer = this.renderers.get(templateId);\r\n if (!renderer) {\r\n throw new Error(`No renderer found for ${templateId}`);\r\n }\r\n return renderer;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CombinedSpliceable\": () => (/* binding */ CombinedSpliceable)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass CombinedSpliceable {\r\n constructor(spliceables) {\r\n this.spliceables = spliceables;\r\n }\r\n splice(start, deleteCount, elements) {\r\n this.spliceables.forEach(s => s.splice(start, deleteCount, elements));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MENU_MNEMONIC_REGEX\": () => (/* binding */ MENU_MNEMONIC_REGEX),\n/* harmony export */ \"MENU_ESCAPED_MNEMONIC_REGEX\": () => (/* binding */ MENU_ESCAPED_MNEMONIC_REGEX),\n/* harmony export */ \"Direction\": () => (/* binding */ Direction),\n/* harmony export */ \"Menu\": () => (/* binding */ Menu),\n/* harmony export */ \"cleanMnemonic\": () => (/* binding */ cleanMnemonic)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../contextview/contextview.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js\");\n/* harmony import */ var _codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../codicons/codiconStyles.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js\");\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _common_iconLabels_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst MENU_MNEMONIC_REGEX = /\\(&([^\\s&])\\)|(^|[^&])&([^\\s&])/;\r\nconst MENU_ESCAPED_MNEMONIC_REGEX = /(&)?(&)([^\\s&])/g;\r\nconst menuSelectionIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.registerCodicon)('menu-selection', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.check);\r\nconst menuSubmenuIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.registerCodicon)('menu-submenu', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.chevronRight);\r\nvar Direction;\r\n(function (Direction) {\r\n Direction[Direction[\"Right\"] = 0] = \"Right\";\r\n Direction[Direction[\"Left\"] = 1] = \"Left\";\r\n})(Direction || (Direction = {}));\r\nclass Menu extends _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__.ActionBar {\r\n constructor(container, actions, options = {}) {\r\n container.classList.add('monaco-menu-container');\r\n container.setAttribute('role', 'presentation');\r\n const menuElement = document.createElement('div');\r\n menuElement.classList.add('monaco-menu');\r\n menuElement.setAttribute('role', 'presentation');\r\n super(menuElement, {\r\n orientation: 2 /* VERTICAL */,\r\n actionViewItemProvider: action => this.doGetActionViewItem(action, options, parentData),\r\n context: options.context,\r\n actionRunner: options.actionRunner,\r\n ariaLabel: options.ariaLabel,\r\n focusOnlyEnabledItems: true,\r\n triggerKeys: { keys: [3 /* Enter */, ...(_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isMacintosh || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isLinux ? [10 /* Space */] : [])], keyDown: true }\r\n });\r\n this.menuElement = menuElement;\r\n this.actionsList.setAttribute('role', 'menu');\r\n this.actionsList.tabIndex = 0;\r\n this.menuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore());\r\n this.initializeStyleSheet(container);\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_DOWN, (e) => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n // Stop tab navigation of menus\r\n if (event.equals(2 /* Tab */)) {\r\n e.preventDefault();\r\n }\r\n });\r\n if (options.enableMnemonics) {\r\n this.menuDisposables.add((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_DOWN, (e) => {\r\n const key = e.key.toLocaleLowerCase();\r\n if (this.mnemonics.has(key)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n const actions = this.mnemonics.get(key);\r\n if (actions.length === 1) {\r\n if (actions[0] instanceof SubmenuMenuActionViewItem && actions[0].container) {\r\n this.focusItemByElement(actions[0].container);\r\n }\r\n actions[0].onClick(e);\r\n }\r\n if (actions.length > 1) {\r\n const action = actions.shift();\r\n if (action && action.container) {\r\n this.focusItemByElement(action.container);\r\n actions.push(action);\r\n }\r\n this.mnemonics.set(key, actions);\r\n }\r\n }\r\n }));\r\n }\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isLinux) {\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_DOWN, e => {\r\n const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n if (event.equals(14 /* Home */) || event.equals(11 /* PageUp */)) {\r\n this.focusedItem = this.viewItems.length - 1;\r\n this.focusNext();\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n }\r\n else if (event.equals(13 /* End */) || event.equals(12 /* PageDown */)) {\r\n this.focusedItem = 0;\r\n this.focusPrevious();\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n }\r\n }));\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_OUT, e => {\r\n let relatedTarget = e.relatedTarget;\r\n if (!(0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.isAncestor)(relatedTarget, this.domNode)) {\r\n this.focusedItem = undefined;\r\n this.updateFocus();\r\n e.stopPropagation();\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.actionsList, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_OVER, e => {\r\n let target = e.target;\r\n if (!target || !(0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.isAncestor)(target, this.actionsList) || target === this.actionsList) {\r\n return;\r\n }\r\n while (target.parentElement !== this.actionsList && target.parentElement !== null) {\r\n target = target.parentElement;\r\n }\r\n if (target.classList.contains('action-item')) {\r\n const lastFocusedItem = this.focusedItem;\r\n this.setFocusedItem(target);\r\n if (lastFocusedItem !== this.focusedItem) {\r\n this.updateFocus();\r\n }\r\n }\r\n }));\r\n let parentData = {\r\n parent: this\r\n };\r\n this.mnemonics = new Map();\r\n // Scroll Logic\r\n this.scrollableElement = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__.DomScrollableElement(menuElement, {\r\n alwaysConsumeMouseWheel: true,\r\n horizontal: 2 /* Hidden */,\r\n vertical: 3 /* Visible */,\r\n verticalScrollbarSize: 7,\r\n handleMouseWheel: true,\r\n useShadows: true\r\n }));\r\n const scrollElement = this.scrollableElement.getDomNode();\r\n scrollElement.style.position = '';\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(scrollElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_UP, e => {\r\n // Absorb clicks in menu dead space https://github.com/microsoft/vscode/issues/63575\r\n // We do this on the scroll element so the scroll bar doesn't dismiss the menu either\r\n e.preventDefault();\r\n }));\r\n menuElement.style.maxHeight = `${Math.max(10, window.innerHeight - container.getBoundingClientRect().top - 35)}px`;\r\n actions = actions.filter(a => {\r\n var _a;\r\n if ((_a = options.submenuIds) === null || _a === void 0 ? void 0 : _a.has(a.id)) {\r\n console.warn(`Found submenu cycle: ${a.id}`);\r\n return false;\r\n }\r\n return true;\r\n });\r\n this.push(actions, { icon: true, label: true, isMenu: true });\r\n container.appendChild(this.scrollableElement.getDomNode());\r\n this.scrollableElement.scanDomNode();\r\n this.viewItems.filter(item => !(item instanceof MenuSeparatorActionViewItem)).forEach((item, index, array) => {\r\n item.updatePositionInSet(index + 1, array.length);\r\n });\r\n }\r\n initializeStyleSheet(container) {\r\n if ((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.isInShadowDOM)(container)) {\r\n this.styleSheet = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.createStyleSheet)(container);\r\n this.styleSheet.textContent = MENU_WIDGET_CSS;\r\n }\r\n else {\r\n if (!Menu.globalStyleSheet) {\r\n Menu.globalStyleSheet = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.createStyleSheet)();\r\n Menu.globalStyleSheet.textContent = MENU_WIDGET_CSS;\r\n }\r\n this.styleSheet = Menu.globalStyleSheet;\r\n }\r\n }\r\n style(style) {\r\n const container = this.getContainer();\r\n const fgColor = style.foregroundColor ? `${style.foregroundColor}` : '';\r\n const bgColor = style.backgroundColor ? `${style.backgroundColor}` : '';\r\n const border = style.borderColor ? `1px solid ${style.borderColor}` : '';\r\n const shadow = style.shadowColor ? `0 2px 4px ${style.shadowColor}` : '';\r\n container.style.border = border;\r\n this.domNode.style.color = fgColor;\r\n this.domNode.style.backgroundColor = bgColor;\r\n container.style.boxShadow = shadow;\r\n if (this.viewItems) {\r\n this.viewItems.forEach(item => {\r\n if (item instanceof BaseMenuActionViewItem || item instanceof MenuSeparatorActionViewItem) {\r\n item.style(style);\r\n }\r\n });\r\n }\r\n }\r\n getContainer() {\r\n return this.scrollableElement.getDomNode();\r\n }\r\n get onScroll() {\r\n return this.scrollableElement.onScroll;\r\n }\r\n focusItemByElement(element) {\r\n const lastFocusedItem = this.focusedItem;\r\n this.setFocusedItem(element);\r\n if (lastFocusedItem !== this.focusedItem) {\r\n this.updateFocus();\r\n }\r\n }\r\n setFocusedItem(element) {\r\n for (let i = 0; i < this.actionsList.children.length; i++) {\r\n let elem = this.actionsList.children[i];\r\n if (element === elem) {\r\n this.focusedItem = i;\r\n break;\r\n }\r\n }\r\n }\r\n updateFocus(fromRight) {\r\n super.updateFocus(fromRight, true);\r\n if (typeof this.focusedItem !== 'undefined') {\r\n // Workaround for #80047 caused by an issue in chromium\r\n // https://bugs.chromium.org/p/chromium/issues/detail?id=414283\r\n // When that's fixed, just call this.scrollableElement.scanDomNode()\r\n this.scrollableElement.setScrollPosition({\r\n scrollTop: Math.round(this.menuElement.scrollTop)\r\n });\r\n }\r\n }\r\n doGetActionViewItem(action, options, parentData) {\r\n if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Separator) {\r\n return new MenuSeparatorActionViewItem(options.context, action, { icon: true });\r\n }\r\n else if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.SubmenuAction) {\r\n const menuActionViewItem = new SubmenuMenuActionViewItem(action, action.actions, parentData, Object.assign(Object.assign({}, options), { submenuIds: new Set([...(options.submenuIds || []), action.id]) }));\r\n if (options.enableMnemonics) {\r\n const mnemonic = menuActionViewItem.getMnemonic();\r\n if (mnemonic && menuActionViewItem.isEnabled()) {\r\n let actionViewItems = [];\r\n if (this.mnemonics.has(mnemonic)) {\r\n actionViewItems = this.mnemonics.get(mnemonic);\r\n }\r\n actionViewItems.push(menuActionViewItem);\r\n this.mnemonics.set(mnemonic, actionViewItems);\r\n }\r\n }\r\n return menuActionViewItem;\r\n }\r\n else {\r\n const menuItemOptions = { enableMnemonics: options.enableMnemonics, useEventAsContext: options.useEventAsContext };\r\n if (options.getKeyBinding) {\r\n const keybinding = options.getKeyBinding(action);\r\n if (keybinding) {\r\n const keybindingLabel = keybinding.getLabel();\r\n if (keybindingLabel) {\r\n menuItemOptions.keybinding = keybindingLabel;\r\n }\r\n }\r\n }\r\n const menuActionViewItem = new BaseMenuActionViewItem(options.context, action, menuItemOptions);\r\n if (options.enableMnemonics) {\r\n const mnemonic = menuActionViewItem.getMnemonic();\r\n if (mnemonic && menuActionViewItem.isEnabled()) {\r\n let actionViewItems = [];\r\n if (this.mnemonics.has(mnemonic)) {\r\n actionViewItems = this.mnemonics.get(mnemonic);\r\n }\r\n actionViewItems.push(menuActionViewItem);\r\n this.mnemonics.set(mnemonic, actionViewItems);\r\n }\r\n }\r\n return menuActionViewItem;\r\n }\r\n }\r\n}\r\nclass BaseMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__.BaseActionViewItem {\r\n constructor(ctx, action, options = {}) {\r\n options.isMenu = true;\r\n super(action, action, options);\r\n this.options = options;\r\n this.options.icon = options.icon !== undefined ? options.icon : false;\r\n this.options.label = options.label !== undefined ? options.label : true;\r\n this.cssClass = '';\r\n // Set mnemonic\r\n if (this.options.label && options.enableMnemonics) {\r\n let label = this.getAction().label;\r\n if (label) {\r\n let matches = MENU_MNEMONIC_REGEX.exec(label);\r\n if (matches) {\r\n this.mnemonic = (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase();\r\n }\r\n }\r\n }\r\n // Add mouse up listener later to avoid accidental clicks\r\n this.runOnceToEnableMouseUp = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__.RunOnceScheduler(() => {\r\n if (!this.element) {\r\n return;\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_UP, e => {\r\n // removed default prevention as it conflicts\r\n // with BaseActionViewItem #101537\r\n // add back if issues arise and link new issue\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n // See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Interact_with_the_clipboard\r\n // > Writing to the clipboard\r\n // > You can use the \"cut\" and \"copy\" commands without any special\r\n // permission if you are using them in a short-lived event handler\r\n // for a user action (for example, a click handler).\r\n // => to get the Copy and Paste context menu actions working on Firefox,\r\n // there should be no timeout here\r\n if (_browser_js__WEBPACK_IMPORTED_MODULE_14__.isFirefox) {\r\n const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__.StandardMouseEvent(e);\r\n // Allowing right click to trigger the event causes the issue described below,\r\n // but since the solution below does not work in FF, we must disable right click\r\n if (mouseEvent.rightButton) {\r\n return;\r\n }\r\n this.onClick(e);\r\n }\r\n // In all other cases, set timout to allow context menu cancellation to trigger\r\n // otherwise the action will destroy the menu and a second context menu\r\n // will still trigger for right click.\r\n else {\r\n setTimeout(() => {\r\n this.onClick(e);\r\n }, 0);\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.CONTEXT_MENU, e => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n }));\r\n }, 100);\r\n this._register(this.runOnceToEnableMouseUp);\r\n }\r\n render(container) {\r\n super.render(container);\r\n if (!this.element) {\r\n return;\r\n }\r\n this.container = container;\r\n this.item = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.element, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('a.action-menu-item'));\r\n if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Separator.ID) {\r\n // A separator is a presentation item\r\n this.item.setAttribute('role', 'presentation');\r\n }\r\n else {\r\n this.item.setAttribute('role', 'menuitem');\r\n if (this.mnemonic) {\r\n this.item.setAttribute('aria-keyshortcuts', `${this.mnemonic}`);\r\n }\r\n }\r\n this.check = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.item, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('span.menu-item-check' + menuSelectionIcon.cssSelector));\r\n this.check.setAttribute('role', 'none');\r\n this.label = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.item, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('span.action-label'));\r\n if (this.options.label && this.options.keybinding) {\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.item, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('span.keybinding')).textContent = this.options.keybinding;\r\n }\r\n // Adds mouse up listener to actually run the action\r\n this.runOnceToEnableMouseUp.schedule();\r\n this.updateClass();\r\n this.updateLabel();\r\n this.updateTooltip();\r\n this.updateEnabled();\r\n this.updateChecked();\r\n }\r\n blur() {\r\n super.blur();\r\n this.applyStyle();\r\n }\r\n focus() {\r\n super.focus();\r\n if (this.item) {\r\n this.item.focus();\r\n }\r\n this.applyStyle();\r\n }\r\n updatePositionInSet(pos, setSize) {\r\n if (this.item) {\r\n this.item.setAttribute('aria-posinset', `${pos}`);\r\n this.item.setAttribute('aria-setsize', `${setSize}`);\r\n }\r\n }\r\n updateLabel() {\r\n if (!this.label) {\r\n return;\r\n }\r\n if (this.options.label) {\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.clearNode)(this.label);\r\n let label = (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_16__.stripIcons)(this.getAction().label);\r\n if (label) {\r\n const cleanLabel = cleanMnemonic(label);\r\n if (!this.options.enableMnemonics) {\r\n label = cleanLabel;\r\n }\r\n this.label.setAttribute('aria-label', cleanLabel.replace(/&&/g, '&'));\r\n const matches = MENU_MNEMONIC_REGEX.exec(label);\r\n if (matches) {\r\n label = _common_strings_js__WEBPACK_IMPORTED_MODULE_1__.escape(label);\r\n // This is global, reset it\r\n MENU_ESCAPED_MNEMONIC_REGEX.lastIndex = 0;\r\n let escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label);\r\n // We can't use negative lookbehind so if we match our negative and skip\r\n while (escMatch && escMatch[1]) {\r\n escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label);\r\n }\r\n const replaceDoubleEscapes = (str) => str.replace(/&&/g, '&');\r\n if (escMatch) {\r\n this.label.append(_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.ltrim(replaceDoubleEscapes(label.substr(0, escMatch.index)), ' '), (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('u', { 'aria-hidden': 'true' }, escMatch[3]), _common_strings_js__WEBPACK_IMPORTED_MODULE_1__.rtrim(replaceDoubleEscapes(label.substr(escMatch.index + escMatch[0].length)), ' '));\r\n }\r\n else {\r\n this.label.innerText = replaceDoubleEscapes(label).trim();\r\n }\r\n if (this.item) {\r\n this.item.setAttribute('aria-keyshortcuts', (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase());\r\n }\r\n }\r\n else {\r\n this.label.innerText = label.replace(/&&/g, '&').trim();\r\n }\r\n }\r\n }\r\n }\r\n updateTooltip() {\r\n let title = null;\r\n if (this.getAction().tooltip) {\r\n title = this.getAction().tooltip;\r\n }\r\n else if (!this.options.label && this.getAction().label && this.options.icon) {\r\n title = this.getAction().label;\r\n if (this.options.keybinding) {\r\n title = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, \"{0} ({1})\", title, this.options.keybinding);\r\n }\r\n }\r\n if (title && this.item) {\r\n this.item.title = title;\r\n }\r\n }\r\n updateClass() {\r\n if (this.cssClass && this.item) {\r\n this.item.classList.remove(...this.cssClass.split(' '));\r\n }\r\n if (this.options.icon && this.label) {\r\n this.cssClass = this.getAction().class || '';\r\n this.label.classList.add('icon');\r\n if (this.cssClass) {\r\n this.label.classList.add(...this.cssClass.split(' '));\r\n }\r\n this.updateEnabled();\r\n }\r\n else if (this.label) {\r\n this.label.classList.remove('icon');\r\n }\r\n }\r\n updateEnabled() {\r\n if (this.getAction().enabled) {\r\n if (this.element) {\r\n this.element.classList.remove('disabled');\r\n this.element.removeAttribute('aria-disabled');\r\n }\r\n if (this.item) {\r\n this.item.classList.remove('disabled');\r\n this.item.removeAttribute('aria-disabled');\r\n this.item.tabIndex = 0;\r\n }\r\n }\r\n else {\r\n if (this.element) {\r\n this.element.classList.add('disabled');\r\n this.element.setAttribute('aria-disabled', 'true');\r\n }\r\n if (this.item) {\r\n this.item.classList.add('disabled');\r\n this.item.setAttribute('aria-disabled', 'true');\r\n }\r\n }\r\n }\r\n updateChecked() {\r\n if (!this.item) {\r\n return;\r\n }\r\n if (this.getAction().checked) {\r\n this.item.classList.add('checked');\r\n this.item.setAttribute('role', 'menuitemcheckbox');\r\n this.item.setAttribute('aria-checked', 'true');\r\n }\r\n else {\r\n this.item.classList.remove('checked');\r\n this.item.setAttribute('role', 'menuitem');\r\n this.item.setAttribute('aria-checked', 'false');\r\n }\r\n }\r\n getMnemonic() {\r\n return this.mnemonic;\r\n }\r\n applyStyle() {\r\n if (!this.menuStyle) {\r\n return;\r\n }\r\n const isSelected = this.element && this.element.classList.contains('focused');\r\n const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor;\r\n const bgColor = isSelected && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : undefined;\r\n const border = isSelected && this.menuStyle.selectionBorderColor ? `thin solid ${this.menuStyle.selectionBorderColor}` : '';\r\n if (this.item) {\r\n this.item.style.color = fgColor ? fgColor.toString() : '';\r\n this.item.style.backgroundColor = bgColor ? bgColor.toString() : '';\r\n }\r\n if (this.check) {\r\n this.check.style.color = fgColor ? fgColor.toString() : '';\r\n }\r\n if (this.container) {\r\n this.container.style.border = border;\r\n }\r\n }\r\n style(style) {\r\n this.menuStyle = style;\r\n this.applyStyle();\r\n }\r\n}\r\nclass SubmenuMenuActionViewItem extends BaseMenuActionViewItem {\r\n constructor(action, submenuActions, parentData, submenuOptions) {\r\n super(action, action, submenuOptions);\r\n this.submenuActions = submenuActions;\r\n this.parentData = parentData;\r\n this.submenuOptions = submenuOptions;\r\n this.mysubmenu = null;\r\n this.submenuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore());\r\n this.mouseOver = false;\r\n this.expandDirection = submenuOptions && submenuOptions.expandDirection !== undefined ? submenuOptions.expandDirection : Direction.Right;\r\n this.showScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__.RunOnceScheduler(() => {\r\n if (this.mouseOver) {\r\n this.cleanupExistingSubmenu(false);\r\n this.createSubmenu(false);\r\n }\r\n }, 250);\r\n this.hideScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__.RunOnceScheduler(() => {\r\n if (this.element && (!(0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.isAncestor)((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.getActiveElement)(), this.element) && this.parentData.submenu === this.mysubmenu)) {\r\n this.parentData.parent.focus(false);\r\n this.cleanupExistingSubmenu(true);\r\n }\r\n }, 750);\r\n }\r\n render(container) {\r\n super.render(container);\r\n if (!this.element) {\r\n return;\r\n }\r\n if (this.item) {\r\n this.item.classList.add('monaco-submenu-item');\r\n this.item.tabIndex = 0;\r\n this.item.setAttribute('aria-haspopup', 'true');\r\n this.updateAriaExpanded('false');\r\n this.submenuIndicator = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.item, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('span.submenu-indicator' + menuSubmenuIcon.cssSelector));\r\n this.submenuIndicator.setAttribute('aria-hidden', 'true');\r\n }\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_UP, e => {\r\n let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n this.createSubmenu(true);\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_DOWN, e => {\r\n let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n if ((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.getActiveElement)() === this.item) {\r\n if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n }\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_OVER, e => {\r\n if (!this.mouseOver) {\r\n this.mouseOver = true;\r\n this.showScheduler.schedule();\r\n }\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_LEAVE, e => {\r\n this.mouseOver = false;\r\n }));\r\n this._register((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.FOCUS_OUT, e => {\r\n if (this.element && !(0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.isAncestor)((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.getActiveElement)(), this.element)) {\r\n this.hideScheduler.schedule();\r\n }\r\n }));\r\n this._register(this.parentData.parent.onScroll(() => {\r\n this.parentData.parent.focus(false);\r\n this.cleanupExistingSubmenu(false);\r\n }));\r\n }\r\n updateEnabled() {\r\n // override on submenu entry\r\n // native menus do not observe enablement on sumbenus\r\n // we mimic that behavior\r\n }\r\n onClick(e) {\r\n // stop clicking from trying to run an action\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n this.cleanupExistingSubmenu(false);\r\n this.createSubmenu(true);\r\n }\r\n cleanupExistingSubmenu(force) {\r\n if (this.parentData.submenu && (force || (this.parentData.submenu !== this.mysubmenu))) {\r\n // disposal may throw if the submenu has already been removed\r\n try {\r\n this.parentData.submenu.dispose();\r\n }\r\n catch (_a) { }\r\n this.parentData.submenu = undefined;\r\n this.updateAriaExpanded('false');\r\n if (this.submenuContainer) {\r\n this.submenuDisposables.clear();\r\n this.submenuContainer = undefined;\r\n }\r\n }\r\n }\r\n calculateSubmenuMenuLayout(windowDimensions, submenu, entry, expandDirection) {\r\n const ret = { top: 0, left: 0 };\r\n // Start with horizontal\r\n ret.left = (0,_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__.layout)(windowDimensions.width, submenu.width, { position: expandDirection === Direction.Right ? 0 /* Before */ : 1 /* After */, offset: entry.left, size: entry.width });\r\n // We don't have enough room to layout the menu fully, so we are overlapping the menu\r\n if (ret.left >= entry.left && ret.left < entry.left + entry.width) {\r\n if (entry.left + 10 + submenu.width <= windowDimensions.width) {\r\n ret.left = entry.left + 10;\r\n }\r\n entry.top += 10;\r\n entry.height = 0;\r\n }\r\n // Now that we have a horizontal position, try layout vertically\r\n ret.top = (0,_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__.layout)(windowDimensions.height, submenu.height, { position: 0 /* Before */, offset: entry.top, size: 0 });\r\n // We didn't have enough room below, but we did above, so we shift down to align the menu\r\n if (ret.top + submenu.height === entry.top && ret.top + entry.height + submenu.height <= windowDimensions.height) {\r\n ret.top += entry.height;\r\n }\r\n return ret;\r\n }\r\n createSubmenu(selectFirstItem = true) {\r\n if (!this.element) {\r\n return;\r\n }\r\n if (!this.parentData.submenu) {\r\n this.updateAriaExpanded('true');\r\n this.submenuContainer = (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.append)(this.element, (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('div.monaco-submenu'));\r\n this.submenuContainer.classList.add('menubar-menu-items-holder', 'context-view');\r\n // Set the top value of the menu container before construction\r\n // This allows the menu constructor to calculate the proper max height\r\n const computedStyles = getComputedStyle(this.parentData.parent.domNode);\r\n const paddingTop = parseFloat(computedStyles.paddingTop || '0') || 0;\r\n // this.submenuContainer.style.top = `${this.element.offsetTop - this.parentData.parent.scrollOffset - paddingTop}px`;\r\n this.submenuContainer.style.zIndex = '1';\r\n this.submenuContainer.style.position = 'fixed';\r\n this.submenuContainer.style.top = '0';\r\n this.submenuContainer.style.left = '0';\r\n this.parentData.submenu = new Menu(this.submenuContainer, this.submenuActions.length ? this.submenuActions : [new _common_actions_js__WEBPACK_IMPORTED_MODULE_2__.EmptySubmenuAction()], this.submenuOptions);\r\n if (this.menuStyle) {\r\n this.parentData.submenu.style(this.menuStyle);\r\n }\r\n // layout submenu\r\n const entryBox = this.element.getBoundingClientRect();\r\n const entryBoxUpdated = {\r\n top: entryBox.top - paddingTop,\r\n left: entryBox.left,\r\n height: entryBox.height + 2 * paddingTop,\r\n width: entryBox.width\r\n };\r\n const viewBox = this.submenuContainer.getBoundingClientRect();\r\n const { top, left } = this.calculateSubmenuMenuLayout(new _dom_js__WEBPACK_IMPORTED_MODULE_4__.Dimension(window.innerWidth, window.innerHeight), _dom_js__WEBPACK_IMPORTED_MODULE_4__.Dimension.lift(viewBox), entryBoxUpdated, this.expandDirection);\r\n this.submenuContainer.style.left = `${left}px`;\r\n this.submenuContainer.style.top = `${top}px`;\r\n this.submenuDisposables.add((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_UP, e => {\r\n let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n if (event.equals(15 /* LeftArrow */)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n this.parentData.parent.focus();\r\n this.cleanupExistingSubmenu(true);\r\n }\r\n }));\r\n this.submenuDisposables.add((0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.addDisposableListener)(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.KEY_DOWN, e => {\r\n let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e);\r\n if (event.equals(15 /* LeftArrow */)) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_4__.EventHelper.stop(e, true);\r\n }\r\n }));\r\n this.submenuDisposables.add(this.parentData.submenu.onDidCancel(() => {\r\n this.parentData.parent.focus();\r\n this.cleanupExistingSubmenu(true);\r\n }));\r\n this.parentData.submenu.focus(selectFirstItem);\r\n this.mysubmenu = this.parentData.submenu;\r\n }\r\n else {\r\n this.parentData.submenu.focus(false);\r\n }\r\n }\r\n updateAriaExpanded(value) {\r\n var _a;\r\n if (this.item) {\r\n (_a = this.item) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', value);\r\n }\r\n }\r\n applyStyle() {\r\n super.applyStyle();\r\n if (!this.menuStyle) {\r\n return;\r\n }\r\n const isSelected = this.element && this.element.classList.contains('focused');\r\n const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor;\r\n if (this.submenuIndicator) {\r\n this.submenuIndicator.style.color = fgColor ? `${fgColor}` : '';\r\n }\r\n if (this.parentData.submenu) {\r\n this.parentData.submenu.style(this.menuStyle);\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.hideScheduler.dispose();\r\n if (this.mysubmenu) {\r\n this.mysubmenu.dispose();\r\n this.mysubmenu = null;\r\n }\r\n if (this.submenuContainer) {\r\n this.submenuContainer = undefined;\r\n }\r\n }\r\n}\r\nclass MenuSeparatorActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__.ActionViewItem {\r\n style(style) {\r\n if (this.label) {\r\n this.label.style.borderBottomColor = style.separatorColor ? `${style.separatorColor}` : '';\r\n }\r\n }\r\n}\r\nfunction cleanMnemonic(label) {\r\n const regex = MENU_MNEMONIC_REGEX;\r\n const matches = regex.exec(label);\r\n if (!matches) {\r\n return label;\r\n }\r\n const mnemonicInText = !matches[1];\r\n return label.replace(regex, mnemonicInText ? '$2$3' : '').trim();\r\n}\r\nlet MENU_WIDGET_CSS = `\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__.formatRule)(menuSelectionIcon)}\n${(0,_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__.formatRule)(menuSubmenuIcon)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MOUSE_CURSOR_TEXT_CSS_CLASS_NAME\": () => (/* binding */ MOUSE_CURSOR_TEXT_CSS_CLASS_NAME)\n/* harmony export */ });\n/* harmony import */ var _mouseCursor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mouseCursor.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ProgressBar\": () => (/* binding */ ProgressBar)\n/* harmony export */ });\n/* harmony import */ var _progressbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progressbar.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CSS_DONE = 'done';\r\nconst CSS_ACTIVE = 'active';\r\nconst CSS_INFINITE = 'infinite';\r\nconst CSS_DISCRETE = 'discrete';\r\nconst defaultOpts = {\r\n progressBarBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.fromHex('#0E70C0')\r\n};\r\n/**\r\n * A progress bar with support for infinite or discrete progress.\r\n */\r\nclass ProgressBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(container, options) {\r\n super();\r\n this.options = options || Object.create(null);\r\n (0,_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.mixin)(this.options, defaultOpts, false);\r\n this.workedVal = 0;\r\n this.progressBarBackground = this.options.progressBarBackground;\r\n this._register(this.showDelayedScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_5__.RunOnceScheduler(() => (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.show)(this.element), 0));\r\n this.create(container);\r\n }\r\n create(container) {\r\n this.element = document.createElement('div');\r\n this.element.classList.add('monaco-progress-container');\r\n this.element.setAttribute('role', 'progressbar');\r\n this.element.setAttribute('aria-valuemin', '0');\r\n container.appendChild(this.element);\r\n this.bit = document.createElement('div');\r\n this.bit.classList.add('progress-bit');\r\n this.element.appendChild(this.bit);\r\n this.applyStyles();\r\n }\r\n off() {\r\n this.bit.style.width = 'inherit';\r\n this.bit.style.opacity = '1';\r\n this.element.classList.remove(CSS_ACTIVE, CSS_INFINITE, CSS_DISCRETE);\r\n this.workedVal = 0;\r\n this.totalWork = undefined;\r\n }\r\n /**\r\n * Stops the progressbar from showing any progress instantly without fading out.\r\n */\r\n stop() {\r\n return this.doDone(false);\r\n }\r\n doDone(delayed) {\r\n this.element.classList.add(CSS_DONE);\r\n // let it grow to 100% width and hide afterwards\r\n if (!this.element.classList.contains(CSS_INFINITE)) {\r\n this.bit.style.width = 'inherit';\r\n if (delayed) {\r\n setTimeout(() => this.off(), 200);\r\n }\r\n else {\r\n this.off();\r\n }\r\n }\r\n // let it fade out and hide afterwards\r\n else {\r\n this.bit.style.opacity = '0';\r\n if (delayed) {\r\n setTimeout(() => this.off(), 200);\r\n }\r\n else {\r\n this.off();\r\n }\r\n }\r\n return this;\r\n }\r\n /**\r\n * Use this mode to indicate progress that has no total number of work units.\r\n */\r\n infinite() {\r\n this.bit.style.width = '2%';\r\n this.bit.style.opacity = '1';\r\n this.element.classList.remove(CSS_DISCRETE, CSS_DONE);\r\n this.element.classList.add(CSS_ACTIVE, CSS_INFINITE);\r\n return this;\r\n }\r\n getContainer() {\r\n return this.element;\r\n }\r\n style(styles) {\r\n this.progressBarBackground = styles.progressBarBackground;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.bit) {\r\n const background = this.progressBarBackground ? this.progressBarBackground.toString() : '';\r\n this.bit.style.backgroundColor = background;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OrthogonalEdge\": () => (/* binding */ OrthogonalEdge),\n/* harmony export */ \"Sash\": () => (/* binding */ Sash)\n/* harmony export */ });\n/* harmony import */ var _sash_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sash.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet DEBUG = false;\r\nvar OrthogonalEdge;\r\n(function (OrthogonalEdge) {\r\n OrthogonalEdge[\"North\"] = \"north\";\r\n OrthogonalEdge[\"South\"] = \"south\";\r\n OrthogonalEdge[\"East\"] = \"east\";\r\n OrthogonalEdge[\"West\"] = \"west\";\r\n})(OrthogonalEdge || (OrthogonalEdge = {}));\r\nlet globalSize = 4;\r\nconst onDidChangeGlobalSize = new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\nclass Sash extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(container, layoutProvider, options) {\r\n super();\r\n this.hoverDelayer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_9__.Delayer(300));\r\n this._state = 3 /* Enabled */;\r\n this._onDidEnablementChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidEnablementChange = this._onDidEnablementChange.event;\r\n this._onDidStart = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidStart = this._onDidStart.event;\r\n this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._onDidReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidReset = this._onDidReset.event;\r\n this._onDidEnd = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidEnd = this._onDidEnd.event;\r\n this.linkedSash = undefined;\r\n this.orthogonalStartSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore());\r\n this.orthogonalStartDragHandleDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore());\r\n this.orthogonalEndSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore());\r\n this.orthogonalEndDragHandleDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore());\r\n this.el = (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.$)('.monaco-sash'));\r\n if (options.orthogonalEdge) {\r\n this.el.classList.add(`orthogonal-edge-${options.orthogonalEdge}`);\r\n }\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n this.el.classList.add('mac');\r\n }\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this.el, 'mousedown')(this.onMouseDown, this));\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this.el, 'dblclick')(this.onMouseDoubleClick, this));\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this.el, 'mouseenter')(() => Sash.onMouseEnter(this)));\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this.el, 'mouseleave')(() => Sash.onMouseLeave(this)));\r\n this._register(_touch_js__WEBPACK_IMPORTED_MODULE_4__.Gesture.addTarget(this.el));\r\n this._register((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__.EventType.Start)(this.onTouchStart, this));\r\n if (typeof options.size === 'number') {\r\n this.size = options.size;\r\n if (options.orientation === 0 /* VERTICAL */) {\r\n this.el.style.width = `${this.size}px`;\r\n }\r\n else {\r\n this.el.style.height = `${this.size}px`;\r\n }\r\n }\r\n else {\r\n this.size = globalSize;\r\n this._register(onDidChangeGlobalSize.event(size => {\r\n this.size = size;\r\n this.layout();\r\n }));\r\n }\r\n this.hidden = false;\r\n this.layoutProvider = layoutProvider;\r\n this.orthogonalStartSash = options.orthogonalStartSash;\r\n this.orthogonalEndSash = options.orthogonalEndSash;\r\n this.orientation = options.orientation || 0 /* VERTICAL */;\r\n if (this.orientation === 1 /* HORIZONTAL */) {\r\n this.el.classList.add('horizontal');\r\n this.el.classList.remove('vertical');\r\n }\r\n else {\r\n this.el.classList.remove('horizontal');\r\n this.el.classList.add('vertical');\r\n }\r\n this.el.classList.toggle('debug', DEBUG);\r\n this.layout();\r\n }\r\n get state() { return this._state; }\r\n set state(state) {\r\n if (this._state === state) {\r\n return;\r\n }\r\n this.el.classList.toggle('disabled', state === 0 /* Disabled */);\r\n this.el.classList.toggle('minimum', state === 1 /* Minimum */);\r\n this.el.classList.toggle('maximum', state === 2 /* Maximum */);\r\n this._state = state;\r\n this._onDidEnablementChange.fire(state);\r\n }\r\n get orthogonalStartSash() { return this._orthogonalStartSash; }\r\n set orthogonalStartSash(sash) {\r\n this.orthogonalStartDragHandleDisposables.clear();\r\n this.orthogonalStartSashDisposables.clear();\r\n if (sash) {\r\n const onChange = (state) => {\r\n this.orthogonalStartDragHandleDisposables.clear();\r\n if (state !== 0 /* Disabled */) {\r\n this._orthogonalStartDragHandle = (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.append)(this.el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.$)('.orthogonal-drag-handle.start'));\r\n this.orthogonalStartDragHandleDisposables.add((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => this._orthogonalStartDragHandle.remove()));\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this._orthogonalStartDragHandle, 'mouseenter')(() => Sash.onMouseEnter(sash), undefined, this.orthogonalStartDragHandleDisposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this._orthogonalStartDragHandle, 'mouseleave')(() => Sash.onMouseLeave(sash), undefined, this.orthogonalStartDragHandleDisposables);\r\n }\r\n };\r\n this.orthogonalStartSashDisposables.add(sash.onDidEnablementChange(onChange, this));\r\n onChange(sash.state);\r\n }\r\n this._orthogonalStartSash = sash;\r\n }\r\n get orthogonalEndSash() { return this._orthogonalEndSash; }\r\n set orthogonalEndSash(sash) {\r\n this.orthogonalEndDragHandleDisposables.clear();\r\n this.orthogonalEndSashDisposables.clear();\r\n if (sash) {\r\n const onChange = (state) => {\r\n this.orthogonalEndDragHandleDisposables.clear();\r\n if (state !== 0 /* Disabled */) {\r\n this._orthogonalEndDragHandle = (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.append)(this.el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.$)('.orthogonal-drag-handle.end'));\r\n this.orthogonalEndDragHandleDisposables.add((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => this._orthogonalEndDragHandle.remove()));\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this._orthogonalEndDragHandle, 'mouseenter')(() => Sash.onMouseEnter(sash), undefined, this.orthogonalEndDragHandleDisposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(this._orthogonalEndDragHandle, 'mouseleave')(() => Sash.onMouseLeave(sash), undefined, this.orthogonalEndDragHandleDisposables);\r\n }\r\n };\r\n this.orthogonalEndSashDisposables.add(sash.onDidEnablementChange(onChange, this));\r\n onChange(sash.state);\r\n }\r\n this._orthogonalEndSash = sash;\r\n }\r\n onMouseDown(e) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_7__.EventHelper.stop(e, false);\r\n let isMultisashResize = false;\r\n if (!e.__orthogonalSashEvent) {\r\n const orthogonalSash = this.getOrthogonalSash(e);\r\n if (orthogonalSash) {\r\n isMultisashResize = true;\r\n e.__orthogonalSashEvent = true;\r\n orthogonalSash.onMouseDown(e);\r\n }\r\n }\r\n if (this.linkedSash && !e.__linkedSashEvent) {\r\n e.__linkedSashEvent = true;\r\n this.linkedSash.onMouseDown(e);\r\n }\r\n if (!this.state) {\r\n return;\r\n }\r\n // Select both iframes and webviews; internally Electron nests an iframe\r\n // in its <webview> component, but this isn't queryable.\r\n const iframes = [\r\n ...(0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.getElementsByTagName)('iframe'),\r\n ...(0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.getElementsByTagName)('webview'),\r\n ];\r\n for (const iframe of iframes) {\r\n iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash\r\n }\r\n const mouseDownEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardMouseEvent(e);\r\n const startX = mouseDownEvent.posx;\r\n const startY = mouseDownEvent.posy;\r\n const altKey = mouseDownEvent.altKey;\r\n const startEvent = { startX, currentX: startX, startY, currentY: startY, altKey };\r\n this.el.classList.add('active');\r\n this._onDidStart.fire(startEvent);\r\n // fix https://github.com/microsoft/vscode/issues/21675\r\n const style = (0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.createStyleSheet)(this.el);\r\n const updateStyle = () => {\r\n let cursor = '';\r\n if (isMultisashResize) {\r\n cursor = 'all-scroll';\r\n }\r\n else if (this.orientation === 1 /* HORIZONTAL */) {\r\n if (this.state === 1 /* Minimum */) {\r\n cursor = 's-resize';\r\n }\r\n else if (this.state === 2 /* Maximum */) {\r\n cursor = 'n-resize';\r\n }\r\n else {\r\n cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh ? 'row-resize' : 'ns-resize';\r\n }\r\n }\r\n else {\r\n if (this.state === 1 /* Minimum */) {\r\n cursor = 'e-resize';\r\n }\r\n else if (this.state === 2 /* Maximum */) {\r\n cursor = 'w-resize';\r\n }\r\n else {\r\n cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh ? 'col-resize' : 'ew-resize';\r\n }\r\n }\r\n style.textContent = `* { cursor: ${cursor} !important; }`;\r\n };\r\n const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n updateStyle();\r\n if (!isMultisashResize) {\r\n this.onDidEnablementChange(updateStyle, null, disposables);\r\n }\r\n const onMouseMove = (e) => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_7__.EventHelper.stop(e, false);\r\n const mouseMoveEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardMouseEvent(e);\r\n const event = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey };\r\n this._onDidChange.fire(event);\r\n };\r\n const onMouseUp = (e) => {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_7__.EventHelper.stop(e, false);\r\n this.el.removeChild(style);\r\n this.el.classList.remove('active');\r\n this._onDidEnd.fire();\r\n disposables.dispose();\r\n for (const iframe of iframes) {\r\n iframe.style.pointerEvents = 'auto';\r\n }\r\n };\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(window, 'mousemove')(onMouseMove, null, disposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(window, 'mouseup')(onMouseUp, null, disposables);\r\n }\r\n onMouseDoubleClick(e) {\r\n const orthogonalSash = this.getOrthogonalSash(e);\r\n if (orthogonalSash) {\r\n orthogonalSash._onDidReset.fire();\r\n }\r\n if (this.linkedSash) {\r\n this.linkedSash._onDidReset.fire();\r\n }\r\n this._onDidReset.fire();\r\n }\r\n onTouchStart(event) {\r\n _dom_js__WEBPACK_IMPORTED_MODULE_7__.EventHelper.stop(event);\r\n const listeners = [];\r\n const startX = event.pageX;\r\n const startY = event.pageY;\r\n const altKey = event.altKey;\r\n this._onDidStart.fire({\r\n startX: startX,\r\n currentX: startX,\r\n startY: startY,\r\n currentY: startY,\r\n altKey\r\n });\r\n listeners.push((0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.addDisposableListener)(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__.EventType.Change, (event) => {\r\n if (_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isNumber(event.pageX) && _common_types_js__WEBPACK_IMPORTED_MODULE_3__.isNumber(event.pageY)) {\r\n this._onDidChange.fire({\r\n startX: startX,\r\n currentX: event.pageX,\r\n startY: startY,\r\n currentY: event.pageY,\r\n altKey\r\n });\r\n }\r\n }));\r\n listeners.push((0,_dom_js__WEBPACK_IMPORTED_MODULE_7__.addDisposableListener)(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__.EventType.End, () => {\r\n this._onDidEnd.fire();\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(listeners);\r\n }));\r\n }\r\n static onMouseEnter(sash, fromLinkedSash = false) {\r\n if (sash.el.classList.contains('active')) {\r\n sash.hoverDelayer.cancel();\r\n sash.el.classList.add('hover');\r\n }\r\n else {\r\n sash.hoverDelayer.trigger(() => sash.el.classList.add('hover'));\r\n }\r\n if (!fromLinkedSash && sash.linkedSash) {\r\n Sash.onMouseEnter(sash.linkedSash, true);\r\n }\r\n }\r\n static onMouseLeave(sash, fromLinkedSash = false) {\r\n sash.hoverDelayer.cancel();\r\n sash.el.classList.remove('hover');\r\n if (!fromLinkedSash && sash.linkedSash) {\r\n Sash.onMouseLeave(sash.linkedSash, true);\r\n }\r\n }\r\n layout() {\r\n if (this.orientation === 0 /* VERTICAL */) {\r\n const verticalProvider = this.layoutProvider;\r\n this.el.style.left = verticalProvider.getVerticalSashLeft(this) - (this.size / 2) + 'px';\r\n if (verticalProvider.getVerticalSashTop) {\r\n this.el.style.top = verticalProvider.getVerticalSashTop(this) + 'px';\r\n }\r\n if (verticalProvider.getVerticalSashHeight) {\r\n this.el.style.height = verticalProvider.getVerticalSashHeight(this) + 'px';\r\n }\r\n }\r\n else {\r\n const horizontalProvider = this.layoutProvider;\r\n this.el.style.top = horizontalProvider.getHorizontalSashTop(this) - (this.size / 2) + 'px';\r\n if (horizontalProvider.getHorizontalSashLeft) {\r\n this.el.style.left = horizontalProvider.getHorizontalSashLeft(this) + 'px';\r\n }\r\n if (horizontalProvider.getHorizontalSashWidth) {\r\n this.el.style.width = horizontalProvider.getHorizontalSashWidth(this) + 'px';\r\n }\r\n }\r\n }\r\n hide() {\r\n this.hidden = true;\r\n this.el.style.display = 'none';\r\n this.el.setAttribute('aria-hidden', 'true');\r\n }\r\n getOrthogonalSash(e) {\r\n if (!e.target || !(e.target instanceof HTMLElement)) {\r\n return undefined;\r\n }\r\n if (e.target.classList.contains('orthogonal-drag-handle')) {\r\n return e.target.classList.contains('start') ? this.orthogonalStartSash : this.orthogonalEndSash;\r\n }\r\n return undefined;\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.el.remove();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractScrollbar\": () => (/* binding */ AbstractScrollbar)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarArrow.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js\");\n/* harmony import */ var _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scrollbarVisibilityController.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\r\n */\r\nconst MOUSE_DRAG_RESET_DISTANCE = 140;\r\nclass AbstractScrollbar extends _widget_js__WEBPACK_IMPORTED_MODULE_5__.Widget {\r\n constructor(opts) {\r\n super();\r\n this._lazyRender = opts.lazyRender;\r\n this._host = opts.host;\r\n this._scrollable = opts.scrollable;\r\n this._scrollByPage = opts.scrollByPage;\r\n this._scrollbarState = opts.scrollbarState;\r\n this._visibilityController = this._register(new _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__.ScrollbarVisibilityController(opts.visibility, 'visible scrollbar ' + opts.extraScrollbarClassName, 'invisible scrollbar ' + opts.extraScrollbarClassName));\r\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\r\n this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__.GlobalMouseMoveMonitor());\r\n this._shouldRender = true;\r\n this.domNode = (0,_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this.domNode.setAttribute('role', 'presentation');\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this._visibilityController.setDomNode(this.domNode);\r\n this.domNode.setPosition('absolute');\r\n this.onmousedown(this.domNode.domNode, (e) => this._domNodeMouseDown(e));\r\n }\r\n // ----------------- creation\r\n /**\r\n * Creates the dom node for an arrow & adds it to the container\r\n */\r\n _createArrow(opts) {\r\n const arrow = this._register(new _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__.ScrollbarArrow(opts));\r\n this.domNode.domNode.appendChild(arrow.bgDomNode);\r\n this.domNode.domNode.appendChild(arrow.domNode);\r\n }\r\n /**\r\n * Creates the slider dom node, adds it to the container & hooks up the events\r\n */\r\n _createSlider(top, left, width, height) {\r\n this.slider = (0,_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this.slider.setClassName('slider');\r\n this.slider.setPosition('absolute');\r\n this.slider.setTop(top);\r\n this.slider.setLeft(left);\r\n if (typeof width === 'number') {\r\n this.slider.setWidth(width);\r\n }\r\n if (typeof height === 'number') {\r\n this.slider.setHeight(height);\r\n }\r\n this.slider.setLayerHinting(true);\r\n this.slider.setContain('strict');\r\n this.domNode.domNode.appendChild(this.slider.domNode);\r\n this.onmousedown(this.slider.domNode, (e) => {\r\n if (e.leftButton) {\r\n e.preventDefault();\r\n this._sliderMouseDown(e, () => { });\r\n }\r\n });\r\n this.onclick(this.slider.domNode, e => {\r\n if (e.leftButton) {\r\n e.stopPropagation();\r\n }\r\n });\r\n }\r\n // ----------------- Update state\r\n _onElementSize(visibleSize) {\r\n if (this._scrollbarState.setVisibleSize(visibleSize)) {\r\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\r\n this._shouldRender = true;\r\n if (!this._lazyRender) {\r\n this.render();\r\n }\r\n }\r\n return this._shouldRender;\r\n }\r\n _onElementScrollSize(elementScrollSize) {\r\n if (this._scrollbarState.setScrollSize(elementScrollSize)) {\r\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\r\n this._shouldRender = true;\r\n if (!this._lazyRender) {\r\n this.render();\r\n }\r\n }\r\n return this._shouldRender;\r\n }\r\n _onElementScrollPosition(elementScrollPosition) {\r\n if (this._scrollbarState.setScrollPosition(elementScrollPosition)) {\r\n this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());\r\n this._shouldRender = true;\r\n if (!this._lazyRender) {\r\n this.render();\r\n }\r\n }\r\n return this._shouldRender;\r\n }\r\n // ----------------- rendering\r\n beginReveal() {\r\n this._visibilityController.setShouldBeVisible(true);\r\n }\r\n beginHide() {\r\n this._visibilityController.setShouldBeVisible(false);\r\n }\r\n render() {\r\n if (!this._shouldRender) {\r\n return;\r\n }\r\n this._shouldRender = false;\r\n this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize());\r\n this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition());\r\n }\r\n // ----------------- DOM events\r\n _domNodeMouseDown(e) {\r\n if (e.target !== this.domNode.domNode) {\r\n return;\r\n }\r\n this._onMouseDown(e);\r\n }\r\n delegateMouseDown(e) {\r\n const domTop = this.domNode.domNode.getClientRects()[0].top;\r\n const sliderStart = domTop + this._scrollbarState.getSliderPosition();\r\n const sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize();\r\n const mousePos = this._sliderMousePosition(e);\r\n if (sliderStart <= mousePos && mousePos <= sliderStop) {\r\n // Act as if it was a mouse down on the slider\r\n if (e.leftButton) {\r\n e.preventDefault();\r\n this._sliderMouseDown(e, () => { });\r\n }\r\n }\r\n else {\r\n // Act as if it was a mouse down on the scrollbar\r\n this._onMouseDown(e);\r\n }\r\n }\r\n _onMouseDown(e) {\r\n let offsetX;\r\n let offsetY;\r\n if (e.target === this.domNode.domNode && typeof e.browserEvent.offsetX === 'number' && typeof e.browserEvent.offsetY === 'number') {\r\n offsetX = e.browserEvent.offsetX;\r\n offsetY = e.browserEvent.offsetY;\r\n }\r\n else {\r\n const domNodePosition = _dom_js__WEBPACK_IMPORTED_MODULE_0__.getDomNodePagePosition(this.domNode.domNode);\r\n offsetX = e.posx - domNodePosition.left;\r\n offsetY = e.posy - domNodePosition.top;\r\n }\r\n const offset = this._mouseDownRelativePosition(offsetX, offsetY);\r\n this._setDesiredScrollPositionNow(this._scrollByPage\r\n ? this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(offset)\r\n : this._scrollbarState.getDesiredScrollPositionFromOffset(offset));\r\n if (e.leftButton) {\r\n e.preventDefault();\r\n this._sliderMouseDown(e, () => { });\r\n }\r\n }\r\n _sliderMouseDown(e, onDragFinished) {\r\n const initialMousePosition = this._sliderMousePosition(e);\r\n const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e);\r\n const initialScrollbarState = this._scrollbarState.clone();\r\n this.slider.toggleClassName('active', true);\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__.standardMouseMoveMerger, (mouseMoveData) => {\r\n const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData);\r\n const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition);\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) {\r\n // The mouse has wondered away from the scrollbar => reset dragging\r\n this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition());\r\n return;\r\n }\r\n const mousePosition = this._sliderMousePosition(mouseMoveData);\r\n const mouseDelta = mousePosition - initialMousePosition;\r\n this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta));\r\n }, () => {\r\n this.slider.toggleClassName('active', false);\r\n this._host.onDragEnd();\r\n onDragFinished();\r\n });\r\n this._host.onDragStart();\r\n }\r\n _setDesiredScrollPositionNow(_desiredScrollPosition) {\r\n const desiredScrollPosition = {};\r\n this.writeScrollPosition(desiredScrollPosition, _desiredScrollPosition);\r\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\r\n }\r\n updateScrollbarSize(scrollbarSize) {\r\n this._updateScrollbarSize(scrollbarSize);\r\n this._scrollbarState.setScrollbarSize(scrollbarSize);\r\n this._shouldRender = true;\r\n if (!this._lazyRender) {\r\n this.render();\r\n }\r\n }\r\n isNeeded() {\r\n return this._scrollbarState.isNeeded();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HorizontalScrollbar\": () => (/* binding */ HorizontalScrollbar)\n/* harmony export */ });\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js\");\n/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js\");\n/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst scrollbarButtonLeftIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.registerCodicon)('scrollbar-button-left', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.triangleLeft);\r\nconst scrollbarButtonRightIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.registerCodicon)('scrollbar-button-right', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.triangleRight);\r\nclass HorizontalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__.AbstractScrollbar {\r\n constructor(scrollable, options, host) {\r\n const scrollDimensions = scrollable.getScrollDimensions();\r\n const scrollPosition = scrollable.getCurrentScrollPosition();\r\n super({\r\n lazyRender: options.lazyRender,\r\n host: host,\r\n scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__.ScrollbarState((options.horizontalHasArrows ? options.arrowSize : 0), (options.horizontal === 2 /* Hidden */ ? 0 : options.horizontalScrollbarSize), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), scrollDimensions.width, scrollDimensions.scrollWidth, scrollPosition.scrollLeft),\r\n visibility: options.horizontal,\r\n extraScrollbarClassName: 'horizontal',\r\n scrollable: scrollable,\r\n scrollByPage: options.scrollByPage\r\n });\r\n if (options.horizontalHasArrows) {\r\n const arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__.ARROW_IMG_SIZE) / 2;\r\n const scrollbarDelta = (options.horizontalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__.ARROW_IMG_SIZE) / 2;\r\n this._createArrow({\r\n className: 'scra',\r\n icon: scrollbarButtonLeftIcon,\r\n top: scrollbarDelta,\r\n left: arrowDelta,\r\n bottom: undefined,\r\n right: undefined,\r\n bgWidth: options.arrowSize,\r\n bgHeight: options.horizontalScrollbarSize,\r\n onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__.StandardWheelEvent(null, 1, 0)),\r\n });\r\n this._createArrow({\r\n className: 'scra',\r\n icon: scrollbarButtonRightIcon,\r\n top: scrollbarDelta,\r\n left: undefined,\r\n bottom: undefined,\r\n right: arrowDelta,\r\n bgWidth: options.arrowSize,\r\n bgHeight: options.horizontalScrollbarSize,\r\n onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__.StandardWheelEvent(null, -1, 0)),\r\n });\r\n }\r\n this._createSlider(Math.floor((options.horizontalScrollbarSize - options.horizontalSliderSize) / 2), 0, undefined, options.horizontalSliderSize);\r\n }\r\n _updateSlider(sliderSize, sliderPosition) {\r\n this.slider.setWidth(sliderSize);\r\n this.slider.setLeft(sliderPosition);\r\n }\r\n _renderDomNode(largeSize, smallSize) {\r\n this.domNode.setWidth(largeSize);\r\n this.domNode.setHeight(smallSize);\r\n this.domNode.setLeft(0);\r\n this.domNode.setBottom(0);\r\n }\r\n onDidScroll(e) {\r\n this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender;\r\n this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender;\r\n this._shouldRender = this._onElementSize(e.width) || this._shouldRender;\r\n return this._shouldRender;\r\n }\r\n _mouseDownRelativePosition(offsetX, offsetY) {\r\n return offsetX;\r\n }\r\n _sliderMousePosition(e) {\r\n return e.posx;\r\n }\r\n _sliderOrthogonalMousePosition(e) {\r\n return e.posy;\r\n }\r\n _updateScrollbarSize(size) {\r\n this.slider.setHeight(size);\r\n }\r\n writeScrollPosition(target, scrollPosition) {\r\n target.scrollLeft = scrollPosition;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MouseWheelClassifier\": () => (/* binding */ MouseWheelClassifier),\n/* harmony export */ \"AbstractScrollableElement\": () => (/* binding */ AbstractScrollableElement),\n/* harmony export */ \"ScrollableElement\": () => (/* binding */ ScrollableElement),\n/* harmony export */ \"SmoothScrollableElement\": () => (/* binding */ SmoothScrollableElement),\n/* harmony export */ \"DomScrollableElement\": () => (/* binding */ DomScrollableElement)\n/* harmony export */ });\n/* harmony import */ var _media_scrollbars_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/scrollbars.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./horizontalScrollbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js\");\n/* harmony import */ var _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./verticalScrollbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/scrollable.js */ \"./node_modules/monaco-editor/esm/vs/base/common/scrollable.js\");\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst HIDE_TIMEOUT = 500;\r\nconst SCROLL_WHEEL_SENSITIVITY = 50;\r\nconst SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED = true;\r\nclass MouseWheelClassifierItem {\r\n constructor(timestamp, deltaX, deltaY) {\r\n this.timestamp = timestamp;\r\n this.deltaX = deltaX;\r\n this.deltaY = deltaY;\r\n this.score = 0;\r\n }\r\n}\r\nclass MouseWheelClassifier {\r\n constructor() {\r\n this._capacity = 5;\r\n this._memory = [];\r\n this._front = -1;\r\n this._rear = -1;\r\n }\r\n isPhysicalMouseWheel() {\r\n if (this._front === -1 && this._rear === -1) {\r\n // no elements\r\n return false;\r\n }\r\n // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ...\r\n let remainingInfluence = 1;\r\n let score = 0;\r\n let iteration = 1;\r\n let index = this._rear;\r\n do {\r\n const influence = (index === this._front ? remainingInfluence : Math.pow(2, -iteration));\r\n remainingInfluence -= influence;\r\n score += this._memory[index].score * influence;\r\n if (index === this._front) {\r\n break;\r\n }\r\n index = (this._capacity + index - 1) % this._capacity;\r\n iteration++;\r\n } while (true);\r\n return (score <= 0.5);\r\n }\r\n accept(timestamp, deltaX, deltaY) {\r\n const item = new MouseWheelClassifierItem(timestamp, deltaX, deltaY);\r\n item.score = this._computeScore(item);\r\n if (this._front === -1 && this._rear === -1) {\r\n this._memory[0] = item;\r\n this._front = 0;\r\n this._rear = 0;\r\n }\r\n else {\r\n this._rear = (this._rear + 1) % this._capacity;\r\n if (this._rear === this._front) {\r\n // Drop oldest\r\n this._front = (this._front + 1) % this._capacity;\r\n }\r\n this._memory[this._rear] = item;\r\n }\r\n }\r\n /**\r\n * A score between 0 and 1 for `item`.\r\n * - a score towards 0 indicates that the source appears to be a physical mouse wheel\r\n * - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc.\r\n */\r\n _computeScore(item) {\r\n if (Math.abs(item.deltaX) > 0 && Math.abs(item.deltaY) > 0) {\r\n // both axes exercised => definitely not a physical mouse wheel\r\n return 1;\r\n }\r\n let score = 0.5;\r\n const prev = (this._front === -1 && this._rear === -1 ? null : this._memory[this._rear]);\r\n if (prev) {\r\n // const deltaT = item.timestamp - prev.timestamp;\r\n // if (deltaT < 1000 / 30) {\r\n // \t// sooner than X times per second => indicator that this is not a physical mouse wheel\r\n // \tscore += 0.25;\r\n // }\r\n // if (item.deltaX === prev.deltaX && item.deltaY === prev.deltaY) {\r\n // \t// equal amplitude => indicator that this is a physical mouse wheel\r\n // \tscore -= 0.25;\r\n // }\r\n }\r\n if (!this._isAlmostInt(item.deltaX) || !this._isAlmostInt(item.deltaY)) {\r\n // non-integer deltas => indicator that this is not a physical mouse wheel\r\n score += 0.25;\r\n }\r\n return Math.min(Math.max(score, 0), 1);\r\n }\r\n _isAlmostInt(value) {\r\n const delta = Math.abs(Math.round(value) - value);\r\n return (delta < 0.01);\r\n }\r\n}\r\nMouseWheelClassifier.INSTANCE = new MouseWheelClassifier();\r\nclass AbstractScrollableElement extends _widget_js__WEBPACK_IMPORTED_MODULE_6__.Widget {\r\n constructor(element, options, scrollable) {\r\n super();\r\n this._onScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter());\r\n this.onScroll = this._onScroll.event;\r\n this._onWillScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter());\r\n element.style.overflow = 'hidden';\r\n this._options = resolveOptions(options);\r\n this._scrollable = scrollable;\r\n this._register(this._scrollable.onScroll((e) => {\r\n this._onWillScroll.fire(e);\r\n this._onDidScroll(e);\r\n this._onScroll.fire(e);\r\n }));\r\n const scrollbarHost = {\r\n onMouseWheel: (mouseWheelEvent) => this._onMouseWheel(mouseWheelEvent),\r\n onDragStart: () => this._onDragStart(),\r\n onDragEnd: () => this._onDragEnd(),\r\n };\r\n this._verticalScrollbar = this._register(new _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__.VerticalScrollbar(this._scrollable, this._options, scrollbarHost));\r\n this._horizontalScrollbar = this._register(new _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__.HorizontalScrollbar(this._scrollable, this._options, scrollbarHost));\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'monaco-scrollable-element ' + this._options.className;\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.style.position = 'relative';\r\n this._domNode.style.overflow = 'hidden';\r\n this._domNode.appendChild(element);\r\n this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode);\r\n this._domNode.appendChild(this._verticalScrollbar.domNode.domNode);\r\n if (this._options.useShadows) {\r\n this._leftShadowDomNode = (0,_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._leftShadowDomNode.setClassName('shadow');\r\n this._domNode.appendChild(this._leftShadowDomNode.domNode);\r\n this._topShadowDomNode = (0,_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._topShadowDomNode.setClassName('shadow');\r\n this._domNode.appendChild(this._topShadowDomNode.domNode);\r\n this._topLeftShadowDomNode = (0,_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._topLeftShadowDomNode.setClassName('shadow top-left-corner');\r\n this._domNode.appendChild(this._topLeftShadowDomNode.domNode);\r\n }\r\n else {\r\n this._leftShadowDomNode = null;\r\n this._topShadowDomNode = null;\r\n this._topLeftShadowDomNode = null;\r\n }\r\n this._listenOnDomNode = this._options.listenOnDomNode || this._domNode;\r\n this._mouseWheelToDispose = [];\r\n this._setListeningToMouseWheel(this._options.handleMouseWheel);\r\n this.onmouseover(this._listenOnDomNode, (e) => this._onMouseOver(e));\r\n this.onnonbubblingmouseout(this._listenOnDomNode, (e) => this._onMouseOut(e));\r\n this._hideTimeout = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_7__.TimeoutTimer());\r\n this._isDragging = false;\r\n this._mouseIsOver = false;\r\n this._shouldRender = true;\r\n this._revealOnScroll = true;\r\n }\r\n dispose() {\r\n this._mouseWheelToDispose = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.dispose)(this._mouseWheelToDispose);\r\n super.dispose();\r\n }\r\n /**\r\n * Get the generated 'scrollable' dom node\r\n */\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getOverviewRulerLayoutInfo() {\r\n return {\r\n parent: this._domNode,\r\n insertBefore: this._verticalScrollbar.domNode.domNode,\r\n };\r\n }\r\n /**\r\n * Delegate a mouse down event to the vertical scrollbar.\r\n * This is to help with clicking somewhere else and having the scrollbar react.\r\n */\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n this._verticalScrollbar.delegateMouseDown(browserEvent);\r\n }\r\n getScrollDimensions() {\r\n return this._scrollable.getScrollDimensions();\r\n }\r\n setScrollDimensions(dimensions) {\r\n this._scrollable.setScrollDimensions(dimensions, false);\r\n }\r\n /**\r\n * Update the class name of the scrollable element.\r\n */\r\n updateClassName(newClassName) {\r\n this._options.className = newClassName;\r\n // Defaults are different on Macs\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isMacintosh) {\r\n this._options.className += ' mac';\r\n }\r\n this._domNode.className = 'monaco-scrollable-element ' + this._options.className;\r\n }\r\n /**\r\n * Update configuration options for the scrollbar.\r\n * Really this is Editor.IEditorScrollbarOptions, but base shouldn't\r\n * depend on Editor.\r\n */\r\n updateOptions(newOptions) {\r\n if (typeof newOptions.handleMouseWheel !== 'undefined') {\r\n this._options.handleMouseWheel = newOptions.handleMouseWheel;\r\n this._setListeningToMouseWheel(this._options.handleMouseWheel);\r\n }\r\n if (typeof newOptions.mouseWheelScrollSensitivity !== 'undefined') {\r\n this._options.mouseWheelScrollSensitivity = newOptions.mouseWheelScrollSensitivity;\r\n }\r\n if (typeof newOptions.fastScrollSensitivity !== 'undefined') {\r\n this._options.fastScrollSensitivity = newOptions.fastScrollSensitivity;\r\n }\r\n if (typeof newOptions.scrollPredominantAxis !== 'undefined') {\r\n this._options.scrollPredominantAxis = newOptions.scrollPredominantAxis;\r\n }\r\n if (typeof newOptions.horizontalScrollbarSize !== 'undefined') {\r\n this._horizontalScrollbar.updateScrollbarSize(newOptions.horizontalScrollbarSize);\r\n }\r\n if (!this._options.lazyRender) {\r\n this._render();\r\n }\r\n }\r\n // -------------------- mouse wheel scrolling --------------------\r\n _setListeningToMouseWheel(shouldListen) {\r\n const isListening = (this._mouseWheelToDispose.length > 0);\r\n if (isListening === shouldListen) {\r\n // No change\r\n return;\r\n }\r\n // Stop listening (if necessary)\r\n this._mouseWheelToDispose = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.dispose)(this._mouseWheelToDispose);\r\n // Start listening (if necessary)\r\n if (shouldListen) {\r\n const onMouseWheel = (browserEvent) => {\r\n this._onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__.StandardWheelEvent(browserEvent));\r\n };\r\n this._mouseWheelToDispose.push(_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this._listenOnDomNode, _dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_WHEEL, onMouseWheel, { passive: false }));\r\n }\r\n }\r\n _onMouseWheel(e) {\r\n const classifier = MouseWheelClassifier.INSTANCE;\r\n if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) {\r\n const osZoomFactor = window.devicePixelRatio / (0,_browser_js__WEBPACK_IMPORTED_MODULE_12__.getZoomFactor)();\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isWindows || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isLinux) {\r\n // On Windows and Linux, the incoming delta events are multiplied with the OS zoom factor.\r\n // The OS zoom factor can be reverse engineered by using the device pixel ratio and the configured zoom factor into account.\r\n classifier.accept(Date.now(), e.deltaX / osZoomFactor, e.deltaY / osZoomFactor);\r\n }\r\n else {\r\n classifier.accept(Date.now(), e.deltaX, e.deltaY);\r\n }\r\n }\r\n // console.log(`${Date.now()}, ${e.deltaY}, ${e.deltaX}`);\r\n let didScroll = false;\r\n if (e.deltaY || e.deltaX) {\r\n let deltaY = e.deltaY * this._options.mouseWheelScrollSensitivity;\r\n let deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity;\r\n if (this._options.scrollPredominantAxis) {\r\n if (Math.abs(deltaY) >= Math.abs(deltaX)) {\r\n deltaX = 0;\r\n }\r\n else {\r\n deltaY = 0;\r\n }\r\n }\r\n if (this._options.flipAxes) {\r\n [deltaY, deltaX] = [deltaX, deltaY];\r\n }\r\n // Convert vertical scrolling to horizontal if shift is held, this\r\n // is handled at a higher level on Mac\r\n const shiftConvert = !_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;\r\n if ((this._options.scrollYToX || shiftConvert) && !deltaX) {\r\n deltaX = deltaY;\r\n deltaY = 0;\r\n }\r\n if (e.browserEvent && e.browserEvent.altKey) {\r\n // fastScrolling\r\n deltaX = deltaX * this._options.fastScrollSensitivity;\r\n deltaY = deltaY * this._options.fastScrollSensitivity;\r\n }\r\n const futureScrollPosition = this._scrollable.getFutureScrollPosition();\r\n let desiredScrollPosition = {};\r\n if (deltaY) {\r\n const desiredScrollTop = futureScrollPosition.scrollTop - SCROLL_WHEEL_SENSITIVITY * deltaY;\r\n this._verticalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollTop);\r\n }\r\n if (deltaX) {\r\n const desiredScrollLeft = futureScrollPosition.scrollLeft - SCROLL_WHEEL_SENSITIVITY * deltaX;\r\n this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollLeft);\r\n }\r\n // Check that we are scrolling towards a location which is valid\r\n desiredScrollPosition = this._scrollable.validateScrollPosition(desiredScrollPosition);\r\n if (futureScrollPosition.scrollLeft !== desiredScrollPosition.scrollLeft || futureScrollPosition.scrollTop !== desiredScrollPosition.scrollTop) {\r\n const canPerformSmoothScroll = (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED\r\n && this._options.mouseWheelSmoothScroll\r\n && classifier.isPhysicalMouseWheel());\r\n if (canPerformSmoothScroll) {\r\n this._scrollable.setScrollPositionSmooth(desiredScrollPosition);\r\n }\r\n else {\r\n this._scrollable.setScrollPositionNow(desiredScrollPosition);\r\n }\r\n didScroll = true;\r\n }\r\n }\r\n let consumeMouseWheel = didScroll;\r\n if (!consumeMouseWheel && this._options.alwaysConsumeMouseWheel) {\r\n consumeMouseWheel = true;\r\n }\r\n if (!consumeMouseWheel && this._options.consumeMouseWheelIfScrollbarIsNeeded && (this._verticalScrollbar.isNeeded() || this._horizontalScrollbar.isNeeded())) {\r\n consumeMouseWheel = true;\r\n }\r\n if (consumeMouseWheel) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n _onDidScroll(e) {\r\n this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender;\r\n this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender;\r\n if (this._options.useShadows) {\r\n this._shouldRender = true;\r\n }\r\n if (this._revealOnScroll) {\r\n this._reveal();\r\n }\r\n if (!this._options.lazyRender) {\r\n this._render();\r\n }\r\n }\r\n /**\r\n * Render / mutate the DOM now.\r\n * Should be used together with the ctor option `lazyRender`.\r\n */\r\n renderNow() {\r\n if (!this._options.lazyRender) {\r\n throw new Error('Please use `lazyRender` together with `renderNow`!');\r\n }\r\n this._render();\r\n }\r\n _render() {\r\n if (!this._shouldRender) {\r\n return;\r\n }\r\n this._shouldRender = false;\r\n this._horizontalScrollbar.render();\r\n this._verticalScrollbar.render();\r\n if (this._options.useShadows) {\r\n const scrollState = this._scrollable.getCurrentScrollPosition();\r\n const enableTop = scrollState.scrollTop > 0;\r\n const enableLeft = scrollState.scrollLeft > 0;\r\n this._leftShadowDomNode.setClassName('shadow' + (enableLeft ? ' left' : ''));\r\n this._topShadowDomNode.setClassName('shadow' + (enableTop ? ' top' : ''));\r\n this._topLeftShadowDomNode.setClassName('shadow top-left-corner' + (enableTop ? ' top' : '') + (enableLeft ? ' left' : ''));\r\n }\r\n }\r\n // -------------------- fade in / fade out --------------------\r\n _onDragStart() {\r\n this._isDragging = true;\r\n this._reveal();\r\n }\r\n _onDragEnd() {\r\n this._isDragging = false;\r\n this._hide();\r\n }\r\n _onMouseOut(e) {\r\n this._mouseIsOver = false;\r\n this._hide();\r\n }\r\n _onMouseOver(e) {\r\n this._mouseIsOver = true;\r\n this._reveal();\r\n }\r\n _reveal() {\r\n this._verticalScrollbar.beginReveal();\r\n this._horizontalScrollbar.beginReveal();\r\n this._scheduleHide();\r\n }\r\n _hide() {\r\n if (!this._mouseIsOver && !this._isDragging) {\r\n this._verticalScrollbar.beginHide();\r\n this._horizontalScrollbar.beginHide();\r\n }\r\n }\r\n _scheduleHide() {\r\n if (!this._mouseIsOver && !this._isDragging) {\r\n this._hideTimeout.cancelAndSet(() => this._hide(), HIDE_TIMEOUT);\r\n }\r\n }\r\n}\r\nclass ScrollableElement extends AbstractScrollableElement {\r\n constructor(element, options) {\r\n options = options || {};\r\n options.mouseWheelSmoothScroll = false;\r\n const scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__.Scrollable(0, (callback) => _dom_js__WEBPACK_IMPORTED_MODULE_1__.scheduleAtNextAnimationFrame(callback));\r\n super(element, options, scrollable);\r\n this._register(scrollable);\r\n }\r\n setScrollPosition(update) {\r\n this._scrollable.setScrollPositionNow(update);\r\n }\r\n}\r\nclass SmoothScrollableElement extends AbstractScrollableElement {\r\n constructor(element, options, scrollable) {\r\n super(element, options, scrollable);\r\n }\r\n setScrollPosition(update) {\r\n if (update.reuseAnimation) {\r\n this._scrollable.setScrollPositionSmooth(update, update.reuseAnimation);\r\n }\r\n else {\r\n this._scrollable.setScrollPositionNow(update);\r\n }\r\n }\r\n getScrollPosition() {\r\n return this._scrollable.getCurrentScrollPosition();\r\n }\r\n}\r\nclass DomScrollableElement extends ScrollableElement {\r\n constructor(element, options) {\r\n super(element, options);\r\n this._element = element;\r\n this.onScroll((e) => {\r\n if (e.scrollTopChanged) {\r\n this._element.scrollTop = e.scrollTop;\r\n }\r\n if (e.scrollLeftChanged) {\r\n this._element.scrollLeft = e.scrollLeft;\r\n }\r\n });\r\n this.scanDomNode();\r\n }\r\n scanDomNode() {\r\n // width, scrollLeft, scrollWidth, height, scrollTop, scrollHeight\r\n this.setScrollDimensions({\r\n width: this._element.clientWidth,\r\n scrollWidth: this._element.scrollWidth,\r\n height: this._element.clientHeight,\r\n scrollHeight: this._element.scrollHeight\r\n });\r\n this.setScrollPosition({\r\n scrollLeft: this._element.scrollLeft,\r\n scrollTop: this._element.scrollTop,\r\n });\r\n }\r\n}\r\nfunction resolveOptions(opts) {\r\n const result = {\r\n lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false),\r\n className: (typeof opts.className !== 'undefined' ? opts.className : ''),\r\n useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true),\r\n handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true),\r\n flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false),\r\n consumeMouseWheelIfScrollbarIsNeeded: (typeof opts.consumeMouseWheelIfScrollbarIsNeeded !== 'undefined' ? opts.consumeMouseWheelIfScrollbarIsNeeded : false),\r\n alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false),\r\n scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false),\r\n mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1),\r\n fastScrollSensitivity: (typeof opts.fastScrollSensitivity !== 'undefined' ? opts.fastScrollSensitivity : 5),\r\n scrollPredominantAxis: (typeof opts.scrollPredominantAxis !== 'undefined' ? opts.scrollPredominantAxis : true),\r\n mouseWheelSmoothScroll: (typeof opts.mouseWheelSmoothScroll !== 'undefined' ? opts.mouseWheelSmoothScroll : true),\r\n arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11),\r\n listenOnDomNode: (typeof opts.listenOnDomNode !== 'undefined' ? opts.listenOnDomNode : null),\r\n horizontal: (typeof opts.horizontal !== 'undefined' ? opts.horizontal : 1 /* Auto */),\r\n horizontalScrollbarSize: (typeof opts.horizontalScrollbarSize !== 'undefined' ? opts.horizontalScrollbarSize : 10),\r\n horizontalSliderSize: (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : 0),\r\n horizontalHasArrows: (typeof opts.horizontalHasArrows !== 'undefined' ? opts.horizontalHasArrows : false),\r\n vertical: (typeof opts.vertical !== 'undefined' ? opts.vertical : 1 /* Auto */),\r\n verticalScrollbarSize: (typeof opts.verticalScrollbarSize !== 'undefined' ? opts.verticalScrollbarSize : 10),\r\n verticalHasArrows: (typeof opts.verticalHasArrows !== 'undefined' ? opts.verticalHasArrows : false),\r\n verticalSliderSize: (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : 0),\r\n scrollByPage: (typeof opts.scrollByPage !== 'undefined' ? opts.scrollByPage : false)\r\n };\r\n result.horizontalSliderSize = (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : result.horizontalScrollbarSize);\r\n result.verticalSliderSize = (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : result.verticalScrollbarSize);\r\n // Defaults are different on Macs\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isMacintosh) {\r\n result.className += ' mac';\r\n }\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ARROW_IMG_SIZE\": () => (/* binding */ ARROW_IMG_SIZE),\n/* harmony export */ \"ScrollbarArrow\": () => (/* binding */ ScrollbarArrow)\n/* harmony export */ });\n/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n/**\r\n * The arrow image size.\r\n */\r\nconst ARROW_IMG_SIZE = 11;\r\nclass ScrollbarArrow extends _widget_js__WEBPACK_IMPORTED_MODULE_1__.Widget {\r\n constructor(opts) {\r\n super();\r\n this._onActivate = opts.onActivate;\r\n this.bgDomNode = document.createElement('div');\r\n this.bgDomNode.className = 'arrow-background';\r\n this.bgDomNode.style.position = 'absolute';\r\n this.bgDomNode.style.width = opts.bgWidth + 'px';\r\n this.bgDomNode.style.height = opts.bgHeight + 'px';\r\n if (typeof opts.top !== 'undefined') {\r\n this.bgDomNode.style.top = '0px';\r\n }\r\n if (typeof opts.left !== 'undefined') {\r\n this.bgDomNode.style.left = '0px';\r\n }\r\n if (typeof opts.bottom !== 'undefined') {\r\n this.bgDomNode.style.bottom = '0px';\r\n }\r\n if (typeof opts.right !== 'undefined') {\r\n this.bgDomNode.style.right = '0px';\r\n }\r\n this.domNode = document.createElement('div');\r\n this.domNode.className = opts.className;\r\n this.domNode.classList.add(...opts.icon.classNamesArray);\r\n this.domNode.style.position = 'absolute';\r\n this.domNode.style.width = ARROW_IMG_SIZE + 'px';\r\n this.domNode.style.height = ARROW_IMG_SIZE + 'px';\r\n if (typeof opts.top !== 'undefined') {\r\n this.domNode.style.top = opts.top + 'px';\r\n }\r\n if (typeof opts.left !== 'undefined') {\r\n this.domNode.style.left = opts.left + 'px';\r\n }\r\n if (typeof opts.bottom !== 'undefined') {\r\n this.domNode.style.bottom = opts.bottom + 'px';\r\n }\r\n if (typeof opts.right !== 'undefined') {\r\n this.domNode.style.right = opts.right + 'px';\r\n }\r\n this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__.GlobalMouseMoveMonitor());\r\n this.onmousedown(this.bgDomNode, (e) => this._arrowMouseDown(e));\r\n this.onmousedown(this.domNode, (e) => this._arrowMouseDown(e));\r\n this._mousedownRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__.IntervalTimer());\r\n this._mousedownScheduleRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__.TimeoutTimer());\r\n }\r\n _arrowMouseDown(e) {\r\n const scheduleRepeater = () => {\r\n this._mousedownRepeatTimer.cancelAndSet(() => this._onActivate(), 1000 / 24);\r\n };\r\n this._onActivate();\r\n this._mousedownRepeatTimer.cancel();\r\n this._mousedownScheduleRepeatTimer.cancelAndSet(scheduleRepeater, 200);\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__.standardMouseMoveMerger, (mouseMoveData) => {\r\n /* Intentional empty */\r\n }, () => {\r\n this._mousedownRepeatTimer.cancel();\r\n this._mousedownScheduleRepeatTimer.cancel();\r\n });\r\n e.preventDefault();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ScrollbarState\": () => (/* binding */ ScrollbarState)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * The minimal size of the slider (such that it can still be clickable) -- it is artificially enlarged.\r\n */\r\nconst MINIMUM_SLIDER_SIZE = 20;\r\nclass ScrollbarState {\r\n constructor(arrowSize, scrollbarSize, oppositeScrollbarSize, visibleSize, scrollSize, scrollPosition) {\r\n this._scrollbarSize = Math.round(scrollbarSize);\r\n this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize);\r\n this._arrowSize = Math.round(arrowSize);\r\n this._visibleSize = visibleSize;\r\n this._scrollSize = scrollSize;\r\n this._scrollPosition = scrollPosition;\r\n this._computedAvailableSize = 0;\r\n this._computedIsNeeded = false;\r\n this._computedSliderSize = 0;\r\n this._computedSliderRatio = 0;\r\n this._computedSliderPosition = 0;\r\n this._refreshComputedValues();\r\n }\r\n clone() {\r\n return new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition);\r\n }\r\n setVisibleSize(visibleSize) {\r\n const iVisibleSize = Math.round(visibleSize);\r\n if (this._visibleSize !== iVisibleSize) {\r\n this._visibleSize = iVisibleSize;\r\n this._refreshComputedValues();\r\n return true;\r\n }\r\n return false;\r\n }\r\n setScrollSize(scrollSize) {\r\n const iScrollSize = Math.round(scrollSize);\r\n if (this._scrollSize !== iScrollSize) {\r\n this._scrollSize = iScrollSize;\r\n this._refreshComputedValues();\r\n return true;\r\n }\r\n return false;\r\n }\r\n setScrollPosition(scrollPosition) {\r\n const iScrollPosition = Math.round(scrollPosition);\r\n if (this._scrollPosition !== iScrollPosition) {\r\n this._scrollPosition = iScrollPosition;\r\n this._refreshComputedValues();\r\n return true;\r\n }\r\n return false;\r\n }\r\n setScrollbarSize(scrollbarSize) {\r\n this._scrollbarSize = scrollbarSize;\r\n }\r\n static _computeValues(oppositeScrollbarSize, arrowSize, visibleSize, scrollSize, scrollPosition) {\r\n const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize);\r\n const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize);\r\n const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize);\r\n if (!computedIsNeeded) {\r\n // There is no need for a slider\r\n return {\r\n computedAvailableSize: Math.round(computedAvailableSize),\r\n computedIsNeeded: computedIsNeeded,\r\n computedSliderSize: Math.round(computedRepresentableSize),\r\n computedSliderRatio: 0,\r\n computedSliderPosition: 0,\r\n };\r\n }\r\n // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise\r\n const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize)));\r\n // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize`\r\n // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`.\r\n const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize);\r\n const computedSliderPosition = (scrollPosition * computedSliderRatio);\r\n return {\r\n computedAvailableSize: Math.round(computedAvailableSize),\r\n computedIsNeeded: computedIsNeeded,\r\n computedSliderSize: Math.round(computedSliderSize),\r\n computedSliderRatio: computedSliderRatio,\r\n computedSliderPosition: Math.round(computedSliderPosition),\r\n };\r\n }\r\n _refreshComputedValues() {\r\n const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);\r\n this._computedAvailableSize = r.computedAvailableSize;\r\n this._computedIsNeeded = r.computedIsNeeded;\r\n this._computedSliderSize = r.computedSliderSize;\r\n this._computedSliderRatio = r.computedSliderRatio;\r\n this._computedSliderPosition = r.computedSliderPosition;\r\n }\r\n getArrowSize() {\r\n return this._arrowSize;\r\n }\r\n getScrollPosition() {\r\n return this._scrollPosition;\r\n }\r\n getRectangleLargeSize() {\r\n return this._computedAvailableSize;\r\n }\r\n getRectangleSmallSize() {\r\n return this._scrollbarSize;\r\n }\r\n isNeeded() {\r\n return this._computedIsNeeded;\r\n }\r\n getSliderSize() {\r\n return this._computedSliderSize;\r\n }\r\n getSliderPosition() {\r\n return this._computedSliderPosition;\r\n }\r\n /**\r\n * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider.\r\n * `offset` is based on the same coordinate system as the `sliderPosition`.\r\n */\r\n getDesiredScrollPositionFromOffset(offset) {\r\n if (!this._computedIsNeeded) {\r\n // no need for a slider\r\n return 0;\r\n }\r\n const desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2;\r\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\r\n }\r\n /**\r\n * Compute a desired `scrollPosition` from if offset is before or after the slider position.\r\n * If offset is before slider, treat as a page up (or left). If after, page down (or right).\r\n * `offset` and `_computedSliderPosition` are based on the same coordinate system.\r\n * `_visibleSize` corresponds to a \"page\" of lines in the returned coordinate system.\r\n */\r\n getDesiredScrollPositionFromOffsetPaged(offset) {\r\n if (!this._computedIsNeeded) {\r\n // no need for a slider\r\n return 0;\r\n }\r\n const correctedOffset = offset - this._arrowSize; // compensate if has arrows\r\n let desiredScrollPosition = this._scrollPosition;\r\n if (correctedOffset < this._computedSliderPosition) {\r\n desiredScrollPosition -= this._visibleSize; // page up/left\r\n }\r\n else {\r\n desiredScrollPosition += this._visibleSize; // page down/right\r\n }\r\n return desiredScrollPosition;\r\n }\r\n /**\r\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\r\n */\r\n getDesiredScrollPositionFromDelta(delta) {\r\n if (!this._computedIsNeeded) {\r\n // no need for a slider\r\n return 0;\r\n }\r\n const desiredSliderPosition = this._computedSliderPosition + delta;\r\n return Math.round(desiredSliderPosition / this._computedSliderRatio);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js":
|
||
/*!******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js ***!
|
||
\******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ScrollbarVisibilityController\": () => (/* binding */ ScrollbarVisibilityController)\n/* harmony export */ });\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass ScrollbarVisibilityController extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(visibility, visibleClassName, invisibleClassName) {\r\n super();\r\n this._visibility = visibility;\r\n this._visibleClassName = visibleClassName;\r\n this._invisibleClassName = invisibleClassName;\r\n this._domNode = null;\r\n this._isVisible = false;\r\n this._isNeeded = false;\r\n this._shouldBeVisible = false;\r\n this._revealTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer());\r\n }\r\n // ----------------- Hide / Reveal\r\n applyVisibilitySetting(shouldBeVisible) {\r\n if (this._visibility === 2 /* Hidden */) {\r\n return false;\r\n }\r\n if (this._visibility === 3 /* Visible */) {\r\n return true;\r\n }\r\n return shouldBeVisible;\r\n }\r\n setShouldBeVisible(rawShouldBeVisible) {\r\n const shouldBeVisible = this.applyVisibilitySetting(rawShouldBeVisible);\r\n if (this._shouldBeVisible !== shouldBeVisible) {\r\n this._shouldBeVisible = shouldBeVisible;\r\n this.ensureVisibility();\r\n }\r\n }\r\n setIsNeeded(isNeeded) {\r\n if (this._isNeeded !== isNeeded) {\r\n this._isNeeded = isNeeded;\r\n this.ensureVisibility();\r\n }\r\n }\r\n setDomNode(domNode) {\r\n this._domNode = domNode;\r\n this._domNode.setClassName(this._invisibleClassName);\r\n // Now that the flags & the dom node are in a consistent state, ensure the Hidden/Visible configuration\r\n this.setShouldBeVisible(false);\r\n }\r\n ensureVisibility() {\r\n if (!this._isNeeded) {\r\n // Nothing to be rendered\r\n this._hide(false);\r\n return;\r\n }\r\n if (this._shouldBeVisible) {\r\n this._reveal();\r\n }\r\n else {\r\n this._hide(true);\r\n }\r\n }\r\n _reveal() {\r\n if (this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = true;\r\n // The CSS animation doesn't play otherwise\r\n this._revealTimer.setIfNotSet(() => {\r\n if (this._domNode) {\r\n this._domNode.setClassName(this._visibleClassName);\r\n }\r\n }, 0);\r\n }\r\n _hide(withFadeAway) {\r\n this._revealTimer.cancel();\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = false;\r\n if (this._domNode) {\r\n this._domNode.setClassName(this._invisibleClassName + (withFadeAway ? ' fade' : ''));\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"VerticalScrollbar\": () => (/* binding */ VerticalScrollbar)\n/* harmony export */ });\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js\");\n/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js\");\n/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst scrollbarButtonUpIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.registerCodicon)('scrollbar-button-up', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.triangleUp);\r\nconst scrollbarButtonDownIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.registerCodicon)('scrollbar-button-down', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.triangleDown);\r\nclass VerticalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__.AbstractScrollbar {\r\n constructor(scrollable, options, host) {\r\n const scrollDimensions = scrollable.getScrollDimensions();\r\n const scrollPosition = scrollable.getCurrentScrollPosition();\r\n super({\r\n lazyRender: options.lazyRender,\r\n host: host,\r\n scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__.ScrollbarState((options.verticalHasArrows ? options.arrowSize : 0), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), \r\n // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom\r\n 0, scrollDimensions.height, scrollDimensions.scrollHeight, scrollPosition.scrollTop),\r\n visibility: options.vertical,\r\n extraScrollbarClassName: 'vertical',\r\n scrollable: scrollable,\r\n scrollByPage: options.scrollByPage\r\n });\r\n if (options.verticalHasArrows) {\r\n const arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__.ARROW_IMG_SIZE) / 2;\r\n const scrollbarDelta = (options.verticalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__.ARROW_IMG_SIZE) / 2;\r\n this._createArrow({\r\n className: 'scra',\r\n icon: scrollbarButtonUpIcon,\r\n top: arrowDelta,\r\n left: scrollbarDelta,\r\n bottom: undefined,\r\n right: undefined,\r\n bgWidth: options.verticalScrollbarSize,\r\n bgHeight: options.arrowSize,\r\n onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__.StandardWheelEvent(null, 0, 1)),\r\n });\r\n this._createArrow({\r\n className: 'scra',\r\n icon: scrollbarButtonDownIcon,\r\n top: undefined,\r\n left: scrollbarDelta,\r\n bottom: arrowDelta,\r\n right: undefined,\r\n bgWidth: options.verticalScrollbarSize,\r\n bgHeight: options.arrowSize,\r\n onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__.StandardWheelEvent(null, 0, -1)),\r\n });\r\n }\r\n this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, undefined);\r\n }\r\n _updateSlider(sliderSize, sliderPosition) {\r\n this.slider.setHeight(sliderSize);\r\n this.slider.setTop(sliderPosition);\r\n }\r\n _renderDomNode(largeSize, smallSize) {\r\n this.domNode.setWidth(smallSize);\r\n this.domNode.setHeight(largeSize);\r\n this.domNode.setRight(0);\r\n this.domNode.setTop(0);\r\n }\r\n onDidScroll(e) {\r\n this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender;\r\n this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender;\r\n this._shouldRender = this._onElementSize(e.height) || this._shouldRender;\r\n return this._shouldRender;\r\n }\r\n _mouseDownRelativePosition(offsetX, offsetY) {\r\n return offsetY;\r\n }\r\n _sliderMousePosition(e) {\r\n return e.posy;\r\n }\r\n _sliderOrthogonalMousePosition(e) {\r\n return e.posx;\r\n }\r\n _updateScrollbarSize(size) {\r\n this.slider.setWidth(size);\r\n }\r\n writeScrollPosition(target, scrollPosition) {\r\n target.scrollTop = scrollPosition;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Sizing\": () => (/* binding */ Sizing),\n/* harmony export */ \"SplitView\": () => (/* binding */ SplitView)\n/* harmony export */ });\n/* harmony import */ var _splitview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./splitview.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/numbers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/numbers.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _sash_sash_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../sash/sash.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js\");\n/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/scrollable.js */ \"./node_modules/monaco-editor/esm/vs/base/common/scrollable.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst defaultStyles = {\r\n separatorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_7__.Color.transparent\r\n};\r\nclass ViewItem {\r\n constructor(container, view, size, disposable) {\r\n this.container = container;\r\n this.view = view;\r\n this.disposable = disposable;\r\n this._cachedVisibleSize = undefined;\r\n if (typeof size === 'number') {\r\n this._size = size;\r\n this._cachedVisibleSize = undefined;\r\n container.classList.add('visible');\r\n }\r\n else {\r\n this._size = 0;\r\n this._cachedVisibleSize = size.cachedVisibleSize;\r\n }\r\n }\r\n set size(size) {\r\n this._size = size;\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n get visible() {\r\n return typeof this._cachedVisibleSize === 'undefined';\r\n }\r\n setVisible(visible, size) {\r\n if (visible === this.visible) {\r\n return;\r\n }\r\n if (visible) {\r\n this.size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize);\r\n this._cachedVisibleSize = undefined;\r\n }\r\n else {\r\n this._cachedVisibleSize = typeof size === 'number' ? size : this.size;\r\n this.size = 0;\r\n }\r\n this.container.classList.toggle('visible', visible);\r\n if (this.view.setVisible) {\r\n this.view.setVisible(visible);\r\n }\r\n }\r\n get minimumSize() { return this.visible ? this.view.minimumSize : 0; }\r\n get viewMinimumSize() { return this.view.minimumSize; }\r\n get maximumSize() { return this.visible ? this.view.maximumSize : 0; }\r\n get viewMaximumSize() { return this.view.maximumSize; }\r\n get priority() { return this.view.priority; }\r\n get snap() { return !!this.view.snap; }\r\n set enabled(enabled) {\r\n this.container.style.pointerEvents = enabled ? '' : 'none';\r\n }\r\n layout(offset, layoutContext) {\r\n this.layoutContainer(offset);\r\n this.view.layout(this.size, offset, layoutContext);\r\n }\r\n dispose() {\r\n this.disposable.dispose();\r\n return this.view;\r\n }\r\n}\r\nclass VerticalViewItem extends ViewItem {\r\n layoutContainer(offset) {\r\n this.container.style.top = `${offset}px`;\r\n this.container.style.height = `${this.size}px`;\r\n }\r\n}\r\nclass HorizontalViewItem extends ViewItem {\r\n layoutContainer(offset) {\r\n this.container.style.left = `${offset}px`;\r\n this.container.style.width = `${this.size}px`;\r\n }\r\n}\r\nvar State;\r\n(function (State) {\r\n State[State[\"Idle\"] = 0] = \"Idle\";\r\n State[State[\"Busy\"] = 1] = \"Busy\";\r\n})(State || (State = {}));\r\nvar Sizing;\r\n(function (Sizing) {\r\n Sizing.Distribute = { type: 'distribute' };\r\n function Split(index) { return { type: 'split', index }; }\r\n Sizing.Split = Split;\r\n function Invisible(cachedVisibleSize) { return { type: 'invisible', cachedVisibleSize }; }\r\n Sizing.Invisible = Invisible;\r\n})(Sizing || (Sizing = {}));\r\nclass SplitView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(container, options = {}) {\r\n var _a, _b;\r\n super();\r\n this.size = 0;\r\n this.contentSize = 0;\r\n this.proportions = undefined;\r\n this.viewItems = [];\r\n this.sashItems = [];\r\n this.state = State.Idle;\r\n this._onDidSashChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onDidSashChange = this._onDidSashChange.event;\r\n this._onDidSashReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this._startSnappingEnabled = true;\r\n this._endSnappingEnabled = true;\r\n this.orientation = _common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefined(options.orientation) ? 0 /* VERTICAL */ : options.orientation;\r\n this.inverseAltBehavior = !!options.inverseAltBehavior;\r\n this.proportionalLayout = _common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefined(options.proportionalLayout) ? true : !!options.proportionalLayout;\r\n this.getSashOrthogonalSize = options.getSashOrthogonalSize;\r\n this.el = document.createElement('div');\r\n this.el.classList.add('monaco-split-view2');\r\n this.el.classList.add(this.orientation === 0 /* VERTICAL */ ? 'vertical' : 'horizontal');\r\n container.appendChild(this.el);\r\n this.sashContainer = (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.append)(this.el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.$)('.sash-container'));\r\n this.viewContainer = (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.$)('.split-view-container');\r\n this.scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__.Scrollable(125, _dom_js__WEBPACK_IMPORTED_MODULE_9__.scheduleAtNextAnimationFrame);\r\n this.scrollableElement = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_10__.SmoothScrollableElement(this.viewContainer, {\r\n vertical: this.orientation === 0 /* VERTICAL */ ? ((_a = options.scrollbarVisibility) !== null && _a !== void 0 ? _a : 1 /* Auto */) : 2 /* Hidden */,\r\n horizontal: this.orientation === 1 /* HORIZONTAL */ ? ((_b = options.scrollbarVisibility) !== null && _b !== void 0 ? _b : 1 /* Auto */) : 2 /* Hidden */\r\n }, this.scrollable));\r\n this._register(this.scrollableElement.onScroll(e => {\r\n this.viewContainer.scrollTop = e.scrollTop;\r\n this.viewContainer.scrollLeft = e.scrollLeft;\r\n }));\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.append)(this.el, this.scrollableElement.getDomNode());\r\n this.style(options.styles || defaultStyles);\r\n // We have an existing set of view, add them now\r\n if (options.descriptor) {\r\n this.size = options.descriptor.size;\r\n options.descriptor.views.forEach((viewDescriptor, index) => {\r\n const sizing = _common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefined(viewDescriptor.visible) || viewDescriptor.visible ? viewDescriptor.size : { type: 'invisible', cachedVisibleSize: viewDescriptor.size };\r\n const view = viewDescriptor.view;\r\n this.doAddView(view, sizing, index, true);\r\n });\r\n // Initialize content size and proportions for first layout\r\n this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n this.saveProportions();\r\n }\r\n }\r\n get orthogonalStartSash() { return this._orthogonalStartSash; }\r\n set orthogonalStartSash(sash) {\r\n for (const sashItem of this.sashItems) {\r\n sashItem.sash.orthogonalStartSash = sash;\r\n }\r\n this._orthogonalStartSash = sash;\r\n }\r\n get orthogonalEndSash() { return this._orthogonalEndSash; }\r\n set orthogonalEndSash(sash) {\r\n for (const sashItem of this.sashItems) {\r\n sashItem.sash.orthogonalEndSash = sash;\r\n }\r\n this._orthogonalEndSash = sash;\r\n }\r\n get startSnappingEnabled() { return this._startSnappingEnabled; }\r\n set startSnappingEnabled(startSnappingEnabled) {\r\n if (this._startSnappingEnabled === startSnappingEnabled) {\r\n return;\r\n }\r\n this._startSnappingEnabled = startSnappingEnabled;\r\n this.updateSashEnablement();\r\n }\r\n get endSnappingEnabled() { return this._endSnappingEnabled; }\r\n set endSnappingEnabled(endSnappingEnabled) {\r\n if (this._endSnappingEnabled === endSnappingEnabled) {\r\n return;\r\n }\r\n this._endSnappingEnabled = endSnappingEnabled;\r\n this.updateSashEnablement();\r\n }\r\n style(styles) {\r\n if (styles.separatorBorder.isTransparent()) {\r\n this.el.classList.remove('separator-border');\r\n this.el.style.removeProperty('--separator-border');\r\n }\r\n else {\r\n this.el.classList.add('separator-border');\r\n this.el.style.setProperty('--separator-border', styles.separatorBorder.toString());\r\n }\r\n }\r\n addView(view, size, index = this.viewItems.length, skipLayout) {\r\n this.doAddView(view, size, index, skipLayout);\r\n }\r\n layout(size, layoutContext) {\r\n const previousSize = Math.max(this.size, this.contentSize);\r\n this.size = size;\r\n this.layoutContext = layoutContext;\r\n if (!this.proportions) {\r\n const indexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(this.viewItems.length);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n this.resize(this.viewItems.length - 1, size - previousSize, undefined, lowPriorityIndexes, highPriorityIndexes);\r\n }\r\n else {\r\n for (let i = 0; i < this.viewItems.length; i++) {\r\n const item = this.viewItems[i];\r\n item.size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(Math.round(this.proportions[i] * size), item.minimumSize, item.maximumSize);\r\n }\r\n }\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n saveProportions() {\r\n if (this.proportionalLayout && this.contentSize > 0) {\r\n this.proportions = this.viewItems.map(i => i.size / this.contentSize);\r\n }\r\n }\r\n onSashStart({ sash, start, alt }) {\r\n for (const item of this.viewItems) {\r\n item.enabled = false;\r\n }\r\n const index = this.sashItems.findIndex(item => item.sash === sash);\r\n // This way, we can press Alt while we resize a sash, macOS style!\r\n const disposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.combinedDisposable)((0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)), (0,_event_js__WEBPACK_IMPORTED_MODULE_8__.domEvent)(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false)));\r\n const resetSashDragState = (start, alt) => {\r\n const sizes = this.viewItems.map(i => i.size);\r\n let minDelta = Number.NEGATIVE_INFINITY;\r\n let maxDelta = Number.POSITIVE_INFINITY;\r\n if (this.inverseAltBehavior) {\r\n alt = !alt;\r\n }\r\n if (alt) {\r\n // When we're using the last sash with Alt, we're resizing\r\n // the view to the left/up, instead of right/down as usual\r\n // Thus, we must do the inverse of the usual\r\n const isLastSash = index === this.sashItems.length - 1;\r\n if (isLastSash) {\r\n const viewItem = this.viewItems[index];\r\n minDelta = (viewItem.minimumSize - viewItem.size) / 2;\r\n maxDelta = (viewItem.maximumSize - viewItem.size) / 2;\r\n }\r\n else {\r\n const viewItem = this.viewItems[index + 1];\r\n minDelta = (viewItem.size - viewItem.maximumSize) / 2;\r\n maxDelta = (viewItem.size - viewItem.minimumSize) / 2;\r\n }\r\n }\r\n let snapBefore;\r\n let snapAfter;\r\n if (!alt) {\r\n const upIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index, -1);\r\n const downIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index + 1, this.viewItems.length);\r\n const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0);\r\n const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].viewMaximumSize - sizes[i]), 0);\r\n const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0);\r\n const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0);\r\n const minDelta = Math.max(minDeltaUp, minDeltaDown);\r\n const maxDelta = Math.min(maxDeltaDown, maxDeltaUp);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n if (typeof snapBeforeIndex === 'number') {\r\n const viewItem = this.viewItems[snapBeforeIndex];\r\n const halfSize = Math.floor(viewItem.viewMinimumSize / 2);\r\n snapBefore = {\r\n index: snapBeforeIndex,\r\n limitDelta: viewItem.visible ? minDelta - halfSize : minDelta + halfSize,\r\n size: viewItem.size\r\n };\r\n }\r\n if (typeof snapAfterIndex === 'number') {\r\n const viewItem = this.viewItems[snapAfterIndex];\r\n const halfSize = Math.floor(viewItem.viewMinimumSize / 2);\r\n snapAfter = {\r\n index: snapAfterIndex,\r\n limitDelta: viewItem.visible ? maxDelta + halfSize : maxDelta - halfSize,\r\n size: viewItem.size\r\n };\r\n }\r\n }\r\n this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapBefore, snapAfter, disposable };\r\n };\r\n resetSashDragState(start, alt);\r\n }\r\n onSashChange({ current }) {\r\n const { index, start, sizes, alt, minDelta, maxDelta, snapBefore, snapAfter } = this.sashDragState;\r\n this.sashDragState.current = current;\r\n const delta = current - start;\r\n const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter);\r\n if (alt) {\r\n const isLastSash = index === this.sashItems.length - 1;\r\n const newSizes = this.viewItems.map(i => i.size);\r\n const viewItemIndex = isLastSash ? index : index + 1;\r\n const viewItem = this.viewItems[viewItemIndex];\r\n const newMinDelta = viewItem.size - viewItem.maximumSize;\r\n const newMaxDelta = viewItem.size - viewItem.minimumSize;\r\n const resizeIndex = isLastSash ? index - 1 : index + 1;\r\n this.resize(resizeIndex, -newDelta, newSizes, undefined, undefined, newMinDelta, newMaxDelta);\r\n }\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n onSashEnd(index) {\r\n this._onDidSashChange.fire(index);\r\n this.sashDragState.disposable.dispose();\r\n this.saveProportions();\r\n for (const item of this.viewItems) {\r\n item.enabled = true;\r\n }\r\n }\r\n onViewChange(item, size) {\r\n const index = this.viewItems.indexOf(item);\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return;\r\n }\r\n size = typeof size === 'number' ? size : item.size;\r\n size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(size, item.minimumSize, item.maximumSize);\r\n if (this.inverseAltBehavior && index > 0) {\r\n // In this case, we want the view to grow or shrink both sides equally\r\n // so we just resize the \"left\" side by half and let `resize` do the clamping magic\r\n this.resize(index - 1, Math.floor((item.size - size) / 2));\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n else {\r\n item.size = size;\r\n this.relayout([index], undefined);\r\n }\r\n }\r\n resizeView(index, size) {\r\n if (this.state !== State.Idle) {\r\n throw new Error('Cant modify splitview');\r\n }\r\n this.state = State.Busy;\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return;\r\n }\r\n const indexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(this.viewItems.length).filter(i => i !== index);\r\n const lowPriorityIndexes = [...indexes.filter(i => this.viewItems[i].priority === 1 /* Low */), index];\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n const item = this.viewItems[index];\r\n size = Math.round(size);\r\n size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(size, item.minimumSize, Math.min(item.maximumSize, this.size));\r\n item.size = size;\r\n this.relayout(lowPriorityIndexes, highPriorityIndexes);\r\n this.state = State.Idle;\r\n }\r\n distributeViewSizes() {\r\n const flexibleViewItems = [];\r\n let flexibleSize = 0;\r\n for (const item of this.viewItems) {\r\n if (item.maximumSize - item.minimumSize > 0) {\r\n flexibleViewItems.push(item);\r\n flexibleSize += item.size;\r\n }\r\n }\r\n const size = Math.floor(flexibleSize / flexibleViewItems.length);\r\n for (const item of flexibleViewItems) {\r\n item.size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(size, item.minimumSize, item.maximumSize);\r\n }\r\n const indexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(this.viewItems.length);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n this.relayout(lowPriorityIndexes, highPriorityIndexes);\r\n }\r\n getViewSize(index) {\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return -1;\r\n }\r\n return this.viewItems[index].size;\r\n }\r\n doAddView(view, size, index = this.viewItems.length, skipLayout) {\r\n if (this.state !== State.Idle) {\r\n throw new Error('Cant modify splitview');\r\n }\r\n this.state = State.Busy;\r\n // Add view\r\n const container = (0,_dom_js__WEBPACK_IMPORTED_MODULE_9__.$)('.split-view-view');\r\n if (index === this.viewItems.length) {\r\n this.viewContainer.appendChild(container);\r\n }\r\n else {\r\n this.viewContainer.insertBefore(container, this.viewContainer.children.item(index));\r\n }\r\n const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size));\r\n const containerDisposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => this.viewContainer.removeChild(container));\r\n const disposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.combinedDisposable)(onChangeDisposable, containerDisposable);\r\n let viewSize;\r\n if (typeof size === 'number') {\r\n viewSize = size;\r\n }\r\n else if (size.type === 'split') {\r\n viewSize = this.getViewSize(size.index) / 2;\r\n }\r\n else if (size.type === 'invisible') {\r\n viewSize = { cachedVisibleSize: size.cachedVisibleSize };\r\n }\r\n else {\r\n viewSize = view.minimumSize;\r\n }\r\n const item = this.orientation === 0 /* VERTICAL */\r\n ? new VerticalViewItem(container, view, viewSize, disposable)\r\n : new HorizontalViewItem(container, view, viewSize, disposable);\r\n this.viewItems.splice(index, 0, item);\r\n // Add sash\r\n if (this.viewItems.length > 1) {\r\n let opts = { orthogonalStartSash: this.orthogonalStartSash, orthogonalEndSash: this.orthogonalEndSash };\r\n const sash = this.orientation === 0 /* VERTICAL */\r\n ? new _sash_sash_js__WEBPACK_IMPORTED_MODULE_6__.Sash(this.sashContainer, { getHorizontalSashTop: s => this.getSashPosition(s), getHorizontalSashWidth: this.getSashOrthogonalSize }, Object.assign(Object.assign({}, opts), { orientation: 1 /* HORIZONTAL */ }))\r\n : new _sash_sash_js__WEBPACK_IMPORTED_MODULE_6__.Sash(this.sashContainer, { getVerticalSashLeft: s => this.getSashPosition(s), getVerticalSashHeight: this.getSashOrthogonalSize }, Object.assign(Object.assign({}, opts), { orientation: 0 /* VERTICAL */ }));\r\n const sashEventMapper = this.orientation === 0 /* VERTICAL */\r\n ? (e) => ({ sash, start: e.startY, current: e.currentY, alt: e.altKey })\r\n : (e) => ({ sash, start: e.startX, current: e.currentX, alt: e.altKey });\r\n const onStart = _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Event.map(sash.onDidStart, sashEventMapper);\r\n const onStartDisposable = onStart(this.onSashStart, this);\r\n const onChange = _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Event.map(sash.onDidChange, sashEventMapper);\r\n const onChangeDisposable = onChange(this.onSashChange, this);\r\n const onEnd = _common_event_js__WEBPACK_IMPORTED_MODULE_2__.Event.map(sash.onDidEnd, () => this.sashItems.findIndex(item => item.sash === sash));\r\n const onEndDisposable = onEnd(this.onSashEnd, this);\r\n const onDidResetDisposable = sash.onDidReset(() => {\r\n const index = this.sashItems.findIndex(item => item.sash === sash);\r\n const upIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index, -1);\r\n const downIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index + 1, this.viewItems.length);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) {\r\n return;\r\n }\r\n if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) {\r\n return;\r\n }\r\n this._onDidSashReset.fire(index);\r\n });\r\n const disposable = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.combinedDisposable)(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);\r\n const sashItem = { sash, disposable };\r\n this.sashItems.splice(index - 1, 0, sashItem);\r\n }\r\n container.appendChild(view.element);\r\n let highPriorityIndexes;\r\n if (typeof size !== 'number' && size.type === 'split') {\r\n highPriorityIndexes = [size.index];\r\n }\r\n if (!skipLayout) {\r\n this.relayout([index], highPriorityIndexes);\r\n }\r\n this.state = State.Idle;\r\n if (!skipLayout && typeof size !== 'number' && size.type === 'distribute') {\r\n this.distributeViewSizes();\r\n }\r\n }\r\n relayout(lowPriorityIndexes, highPriorityIndexes) {\r\n const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes);\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n this.saveProportions();\r\n }\r\n resize(index, delta, sizes = this.viewItems.map(i => i.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) {\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return 0;\r\n }\r\n const upIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index, -1);\r\n const downIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index + 1, this.viewItems.length);\r\n if (highPriorityIndexes) {\r\n for (const index of highPriorityIndexes) {\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToStart)(upIndexes, index);\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToStart)(downIndexes, index);\r\n }\r\n }\r\n if (lowPriorityIndexes) {\r\n for (const index of lowPriorityIndexes) {\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToEnd)(upIndexes, index);\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToEnd)(downIndexes, index);\r\n }\r\n }\r\n const upItems = upIndexes.map(i => this.viewItems[i]);\r\n const upSizes = upIndexes.map(i => sizes[i]);\r\n const downItems = downIndexes.map(i => this.viewItems[i]);\r\n const downSizes = downIndexes.map(i => sizes[i]);\r\n const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0);\r\n const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0);\r\n const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0);\r\n const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0);\r\n const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta);\r\n const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta);\r\n let snapped = false;\r\n if (snapBefore) {\r\n const snapView = this.viewItems[snapBefore.index];\r\n const visible = delta >= snapBefore.limitDelta;\r\n snapped = visible !== snapView.visible;\r\n snapView.setVisible(visible, snapBefore.size);\r\n }\r\n if (!snapped && snapAfter) {\r\n const snapView = this.viewItems[snapAfter.index];\r\n const visible = delta < snapAfter.limitDelta;\r\n snapped = visible !== snapView.visible;\r\n snapView.setVisible(visible, snapAfter.size);\r\n }\r\n if (snapped) {\r\n return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta);\r\n }\r\n delta = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(delta, minDelta, maxDelta);\r\n for (let i = 0, deltaUp = delta; i < upItems.length; i++) {\r\n const item = upItems[i];\r\n const size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(upSizes[i] + deltaUp, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - upSizes[i];\r\n deltaUp -= viewDelta;\r\n item.size = size;\r\n }\r\n for (let i = 0, deltaDown = delta; i < downItems.length; i++) {\r\n const item = downItems[i];\r\n const size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(downSizes[i] - deltaDown, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - downSizes[i];\r\n deltaDown += viewDelta;\r\n item.size = size;\r\n }\r\n return delta;\r\n }\r\n distributeEmptySpace(lowPriorityIndex) {\r\n const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n let emptyDelta = this.size - contentSize;\r\n const indexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(this.viewItems.length - 1, -1);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n for (const index of highPriorityIndexes) {\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToStart)(indexes, index);\r\n }\r\n for (const index of lowPriorityIndexes) {\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToEnd)(indexes, index);\r\n }\r\n if (typeof lowPriorityIndex === 'number') {\r\n (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.pushToEnd)(indexes, lowPriorityIndex);\r\n }\r\n for (let i = 0; emptyDelta !== 0 && i < indexes.length; i++) {\r\n const item = this.viewItems[indexes[i]];\r\n const size = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.clamp)(item.size + emptyDelta, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - item.size;\r\n emptyDelta -= viewDelta;\r\n item.size = size;\r\n }\r\n }\r\n layoutViews() {\r\n // Save new content size\r\n this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n // Layout views\r\n let offset = 0;\r\n for (const viewItem of this.viewItems) {\r\n viewItem.layout(offset, this.layoutContext);\r\n offset += viewItem.size;\r\n }\r\n // Layout sashes\r\n this.sashItems.forEach(item => item.sash.layout());\r\n this.updateSashEnablement();\r\n this.updateScrollableElement();\r\n }\r\n updateScrollableElement() {\r\n if (this.orientation === 0 /* VERTICAL */) {\r\n this.scrollableElement.setScrollDimensions({\r\n height: this.size,\r\n scrollHeight: this.contentSize\r\n });\r\n }\r\n else {\r\n this.scrollableElement.setScrollDimensions({\r\n width: this.size,\r\n scrollWidth: this.contentSize\r\n });\r\n }\r\n }\r\n updateSashEnablement() {\r\n let previous = false;\r\n const collapsesDown = this.viewItems.map(i => previous = (i.size - i.minimumSize > 0) || previous);\r\n previous = false;\r\n const expandsDown = this.viewItems.map(i => previous = (i.maximumSize - i.size > 0) || previous);\r\n const reverseViews = [...this.viewItems].reverse();\r\n previous = false;\r\n const collapsesUp = reverseViews.map(i => previous = (i.size - i.minimumSize > 0) || previous).reverse();\r\n previous = false;\r\n const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse();\r\n let position = 0;\r\n for (let index = 0; index < this.sashItems.length; index++) {\r\n const { sash } = this.sashItems[index];\r\n const viewItem = this.viewItems[index];\r\n position += viewItem.size;\r\n const min = !(collapsesDown[index] && expandsUp[index + 1]);\r\n const max = !(expandsDown[index] && collapsesUp[index + 1]);\r\n if (min && max) {\r\n const upIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index, -1);\r\n const downIndexes = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.range)(index + 1, this.viewItems.length);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n const snappedBefore = typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible;\r\n const snappedAfter = typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible;\r\n if (snappedBefore && collapsesUp[index] && (position > 0 || this.startSnappingEnabled)) {\r\n sash.state = 1 /* Minimum */;\r\n }\r\n else if (snappedAfter && collapsesDown[index] && (position < this.contentSize || this.endSnappingEnabled)) {\r\n sash.state = 2 /* Maximum */;\r\n }\r\n else {\r\n sash.state = 0 /* Disabled */;\r\n }\r\n }\r\n else if (min && !max) {\r\n sash.state = 1 /* Minimum */;\r\n }\r\n else if (!min && max) {\r\n sash.state = 2 /* Maximum */;\r\n }\r\n else {\r\n sash.state = 3 /* Enabled */;\r\n }\r\n }\r\n }\r\n getSashPosition(sash) {\r\n let position = 0;\r\n for (let i = 0; i < this.sashItems.length; i++) {\r\n position += this.viewItems[i].size;\r\n if (this.sashItems[i].sash === sash) {\r\n return position;\r\n }\r\n }\r\n return 0;\r\n }\r\n findFirstSnapIndex(indexes) {\r\n // visible views first\r\n for (const index of indexes) {\r\n const viewItem = this.viewItems[index];\r\n if (!viewItem.visible) {\r\n continue;\r\n }\r\n if (viewItem.snap) {\r\n return index;\r\n }\r\n }\r\n // then, hidden views\r\n for (const index of indexes) {\r\n const viewItem = this.viewItems[index];\r\n if (viewItem.visible && viewItem.maximumSize - viewItem.minimumSize > 0) {\r\n return undefined;\r\n }\r\n if (!viewItem.visible && viewItem.snap) {\r\n return index;\r\n }\r\n }\r\n return undefined;\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.viewItems.forEach(i => i.dispose());\r\n this.viewItems = [];\r\n this.sashItems.forEach(i => i.disposable.dispose());\r\n this.sashItems = [];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Table\": () => (/* binding */ Table)\n/* harmony export */ });\n/* harmony import */ var _table_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./table.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css\");\n/* harmony import */ var _list_listWidget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../list/listWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _splitview_splitview_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../splitview/splitview.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass TableListRenderer {\r\n constructor(columns, renderers, getColumnSize) {\r\n this.columns = columns;\r\n this.getColumnSize = getColumnSize;\r\n this.templateId = TableListRenderer.TemplateId;\r\n this.renderedTemplates = new Set();\r\n const rendererMap = new Map(renderers.map(r => [r.templateId, r]));\r\n this.renderers = [];\r\n for (const column of columns) {\r\n const renderer = rendererMap.get(column.templateId);\r\n if (!renderer) {\r\n throw new Error(`Table cell renderer for template id ${column.templateId} not found.`);\r\n }\r\n this.renderers.push(renderer);\r\n }\r\n }\r\n renderTemplate(container) {\r\n const rowContainer = (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.$)('.monaco-table-tr'));\r\n const cellContainers = [];\r\n const cellTemplateData = [];\r\n for (let i = 0; i < this.columns.length; i++) {\r\n const renderer = this.renderers[i];\r\n const cellContainer = (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.append)(rowContainer, (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.$)('.monaco-table-td', { 'data-col-index': i }));\r\n cellContainer.style.width = `${this.getColumnSize(i)}px`;\r\n cellContainers.push(cellContainer);\r\n cellTemplateData.push(renderer.renderTemplate(cellContainer));\r\n }\r\n const result = { container, cellContainers, cellTemplateData };\r\n this.renderedTemplates.add(result);\r\n return result;\r\n }\r\n renderElement(element, index, templateData, height) {\r\n for (let i = 0; i < this.columns.length; i++) {\r\n const column = this.columns[i];\r\n const cell = column.project(element);\r\n const renderer = this.renderers[i];\r\n renderer.renderElement(cell, index, templateData.cellTemplateData[i], height);\r\n }\r\n }\r\n disposeElement(element, index, templateData, height) {\r\n for (let i = 0; i < this.columns.length; i++) {\r\n const renderer = this.renderers[i];\r\n if (renderer.disposeElement) {\r\n const column = this.columns[i];\r\n const cell = column.project(element);\r\n renderer.disposeElement(cell, index, templateData.cellTemplateData[i], height);\r\n }\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n for (let i = 0; i < this.columns.length; i++) {\r\n const renderer = this.renderers[i];\r\n renderer.disposeTemplate(templateData.cellTemplateData[i]);\r\n }\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode)(templateData.container);\r\n this.renderedTemplates.delete(templateData);\r\n }\r\n layoutColumn(index, size) {\r\n for (const { cellContainers } of this.renderedTemplates) {\r\n cellContainers[index].style.width = `${size}px`;\r\n }\r\n }\r\n}\r\nTableListRenderer.TemplateId = 'row';\r\nfunction asListVirtualDelegate(delegate) {\r\n return {\r\n getHeight(row) { return delegate.getHeight(row); },\r\n getTemplateId() { return TableListRenderer.TemplateId; },\r\n };\r\n}\r\nclass ColumnHeader {\r\n constructor(column, index) {\r\n this.column = column;\r\n this.index = index;\r\n this._onDidLayout = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.onDidLayout = this._onDidLayout.event;\r\n this.element = (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.$)('.monaco-table-th', { 'data-col-index': index, title: column.tooltip }, column.label);\r\n }\r\n get minimumSize() { var _a; return (_a = this.column.minimumWidth) !== null && _a !== void 0 ? _a : 120; }\r\n get maximumSize() { var _a; return (_a = this.column.maximumWidth) !== null && _a !== void 0 ? _a : Number.POSITIVE_INFINITY; }\r\n get onDidChange() { var _a; return (_a = this.column.onDidChangeWidthConstraints) !== null && _a !== void 0 ? _a : _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.None; }\r\n layout(size) {\r\n this._onDidLayout.fire([this.index, size]);\r\n }\r\n}\r\nclass Table {\r\n constructor(user, container, virtualDelegate, columns, renderers, _options) {\r\n this.virtualDelegate = virtualDelegate;\r\n this.domId = `table_id_${++Table.InstanceCount}`;\r\n this.cachedHeight = 0;\r\n this.domNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.$)(`.monaco-table.${this.domId}`));\r\n const headers = columns.map((c, i) => new ColumnHeader(c, i));\r\n const descriptor = {\r\n size: headers.reduce((a, b) => a + b.column.weight, 0),\r\n views: headers.map(view => ({ size: view.column.weight, view }))\r\n };\r\n this.splitview = new _splitview_splitview_js__WEBPACK_IMPORTED_MODULE_3__.SplitView(this.domNode, {\r\n orientation: 1 /* HORIZONTAL */,\r\n scrollbarVisibility: 2 /* Hidden */,\r\n getSashOrthogonalSize: () => this.cachedHeight,\r\n descriptor\r\n });\r\n this.splitview.el.style.height = `${virtualDelegate.headerRowHeight}px`;\r\n this.splitview.el.style.lineHeight = `${virtualDelegate.headerRowHeight}px`;\r\n const renderer = new TableListRenderer(columns, renderers, i => this.splitview.getViewSize(i));\r\n this.list = new _list_listWidget_js__WEBPACK_IMPORTED_MODULE_1__.List(user, this.domNode, asListVirtualDelegate(virtualDelegate), [renderer], _options);\r\n this.columnLayoutDisposable = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.any(...headers.map(h => h.onDidLayout))(([index, size]) => renderer.layoutColumn(index, size));\r\n this.styleElement = (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.createStyleSheet)(this.domNode);\r\n this.style({});\r\n }\r\n get onDidChangeFocus() { return this.list.onDidChangeFocus; }\r\n get onDidChangeSelection() { return this.list.onDidChangeSelection; }\r\n get onMouseDblClick() { return this.list.onMouseDblClick; }\r\n get onPointer() { return this.list.onPointer; }\r\n get onDidFocus() { return this.list.onDidFocus; }\r\n get onDidDispose() { return this.list.onDidDispose; }\r\n updateOptions(options) {\r\n this.list.updateOptions(options);\r\n }\r\n splice(start, deleteCount, elements = []) {\r\n this.list.splice(start, deleteCount, elements);\r\n }\r\n getHTMLElement() {\r\n return this.domNode;\r\n }\r\n style(styles) {\r\n const content = [];\r\n content.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight + 1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`);\r\n this.styleElement.textContent = content.join('\\n');\r\n this.list.style(styles);\r\n }\r\n getSelectedElements() {\r\n return this.list.getSelectedElements();\r\n }\r\n setSelection(indexes, browserEvent) {\r\n this.list.setSelection(indexes, browserEvent);\r\n }\r\n getSelection() {\r\n return this.list.getSelection();\r\n }\r\n getFocus() {\r\n return this.list.getFocus();\r\n }\r\n dispose() {\r\n this.splitview.dispose();\r\n this.list.dispose();\r\n this.columnLayoutDisposable.dispose();\r\n }\r\n}\r\nTable.InstanceCount = 0;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComposedTreeDelegate\": () => (/* binding */ ComposedTreeDelegate),\n/* harmony export */ \"RenderIndentGuides\": () => (/* binding */ RenderIndentGuides),\n/* harmony export */ \"AbstractTree\": () => (/* binding */ AbstractTree)\n/* harmony export */ });\n/* harmony import */ var _media_tree_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/tree.css */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../list/listWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js\");\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js\");\n/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dnd.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dnd.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../list/listView.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./indexTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/numbers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/numbers.js\");\n/* harmony import */ var _common_collections_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/collections.js */ \"./node_modules/monaco-editor/esm/vs/base/common/collections.js\");\n/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./treeIcons.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_9__.ElementsDragAndDropData {\r\n constructor(data) {\r\n super(data.elements.map(node => node.element));\r\n this.data = data;\r\n }\r\n}\r\nfunction asTreeDragAndDropData(data) {\r\n if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_9__.ElementsDragAndDropData) {\r\n return new TreeElementsDragAndDropData(data);\r\n }\r\n return data;\r\n}\r\nclass TreeNodeListDragAndDrop {\r\n constructor(modelProvider, dnd) {\r\n this.modelProvider = modelProvider;\r\n this.dnd = dnd;\r\n this.autoExpandDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n getDragURI(node) {\r\n return this.dnd.getDragURI(node.element);\r\n }\r\n getDragLabel(nodes, originalEvent) {\r\n if (this.dnd.getDragLabel) {\r\n return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent);\r\n }\r\n return undefined;\r\n }\r\n onDragStart(data, originalEvent) {\r\n if (this.dnd.onDragStart) {\r\n this.dnd.onDragStart(asTreeDragAndDropData(data), originalEvent);\r\n }\r\n }\r\n onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) {\r\n const result = this.dnd.onDragOver(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent);\r\n const didChangeAutoExpandNode = this.autoExpandNode !== targetNode;\r\n if (didChangeAutoExpandNode) {\r\n this.autoExpandDisposable.dispose();\r\n this.autoExpandNode = targetNode;\r\n }\r\n if (typeof targetNode === 'undefined') {\r\n return result;\r\n }\r\n if (didChangeAutoExpandNode && typeof result !== 'boolean' && result.autoExpand) {\r\n this.autoExpandDisposable = (0,_common_async_js__WEBPACK_IMPORTED_MODULE_14__.disposableTimeout)(() => {\r\n const model = this.modelProvider();\r\n const ref = model.getNodeLocation(targetNode);\r\n if (model.isCollapsed(ref)) {\r\n model.setCollapsed(ref, false);\r\n }\r\n this.autoExpandNode = undefined;\r\n }, 500);\r\n }\r\n if (typeof result === 'boolean' || !result.accept || typeof result.bubble === 'undefined' || result.feedback) {\r\n if (!raw) {\r\n const accept = typeof result === 'boolean' ? result : result.accept;\r\n const effect = typeof result === 'boolean' ? undefined : result.effect;\r\n return { accept, effect, feedback: [targetIndex] };\r\n }\r\n return result;\r\n }\r\n if (result.bubble === 1 /* Up */) {\r\n const model = this.modelProvider();\r\n const ref = model.getNodeLocation(targetNode);\r\n const parentRef = model.getParentNodeLocation(ref);\r\n const parentNode = model.getNode(parentRef);\r\n const parentIndex = parentRef && model.getListIndex(parentRef);\r\n return this.onDragOver(data, parentNode, parentIndex, originalEvent, false);\r\n }\r\n const model = this.modelProvider();\r\n const ref = model.getNodeLocation(targetNode);\r\n const start = model.getListIndex(ref);\r\n const length = model.getListRenderCount(ref);\r\n return Object.assign(Object.assign({}, result), { feedback: (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__.range)(start, start + length) });\r\n }\r\n drop(data, targetNode, targetIndex, originalEvent) {\r\n this.autoExpandDisposable.dispose();\r\n this.autoExpandNode = undefined;\r\n this.dnd.drop(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent);\r\n }\r\n onDragEnd(originalEvent) {\r\n if (this.dnd.onDragEnd) {\r\n this.dnd.onDragEnd(originalEvent);\r\n }\r\n }\r\n}\r\nfunction asListOptions(modelProvider, options) {\r\n return options && Object.assign(Object.assign({}, options), { identityProvider: options.identityProvider && {\r\n getId(el) {\r\n return options.identityProvider.getId(el.element);\r\n }\r\n }, dnd: options.dnd && new TreeNodeListDragAndDrop(modelProvider, options.dnd), multipleSelectionController: options.multipleSelectionController && {\r\n isSelectionSingleChangeEvent(e) {\r\n return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element }));\r\n },\r\n isSelectionRangeChangeEvent(e) {\r\n return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element }));\r\n }\r\n }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getSetSize(node) {\r\n const model = modelProvider();\r\n const ref = model.getNodeLocation(node);\r\n const parentRef = model.getParentNodeLocation(ref);\r\n const parentNode = model.getNode(parentRef);\r\n return parentNode.visibleChildrenCount;\r\n },\r\n getPosInSet(node) {\r\n return node.visibleChildIndex + 1;\r\n }, isChecked: options.accessibilityProvider && options.accessibilityProvider.isChecked ? (node) => {\r\n return options.accessibilityProvider.isChecked(node.element);\r\n } : undefined, getRole: options.accessibilityProvider && options.accessibilityProvider.getRole ? (node) => {\r\n return options.accessibilityProvider.getRole(node.element);\r\n } : () => 'treeitem', getAriaLabel(e) {\r\n return options.accessibilityProvider.getAriaLabel(e.element);\r\n },\r\n getWidgetAriaLabel() {\r\n return options.accessibilityProvider.getWidgetAriaLabel();\r\n }, getWidgetRole: options.accessibilityProvider && options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel: options.accessibilityProvider && options.accessibilityProvider.getAriaLevel ? (node) => options.accessibilityProvider.getAriaLevel(node.element) : (node) => {\r\n return node.depth;\r\n }, getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => {\r\n return options.accessibilityProvider.getActiveDescendantId(node.element);\r\n }) }), keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(node) {\r\n return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(node.element);\r\n } }), enableKeyboardNavigation: options.simpleKeyboardNavigation });\r\n}\r\nclass ComposedTreeDelegate {\r\n constructor(delegate) {\r\n this.delegate = delegate;\r\n }\r\n getHeight(element) {\r\n return this.delegate.getHeight(element.element);\r\n }\r\n getTemplateId(element) {\r\n return this.delegate.getTemplateId(element.element);\r\n }\r\n hasDynamicHeight(element) {\r\n return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element);\r\n }\r\n setDynamicHeight(element, height) {\r\n if (this.delegate.setDynamicHeight) {\r\n this.delegate.setDynamicHeight(element.element, height);\r\n }\r\n }\r\n}\r\nvar RenderIndentGuides;\r\n(function (RenderIndentGuides) {\r\n RenderIndentGuides[\"None\"] = \"none\";\r\n RenderIndentGuides[\"OnHover\"] = \"onHover\";\r\n RenderIndentGuides[\"Always\"] = \"always\";\r\n})(RenderIndentGuides || (RenderIndentGuides = {}));\r\nclass EventCollection {\r\n constructor(onDidChange, _elements = []) {\r\n this._elements = _elements;\r\n this.onDidChange = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.forEach(onDidChange, elements => this._elements = elements);\r\n }\r\n get elements() {\r\n return this._elements;\r\n }\r\n}\r\nclass TreeRenderer {\r\n constructor(renderer, modelProvider, onDidChangeCollapseState, activeNodes, options = {}) {\r\n this.renderer = renderer;\r\n this.modelProvider = modelProvider;\r\n this.activeNodes = activeNodes;\r\n this.renderedElements = new Map();\r\n this.renderedNodes = new Map();\r\n this.indent = TreeRenderer.DefaultIndent;\r\n this.hideTwistiesOfChildlessElements = false;\r\n this.shouldRenderIndentGuides = false;\r\n this.renderedIndentGuides = new _common_collections_js__WEBPACK_IMPORTED_MODULE_17__.SetMap();\r\n this.activeIndentNodes = new Set();\r\n this.indentGuidesDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.templateId = renderer.templateId;\r\n this.updateOptions(options);\r\n _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(onDidChangeCollapseState, e => e.node)(this.onDidChangeNodeTwistieState, this, this.disposables);\r\n if (renderer.onDidChangeTwistieState) {\r\n renderer.onDidChangeTwistieState(this.onDidChangeTwistieState, this, this.disposables);\r\n }\r\n }\r\n updateOptions(options = {}) {\r\n if (typeof options.indent !== 'undefined') {\r\n this.indent = (0,_common_numbers_js__WEBPACK_IMPORTED_MODULE_16__.clamp)(options.indent, 0, 40);\r\n }\r\n if (typeof options.renderIndentGuides !== 'undefined') {\r\n const shouldRenderIndentGuides = options.renderIndentGuides !== RenderIndentGuides.None;\r\n if (shouldRenderIndentGuides !== this.shouldRenderIndentGuides) {\r\n this.shouldRenderIndentGuides = shouldRenderIndentGuides;\r\n this.indentGuidesDisposable.dispose();\r\n if (shouldRenderIndentGuides) {\r\n const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, disposables);\r\n this.indentGuidesDisposable = disposables;\r\n this._onDidChangeActiveNodes(this.activeNodes.elements);\r\n }\r\n }\r\n }\r\n if (typeof options.hideTwistiesOfChildlessElements !== 'undefined') {\r\n this.hideTwistiesOfChildlessElements = options.hideTwistiesOfChildlessElements;\r\n }\r\n }\r\n renderTemplate(container) {\r\n const el = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(container, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.monaco-tl-row'));\r\n const indent = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.monaco-tl-indent'));\r\n const twistie = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.monaco-tl-twistie'));\r\n const contents = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(el, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.monaco-tl-contents'));\r\n const templateData = this.renderer.renderTemplate(contents);\r\n return { container, indent, twistie, indentGuidesDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None, templateData };\r\n }\r\n renderElement(node, index, templateData, height) {\r\n if (typeof height === 'number') {\r\n this.renderedNodes.set(node, { templateData, height });\r\n this.renderedElements.set(node.element, node);\r\n }\r\n const indent = TreeRenderer.DefaultIndent + (node.depth - 1) * this.indent;\r\n templateData.twistie.style.paddingLeft = `${indent}px`;\r\n templateData.indent.style.width = `${indent + this.indent - 16}px`;\r\n this.renderTwistie(node, templateData);\r\n if (typeof height === 'number') {\r\n this.renderIndentGuides(node, templateData);\r\n }\r\n this.renderer.renderElement(node, index, templateData.templateData, height);\r\n }\r\n disposeElement(node, index, templateData, height) {\r\n templateData.indentGuidesDisposable.dispose();\r\n if (this.renderer.disposeElement) {\r\n this.renderer.disposeElement(node, index, templateData.templateData, height);\r\n }\r\n if (typeof height === 'number') {\r\n this.renderedNodes.delete(node);\r\n this.renderedElements.delete(node.element);\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n this.renderer.disposeTemplate(templateData.templateData);\r\n }\r\n onDidChangeTwistieState(element) {\r\n const node = this.renderedElements.get(element);\r\n if (!node) {\r\n return;\r\n }\r\n this.onDidChangeNodeTwistieState(node);\r\n }\r\n onDidChangeNodeTwistieState(node) {\r\n const data = this.renderedNodes.get(node);\r\n if (!data) {\r\n return;\r\n }\r\n this.renderTwistie(node, data.templateData);\r\n this._onDidChangeActiveNodes(this.activeNodes.elements);\r\n this.renderIndentGuides(node, data.templateData);\r\n }\r\n renderTwistie(node, templateData) {\r\n templateData.twistie.classList.remove(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeItemExpandedIcon.classNamesArray);\r\n let twistieRendered = false;\r\n if (this.renderer.renderTwistie) {\r\n twistieRendered = this.renderer.renderTwistie(node.element, templateData.twistie);\r\n }\r\n if (node.collapsible && (!this.hideTwistiesOfChildlessElements || node.visibleChildrenCount > 0)) {\r\n if (!twistieRendered) {\r\n templateData.twistie.classList.add(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeItemExpandedIcon.classNamesArray);\r\n }\r\n templateData.twistie.classList.add('collapsible');\r\n templateData.twistie.classList.toggle('collapsed', node.collapsed);\r\n }\r\n else {\r\n templateData.twistie.classList.remove('collapsible', 'collapsed');\r\n }\r\n if (node.collapsible) {\r\n templateData.container.setAttribute('aria-expanded', String(!node.collapsed));\r\n }\r\n else {\r\n templateData.container.removeAttribute('aria-expanded');\r\n }\r\n }\r\n renderIndentGuides(target, templateData) {\r\n (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.clearNode)(templateData.indent);\r\n templateData.indentGuidesDisposable.dispose();\r\n if (!this.shouldRenderIndentGuides) {\r\n return;\r\n }\r\n const disposableStore = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n const model = this.modelProvider();\r\n let node = target;\r\n while (true) {\r\n const ref = model.getNodeLocation(node);\r\n const parentRef = model.getParentNodeLocation(ref);\r\n if (!parentRef) {\r\n break;\r\n }\r\n const parent = model.getNode(parentRef);\r\n const guide = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.indent-guide', { style: `width: ${this.indent}px` });\r\n if (this.activeIndentNodes.has(parent)) {\r\n guide.classList.add('active');\r\n }\r\n if (templateData.indent.childElementCount === 0) {\r\n templateData.indent.appendChild(guide);\r\n }\r\n else {\r\n templateData.indent.insertBefore(guide, templateData.indent.firstElementChild);\r\n }\r\n this.renderedIndentGuides.add(parent, guide);\r\n disposableStore.add((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => this.renderedIndentGuides.delete(parent, guide)));\r\n node = parent;\r\n }\r\n templateData.indentGuidesDisposable = disposableStore;\r\n }\r\n _onDidChangeActiveNodes(nodes) {\r\n if (!this.shouldRenderIndentGuides) {\r\n return;\r\n }\r\n const set = new Set();\r\n const model = this.modelProvider();\r\n nodes.forEach(node => {\r\n const ref = model.getNodeLocation(node);\r\n try {\r\n const parentRef = model.getParentNodeLocation(ref);\r\n if (node.collapsible && node.children.length > 0 && !node.collapsed) {\r\n set.add(node);\r\n }\r\n else if (parentRef) {\r\n set.add(model.getNode(parentRef));\r\n }\r\n }\r\n catch (_a) {\r\n // noop\r\n }\r\n });\r\n this.activeIndentNodes.forEach(node => {\r\n if (!set.has(node)) {\r\n this.renderedIndentGuides.forEach(node, line => line.classList.remove('active'));\r\n }\r\n });\r\n set.forEach(node => {\r\n if (!this.activeIndentNodes.has(node)) {\r\n this.renderedIndentGuides.forEach(node, line => line.classList.add('active'));\r\n }\r\n });\r\n this.activeIndentNodes = set;\r\n }\r\n dispose() {\r\n this.renderedNodes.clear();\r\n this.renderedElements.clear();\r\n this.indentGuidesDisposable.dispose();\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.disposables);\r\n }\r\n}\r\nTreeRenderer.DefaultIndent = 8;\r\nclass TypeFilter {\r\n constructor(tree, keyboardNavigationLabelProvider, _filter) {\r\n this.tree = tree;\r\n this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider;\r\n this._filter = _filter;\r\n this._totalCount = 0;\r\n this._matchCount = 0;\r\n this._pattern = '';\r\n this._lowercasePattern = '';\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n tree.onWillRefilter(this.reset, this, this.disposables);\r\n }\r\n get totalCount() { return this._totalCount; }\r\n get matchCount() { return this._matchCount; }\r\n set pattern(pattern) {\r\n this._pattern = pattern;\r\n this._lowercasePattern = pattern.toLowerCase();\r\n }\r\n filter(element, parentVisibility) {\r\n if (this._filter) {\r\n const result = this._filter.filter(element, parentVisibility);\r\n if (this.tree.options.simpleKeyboardNavigation) {\r\n return result;\r\n }\r\n let visibility;\r\n if (typeof result === 'boolean') {\r\n visibility = result ? 1 /* Visible */ : 0 /* Hidden */;\r\n }\r\n else if ((0,_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__.isFilterResult)(result)) {\r\n visibility = (0,_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__.getVisibleState)(result.visibility);\r\n }\r\n else {\r\n visibility = result;\r\n }\r\n if (visibility === 0 /* Hidden */) {\r\n return false;\r\n }\r\n }\r\n this._totalCount++;\r\n if (this.tree.options.simpleKeyboardNavigation || !this._pattern) {\r\n this._matchCount++;\r\n return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__.FuzzyScore.Default, visibility: true };\r\n }\r\n const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(element);\r\n const labels = Array.isArray(label) ? label : [label];\r\n for (const l of labels) {\r\n const labelStr = l && l.toString();\r\n if (typeof labelStr === 'undefined') {\r\n return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__.FuzzyScore.Default, visibility: true };\r\n }\r\n const score = (0,_common_filters_js__WEBPACK_IMPORTED_MODULE_11__.fuzzyScore)(this._pattern, this._lowercasePattern, 0, labelStr, labelStr.toLowerCase(), 0, true);\r\n if (score) {\r\n this._matchCount++;\r\n return labels.length === 1 ?\r\n { data: score, visibility: true } :\r\n { data: { label: labelStr, score: score }, visibility: true };\r\n }\r\n }\r\n if (this.tree.options.filterOnType) {\r\n return 2 /* Recurse */;\r\n }\r\n else {\r\n return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__.FuzzyScore.Default, visibility: true };\r\n }\r\n }\r\n reset() {\r\n this._totalCount = 0;\r\n this._matchCount = 0;\r\n }\r\n dispose() {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.disposables);\r\n }\r\n}\r\nclass TypeFilterController {\r\n constructor(tree, model, view, filter, keyboardNavigationDelegate) {\r\n this.tree = tree;\r\n this.view = view;\r\n this.filter = filter;\r\n this.keyboardNavigationDelegate = keyboardNavigationDelegate;\r\n this._enabled = false;\r\n this._pattern = '';\r\n this._empty = false;\r\n this._onDidChangeEmptyState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.positionClassName = 'ne';\r\n this.automaticKeyboardNavigation = true;\r\n this.triggered = false;\r\n this._onDidChangePattern = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.domNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)(`.monaco-list-type-filter.${this.positionClassName}`);\r\n this.domNode.draggable = true;\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(this.domNode, 'dragstart')(this.onDragStart, this, this.disposables);\r\n this.messageDomNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(view.getHTMLElement(), (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)(`.monaco-list-type-filter-message`));\r\n this.labelDomNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(this.domNode, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.label'));\r\n const controls = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(this.domNode, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.controls'));\r\n this._filterOnType = !!tree.options.filterOnType;\r\n this.filterOnTypeDomNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(controls, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('input.filter'));\r\n this.filterOnTypeDomNode.type = 'checkbox';\r\n this.filterOnTypeDomNode.checked = this._filterOnType;\r\n this.filterOnTypeDomNode.tabIndex = -1;\r\n this.updateFilterOnTypeTitleAndIcon();\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(this.filterOnTypeDomNode, 'input')(this.onDidChangeFilterOnType, this, this.disposables);\r\n this.clearDomNode = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(controls, (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('button.clear' + _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeFilterClearIcon.cssSelector));\r\n this.clearDomNode.tabIndex = -1;\r\n this.clearDomNode.title = (0,_nls_js__WEBPACK_IMPORTED_MODULE_13__.localize)('clear', \"Clear\");\r\n this.keyboardNavigationEventFilter = tree.options.keyboardNavigationEventFilter;\r\n model.onDidSplice(this.onDidSpliceModel, this, this.disposables);\r\n this.updateOptions(tree.options);\r\n }\r\n get enabled() { return this._enabled; }\r\n get pattern() { return this._pattern; }\r\n get filterOnType() { return this._filterOnType; }\r\n updateOptions(options) {\r\n if (options.simpleKeyboardNavigation) {\r\n this.disable();\r\n }\r\n else {\r\n this.enable();\r\n }\r\n if (typeof options.filterOnType !== 'undefined') {\r\n this._filterOnType = !!options.filterOnType;\r\n this.filterOnTypeDomNode.checked = this._filterOnType;\r\n }\r\n if (typeof options.automaticKeyboardNavigation !== 'undefined') {\r\n this.automaticKeyboardNavigation = options.automaticKeyboardNavigation;\r\n }\r\n this.tree.refilter();\r\n this.render();\r\n if (!this.automaticKeyboardNavigation) {\r\n this.onEventOrInput('');\r\n }\r\n }\r\n enable() {\r\n if (this._enabled) {\r\n return;\r\n }\r\n const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.chain((0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(this.view.getHTMLElement(), 'keydown'))\r\n .filter(e => !(0,_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isInputElement)(e.target) || e.target === this.filterOnTypeDomNode)\r\n .filter(e => e.key !== 'Dead' && !/^Media/.test(e.key))\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e))\r\n .filter(this.keyboardNavigationEventFilter || (() => true))\r\n .filter(() => this.automaticKeyboardNavigation || this.triggered)\r\n .filter(e => (this.keyboardNavigationDelegate.mightProducePrintableCharacter(e) && !(e.keyCode === 18 /* DownArrow */ || e.keyCode === 16 /* UpArrow */ || e.keyCode === 15 /* LeftArrow */ || e.keyCode === 17 /* RightArrow */)) || ((this.pattern.length > 0 || this.triggered) && ((e.keyCode === 9 /* Escape */ || e.keyCode === 1 /* Backspace */) && !e.altKey && !e.ctrlKey && !e.metaKey) || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__.isMacintosh ? (e.altKey && !e.metaKey) : e.ctrlKey) && !e.shiftKey)))\r\n .forEach(e => { e.stopPropagation(); e.preventDefault(); })\r\n .event;\r\n const onClear = (0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(this.clearDomNode, 'click');\r\n _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.any(onKeyDown, onClear))\r\n .event(this.onEventOrInput, this, this.enabledDisposables);\r\n this.filter.pattern = '';\r\n this.tree.refilter();\r\n this.render();\r\n this._enabled = true;\r\n this.triggered = false;\r\n }\r\n disable() {\r\n if (!this._enabled) {\r\n return;\r\n }\r\n this.domNode.remove();\r\n this.enabledDisposables.clear();\r\n this.tree.refilter();\r\n this.render();\r\n this._enabled = false;\r\n this.triggered = false;\r\n }\r\n onEventOrInput(e) {\r\n if (typeof e === 'string') {\r\n this.onInput(e);\r\n }\r\n else if (e instanceof MouseEvent || e.keyCode === 9 /* Escape */ || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__.isMacintosh ? e.altKey : e.ctrlKey))) {\r\n this.onInput('');\r\n }\r\n else if (e.keyCode === 1 /* Backspace */) {\r\n this.onInput(this.pattern.length === 0 ? '' : this.pattern.substr(0, this.pattern.length - 1));\r\n }\r\n else {\r\n this.onInput(this.pattern + e.browserEvent.key);\r\n }\r\n }\r\n onInput(pattern) {\r\n const container = this.view.getHTMLElement();\r\n if (pattern && !this.domNode.parentElement) {\r\n container.append(this.domNode);\r\n }\r\n else if (!pattern && this.domNode.parentElement) {\r\n this.domNode.remove();\r\n this.tree.domFocus();\r\n }\r\n this._pattern = pattern;\r\n this._onDidChangePattern.fire(pattern);\r\n this.filter.pattern = pattern;\r\n this.tree.refilter();\r\n if (pattern) {\r\n this.tree.focusNext(0, true, undefined, node => !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__.FuzzyScore.isDefault(node.filterData));\r\n }\r\n const focus = this.tree.getFocus();\r\n if (focus.length > 0) {\r\n const element = focus[0];\r\n if (this.tree.getRelativeTop(element) === null) {\r\n this.tree.reveal(element, 0.5);\r\n }\r\n }\r\n this.render();\r\n if (!pattern) {\r\n this.triggered = false;\r\n }\r\n }\r\n onDragStart() {\r\n const container = this.view.getHTMLElement();\r\n const { left } = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.getDomNodePagePosition)(container);\r\n const containerWidth = container.clientWidth;\r\n const midContainerWidth = containerWidth / 2;\r\n const width = this.domNode.clientWidth;\r\n const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n let positionClassName = this.positionClassName;\r\n const updatePosition = () => {\r\n switch (positionClassName) {\r\n case 'nw':\r\n this.domNode.style.top = `4px`;\r\n this.domNode.style.left = `4px`;\r\n break;\r\n case 'ne':\r\n this.domNode.style.top = `4px`;\r\n this.domNode.style.left = `${containerWidth - width - 6}px`;\r\n break;\r\n }\r\n };\r\n const onDragOver = (event) => {\r\n event.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)\r\n const x = event.clientX - left;\r\n if (event.dataTransfer) {\r\n event.dataTransfer.dropEffect = 'none';\r\n }\r\n if (x < midContainerWidth) {\r\n positionClassName = 'nw';\r\n }\r\n else {\r\n positionClassName = 'ne';\r\n }\r\n updatePosition();\r\n };\r\n const onDragEnd = () => {\r\n this.positionClassName = positionClassName;\r\n this.domNode.className = `monaco-list-type-filter ${this.positionClassName}`;\r\n this.domNode.style.top = '';\r\n this.domNode.style.left = '';\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(disposables);\r\n };\r\n updatePosition();\r\n this.domNode.classList.remove(positionClassName);\r\n this.domNode.classList.add('dragging');\r\n disposables.add((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => this.domNode.classList.remove('dragging')));\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(document, 'dragover')(onDragOver, null, disposables);\r\n (0,_event_js__WEBPACK_IMPORTED_MODULE_10__.domEvent)(this.domNode, 'dragend')(onDragEnd, null, disposables);\r\n _dnd_js__WEBPACK_IMPORTED_MODULE_7__.StaticDND.CurrentDragAndDropData = new _dnd_js__WEBPACK_IMPORTED_MODULE_7__.DragAndDropData('vscode-ui');\r\n disposables.add((0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => _dnd_js__WEBPACK_IMPORTED_MODULE_7__.StaticDND.CurrentDragAndDropData = undefined));\r\n }\r\n onDidSpliceModel() {\r\n if (!this._enabled || this.pattern.length === 0) {\r\n return;\r\n }\r\n this.tree.refilter();\r\n this.render();\r\n }\r\n onDidChangeFilterOnType() {\r\n this.tree.updateOptions({ filterOnType: this.filterOnTypeDomNode.checked });\r\n this.tree.refilter();\r\n this.tree.domFocus();\r\n this.render();\r\n this.updateFilterOnTypeTitleAndIcon();\r\n }\r\n updateFilterOnTypeTitleAndIcon() {\r\n if (this.filterOnType) {\r\n this.filterOnTypeDomNode.classList.remove(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeFilterOnTypeOffIcon.classNamesArray);\r\n this.filterOnTypeDomNode.classList.add(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeFilterOnTypeOnIcon.classNamesArray);\r\n this.filterOnTypeDomNode.title = (0,_nls_js__WEBPACK_IMPORTED_MODULE_13__.localize)('disable filter on type', \"Disable Filter on Type\");\r\n }\r\n else {\r\n this.filterOnTypeDomNode.classList.remove(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeFilterOnTypeOnIcon.classNamesArray);\r\n this.filterOnTypeDomNode.classList.add(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_18__.treeFilterOnTypeOffIcon.classNamesArray);\r\n this.filterOnTypeDomNode.title = (0,_nls_js__WEBPACK_IMPORTED_MODULE_13__.localize)('enable filter on type', \"Enable Filter on Type\");\r\n }\r\n }\r\n render() {\r\n const noMatches = this.filter.totalCount > 0 && this.filter.matchCount === 0;\r\n if (this.pattern && this.tree.options.filterOnType && noMatches) {\r\n this.messageDomNode.textContent = (0,_nls_js__WEBPACK_IMPORTED_MODULE_13__.localize)('empty', \"No elements found\");\r\n this._empty = true;\r\n }\r\n else {\r\n this.messageDomNode.innerText = '';\r\n this._empty = false;\r\n }\r\n this.domNode.classList.toggle('no-matches', noMatches);\r\n this.domNode.title = (0,_nls_js__WEBPACK_IMPORTED_MODULE_13__.localize)('found', \"Matched {0} out of {1} elements\", this.filter.matchCount, this.filter.totalCount);\r\n this.labelDomNode.textContent = this.pattern.length > 16 ? '…' + this.pattern.substr(this.pattern.length - 16) : this.pattern;\r\n this._onDidChangeEmptyState.fire(this._empty);\r\n }\r\n shouldAllowFocus(node) {\r\n if (!this.enabled || !this.pattern || this.filterOnType) {\r\n return true;\r\n }\r\n if (this.filter.totalCount > 0 && this.filter.matchCount <= 1) {\r\n return true;\r\n }\r\n return !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__.FuzzyScore.isDefault(node.filterData);\r\n }\r\n dispose() {\r\n if (this._enabled) {\r\n this.domNode.remove();\r\n this.enabledDisposables.dispose();\r\n this._enabled = false;\r\n this.triggered = false;\r\n }\r\n this._onDidChangePattern.dispose();\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.disposables);\r\n }\r\n}\r\nfunction asTreeMouseEvent(event) {\r\n let target = _tree_js__WEBPACK_IMPORTED_MODULE_6__.TreeMouseEventTarget.Unknown;\r\n if ((0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.hasParentWithClass)(event.browserEvent.target, 'monaco-tl-twistie', 'monaco-tl-row')) {\r\n target = _tree_js__WEBPACK_IMPORTED_MODULE_6__.TreeMouseEventTarget.Twistie;\r\n }\r\n else if ((0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.hasParentWithClass)(event.browserEvent.target, 'monaco-tl-contents', 'monaco-tl-row')) {\r\n target = _tree_js__WEBPACK_IMPORTED_MODULE_6__.TreeMouseEventTarget.Element;\r\n }\r\n return {\r\n browserEvent: event.browserEvent,\r\n element: event.element ? event.element.element : null,\r\n target\r\n };\r\n}\r\nfunction dfs(node, fn) {\r\n fn(node);\r\n node.children.forEach(child => dfs(child, fn));\r\n}\r\n/**\r\n * The trait concept needs to exist at the tree level, because collapsed\r\n * tree nodes will not be known by the list.\r\n */\r\nclass Trait {\r\n constructor(identityProvider) {\r\n this.identityProvider = identityProvider;\r\n this.nodes = [];\r\n this._onDidChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n }\r\n get nodeSet() {\r\n if (!this._nodeSet) {\r\n this._nodeSet = this.createNodeSet();\r\n }\r\n return this._nodeSet;\r\n }\r\n set(nodes, browserEvent) {\r\n var _a;\r\n if (!((_a = browserEvent) === null || _a === void 0 ? void 0 : _a.__forceEvent) && (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__.equals)(this.nodes, nodes)) {\r\n return;\r\n }\r\n this._set(nodes, false, browserEvent);\r\n }\r\n _set(nodes, silent, browserEvent) {\r\n this.nodes = [...nodes];\r\n this.elements = undefined;\r\n this._nodeSet = undefined;\r\n if (!silent) {\r\n const that = this;\r\n this._onDidChange.fire({ get elements() { return that.get(); }, browserEvent });\r\n }\r\n }\r\n get() {\r\n if (!this.elements) {\r\n this.elements = this.nodes.map(node => node.element);\r\n }\r\n return [...this.elements];\r\n }\r\n getNodes() {\r\n return this.nodes;\r\n }\r\n has(node) {\r\n return this.nodeSet.has(node);\r\n }\r\n onDidModelSplice({ insertedNodes, deletedNodes }) {\r\n if (!this.identityProvider) {\r\n const set = this.createNodeSet();\r\n const visit = (node) => set.delete(node);\r\n deletedNodes.forEach(node => dfs(node, visit));\r\n this.set([...set.values()]);\r\n return;\r\n }\r\n const deletedNodesIdSet = new Set();\r\n const deletedNodesVisitor = (node) => deletedNodesIdSet.add(this.identityProvider.getId(node.element).toString());\r\n deletedNodes.forEach(node => dfs(node, deletedNodesVisitor));\r\n const insertedNodesMap = new Map();\r\n const insertedNodesVisitor = (node) => insertedNodesMap.set(this.identityProvider.getId(node.element).toString(), node);\r\n insertedNodes.forEach(node => dfs(node, insertedNodesVisitor));\r\n const nodes = [];\r\n for (const node of this.nodes) {\r\n const id = this.identityProvider.getId(node.element).toString();\r\n const wasDeleted = deletedNodesIdSet.has(id);\r\n if (!wasDeleted) {\r\n nodes.push(node);\r\n }\r\n else {\r\n const insertedNode = insertedNodesMap.get(id);\r\n if (insertedNode) {\r\n nodes.push(insertedNode);\r\n }\r\n }\r\n }\r\n this._set(nodes, true);\r\n }\r\n createNodeSet() {\r\n const set = new Set();\r\n for (const node of this.nodes) {\r\n set.add(node);\r\n }\r\n return set;\r\n }\r\n}\r\nclass TreeNodeListMouseController extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.MouseController {\r\n constructor(list, tree) {\r\n super(list);\r\n this.tree = tree;\r\n }\r\n onViewPointer(e) {\r\n if ((0,_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isInputElement)(e.browserEvent.target) || (0,_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isMonacoEditor)(e.browserEvent.target)) {\r\n return;\r\n }\r\n const node = e.element;\r\n if (!node) {\r\n return super.onViewPointer(e);\r\n }\r\n if (this.isSelectionRangeChangeEvent(e) || this.isSelectionSingleChangeEvent(e)) {\r\n return super.onViewPointer(e);\r\n }\r\n const target = e.browserEvent.target;\r\n const onTwistie = target.classList.contains('monaco-tl-twistie')\r\n || (target.classList.contains('monaco-icon-label') && target.classList.contains('folder-icon') && e.browserEvent.offsetX < 16);\r\n let expandOnlyOnTwistieClick = false;\r\n if (typeof this.tree.expandOnlyOnTwistieClick === 'function') {\r\n expandOnlyOnTwistieClick = this.tree.expandOnlyOnTwistieClick(node.element);\r\n }\r\n else {\r\n expandOnlyOnTwistieClick = !!this.tree.expandOnlyOnTwistieClick;\r\n }\r\n if (expandOnlyOnTwistieClick && !onTwistie && e.browserEvent.detail !== 2) {\r\n return super.onViewPointer(e);\r\n }\r\n if (!this.tree.expandOnDoubleClick && e.browserEvent.detail === 2) {\r\n return super.onViewPointer(e);\r\n }\r\n if (node.collapsible) {\r\n const model = this.tree.model; // internal\r\n const location = model.getNodeLocation(node);\r\n const recursive = e.browserEvent.altKey;\r\n this.tree.setFocus([location]);\r\n model.setCollapsed(location, undefined, recursive);\r\n if (expandOnlyOnTwistieClick && onTwistie) {\r\n return;\r\n }\r\n }\r\n super.onViewPointer(e);\r\n }\r\n onDoubleClick(e) {\r\n const onTwistie = e.browserEvent.target.classList.contains('monaco-tl-twistie');\r\n if (onTwistie || !this.tree.expandOnDoubleClick) {\r\n return;\r\n }\r\n super.onDoubleClick(e);\r\n }\r\n}\r\n/**\r\n * We use this List subclass to restore selection and focus as nodes\r\n * get rendered in the list, possibly due to a node expand() call.\r\n */\r\nclass TreeNodeList extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.List {\r\n constructor(user, container, virtualDelegate, renderers, focusTrait, selectionTrait, options) {\r\n super(user, container, virtualDelegate, renderers, options);\r\n this.focusTrait = focusTrait;\r\n this.selectionTrait = selectionTrait;\r\n }\r\n createMouseController(options) {\r\n return new TreeNodeListMouseController(this, options.tree);\r\n }\r\n splice(start, deleteCount, elements = []) {\r\n super.splice(start, deleteCount, elements);\r\n if (elements.length === 0) {\r\n return;\r\n }\r\n const additionalFocus = [];\r\n const additionalSelection = [];\r\n elements.forEach((node, index) => {\r\n if (this.focusTrait.has(node)) {\r\n additionalFocus.push(start + index);\r\n }\r\n if (this.selectionTrait.has(node)) {\r\n additionalSelection.push(start + index);\r\n }\r\n });\r\n if (additionalFocus.length > 0) {\r\n super.setFocus((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__.distinctES6)([...super.getFocus(), ...additionalFocus]));\r\n }\r\n if (additionalSelection.length > 0) {\r\n super.setSelection((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__.distinctES6)([...super.getSelection(), ...additionalSelection]));\r\n }\r\n }\r\n setFocus(indexes, browserEvent, fromAPI = false) {\r\n super.setFocus(indexes, browserEvent);\r\n if (!fromAPI) {\r\n this.focusTrait.set(indexes.map(i => this.element(i)), browserEvent);\r\n }\r\n }\r\n setSelection(indexes, browserEvent, fromAPI = false) {\r\n super.setSelection(indexes, browserEvent);\r\n if (!fromAPI) {\r\n this.selectionTrait.set(indexes.map(i => this.element(i)), browserEvent);\r\n }\r\n }\r\n}\r\nclass AbstractTree {\r\n constructor(user, container, delegate, renderers, _options = {}) {\r\n this._options = _options;\r\n this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.EventBufferer();\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._onWillRefilter = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.onWillRefilter = this._onWillRefilter.event;\r\n this._onDidUpdateOptions = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n const treeDelegate = new ComposedTreeDelegate(delegate);\r\n const onDidChangeCollapseStateRelay = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Relay();\r\n const onDidChangeActiveNodes = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Relay();\r\n const activeNodes = new EventCollection(onDidChangeActiveNodes.event);\r\n this.renderers = renderers.map(r => new TreeRenderer(r, () => this.model, onDidChangeCollapseStateRelay.event, activeNodes, _options));\r\n for (let r of this.renderers) {\r\n this.disposables.add(r);\r\n }\r\n let filter;\r\n if (_options.keyboardNavigationLabelProvider) {\r\n filter = new TypeFilter(this, _options.keyboardNavigationLabelProvider, _options.filter);\r\n _options = Object.assign(Object.assign({}, _options), { filter: filter }); // TODO need typescript help here\r\n this.disposables.add(filter);\r\n }\r\n this.focus = new Trait(_options.identityProvider);\r\n this.selection = new Trait(_options.identityProvider);\r\n this.view = new TreeNodeList(user, container, treeDelegate, this.renderers, this.focus, this.selection, Object.assign(Object.assign({}, asListOptions(() => this.model, _options)), { tree: this }));\r\n this.model = this.createModel(user, this.view, _options);\r\n onDidChangeCollapseStateRelay.input = this.model.onDidChangeCollapseState;\r\n const onDidModelSplice = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.forEach(this.model.onDidSplice, e => {\r\n this.eventBufferer.bufferEvents(() => {\r\n this.focus.onDidModelSplice(e);\r\n this.selection.onDidModelSplice(e);\r\n });\r\n });\r\n // Make sure the `forEach` always runs\r\n onDidModelSplice(() => null, null, this.disposables);\r\n // Active nodes can change when the model changes or when focus or selection change.\r\n // We debounce it with 0 delay since these events may fire in the same stack and we only\r\n // want to run this once. It also doesn't matter if it runs on the next tick since it's only\r\n // a nice to have UI feature.\r\n onDidChangeActiveNodes.input = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.any(onDidModelSplice, this.focus.onDidChange, this.selection.onDidChange))\r\n .debounce(() => null, 0)\r\n .map(() => {\r\n const set = new Set();\r\n for (const node of this.focus.getNodes()) {\r\n set.add(node);\r\n }\r\n for (const node of this.selection.getNodes()) {\r\n set.add(node);\r\n }\r\n return [...set.values()];\r\n }).event;\r\n if (_options.keyboardSupport !== false) {\r\n const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.chain(this.view.onKeyDown)\r\n .filter(e => !(0,_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isInputElement)(e.target))\r\n .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__.StandardKeyboardEvent(e));\r\n onKeyDown.filter(e => e.keyCode === 15 /* LeftArrow */).on(this.onLeftArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 17 /* RightArrow */).on(this.onRightArrow, this, this.disposables);\r\n onKeyDown.filter(e => e.keyCode === 10 /* Space */).on(this.onSpace, this, this.disposables);\r\n }\r\n if (_options.keyboardNavigationLabelProvider) {\r\n const delegate = _options.keyboardNavigationDelegate || _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.DefaultKeyboardNavigationDelegate;\r\n this.typeFilterController = new TypeFilterController(this, this.model, this.view, filter, delegate);\r\n this.focusNavigationFilter = node => this.typeFilterController.shouldAllowFocus(node);\r\n this.disposables.add(this.typeFilterController);\r\n }\r\n this.styleElement = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.createStyleSheet)(this.view.getHTMLElement());\r\n this.getHTMLElement().classList.toggle('always', this._options.renderIndentGuides === RenderIndentGuides.Always);\r\n }\r\n get onDidChangeFocus() { return this.eventBufferer.wrapEvent(this.focus.onDidChange); }\r\n get onDidChangeSelection() { return this.eventBufferer.wrapEvent(this.selection.onDidChange); }\r\n get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.view.onMouseDblClick, asTreeMouseEvent); }\r\n get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.view.onPointer, asTreeMouseEvent); }\r\n get onDidFocus() { return this.view.onDidFocus; }\r\n get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; }\r\n get expandOnDoubleClick() { return typeof this._options.expandOnDoubleClick === 'undefined' ? true : this._options.expandOnDoubleClick; }\r\n get expandOnlyOnTwistieClick() { return typeof this._options.expandOnlyOnTwistieClick === 'undefined' ? true : this._options.expandOnlyOnTwistieClick; }\r\n get onDidDispose() { return this.view.onDidDispose; }\r\n updateOptions(optionsUpdate = {}) {\r\n this._options = Object.assign(Object.assign({}, this._options), optionsUpdate);\r\n for (const renderer of this.renderers) {\r\n renderer.updateOptions(optionsUpdate);\r\n }\r\n this.view.updateOptions({\r\n enableKeyboardNavigation: this._options.simpleKeyboardNavigation,\r\n automaticKeyboardNavigation: this._options.automaticKeyboardNavigation,\r\n smoothScrolling: this._options.smoothScrolling,\r\n horizontalScrolling: this._options.horizontalScrolling\r\n });\r\n if (this.typeFilterController) {\r\n this.typeFilterController.updateOptions(this._options);\r\n }\r\n this._onDidUpdateOptions.fire(this._options);\r\n this.getHTMLElement().classList.toggle('always', this._options.renderIndentGuides === RenderIndentGuides.Always);\r\n }\r\n get options() {\r\n return this._options;\r\n }\r\n // Widget\r\n getHTMLElement() {\r\n return this.view.getHTMLElement();\r\n }\r\n get scrollTop() {\r\n return this.view.scrollTop;\r\n }\r\n set scrollTop(scrollTop) {\r\n this.view.scrollTop = scrollTop;\r\n }\r\n domFocus() {\r\n this.view.domFocus();\r\n }\r\n layout(height, width) {\r\n this.view.layout(height, width);\r\n }\r\n style(styles) {\r\n const suffix = `.${this.view.domId}`;\r\n const content = [];\r\n if (styles.treeIndentGuidesStroke) {\r\n content.push(`.monaco-list${suffix}:hover .monaco-tl-indent > .indent-guide, .monaco-list${suffix}.always .monaco-tl-indent > .indent-guide { border-color: ${styles.treeIndentGuidesStroke.transparent(0.4)}; }`);\r\n content.push(`.monaco-list${suffix} .monaco-tl-indent > .indent-guide.active { border-color: ${styles.treeIndentGuidesStroke}; }`);\r\n }\r\n this.styleElement.textContent = content.join('\\n');\r\n this.view.style(styles);\r\n }\r\n collapse(location, recursive = false) {\r\n return this.model.setCollapsed(location, true, recursive);\r\n }\r\n expand(location, recursive = false) {\r\n return this.model.setCollapsed(location, false, recursive);\r\n }\r\n isCollapsible(location) {\r\n return this.model.isCollapsible(location);\r\n }\r\n setCollapsible(location, collapsible) {\r\n return this.model.setCollapsible(location, collapsible);\r\n }\r\n isCollapsed(location) {\r\n return this.model.isCollapsed(location);\r\n }\r\n refilter() {\r\n this._onWillRefilter.fire(undefined);\r\n this.model.refilter();\r\n }\r\n setSelection(elements, browserEvent) {\r\n const nodes = elements.map(e => this.model.getNode(e));\r\n this.selection.set(nodes, browserEvent);\r\n const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1);\r\n this.view.setSelection(indexes, browserEvent, true);\r\n }\r\n getSelection() {\r\n return this.selection.get();\r\n }\r\n setFocus(elements, browserEvent) {\r\n const nodes = elements.map(e => this.model.getNode(e));\r\n this.focus.set(nodes, browserEvent);\r\n const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1);\r\n this.view.setFocus(indexes, browserEvent, true);\r\n }\r\n focusNext(n = 1, loop = false, browserEvent, filter = this.focusNavigationFilter) {\r\n this.view.focusNext(n, loop, browserEvent, filter);\r\n }\r\n getFocus() {\r\n return this.focus.get();\r\n }\r\n reveal(location, relativeTop) {\r\n this.model.expandTo(location);\r\n const index = this.model.getListIndex(location);\r\n if (index === -1) {\r\n return;\r\n }\r\n this.view.reveal(index, relativeTop);\r\n }\r\n /**\r\n * Returns the relative position of an element rendered in the list.\r\n * Returns `null` if the element isn't *entirely* in the visible viewport.\r\n */\r\n getRelativeTop(location) {\r\n const index = this.model.getListIndex(location);\r\n if (index === -1) {\r\n return null;\r\n }\r\n return this.view.getRelativeTop(index);\r\n }\r\n // List\r\n onLeftArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const nodes = this.view.getFocusedElements();\r\n if (nodes.length === 0) {\r\n return;\r\n }\r\n const node = nodes[0];\r\n const location = this.model.getNodeLocation(node);\r\n const didChange = this.model.setCollapsed(location, true);\r\n if (!didChange) {\r\n const parentLocation = this.model.getParentNodeLocation(location);\r\n if (!parentLocation) {\r\n return;\r\n }\r\n const parentListIndex = this.model.getListIndex(parentLocation);\r\n this.view.reveal(parentListIndex);\r\n this.view.setFocus([parentListIndex]);\r\n }\r\n }\r\n onRightArrow(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const nodes = this.view.getFocusedElements();\r\n if (nodes.length === 0) {\r\n return;\r\n }\r\n const node = nodes[0];\r\n const location = this.model.getNodeLocation(node);\r\n const didChange = this.model.setCollapsed(location, false);\r\n if (!didChange) {\r\n if (!node.children.some(child => child.visible)) {\r\n return;\r\n }\r\n const [focusedIndex] = this.view.getFocus();\r\n const firstChildIndex = focusedIndex + 1;\r\n this.view.reveal(firstChildIndex);\r\n this.view.setFocus([firstChildIndex]);\r\n }\r\n }\r\n onSpace(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const nodes = this.view.getFocusedElements();\r\n if (nodes.length === 0) {\r\n return;\r\n }\r\n const node = nodes[0];\r\n const location = this.model.getNodeLocation(node);\r\n const recursive = e.browserEvent.altKey;\r\n this.model.setCollapsed(location, undefined, recursive);\r\n }\r\n dispose() {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this.disposables);\r\n this.view.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AsyncDataTree\": () => (/* binding */ AsyncDataTree),\n/* harmony export */ \"CompressibleAsyncDataTree\": () => (/* binding */ CompressibleAsyncDataTree)\n/* harmony export */ });\n/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstractTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js\");\n/* harmony import */ var _objectTree_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js\");\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../list/listView.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js\");\n/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./indexTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js\");\n/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treeIcons.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction createAsyncDataTreeNode(props) {\r\n return Object.assign(Object.assign({}, props), { children: [], refreshPromise: undefined, stale: true, slow: false, collapsedByDefault: undefined });\r\n}\r\nfunction isAncestor(ancestor, descendant) {\r\n if (!descendant.parent) {\r\n return false;\r\n }\r\n else if (descendant.parent === ancestor) {\r\n return true;\r\n }\r\n else {\r\n return isAncestor(ancestor, descendant.parent);\r\n }\r\n}\r\nfunction intersects(node, other) {\r\n return node === other || isAncestor(node, other) || isAncestor(other, node);\r\n}\r\nclass AsyncDataTreeNodeWrapper {\r\n constructor(node) {\r\n this.node = node;\r\n }\r\n get element() { return this.node.element.element; }\r\n get children() { return this.node.children.map(node => new AsyncDataTreeNodeWrapper(node)); }\r\n get depth() { return this.node.depth; }\r\n get visibleChildrenCount() { return this.node.visibleChildrenCount; }\r\n get visibleChildIndex() { return this.node.visibleChildIndex; }\r\n get collapsible() { return this.node.collapsible; }\r\n get collapsed() { return this.node.collapsed; }\r\n get visible() { return this.node.visible; }\r\n get filterData() { return this.node.filterData; }\r\n}\r\nclass AsyncDataTreeRenderer {\r\n constructor(renderer, nodeMapper, onDidChangeTwistieState) {\r\n this.renderer = renderer;\r\n this.nodeMapper = nodeMapper;\r\n this.onDidChangeTwistieState = onDidChangeTwistieState;\r\n this.renderedNodes = new Map();\r\n this.templateId = renderer.templateId;\r\n }\r\n renderTemplate(container) {\r\n const templateData = this.renderer.renderTemplate(container);\r\n return { templateData };\r\n }\r\n renderElement(node, index, templateData, height) {\r\n this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height);\r\n }\r\n renderTwistie(element, twistieElement) {\r\n if (element.slow) {\r\n twistieElement.classList.add(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_10__.treeItemLoadingIcon.classNamesArray);\r\n return true;\r\n }\r\n else {\r\n twistieElement.classList.remove(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_10__.treeItemLoadingIcon.classNamesArray);\r\n return false;\r\n }\r\n }\r\n disposeElement(node, index, templateData, height) {\r\n if (this.renderer.disposeElement) {\r\n this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height);\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n this.renderer.disposeTemplate(templateData.templateData);\r\n }\r\n dispose() {\r\n this.renderedNodes.clear();\r\n }\r\n}\r\nfunction asTreeEvent(e) {\r\n return {\r\n browserEvent: e.browserEvent,\r\n elements: e.elements.map(e => e.element)\r\n };\r\n}\r\nfunction asTreeMouseEvent(e) {\r\n return {\r\n browserEvent: e.browserEvent,\r\n element: e.element && e.element.element,\r\n target: e.target\r\n };\r\n}\r\nclass AsyncDataTreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_7__.ElementsDragAndDropData {\r\n constructor(data) {\r\n super(data.elements.map(node => node.element));\r\n this.data = data;\r\n }\r\n}\r\nfunction asAsyncDataTreeDragAndDropData(data) {\r\n if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_7__.ElementsDragAndDropData) {\r\n return new AsyncDataTreeElementsDragAndDropData(data);\r\n }\r\n return data;\r\n}\r\nclass AsyncDataTreeNodeListDragAndDrop {\r\n constructor(dnd) {\r\n this.dnd = dnd;\r\n }\r\n getDragURI(node) {\r\n return this.dnd.getDragURI(node.element);\r\n }\r\n getDragLabel(nodes, originalEvent) {\r\n if (this.dnd.getDragLabel) {\r\n return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent);\r\n }\r\n return undefined;\r\n }\r\n onDragStart(data, originalEvent) {\r\n if (this.dnd.onDragStart) {\r\n this.dnd.onDragStart(asAsyncDataTreeDragAndDropData(data), originalEvent);\r\n }\r\n }\r\n onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) {\r\n return this.dnd.onDragOver(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent);\r\n }\r\n drop(data, targetNode, targetIndex, originalEvent) {\r\n this.dnd.drop(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent);\r\n }\r\n onDragEnd(originalEvent) {\r\n if (this.dnd.onDragEnd) {\r\n this.dnd.onDragEnd(originalEvent);\r\n }\r\n }\r\n}\r\nfunction asObjectTreeOptions(options) {\r\n return options && Object.assign(Object.assign({}, options), { collapseByDefault: true, identityProvider: options.identityProvider && {\r\n getId(el) {\r\n return options.identityProvider.getId(el.element);\r\n }\r\n }, dnd: options.dnd && new AsyncDataTreeNodeListDragAndDrop(options.dnd), multipleSelectionController: options.multipleSelectionController && {\r\n isSelectionSingleChangeEvent(e) {\r\n return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element }));\r\n },\r\n isSelectionRangeChangeEvent(e) {\r\n return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element }));\r\n }\r\n }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getPosInSet: undefined, getSetSize: undefined, getRole: options.accessibilityProvider.getRole ? (el) => {\r\n return options.accessibilityProvider.getRole(el.element);\r\n } : () => 'treeitem', isChecked: options.accessibilityProvider.isChecked ? (e) => {\r\n var _a;\r\n return !!((_a = options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.isChecked(e.element));\r\n } : undefined, getAriaLabel(e) {\r\n return options.accessibilityProvider.getAriaLabel(e.element);\r\n },\r\n getWidgetAriaLabel() {\r\n return options.accessibilityProvider.getWidgetAriaLabel();\r\n }, getWidgetRole: options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel: options.accessibilityProvider.getAriaLevel && (node => {\r\n return options.accessibilityProvider.getAriaLevel(node.element);\r\n }), getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => {\r\n return options.accessibilityProvider.getActiveDescendantId(node.element);\r\n }) }), filter: options.filter && {\r\n filter(e, parentVisibility) {\r\n return options.filter.filter(e.element, parentVisibility);\r\n }\r\n }, keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(e) {\r\n return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element);\r\n } }), sorter: undefined, expandOnlyOnTwistieClick: typeof options.expandOnlyOnTwistieClick === 'undefined' ? undefined : (typeof options.expandOnlyOnTwistieClick !== 'function' ? options.expandOnlyOnTwistieClick : (e => options.expandOnlyOnTwistieClick(e.element))), additionalScrollHeight: options.additionalScrollHeight });\r\n}\r\nfunction dfs(node, fn) {\r\n fn(node);\r\n node.children.forEach(child => dfs(child, fn));\r\n}\r\nclass AsyncDataTree {\r\n constructor(user, container, delegate, renderers, dataSource, options = {}) {\r\n this.user = user;\r\n this.dataSource = dataSource;\r\n this.nodes = new Map();\r\n this.subTreeRefreshPromises = new Map();\r\n this.refreshPromises = new Map();\r\n this._onDidRender = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this._onDidChangeNodeSlowState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Emitter();\r\n this.nodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__.WeakMapper(node => new AsyncDataTreeNodeWrapper(node));\r\n this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this.identityProvider = options.identityProvider;\r\n this.autoExpandSingleChildren = typeof options.autoExpandSingleChildren === 'undefined' ? false : options.autoExpandSingleChildren;\r\n this.sorter = options.sorter;\r\n this.collapseByDefault = options.collapseByDefault;\r\n this.tree = this.createTree(user, container, delegate, renderers, options);\r\n this.root = createAsyncDataTreeNode({\r\n element: undefined,\r\n parent: null,\r\n hasChildren: true\r\n });\r\n if (this.identityProvider) {\r\n this.root = Object.assign(Object.assign({}, this.root), { id: null });\r\n }\r\n this.nodes.set(null, this.root);\r\n this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState, this, this.disposables);\r\n }\r\n get onDidChangeFocus() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.tree.onDidChangeFocus, asTreeEvent); }\r\n get onDidChangeSelection() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.tree.onDidChangeSelection, asTreeEvent); }\r\n get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.tree.onMouseDblClick, asTreeMouseEvent); }\r\n get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.map(this.tree.onPointer, asTreeMouseEvent); }\r\n get onDidFocus() { return this.tree.onDidFocus; }\r\n get onDidDispose() { return this.tree.onDidDispose; }\r\n createTree(user, container, delegate, renderers, options) {\r\n const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__.ComposedTreeDelegate(delegate);\r\n const objectTreeRenderers = renderers.map(r => new AsyncDataTreeRenderer(r, this.nodeMapper, this._onDidChangeNodeSlowState.event));\r\n const objectTreeOptions = asObjectTreeOptions(options) || {};\r\n return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__.ObjectTree(user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions);\r\n }\r\n updateOptions(options = {}) {\r\n this.tree.updateOptions(options);\r\n }\r\n // Widget\r\n getHTMLElement() {\r\n return this.tree.getHTMLElement();\r\n }\r\n get scrollTop() {\r\n return this.tree.scrollTop;\r\n }\r\n set scrollTop(scrollTop) {\r\n this.tree.scrollTop = scrollTop;\r\n }\r\n domFocus() {\r\n this.tree.domFocus();\r\n }\r\n layout(height, width) {\r\n this.tree.layout(height, width);\r\n }\r\n style(styles) {\r\n this.tree.style(styles);\r\n }\r\n // Model\r\n getInput() {\r\n return this.root.element;\r\n }\r\n setInput(input, viewState) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.refreshPromises.forEach(promise => promise.cancel());\r\n this.refreshPromises.clear();\r\n this.root.element = input;\r\n const viewStateContext = viewState && { viewState, focus: [], selection: [] };\r\n yield this._updateChildren(input, true, false, viewStateContext);\r\n if (viewStateContext) {\r\n this.tree.setFocus(viewStateContext.focus);\r\n this.tree.setSelection(viewStateContext.selection);\r\n }\r\n if (viewState && typeof viewState.scrollTop === 'number') {\r\n this.scrollTop = viewState.scrollTop;\r\n }\r\n });\r\n }\r\n _updateChildren(element = this.root.element, recursive = true, rerender = false, viewStateContext, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (typeof this.root.element === 'undefined') {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, 'Tree input not set');\r\n }\r\n if (this.root.refreshPromise) {\r\n yield this.root.refreshPromise;\r\n yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.toPromise(this._onDidRender.event);\r\n }\r\n const node = this.getDataNode(element);\r\n yield this.refreshAndRenderNode(node, recursive, viewStateContext, options);\r\n if (rerender) {\r\n try {\r\n this.tree.rerender(node);\r\n }\r\n catch (_a) {\r\n // missing nodes are fine, this could've resulted from\r\n // parallel refresh calls, removing `node` altogether\r\n }\r\n }\r\n });\r\n }\r\n // View\r\n rerender(element) {\r\n if (element === undefined || element === this.root.element) {\r\n this.tree.rerender();\r\n return;\r\n }\r\n const node = this.getDataNode(element);\r\n this.tree.rerender(node);\r\n }\r\n collapse(element, recursive = false) {\r\n const node = this.getDataNode(element);\r\n return this.tree.collapse(node === this.root ? null : node, recursive);\r\n }\r\n expand(element, recursive = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (typeof this.root.element === 'undefined') {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, 'Tree input not set');\r\n }\r\n if (this.root.refreshPromise) {\r\n yield this.root.refreshPromise;\r\n yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.toPromise(this._onDidRender.event);\r\n }\r\n const node = this.getDataNode(element);\r\n if (this.tree.hasElement(node) && !this.tree.isCollapsible(node)) {\r\n return false;\r\n }\r\n if (node.refreshPromise) {\r\n yield this.root.refreshPromise;\r\n yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.toPromise(this._onDidRender.event);\r\n }\r\n if (node !== this.root && !node.refreshPromise && !this.tree.isCollapsed(node)) {\r\n return false;\r\n }\r\n const result = this.tree.expand(node === this.root ? null : node, recursive);\r\n if (node.refreshPromise) {\r\n yield this.root.refreshPromise;\r\n yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.toPromise(this._onDidRender.event);\r\n }\r\n return result;\r\n });\r\n }\r\n setSelection(elements, browserEvent) {\r\n const nodes = elements.map(e => this.getDataNode(e));\r\n this.tree.setSelection(nodes, browserEvent);\r\n }\r\n getSelection() {\r\n const nodes = this.tree.getSelection();\r\n return nodes.map(n => n.element);\r\n }\r\n setFocus(elements, browserEvent) {\r\n const nodes = elements.map(e => this.getDataNode(e));\r\n this.tree.setFocus(nodes, browserEvent);\r\n }\r\n getFocus() {\r\n const nodes = this.tree.getFocus();\r\n return nodes.map(n => n.element);\r\n }\r\n reveal(element, relativeTop) {\r\n this.tree.reveal(this.getDataNode(element), relativeTop);\r\n }\r\n // Implementation\r\n getDataNode(element) {\r\n const node = this.nodes.get((element === this.root.element ? null : element));\r\n if (!node) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Data tree node not found: ${element}`);\r\n }\r\n return node;\r\n }\r\n refreshAndRenderNode(node, recursive, viewStateContext, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.refreshNode(node, recursive, viewStateContext);\r\n this.render(node, viewStateContext, options);\r\n });\r\n }\r\n refreshNode(node, recursive, viewStateContext) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let result;\r\n this.subTreeRefreshPromises.forEach((refreshPromise, refreshNode) => {\r\n if (!result && intersects(refreshNode, node)) {\r\n result = refreshPromise.then(() => this.refreshNode(node, recursive, viewStateContext));\r\n }\r\n });\r\n if (result) {\r\n return result;\r\n }\r\n return this.doRefreshSubTree(node, recursive, viewStateContext);\r\n });\r\n }\r\n doRefreshSubTree(node, recursive, viewStateContext) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let done;\r\n node.refreshPromise = new Promise(c => done = c);\r\n this.subTreeRefreshPromises.set(node, node.refreshPromise);\r\n node.refreshPromise.finally(() => {\r\n node.refreshPromise = undefined;\r\n this.subTreeRefreshPromises.delete(node);\r\n });\r\n try {\r\n const childrenToRefresh = yield this.doRefreshNode(node, recursive, viewStateContext);\r\n node.stale = false;\r\n yield _common_async_js__WEBPACK_IMPORTED_MODULE_5__.Promises.settled(childrenToRefresh.map(child => this.doRefreshSubTree(child, recursive, viewStateContext)));\r\n }\r\n finally {\r\n done();\r\n }\r\n });\r\n }\r\n doRefreshNode(node, recursive, viewStateContext) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n node.hasChildren = !!this.dataSource.hasChildren(node.element);\r\n let childrenPromise;\r\n if (!node.hasChildren) {\r\n childrenPromise = Promise.resolve(_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.empty());\r\n }\r\n else {\r\n const slowTimeout = (0,_common_async_js__WEBPACK_IMPORTED_MODULE_5__.timeout)(800);\r\n slowTimeout.then(() => {\r\n node.slow = true;\r\n this._onDidChangeNodeSlowState.fire(node);\r\n }, _ => null);\r\n childrenPromise = this.doGetChildren(node)\r\n .finally(() => slowTimeout.cancel());\r\n }\r\n try {\r\n const children = yield childrenPromise;\r\n return this.setChildren(node, children, recursive, viewStateContext);\r\n }\r\n catch (err) {\r\n if (node !== this.root && this.tree.hasElement(node)) {\r\n this.tree.collapse(node);\r\n }\r\n if ((0,_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.isPromiseCanceledError)(err)) {\r\n return [];\r\n }\r\n throw err;\r\n }\r\n finally {\r\n if (node.slow) {\r\n node.slow = false;\r\n this._onDidChangeNodeSlowState.fire(node);\r\n }\r\n }\r\n });\r\n }\r\n doGetChildren(node) {\r\n let result = this.refreshPromises.get(node);\r\n if (result) {\r\n return result;\r\n }\r\n result = (0,_common_async_js__WEBPACK_IMPORTED_MODULE_5__.createCancelablePromise)(() => __awaiter(this, void 0, void 0, function* () {\r\n const children = yield this.dataSource.getChildren(node.element);\r\n return this.processChildren(children);\r\n }));\r\n this.refreshPromises.set(node, result);\r\n return result.finally(() => { this.refreshPromises.delete(node); });\r\n }\r\n _onDidChangeCollapseState({ node, deep }) {\r\n if (node.element === null) {\r\n return;\r\n }\r\n if (!node.collapsed && node.element.stale) {\r\n if (deep) {\r\n this.collapse(node.element.element);\r\n }\r\n else {\r\n this.refreshAndRenderNode(node.element, false)\r\n .catch(_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError);\r\n }\r\n }\r\n }\r\n setChildren(node, childrenElementsIterable, recursive, viewStateContext) {\r\n const childrenElements = [...childrenElementsIterable];\r\n // perf: if the node was and still is a leaf, avoid all this hassle\r\n if (node.children.length === 0 && childrenElements.length === 0) {\r\n return [];\r\n }\r\n const nodesToForget = new Map();\r\n const childrenTreeNodesById = new Map();\r\n for (const child of node.children) {\r\n nodesToForget.set(child.element, child);\r\n if (this.identityProvider) {\r\n const collapsed = this.tree.isCollapsed(child);\r\n childrenTreeNodesById.set(child.id, { node: child, collapsed });\r\n }\r\n }\r\n const childrenToRefresh = [];\r\n const children = childrenElements.map(element => {\r\n const hasChildren = !!this.dataSource.hasChildren(element);\r\n if (!this.identityProvider) {\r\n const asyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, hasChildren });\r\n if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) {\r\n asyncDataTreeNode.collapsedByDefault = false;\r\n childrenToRefresh.push(asyncDataTreeNode);\r\n }\r\n return asyncDataTreeNode;\r\n }\r\n const id = this.identityProvider.getId(element).toString();\r\n const result = childrenTreeNodesById.get(id);\r\n if (result) {\r\n const asyncDataTreeNode = result.node;\r\n nodesToForget.delete(asyncDataTreeNode.element);\r\n this.nodes.delete(asyncDataTreeNode.element);\r\n this.nodes.set(element, asyncDataTreeNode);\r\n asyncDataTreeNode.element = element;\r\n asyncDataTreeNode.hasChildren = hasChildren;\r\n if (recursive) {\r\n if (result.collapsed) {\r\n asyncDataTreeNode.children.forEach(node => dfs(node, node => this.nodes.delete(node.element)));\r\n asyncDataTreeNode.children.splice(0, asyncDataTreeNode.children.length);\r\n asyncDataTreeNode.stale = true;\r\n }\r\n else {\r\n childrenToRefresh.push(asyncDataTreeNode);\r\n }\r\n }\r\n else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) {\r\n asyncDataTreeNode.collapsedByDefault = false;\r\n childrenToRefresh.push(asyncDataTreeNode);\r\n }\r\n return asyncDataTreeNode;\r\n }\r\n const childAsyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, id, hasChildren });\r\n if (viewStateContext && viewStateContext.viewState.focus && viewStateContext.viewState.focus.indexOf(id) > -1) {\r\n viewStateContext.focus.push(childAsyncDataTreeNode);\r\n }\r\n if (viewStateContext && viewStateContext.viewState.selection && viewStateContext.viewState.selection.indexOf(id) > -1) {\r\n viewStateContext.selection.push(childAsyncDataTreeNode);\r\n }\r\n if (viewStateContext && viewStateContext.viewState.expanded && viewStateContext.viewState.expanded.indexOf(id) > -1) {\r\n childrenToRefresh.push(childAsyncDataTreeNode);\r\n }\r\n else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) {\r\n childAsyncDataTreeNode.collapsedByDefault = false;\r\n childrenToRefresh.push(childAsyncDataTreeNode);\r\n }\r\n return childAsyncDataTreeNode;\r\n });\r\n for (const node of nodesToForget.values()) {\r\n dfs(node, node => this.nodes.delete(node.element));\r\n }\r\n for (const child of children) {\r\n this.nodes.set(child.element, child);\r\n }\r\n node.children.splice(0, node.children.length, ...children);\r\n // TODO@joao this doesn't take filter into account\r\n if (node !== this.root && this.autoExpandSingleChildren && children.length === 1 && childrenToRefresh.length === 0) {\r\n children[0].collapsedByDefault = false;\r\n childrenToRefresh.push(children[0]);\r\n }\r\n return childrenToRefresh;\r\n }\r\n render(node, viewStateContext, options) {\r\n const children = node.children.map(node => this.asTreeElement(node, viewStateContext));\r\n const objectTreeOptions = options && Object.assign(Object.assign({}, options), { diffIdentityProvider: options.diffIdentityProvider && {\r\n getId(node) {\r\n return options.diffIdentityProvider.getId(node.element);\r\n }\r\n } });\r\n this.tree.setChildren(node === this.root ? null : node, children, objectTreeOptions);\r\n if (node !== this.root) {\r\n this.tree.setCollapsible(node, node.hasChildren);\r\n }\r\n this._onDidRender.fire();\r\n }\r\n asTreeElement(node, viewStateContext) {\r\n if (node.stale) {\r\n return {\r\n element: node,\r\n collapsible: node.hasChildren,\r\n collapsed: true\r\n };\r\n }\r\n let collapsed;\r\n if (viewStateContext && viewStateContext.viewState.expanded && node.id && viewStateContext.viewState.expanded.indexOf(node.id) > -1) {\r\n collapsed = false;\r\n }\r\n else {\r\n collapsed = node.collapsedByDefault;\r\n }\r\n node.collapsedByDefault = undefined;\r\n return {\r\n element: node,\r\n children: node.hasChildren ? _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.map(node.children, child => this.asTreeElement(child, viewStateContext)) : [],\r\n collapsible: node.hasChildren,\r\n collapsed\r\n };\r\n }\r\n processChildren(children) {\r\n if (this.sorter) {\r\n children = [...children].sort(this.sorter.compare.bind(this.sorter));\r\n }\r\n return children;\r\n }\r\n dispose() {\r\n this.disposables.dispose();\r\n }\r\n}\r\nclass CompressibleAsyncDataTreeNodeWrapper {\r\n constructor(node) {\r\n this.node = node;\r\n }\r\n get element() {\r\n return {\r\n elements: this.node.element.elements.map(e => e.element),\r\n incompressible: this.node.element.incompressible\r\n };\r\n }\r\n get children() { return this.node.children.map(node => new CompressibleAsyncDataTreeNodeWrapper(node)); }\r\n get depth() { return this.node.depth; }\r\n get visibleChildrenCount() { return this.node.visibleChildrenCount; }\r\n get visibleChildIndex() { return this.node.visibleChildIndex; }\r\n get collapsible() { return this.node.collapsible; }\r\n get collapsed() { return this.node.collapsed; }\r\n get visible() { return this.node.visible; }\r\n get filterData() { return this.node.filterData; }\r\n}\r\nclass CompressibleAsyncDataTreeRenderer {\r\n constructor(renderer, nodeMapper, compressibleNodeMapperProvider, onDidChangeTwistieState) {\r\n this.renderer = renderer;\r\n this.nodeMapper = nodeMapper;\r\n this.compressibleNodeMapperProvider = compressibleNodeMapperProvider;\r\n this.onDidChangeTwistieState = onDidChangeTwistieState;\r\n this.renderedNodes = new Map();\r\n this.disposables = [];\r\n this.templateId = renderer.templateId;\r\n }\r\n renderTemplate(container) {\r\n const templateData = this.renderer.renderTemplate(container);\r\n return { templateData };\r\n }\r\n renderElement(node, index, templateData, height) {\r\n this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height);\r\n }\r\n renderCompressedElements(node, index, templateData, height) {\r\n this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height);\r\n }\r\n renderTwistie(element, twistieElement) {\r\n if (element.slow) {\r\n twistieElement.classList.add(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_10__.treeItemLoadingIcon.classNamesArray);\r\n return true;\r\n }\r\n else {\r\n twistieElement.classList.remove(..._treeIcons_js__WEBPACK_IMPORTED_MODULE_10__.treeItemLoadingIcon.classNamesArray);\r\n return false;\r\n }\r\n }\r\n disposeElement(node, index, templateData, height) {\r\n if (this.renderer.disposeElement) {\r\n this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height);\r\n }\r\n }\r\n disposeCompressedElements(node, index, templateData, height) {\r\n if (this.renderer.disposeCompressedElements) {\r\n this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height);\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n this.renderer.disposeTemplate(templateData.templateData);\r\n }\r\n dispose() {\r\n this.renderedNodes.clear();\r\n this.disposables = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)(this.disposables);\r\n }\r\n}\r\nfunction asCompressibleObjectTreeOptions(options) {\r\n const objectTreeOptions = options && asObjectTreeOptions(options);\r\n return objectTreeOptions && Object.assign(Object.assign({}, objectTreeOptions), { keyboardNavigationLabelProvider: objectTreeOptions.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, objectTreeOptions.keyboardNavigationLabelProvider), { getCompressedNodeKeyboardNavigationLabel(els) {\r\n return options.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(els.map(e => e.element));\r\n } }) });\r\n}\r\nclass CompressibleAsyncDataTree extends AsyncDataTree {\r\n constructor(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, options = {}) {\r\n super(user, container, virtualDelegate, renderers, dataSource, options);\r\n this.compressionDelegate = compressionDelegate;\r\n this.compressibleNodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__.WeakMapper(node => new CompressibleAsyncDataTreeNodeWrapper(node));\r\n this.filter = options.filter;\r\n }\r\n createTree(user, container, delegate, renderers, options) {\r\n const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__.ComposedTreeDelegate(delegate);\r\n const objectTreeRenderers = renderers.map(r => new CompressibleAsyncDataTreeRenderer(r, this.nodeMapper, () => this.compressibleNodeMapper, this._onDidChangeNodeSlowState.event));\r\n const objectTreeOptions = asCompressibleObjectTreeOptions(options) || {};\r\n return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__.CompressibleObjectTree(user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions);\r\n }\r\n asTreeElement(node, viewStateContext) {\r\n return Object.assign({ incompressible: this.compressionDelegate.isIncompressible(node.element) }, super.asTreeElement(node, viewStateContext));\r\n }\r\n updateOptions(options = {}) {\r\n this.tree.updateOptions(options);\r\n }\r\n render(node, viewStateContext) {\r\n if (!this.identityProvider) {\r\n return super.render(node, viewStateContext);\r\n }\r\n // Preserve traits across compressions. Hacky but does the trick.\r\n // This is hard to fix properly since it requires rewriting the traits\r\n // across trees and lists. Let's just keep it this way for now.\r\n const getId = (element) => this.identityProvider.getId(element).toString();\r\n const getUncompressedIds = (nodes) => {\r\n const result = new Set();\r\n for (const node of nodes) {\r\n const compressedNode = this.tree.getCompressedTreeNode(node === this.root ? null : node);\r\n if (!compressedNode.element) {\r\n continue;\r\n }\r\n for (const node of compressedNode.element.elements) {\r\n result.add(getId(node.element));\r\n }\r\n }\r\n return result;\r\n };\r\n const oldSelection = getUncompressedIds(this.tree.getSelection());\r\n const oldFocus = getUncompressedIds(this.tree.getFocus());\r\n super.render(node, viewStateContext);\r\n const selection = this.getSelection();\r\n let didChangeSelection = false;\r\n const focus = this.getFocus();\r\n let didChangeFocus = false;\r\n const visit = (node) => {\r\n const compressedNode = node.element;\r\n if (compressedNode) {\r\n for (let i = 0; i < compressedNode.elements.length; i++) {\r\n const id = getId(compressedNode.elements[i].element);\r\n const element = compressedNode.elements[compressedNode.elements.length - 1].element;\r\n // github.com/microsoft/vscode/issues/85938\r\n if (oldSelection.has(id) && selection.indexOf(element) === -1) {\r\n selection.push(element);\r\n didChangeSelection = true;\r\n }\r\n if (oldFocus.has(id) && focus.indexOf(element) === -1) {\r\n focus.push(element);\r\n didChangeFocus = true;\r\n }\r\n }\r\n }\r\n node.children.forEach(visit);\r\n };\r\n visit(this.tree.getCompressedTreeNode(node === this.root ? null : node));\r\n if (didChangeSelection) {\r\n this.setSelection(selection);\r\n }\r\n if (didChangeFocus) {\r\n this.setFocus(focus);\r\n }\r\n }\r\n // For compressed async data trees, `TreeVisibility.Recurse` doesn't currently work\r\n // and we have to filter everything beforehand\r\n // Related to #85193 and #85835\r\n processChildren(children) {\r\n if (this.filter) {\r\n children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.filter(children, e => {\r\n const result = this.filter.filter(e, 1 /* Visible */);\r\n const visibility = getVisibility(result);\r\n if (visibility === 2 /* Recurse */) {\r\n throw new Error('Recursive tree visibility not supported in async data compressed trees');\r\n }\r\n return visibility === 1 /* Visible */;\r\n });\r\n }\r\n return super.processChildren(children);\r\n }\r\n}\r\nfunction getVisibility(filterResult) {\r\n if (typeof filterResult === 'boolean') {\r\n return filterResult ? 1 /* Visible */ : 0 /* Hidden */;\r\n }\r\n else if ((0,_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_9__.isFilterResult)(filterResult)) {\r\n return (0,_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_9__.getVisibleState)(filterResult.visibility);\r\n }\r\n else {\r\n return (0,_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_9__.getVisibleState)(filterResult);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compress\": () => (/* binding */ compress),\n/* harmony export */ \"decompress\": () => (/* binding */ decompress),\n/* harmony export */ \"CompressedObjectTreeModel\": () => (/* binding */ CompressedObjectTreeModel),\n/* harmony export */ \"DefaultElementMapper\": () => (/* binding */ DefaultElementMapper),\n/* harmony export */ \"CompressibleObjectTreeModel\": () => (/* binding */ CompressibleObjectTreeModel)\n/* harmony export */ });\n/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js\");\n/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./objectTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nfunction noCompress(element) {\r\n const elements = [element.element];\r\n const incompressible = element.incompressible || false;\r\n return {\r\n element: { elements, incompressible },\r\n children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.from(element.children), noCompress),\r\n collapsible: element.collapsible,\r\n collapsed: element.collapsed\r\n };\r\n}\r\n// Exported only for test reasons, do not use directly\r\nfunction compress(element) {\r\n const elements = [element.element];\r\n const incompressible = element.incompressible || false;\r\n let childrenIterator;\r\n let children;\r\n while (true) {\r\n [children, childrenIterator] = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.consume(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.from(element.children), 2);\r\n if (children.length !== 1) {\r\n break;\r\n }\r\n if (children[0].incompressible) {\r\n break;\r\n }\r\n element = children[0];\r\n elements.push(element.element);\r\n }\r\n return {\r\n element: { elements, incompressible },\r\n children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.concat(children, childrenIterator), compress),\r\n collapsible: element.collapsible,\r\n collapsed: element.collapsed\r\n };\r\n}\r\nfunction _decompress(element, index = 0) {\r\n let children;\r\n if (index < element.element.elements.length - 1) {\r\n children = [_decompress(element, index + 1)];\r\n }\r\n else {\r\n children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.from(element.children), el => _decompress(el, 0));\r\n }\r\n if (index === 0 && element.element.incompressible) {\r\n return {\r\n element: element.element.elements[index],\r\n children,\r\n incompressible: true,\r\n collapsible: element.collapsible,\r\n collapsed: element.collapsed\r\n };\r\n }\r\n return {\r\n element: element.element.elements[index],\r\n children,\r\n collapsible: element.collapsible,\r\n collapsed: element.collapsed\r\n };\r\n}\r\n// Exported only for test reasons, do not use directly\r\nfunction decompress(element) {\r\n return _decompress(element, 0);\r\n}\r\nfunction splice(treeElement, element, children) {\r\n if (treeElement.element === element) {\r\n return Object.assign(Object.assign({}, treeElement), { children });\r\n }\r\n return Object.assign(Object.assign({}, treeElement), { children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.from(treeElement.children), e => splice(e, element, children)) });\r\n}\r\nconst wrapIdentityProvider = (base) => ({\r\n getId(node) {\r\n return node.elements.map(e => base.getId(e).toString()).join('\\0');\r\n }\r\n});\r\n// Exported only for test reasons, do not use directly\r\nclass CompressedObjectTreeModel {\r\n constructor(user, list, options = {}) {\r\n this.user = user;\r\n this.rootRef = null;\r\n this.nodes = new Map();\r\n this.model = new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__.ObjectTreeModel(user, list, options);\r\n this.enabled = typeof options.compressionEnabled === 'undefined' ? true : options.compressionEnabled;\r\n this.identityProvider = options.identityProvider;\r\n }\r\n get onDidSplice() { return this.model.onDidSplice; }\r\n get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; }\r\n get onDidChangeRenderNodeCount() { return this.model.onDidChangeRenderNodeCount; }\r\n setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options) {\r\n // Diffs must be deem, since the compression can affect nested elements.\r\n // @see https://github.com/microsoft/vscode/pull/114237#issuecomment-759425034\r\n const diffIdentityProvider = options.diffIdentityProvider && wrapIdentityProvider(options.diffIdentityProvider);\r\n if (element === null) {\r\n const compressedChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(children, this.enabled ? compress : noCompress);\r\n this._setChildren(null, compressedChildren, { diffIdentityProvider, diffDepth: Infinity });\r\n return;\r\n }\r\n const compressedNode = this.nodes.get(element);\r\n if (!compressedNode) {\r\n throw new Error('Unknown compressed tree node');\r\n }\r\n const node = this.model.getNode(compressedNode);\r\n const compressedParentNode = this.model.getParentNodeLocation(compressedNode);\r\n const parent = this.model.getNode(compressedParentNode);\r\n const decompressedElement = decompress(node);\r\n const splicedElement = splice(decompressedElement, element, children);\r\n const recompressedElement = (this.enabled ? compress : noCompress)(splicedElement);\r\n const parentChildren = parent.children\r\n .map(child => child === node ? recompressedElement : child);\r\n this._setChildren(parent.element, parentChildren, {\r\n diffIdentityProvider,\r\n diffDepth: node.depth - parent.depth,\r\n });\r\n }\r\n setCompressionEnabled(enabled) {\r\n if (enabled === this.enabled) {\r\n return;\r\n }\r\n this.enabled = enabled;\r\n const root = this.model.getNode();\r\n const rootChildren = root.children;\r\n const decompressedRootChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(rootChildren, decompress);\r\n const recompressedRootChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(decompressedRootChildren, enabled ? compress : noCompress);\r\n // it should be safe to always use deep diff mode here if an identity\r\n // provider is available, since we know the raw nodes are unchanged.\r\n this._setChildren(null, recompressedRootChildren, {\r\n diffIdentityProvider: this.identityProvider,\r\n diffDepth: Infinity,\r\n });\r\n }\r\n _setChildren(node, children, options) {\r\n const insertedElements = new Set();\r\n const onDidCreateNode = (node) => {\r\n for (const element of node.element.elements) {\r\n insertedElements.add(element);\r\n this.nodes.set(element, node.element);\r\n }\r\n };\r\n const onDidDeleteNode = (node) => {\r\n for (const element of node.element.elements) {\r\n if (!insertedElements.has(element)) {\r\n this.nodes.delete(element);\r\n }\r\n }\r\n };\r\n this.model.setChildren(node, children, Object.assign(Object.assign({}, options), { onDidCreateNode, onDidDeleteNode }));\r\n }\r\n has(element) {\r\n return this.nodes.has(element);\r\n }\r\n getListIndex(location) {\r\n const node = this.getCompressedNode(location);\r\n return this.model.getListIndex(node);\r\n }\r\n getListRenderCount(location) {\r\n const node = this.getCompressedNode(location);\r\n return this.model.getListRenderCount(node);\r\n }\r\n getNode(location) {\r\n if (typeof location === 'undefined') {\r\n return this.model.getNode();\r\n }\r\n const node = this.getCompressedNode(location);\r\n return this.model.getNode(node);\r\n }\r\n // TODO: review this\r\n getNodeLocation(node) {\r\n const compressedNode = this.model.getNodeLocation(node);\r\n if (compressedNode === null) {\r\n return null;\r\n }\r\n return compressedNode.elements[compressedNode.elements.length - 1];\r\n }\r\n // TODO: review this\r\n getParentNodeLocation(location) {\r\n const compressedNode = this.getCompressedNode(location);\r\n const parentNode = this.model.getParentNodeLocation(compressedNode);\r\n if (parentNode === null) {\r\n return null;\r\n }\r\n return parentNode.elements[parentNode.elements.length - 1];\r\n }\r\n isCollapsible(location) {\r\n const compressedNode = this.getCompressedNode(location);\r\n return this.model.isCollapsible(compressedNode);\r\n }\r\n setCollapsible(location, collapsible) {\r\n const compressedNode = this.getCompressedNode(location);\r\n return this.model.setCollapsible(compressedNode, collapsible);\r\n }\r\n isCollapsed(location) {\r\n const compressedNode = this.getCompressedNode(location);\r\n return this.model.isCollapsed(compressedNode);\r\n }\r\n setCollapsed(location, collapsed, recursive) {\r\n const compressedNode = this.getCompressedNode(location);\r\n return this.model.setCollapsed(compressedNode, collapsed, recursive);\r\n }\r\n expandTo(location) {\r\n const compressedNode = this.getCompressedNode(location);\r\n this.model.expandTo(compressedNode);\r\n }\r\n rerender(location) {\r\n const compressedNode = this.getCompressedNode(location);\r\n this.model.rerender(compressedNode);\r\n }\r\n refilter() {\r\n this.model.refilter();\r\n }\r\n getCompressedNode(element) {\r\n if (element === null) {\r\n return null;\r\n }\r\n const node = this.nodes.get(element);\r\n if (!node) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Tree element not found: ${element}`);\r\n }\r\n return node;\r\n }\r\n}\r\nconst DefaultElementMapper = elements => elements[elements.length - 1];\r\nclass CompressedTreeNodeWrapper {\r\n constructor(unwrapper, node) {\r\n this.unwrapper = unwrapper;\r\n this.node = node;\r\n }\r\n get element() { return this.node.element === null ? null : this.unwrapper(this.node.element); }\r\n get children() { return this.node.children.map(node => new CompressedTreeNodeWrapper(this.unwrapper, node)); }\r\n get depth() { return this.node.depth; }\r\n get visibleChildrenCount() { return this.node.visibleChildrenCount; }\r\n get visibleChildIndex() { return this.node.visibleChildIndex; }\r\n get collapsible() { return this.node.collapsible; }\r\n get collapsed() { return this.node.collapsed; }\r\n get visible() { return this.node.visible; }\r\n get filterData() { return this.node.filterData; }\r\n}\r\nfunction mapList(nodeMapper, list) {\r\n return {\r\n splice(start, deleteCount, toInsert) {\r\n list.splice(start, deleteCount, toInsert.map(node => nodeMapper.map(node)));\r\n },\r\n updateElementHeight(index, height) {\r\n list.updateElementHeight(index, height);\r\n }\r\n };\r\n}\r\nfunction mapOptions(compressedNodeUnwrapper, options) {\r\n return Object.assign(Object.assign({}, options), { identityProvider: options.identityProvider && {\r\n getId(node) {\r\n return options.identityProvider.getId(compressedNodeUnwrapper(node));\r\n }\r\n }, sorter: options.sorter && {\r\n compare(node, otherNode) {\r\n return options.sorter.compare(node.elements[0], otherNode.elements[0]);\r\n }\r\n }, filter: options.filter && {\r\n filter(node, parentVisibility) {\r\n return options.filter.filter(compressedNodeUnwrapper(node), parentVisibility);\r\n }\r\n } });\r\n}\r\nclass CompressibleObjectTreeModel {\r\n constructor(user, list, options = {}) {\r\n this.rootRef = null;\r\n this.elementMapper = options.elementMapper || DefaultElementMapper;\r\n const compressedNodeUnwrapper = node => this.elementMapper(node.elements);\r\n this.nodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__.WeakMapper(node => new CompressedTreeNodeWrapper(compressedNodeUnwrapper, node));\r\n this.model = new CompressedObjectTreeModel(user, mapList(this.nodeMapper, list), mapOptions(compressedNodeUnwrapper, options));\r\n }\r\n get onDidSplice() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_1__.Event.map(this.model.onDidSplice, ({ insertedNodes, deletedNodes }) => ({\r\n insertedNodes: insertedNodes.map(node => this.nodeMapper.map(node)),\r\n deletedNodes: deletedNodes.map(node => this.nodeMapper.map(node)),\r\n }));\r\n }\r\n get onDidChangeCollapseState() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_1__.Event.map(this.model.onDidChangeCollapseState, ({ node, deep }) => ({\r\n node: this.nodeMapper.map(node),\r\n deep\r\n }));\r\n }\r\n get onDidChangeRenderNodeCount() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_1__.Event.map(this.model.onDidChangeRenderNodeCount, node => this.nodeMapper.map(node));\r\n }\r\n setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options = {}) {\r\n this.model.setChildren(element, children, options);\r\n }\r\n setCompressionEnabled(enabled) {\r\n this.model.setCompressionEnabled(enabled);\r\n }\r\n has(location) {\r\n return this.model.has(location);\r\n }\r\n getListIndex(location) {\r\n return this.model.getListIndex(location);\r\n }\r\n getListRenderCount(location) {\r\n return this.model.getListRenderCount(location);\r\n }\r\n getNode(location) {\r\n return this.nodeMapper.map(this.model.getNode(location));\r\n }\r\n getNodeLocation(node) {\r\n return node.element;\r\n }\r\n getParentNodeLocation(location) {\r\n return this.model.getParentNodeLocation(location);\r\n }\r\n isCollapsible(location) {\r\n return this.model.isCollapsible(location);\r\n }\r\n setCollapsible(location, collapsed) {\r\n return this.model.setCollapsible(location, collapsed);\r\n }\r\n isCollapsed(location) {\r\n return this.model.isCollapsed(location);\r\n }\r\n setCollapsed(location, collapsed, recursive) {\r\n return this.model.setCollapsed(location, collapsed, recursive);\r\n }\r\n expandTo(location) {\r\n return this.model.expandTo(location);\r\n }\r\n rerender(location) {\r\n return this.model.rerender(location);\r\n }\r\n refilter() {\r\n return this.model.refilter();\r\n }\r\n getCompressedTreeNode(location = null) {\r\n return this.model.getNode(location);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DataTree\": () => (/* binding */ DataTree)\n/* harmony export */ });\n/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstractTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js\");\n/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass DataTree extends _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__.AbstractTree {\r\n constructor(user, container, delegate, renderers, dataSource, options = {}) {\r\n super(user, container, delegate, renderers, options);\r\n this.user = user;\r\n this.dataSource = dataSource;\r\n this.identityProvider = options.identityProvider;\r\n }\r\n createModel(user, view, options) {\r\n return new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_1__.ObjectTreeModel(user, view, options);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isFilterResult\": () => (/* binding */ isFilterResult),\n/* harmony export */ \"getVisibleState\": () => (/* binding */ getVisibleState),\n/* harmony export */ \"IndexTreeModel\": () => (/* binding */ IndexTreeModel)\n/* harmony export */ });\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_diff_diff_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/diff/diff.js */ \"./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nfunction isFilterResult(obj) {\r\n return typeof obj === 'object' && 'visibility' in obj && 'data' in obj;\r\n}\r\nfunction getVisibleState(visibility) {\r\n switch (visibility) {\r\n case true: return 1 /* Visible */;\r\n case false: return 0 /* Hidden */;\r\n default: return visibility;\r\n }\r\n}\r\nfunction isCollapsibleStateUpdate(update) {\r\n return typeof update.collapsible === 'boolean';\r\n}\r\nclass IndexTreeModel {\r\n constructor(user, list, rootElement, options = {}) {\r\n this.user = user;\r\n this.list = list;\r\n this.rootRef = [];\r\n this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.EventBufferer();\r\n this._onDidChangeCollapseState = new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidChangeCollapseState = this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event);\r\n this._onDidChangeRenderNodeCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidChangeRenderNodeCount = this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event);\r\n this._onDidSplice = new _common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidSplice = this._onDidSplice.event;\r\n this.collapseByDefault = typeof options.collapseByDefault === 'undefined' ? false : options.collapseByDefault;\r\n this.filter = options.filter;\r\n this.autoExpandSingleChildren = typeof options.autoExpandSingleChildren === 'undefined' ? false : options.autoExpandSingleChildren;\r\n this.root = {\r\n parent: undefined,\r\n element: rootElement,\r\n children: [],\r\n depth: 0,\r\n visibleChildrenCount: 0,\r\n visibleChildIndex: -1,\r\n collapsible: false,\r\n collapsed: false,\r\n renderNodeCount: 0,\r\n visibility: 1 /* Visible */,\r\n visible: true,\r\n filterData: undefined\r\n };\r\n }\r\n splice(location, deleteCount, toInsert = _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.empty(), options = {}) {\r\n if (location.length === 0) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__.TreeError(this.user, 'Invalid tree location');\r\n }\r\n if (options.diffIdentityProvider) {\r\n this.spliceSmart(options.diffIdentityProvider, location, deleteCount, toInsert, options);\r\n }\r\n else {\r\n this.spliceSimple(location, deleteCount, toInsert, options);\r\n }\r\n }\r\n spliceSmart(identity, location, deleteCount, toInsertIterable, options, recurseLevels) {\r\n var _a;\r\n if (toInsertIterable === void 0) { toInsertIterable = _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.empty(); }\r\n if (recurseLevels === void 0) { recurseLevels = (_a = options.diffDepth) !== null && _a !== void 0 ? _a : 0; }\r\n const { parentNode } = this.getParentNodeWithListIndex(location);\r\n const toInsert = [...toInsertIterable];\r\n const index = location[location.length - 1];\r\n const diff = new _common_diff_diff_js__WEBPACK_IMPORTED_MODULE_2__.LcsDiff({ getElements: () => parentNode.children.map(e => identity.getId(e.element).toString()) }, {\r\n getElements: () => [\r\n ...parentNode.children.slice(0, index),\r\n ...toInsert,\r\n ...parentNode.children.slice(index + deleteCount),\r\n ].map(e => identity.getId(e.element).toString())\r\n }).ComputeDiff(false);\r\n // if we were given a 'best effort' diff, use default behavior\r\n if (diff.quitEarly) {\r\n return this.spliceSimple(location, deleteCount, toInsert, options);\r\n }\r\n const locationPrefix = location.slice(0, -1);\r\n const recurseSplice = (fromOriginal, fromModified, count) => {\r\n if (recurseLevels > 0) {\r\n for (let i = 0; i < count; i++) {\r\n fromOriginal--;\r\n fromModified--;\r\n this.spliceSmart(identity, [...locationPrefix, fromOriginal, 0], Number.MAX_SAFE_INTEGER, toInsert[fromModified].children, options, recurseLevels - 1);\r\n }\r\n }\r\n };\r\n let lastStartO = Math.min(parentNode.children.length, index + deleteCount);\r\n let lastStartM = toInsert.length;\r\n for (const change of diff.changes.sort((a, b) => b.originalStart - a.originalStart)) {\r\n recurseSplice(lastStartO, lastStartM, lastStartO - (change.originalStart + change.originalLength));\r\n lastStartO = change.originalStart;\r\n lastStartM = change.modifiedStart - index;\r\n this.spliceSimple([...locationPrefix, lastStartO], change.originalLength, _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.slice(toInsert, lastStartM, lastStartM + change.modifiedLength), options);\r\n }\r\n // at this point, startO === startM === count since any remaining prefix should match\r\n recurseSplice(lastStartO, lastStartM, lastStartO);\r\n }\r\n spliceSimple(location, deleteCount, toInsert = _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.empty(), { onDidCreateNode, onDidDeleteNode }) {\r\n const { parentNode, listIndex, revealed, visible } = this.getParentNodeWithListIndex(location);\r\n const treeListElementsToInsert = [];\r\n const nodesToInsertIterator = _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.map(toInsert, el => this.createTreeNode(el, parentNode, parentNode.visible ? 1 /* Visible */ : 0 /* Hidden */, revealed, treeListElementsToInsert, onDidCreateNode));\r\n const lastIndex = location[location.length - 1];\r\n const lastHadChildren = parentNode.children.length > 0;\r\n // figure out what's the visible child start index right before the\r\n // splice point\r\n let visibleChildStartIndex = 0;\r\n for (let i = lastIndex; i >= 0 && i < parentNode.children.length; i--) {\r\n const child = parentNode.children[i];\r\n if (child.visible) {\r\n visibleChildStartIndex = child.visibleChildIndex;\r\n break;\r\n }\r\n }\r\n const nodesToInsert = [];\r\n let insertedVisibleChildrenCount = 0;\r\n let renderNodeCount = 0;\r\n for (const child of nodesToInsertIterator) {\r\n nodesToInsert.push(child);\r\n renderNodeCount += child.renderNodeCount;\r\n if (child.visible) {\r\n child.visibleChildIndex = visibleChildStartIndex + insertedVisibleChildrenCount++;\r\n }\r\n }\r\n const deletedNodes = parentNode.children.splice(lastIndex, deleteCount, ...nodesToInsert);\r\n // figure out what is the count of deleted visible children\r\n let deletedVisibleChildrenCount = 0;\r\n for (const child of deletedNodes) {\r\n if (child.visible) {\r\n deletedVisibleChildrenCount++;\r\n }\r\n }\r\n // and adjust for all visible children after the splice point\r\n if (deletedVisibleChildrenCount !== 0) {\r\n for (let i = lastIndex + nodesToInsert.length; i < parentNode.children.length; i++) {\r\n const child = parentNode.children[i];\r\n if (child.visible) {\r\n child.visibleChildIndex -= deletedVisibleChildrenCount;\r\n }\r\n }\r\n }\r\n // update parent's visible children count\r\n parentNode.visibleChildrenCount += insertedVisibleChildrenCount - deletedVisibleChildrenCount;\r\n if (revealed && visible) {\r\n const visibleDeleteCount = deletedNodes.reduce((r, node) => r + (node.visible ? node.renderNodeCount : 0), 0);\r\n this._updateAncestorsRenderNodeCount(parentNode, renderNodeCount - visibleDeleteCount);\r\n this.list.splice(listIndex, visibleDeleteCount, treeListElementsToInsert);\r\n }\r\n if (deletedNodes.length > 0 && onDidDeleteNode) {\r\n const visit = (node) => {\r\n onDidDeleteNode(node);\r\n node.children.forEach(visit);\r\n };\r\n deletedNodes.forEach(visit);\r\n }\r\n const currentlyHasChildren = parentNode.children.length > 0;\r\n if (lastHadChildren !== currentlyHasChildren) {\r\n this.setCollapsible(location.slice(0, -1), currentlyHasChildren);\r\n }\r\n this._onDidSplice.fire({ insertedNodes: nodesToInsert, deletedNodes });\r\n let node = parentNode;\r\n while (node) {\r\n if (node.visibility === 2 /* Recurse */) {\r\n this.refilter();\r\n break;\r\n }\r\n node = node.parent;\r\n }\r\n }\r\n rerender(location) {\r\n if (location.length === 0) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__.TreeError(this.user, 'Invalid tree location');\r\n }\r\n const { node, listIndex, revealed } = this.getTreeNodeWithListIndex(location);\r\n if (node.visible && revealed) {\r\n this.list.splice(listIndex, 1, [node]);\r\n }\r\n }\r\n has(location) {\r\n return this.hasTreeNode(location);\r\n }\r\n getListIndex(location) {\r\n const { listIndex, visible, revealed } = this.getTreeNodeWithListIndex(location);\r\n return visible && revealed ? listIndex : -1;\r\n }\r\n getListRenderCount(location) {\r\n return this.getTreeNode(location).renderNodeCount;\r\n }\r\n isCollapsible(location) {\r\n return this.getTreeNode(location).collapsible;\r\n }\r\n setCollapsible(location, collapsible) {\r\n const node = this.getTreeNode(location);\r\n if (typeof collapsible === 'undefined') {\r\n collapsible = !node.collapsible;\r\n }\r\n const update = { collapsible };\r\n return this.eventBufferer.bufferEvents(() => this._setCollapseState(location, update));\r\n }\r\n isCollapsed(location) {\r\n return this.getTreeNode(location).collapsed;\r\n }\r\n setCollapsed(location, collapsed, recursive) {\r\n const node = this.getTreeNode(location);\r\n if (typeof collapsed === 'undefined') {\r\n collapsed = !node.collapsed;\r\n }\r\n const update = { collapsed, recursive: recursive || false };\r\n return this.eventBufferer.bufferEvents(() => this._setCollapseState(location, update));\r\n }\r\n _setCollapseState(location, update) {\r\n const { node, listIndex, revealed } = this.getTreeNodeWithListIndex(location);\r\n const result = this._setListNodeCollapseState(node, listIndex, revealed, update);\r\n if (node !== this.root && this.autoExpandSingleChildren && result && !isCollapsibleStateUpdate(update) && node.collapsible && !node.collapsed && !update.recursive) {\r\n let onlyVisibleChildIndex = -1;\r\n for (let i = 0; i < node.children.length; i++) {\r\n const child = node.children[i];\r\n if (child.visible) {\r\n if (onlyVisibleChildIndex > -1) {\r\n onlyVisibleChildIndex = -1;\r\n break;\r\n }\r\n else {\r\n onlyVisibleChildIndex = i;\r\n }\r\n }\r\n }\r\n if (onlyVisibleChildIndex > -1) {\r\n this._setCollapseState([...location, onlyVisibleChildIndex], update);\r\n }\r\n }\r\n return result;\r\n }\r\n _setListNodeCollapseState(node, listIndex, revealed, update) {\r\n const result = this._setNodeCollapseState(node, update, false);\r\n if (!revealed || !node.visible || !result) {\r\n return result;\r\n }\r\n const previousRenderNodeCount = node.renderNodeCount;\r\n const toInsert = this.updateNodeAfterCollapseChange(node);\r\n const deleteCount = previousRenderNodeCount - (listIndex === -1 ? 0 : 1);\r\n this.list.splice(listIndex + 1, deleteCount, toInsert.slice(1));\r\n return result;\r\n }\r\n _setNodeCollapseState(node, update, deep) {\r\n let result;\r\n if (node === this.root) {\r\n result = false;\r\n }\r\n else {\r\n if (isCollapsibleStateUpdate(update)) {\r\n result = node.collapsible !== update.collapsible;\r\n node.collapsible = update.collapsible;\r\n }\r\n else if (!node.collapsible) {\r\n result = false;\r\n }\r\n else {\r\n result = node.collapsed !== update.collapsed;\r\n node.collapsed = update.collapsed;\r\n }\r\n if (result) {\r\n this._onDidChangeCollapseState.fire({ node, deep });\r\n }\r\n }\r\n if (!isCollapsibleStateUpdate(update) && update.recursive) {\r\n for (const child of node.children) {\r\n result = this._setNodeCollapseState(child, update, true) || result;\r\n }\r\n }\r\n return result;\r\n }\r\n expandTo(location) {\r\n this.eventBufferer.bufferEvents(() => {\r\n let node = this.getTreeNode(location);\r\n while (node.parent) {\r\n node = node.parent;\r\n location = location.slice(0, location.length - 1);\r\n if (node.collapsed) {\r\n this._setCollapseState(location, { collapsed: false, recursive: false });\r\n }\r\n }\r\n });\r\n }\r\n refilter() {\r\n const previousRenderNodeCount = this.root.renderNodeCount;\r\n const toInsert = this.updateNodeAfterFilterChange(this.root);\r\n this.list.splice(0, previousRenderNodeCount, toInsert);\r\n }\r\n createTreeNode(treeElement, parent, parentVisibility, revealed, treeListElements, onDidCreateNode) {\r\n const node = {\r\n parent,\r\n element: treeElement.element,\r\n children: [],\r\n depth: parent.depth + 1,\r\n visibleChildrenCount: 0,\r\n visibleChildIndex: -1,\r\n collapsible: typeof treeElement.collapsible === 'boolean' ? treeElement.collapsible : (typeof treeElement.collapsed !== 'undefined'),\r\n collapsed: typeof treeElement.collapsed === 'undefined' ? this.collapseByDefault : treeElement.collapsed,\r\n renderNodeCount: 1,\r\n visibility: 1 /* Visible */,\r\n visible: true,\r\n filterData: undefined\r\n };\r\n const visibility = this._filterNode(node, parentVisibility);\r\n node.visibility = visibility;\r\n if (revealed) {\r\n treeListElements.push(node);\r\n }\r\n const childElements = treeElement.children || _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.empty();\r\n const childRevealed = revealed && visibility !== 0 /* Hidden */ && !node.collapsed;\r\n const childNodes = _common_iterator_js__WEBPACK_IMPORTED_MODULE_4__.Iterable.map(childElements, el => this.createTreeNode(el, node, visibility, childRevealed, treeListElements, onDidCreateNode));\r\n let visibleChildrenCount = 0;\r\n let renderNodeCount = 1;\r\n for (const child of childNodes) {\r\n node.children.push(child);\r\n renderNodeCount += child.renderNodeCount;\r\n if (child.visible) {\r\n child.visibleChildIndex = visibleChildrenCount++;\r\n }\r\n }\r\n node.collapsible = node.collapsible || node.children.length > 0;\r\n node.visibleChildrenCount = visibleChildrenCount;\r\n node.visible = visibility === 2 /* Recurse */ ? visibleChildrenCount > 0 : (visibility === 1 /* Visible */);\r\n if (!node.visible) {\r\n node.renderNodeCount = 0;\r\n if (revealed) {\r\n treeListElements.pop();\r\n }\r\n }\r\n else if (!node.collapsed) {\r\n node.renderNodeCount = renderNodeCount;\r\n }\r\n if (onDidCreateNode) {\r\n onDidCreateNode(node);\r\n }\r\n return node;\r\n }\r\n updateNodeAfterCollapseChange(node) {\r\n const previousRenderNodeCount = node.renderNodeCount;\r\n const result = [];\r\n this._updateNodeAfterCollapseChange(node, result);\r\n this._updateAncestorsRenderNodeCount(node.parent, result.length - previousRenderNodeCount);\r\n return result;\r\n }\r\n _updateNodeAfterCollapseChange(node, result) {\r\n if (node.visible === false) {\r\n return 0;\r\n }\r\n result.push(node);\r\n node.renderNodeCount = 1;\r\n if (!node.collapsed) {\r\n for (const child of node.children) {\r\n node.renderNodeCount += this._updateNodeAfterCollapseChange(child, result);\r\n }\r\n }\r\n this._onDidChangeRenderNodeCount.fire(node);\r\n return node.renderNodeCount;\r\n }\r\n updateNodeAfterFilterChange(node) {\r\n const previousRenderNodeCount = node.renderNodeCount;\r\n const result = [];\r\n this._updateNodeAfterFilterChange(node, node.visible ? 1 /* Visible */ : 0 /* Hidden */, result);\r\n this._updateAncestorsRenderNodeCount(node.parent, result.length - previousRenderNodeCount);\r\n return result;\r\n }\r\n _updateNodeAfterFilterChange(node, parentVisibility, result, revealed = true) {\r\n let visibility;\r\n if (node !== this.root) {\r\n visibility = this._filterNode(node, parentVisibility);\r\n if (visibility === 0 /* Hidden */) {\r\n node.visible = false;\r\n node.renderNodeCount = 0;\r\n return false;\r\n }\r\n if (revealed) {\r\n result.push(node);\r\n }\r\n }\r\n const resultStartLength = result.length;\r\n node.renderNodeCount = node === this.root ? 0 : 1;\r\n let hasVisibleDescendants = false;\r\n if (!node.collapsed || visibility !== 0 /* Hidden */) {\r\n let visibleChildIndex = 0;\r\n for (const child of node.children) {\r\n hasVisibleDescendants = this._updateNodeAfterFilterChange(child, visibility, result, revealed && !node.collapsed) || hasVisibleDescendants;\r\n if (child.visible) {\r\n child.visibleChildIndex = visibleChildIndex++;\r\n }\r\n }\r\n node.visibleChildrenCount = visibleChildIndex;\r\n }\r\n else {\r\n node.visibleChildrenCount = 0;\r\n }\r\n if (node !== this.root) {\r\n node.visible = visibility === 2 /* Recurse */ ? hasVisibleDescendants : (visibility === 1 /* Visible */);\r\n }\r\n if (!node.visible) {\r\n node.renderNodeCount = 0;\r\n if (revealed) {\r\n result.pop();\r\n }\r\n }\r\n else if (!node.collapsed) {\r\n node.renderNodeCount += result.length - resultStartLength;\r\n }\r\n this._onDidChangeRenderNodeCount.fire(node);\r\n return node.visible;\r\n }\r\n _updateAncestorsRenderNodeCount(node, diff) {\r\n if (diff === 0) {\r\n return;\r\n }\r\n while (node) {\r\n node.renderNodeCount += diff;\r\n this._onDidChangeRenderNodeCount.fire(node);\r\n node = node.parent;\r\n }\r\n }\r\n _filterNode(node, parentVisibility) {\r\n const result = this.filter ? this.filter.filter(node.element, parentVisibility) : 1 /* Visible */;\r\n if (typeof result === 'boolean') {\r\n node.filterData = undefined;\r\n return result ? 1 /* Visible */ : 0 /* Hidden */;\r\n }\r\n else if (isFilterResult(result)) {\r\n node.filterData = result.data;\r\n return getVisibleState(result.visibility);\r\n }\r\n else {\r\n node.filterData = undefined;\r\n return getVisibleState(result);\r\n }\r\n }\r\n // cheap\r\n hasTreeNode(location, node = this.root) {\r\n if (!location || location.length === 0) {\r\n return true;\r\n }\r\n const [index, ...rest] = location;\r\n if (index < 0 || index > node.children.length) {\r\n return false;\r\n }\r\n return this.hasTreeNode(rest, node.children[index]);\r\n }\r\n // cheap\r\n getTreeNode(location, node = this.root) {\r\n if (!location || location.length === 0) {\r\n return node;\r\n }\r\n const [index, ...rest] = location;\r\n if (index < 0 || index > node.children.length) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__.TreeError(this.user, 'Invalid tree location');\r\n }\r\n return this.getTreeNode(rest, node.children[index]);\r\n }\r\n // expensive\r\n getTreeNodeWithListIndex(location) {\r\n if (location.length === 0) {\r\n return { node: this.root, listIndex: -1, revealed: true, visible: false };\r\n }\r\n const { parentNode, listIndex, revealed, visible } = this.getParentNodeWithListIndex(location);\r\n const index = location[location.length - 1];\r\n if (index < 0 || index > parentNode.children.length) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__.TreeError(this.user, 'Invalid tree location');\r\n }\r\n const node = parentNode.children[index];\r\n return { node, listIndex, revealed, visible: visible && node.visible };\r\n }\r\n getParentNodeWithListIndex(location, node = this.root, listIndex = 0, revealed = true, visible = true) {\r\n const [index, ...rest] = location;\r\n if (index < 0 || index > node.children.length) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__.TreeError(this.user, 'Invalid tree location');\r\n }\r\n // TODO@joao perf!\r\n for (let i = 0; i < index; i++) {\r\n listIndex += node.children[i].renderNodeCount;\r\n }\r\n revealed = revealed && !node.collapsed;\r\n visible = visible && node.visible;\r\n if (rest.length === 0) {\r\n return { parentNode: node, listIndex, revealed, visible };\r\n }\r\n return this.getParentNodeWithListIndex(rest, node.children[index], listIndex + 1, revealed, visible);\r\n }\r\n getNode(location = []) {\r\n return this.getTreeNode(location);\r\n }\r\n // TODO@joao perf!\r\n getNodeLocation(node) {\r\n const location = [];\r\n let indexTreeNode = node; // typing woes\r\n while (indexTreeNode.parent) {\r\n location.push(indexTreeNode.parent.children.indexOf(indexTreeNode));\r\n indexTreeNode = indexTreeNode.parent;\r\n }\r\n return location.reverse();\r\n }\r\n getParentNodeLocation(location) {\r\n if (location.length === 0) {\r\n return undefined;\r\n }\r\n else if (location.length === 1) {\r\n return [];\r\n }\r\n else {\r\n return (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.tail2)(location)[0];\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ObjectTree\": () => (/* binding */ ObjectTree),\n/* harmony export */ \"CompressibleObjectTree\": () => (/* binding */ CompressibleObjectTree)\n/* harmony export */ });\n/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js\");\n/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./objectTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js\");\n/* harmony import */ var _compressedObjectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./compressedObjectTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js\");\n/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/decorators.js */ \"./node_modules/monaco-editor/esm/vs/base/common/decorators.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\n\r\n\r\n\r\n\r\n\r\nclass ObjectTree extends _abstractTree_js__WEBPACK_IMPORTED_MODULE_1__.AbstractTree {\r\n constructor(user, container, delegate, renderers, options = {}) {\r\n super(user, container, delegate, renderers, options);\r\n }\r\n get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; }\r\n setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options) {\r\n this.model.setChildren(element, children, options);\r\n }\r\n rerender(element) {\r\n if (element === undefined) {\r\n this.view.rerender();\r\n return;\r\n }\r\n this.model.rerender(element);\r\n }\r\n hasElement(element) {\r\n return this.model.has(element);\r\n }\r\n createModel(user, view, options) {\r\n return new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_2__.ObjectTreeModel(user, view, options);\r\n }\r\n}\r\nclass CompressibleRenderer {\r\n constructor(_compressedTreeNodeProvider, renderer) {\r\n this._compressedTreeNodeProvider = _compressedTreeNodeProvider;\r\n this.renderer = renderer;\r\n this.templateId = renderer.templateId;\r\n if (renderer.onDidChangeTwistieState) {\r\n this.onDidChangeTwistieState = renderer.onDidChangeTwistieState;\r\n }\r\n }\r\n get compressedTreeNodeProvider() {\r\n return this._compressedTreeNodeProvider();\r\n }\r\n renderTemplate(container) {\r\n const data = this.renderer.renderTemplate(container);\r\n return { compressedTreeNode: undefined, data };\r\n }\r\n renderElement(node, index, templateData, height) {\r\n const compressedTreeNode = this.compressedTreeNodeProvider.getCompressedTreeNode(node.element);\r\n if (compressedTreeNode.element.elements.length === 1) {\r\n templateData.compressedTreeNode = undefined;\r\n this.renderer.renderElement(node, index, templateData.data, height);\r\n }\r\n else {\r\n templateData.compressedTreeNode = compressedTreeNode;\r\n this.renderer.renderCompressedElements(compressedTreeNode, index, templateData.data, height);\r\n }\r\n }\r\n disposeElement(node, index, templateData, height) {\r\n if (templateData.compressedTreeNode) {\r\n if (this.renderer.disposeCompressedElements) {\r\n this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index, templateData.data, height);\r\n }\r\n }\r\n else {\r\n if (this.renderer.disposeElement) {\r\n this.renderer.disposeElement(node, index, templateData.data, height);\r\n }\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n this.renderer.disposeTemplate(templateData.data);\r\n }\r\n renderTwistie(element, twistieElement) {\r\n if (this.renderer.renderTwistie) {\r\n return this.renderer.renderTwistie(element, twistieElement);\r\n }\r\n return false;\r\n }\r\n}\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__.memoize\r\n], CompressibleRenderer.prototype, \"compressedTreeNodeProvider\", null);\r\nfunction asObjectTreeOptions(compressedTreeNodeProvider, options) {\r\n return options && Object.assign(Object.assign({}, options), { keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && {\r\n getKeyboardNavigationLabel(e) {\r\n let compressedTreeNode;\r\n try {\r\n compressedTreeNode = compressedTreeNodeProvider().getCompressedTreeNode(e);\r\n }\r\n catch (_a) {\r\n return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e);\r\n }\r\n if (compressedTreeNode.element.elements.length === 1) {\r\n return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e);\r\n }\r\n else {\r\n return options.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(compressedTreeNode.element.elements);\r\n }\r\n }\r\n } });\r\n}\r\nclass CompressibleObjectTree extends ObjectTree {\r\n constructor(user, container, delegate, renderers, options = {}) {\r\n const compressedTreeNodeProvider = () => this;\r\n const compressibleRenderers = renderers.map(r => new CompressibleRenderer(compressedTreeNodeProvider, r));\r\n super(user, container, delegate, compressibleRenderers, asObjectTreeOptions(compressedTreeNodeProvider, options));\r\n }\r\n setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options) {\r\n this.model.setChildren(element, children, options);\r\n }\r\n createModel(user, view, options) {\r\n return new _compressedObjectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__.CompressibleObjectTreeModel(user, view, options);\r\n }\r\n updateOptions(optionsUpdate = {}) {\r\n super.updateOptions(optionsUpdate);\r\n if (typeof optionsUpdate.compressionEnabled !== 'undefined') {\r\n this.model.setCompressionEnabled(optionsUpdate.compressionEnabled);\r\n }\r\n }\r\n getCompressedTreeNode(element = null) {\r\n return this.model.getCompressedTreeNode(element);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ObjectTreeModel\": () => (/* binding */ ObjectTreeModel)\n/* harmony export */ });\n/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indexTreeModel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js\");\n/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass ObjectTreeModel {\r\n constructor(user, list, options = {}) {\r\n this.user = user;\r\n this.rootRef = null;\r\n this.nodes = new Map();\r\n this.nodesByIdentity = new Map();\r\n this.model = new _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_1__.IndexTreeModel(user, list, null, options);\r\n this.onDidSplice = this.model.onDidSplice;\r\n this.onDidChangeCollapseState = this.model.onDidChangeCollapseState;\r\n this.onDidChangeRenderNodeCount = this.model.onDidChangeRenderNodeCount;\r\n if (options.sorter) {\r\n this.sorter = {\r\n compare(a, b) {\r\n return options.sorter.compare(a.element, b.element);\r\n }\r\n };\r\n }\r\n this.identityProvider = options.identityProvider;\r\n }\r\n setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options = {}) {\r\n const location = this.getElementLocation(element);\r\n this._setChildren(location, this.preserveCollapseState(children), options);\r\n }\r\n _setChildren(location, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty(), options) {\r\n const insertedElements = new Set();\r\n const insertedElementIds = new Set();\r\n const onDidCreateNode = (node) => {\r\n var _a;\r\n if (node.element === null) {\r\n return;\r\n }\r\n const tnode = node;\r\n insertedElements.add(tnode.element);\r\n this.nodes.set(tnode.element, tnode);\r\n if (this.identityProvider) {\r\n const id = this.identityProvider.getId(tnode.element).toString();\r\n insertedElementIds.add(id);\r\n this.nodesByIdentity.set(id, tnode);\r\n }\r\n (_a = options.onDidCreateNode) === null || _a === void 0 ? void 0 : _a.call(options, tnode);\r\n };\r\n const onDidDeleteNode = (node) => {\r\n var _a;\r\n if (node.element === null) {\r\n return;\r\n }\r\n const tnode = node;\r\n if (!insertedElements.has(tnode.element)) {\r\n this.nodes.delete(tnode.element);\r\n }\r\n if (this.identityProvider) {\r\n const id = this.identityProvider.getId(tnode.element).toString();\r\n if (!insertedElementIds.has(id)) {\r\n this.nodesByIdentity.delete(id);\r\n }\r\n }\r\n (_a = options.onDidDeleteNode) === null || _a === void 0 ? void 0 : _a.call(options, tnode);\r\n };\r\n this.model.splice([...location, 0], Number.MAX_VALUE, children, Object.assign(Object.assign({}, options), { onDidCreateNode, onDidDeleteNode }));\r\n }\r\n preserveCollapseState(elements = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.empty()) {\r\n if (this.sorter) {\r\n elements = (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__.mergeSort)([...elements], this.sorter.compare.bind(this.sorter));\r\n }\r\n return _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.map(elements, treeElement => {\r\n let node = this.nodes.get(treeElement.element);\r\n if (!node && this.identityProvider) {\r\n const id = this.identityProvider.getId(treeElement.element).toString();\r\n node = this.nodesByIdentity.get(id);\r\n }\r\n if (!node) {\r\n return Object.assign(Object.assign({}, treeElement), { children: this.preserveCollapseState(treeElement.children) });\r\n }\r\n const collapsible = typeof treeElement.collapsible === 'boolean' ? treeElement.collapsible : node.collapsible;\r\n const collapsed = typeof treeElement.collapsed !== 'undefined' ? treeElement.collapsed : node.collapsed;\r\n return Object.assign(Object.assign({}, treeElement), { collapsible,\r\n collapsed, children: this.preserveCollapseState(treeElement.children) });\r\n });\r\n }\r\n rerender(element) {\r\n const location = this.getElementLocation(element);\r\n this.model.rerender(location);\r\n }\r\n has(element) {\r\n return this.nodes.has(element);\r\n }\r\n getListIndex(element) {\r\n const location = this.getElementLocation(element);\r\n return this.model.getListIndex(location);\r\n }\r\n getListRenderCount(element) {\r\n const location = this.getElementLocation(element);\r\n return this.model.getListRenderCount(location);\r\n }\r\n isCollapsible(element) {\r\n const location = this.getElementLocation(element);\r\n return this.model.isCollapsible(location);\r\n }\r\n setCollapsible(element, collapsible) {\r\n const location = this.getElementLocation(element);\r\n return this.model.setCollapsible(location, collapsible);\r\n }\r\n isCollapsed(element) {\r\n const location = this.getElementLocation(element);\r\n return this.model.isCollapsed(location);\r\n }\r\n setCollapsed(element, collapsed, recursive) {\r\n const location = this.getElementLocation(element);\r\n return this.model.setCollapsed(location, collapsed, recursive);\r\n }\r\n expandTo(element) {\r\n const location = this.getElementLocation(element);\r\n this.model.expandTo(location);\r\n }\r\n refilter() {\r\n this.model.refilter();\r\n }\r\n getNode(element = null) {\r\n if (element === null) {\r\n return this.model.getNode(this.model.rootRef);\r\n }\r\n const node = this.nodes.get(element);\r\n if (!node) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Tree element not found: ${element}`);\r\n }\r\n return node;\r\n }\r\n getNodeLocation(node) {\r\n return node.element;\r\n }\r\n getParentNodeLocation(element) {\r\n if (element === null) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Invalid getParentNodeLocation call`);\r\n }\r\n const node = this.nodes.get(element);\r\n if (!node) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Tree element not found: ${element}`);\r\n }\r\n const location = this.model.getNodeLocation(node);\r\n const parentLocation = this.model.getParentNodeLocation(location);\r\n const parent = this.model.getNode(parentLocation);\r\n return parent.element;\r\n }\r\n getElementLocation(element) {\r\n if (element === null) {\r\n return [];\r\n }\r\n const node = this.nodes.get(element);\r\n if (!node) {\r\n throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__.TreeError(this.user, `Tree element not found: ${element}`);\r\n }\r\n return this.model.getNodeLocation(node);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TreeMouseEventTarget\": () => (/* binding */ TreeMouseEventTarget),\n/* harmony export */ \"TreeError\": () => (/* binding */ TreeError),\n/* harmony export */ \"WeakMapper\": () => (/* binding */ WeakMapper)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar TreeMouseEventTarget;\r\n(function (TreeMouseEventTarget) {\r\n TreeMouseEventTarget[TreeMouseEventTarget[\"Unknown\"] = 0] = \"Unknown\";\r\n TreeMouseEventTarget[TreeMouseEventTarget[\"Twistie\"] = 1] = \"Twistie\";\r\n TreeMouseEventTarget[TreeMouseEventTarget[\"Element\"] = 2] = \"Element\";\r\n})(TreeMouseEventTarget || (TreeMouseEventTarget = {}));\r\nclass TreeError extends Error {\r\n constructor(user, message) {\r\n super(`TreeError [${user}] ${message}`);\r\n }\r\n}\r\nclass WeakMapper {\r\n constructor(fn) {\r\n this.fn = fn;\r\n this._map = new WeakMap();\r\n }\r\n map(key) {\r\n let result = this._map.get(key);\r\n if (!result) {\r\n result = this.fn(key);\r\n this._map.set(key, result);\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"treeItemExpandedIcon\": () => (/* binding */ treeItemExpandedIcon),\n/* harmony export */ \"treeFilterOnTypeOnIcon\": () => (/* binding */ treeFilterOnTypeOnIcon),\n/* harmony export */ \"treeFilterOnTypeOffIcon\": () => (/* binding */ treeFilterOnTypeOffIcon),\n/* harmony export */ \"treeFilterClearIcon\": () => (/* binding */ treeFilterClearIcon),\n/* harmony export */ \"treeItemLoadingIcon\": () => (/* binding */ treeItemLoadingIcon)\n/* harmony export */ });\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst treeItemExpandedIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.registerCodicon)('tree-item-expanded', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.Codicon.chevronDown); // collapsed is done with rotation\r\nconst treeFilterOnTypeOnIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.registerCodicon)('tree-filter-on-type-on', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.Codicon.listFilter);\r\nconst treeFilterOnTypeOffIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.registerCodicon)('tree-filter-on-type-off', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.Codicon.listSelection);\r\nconst treeFilterClearIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.registerCodicon)('tree-filter-clear', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.Codicon.close);\r\nconst treeItemLoadingIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.registerCodicon)('tree-item-loading', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__.Codicon.loading);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Widget\": () => (/* binding */ Widget)\n/* harmony export */ });\n/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass Widget extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n onclick(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.CLICK, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(e))));\r\n }\r\n onmousedown(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.MOUSE_DOWN, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(e))));\r\n }\r\n onmouseover(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.MOUSE_OVER, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(e))));\r\n }\r\n onnonbubblingmouseout(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableNonBubblingMouseOutListener(domNode, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent(e))));\r\n }\r\n onkeydown(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.KEY_DOWN, (e) => listener(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__.StandardKeyboardEvent(e))));\r\n }\r\n onkeyup(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.KEY_UP, (e) => listener(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__.StandardKeyboardEvent(e))));\r\n }\r\n oninput(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.INPUT, listener));\r\n }\r\n onblur(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.BLUR, listener));\r\n }\r\n onfocus(domNode, listener) {\r\n this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.FOCUS, listener));\r\n }\r\n ignoreGesture(domNode) {\r\n _touch_js__WEBPACK_IMPORTED_MODULE_4__.Gesture.ignoreTarget(domNode);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/actions.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/actions.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Action\": () => (/* binding */ Action),\n/* harmony export */ \"ActionRunner\": () => (/* binding */ ActionRunner),\n/* harmony export */ \"Separator\": () => (/* binding */ Separator),\n/* harmony export */ \"SubmenuAction\": () => (/* binding */ SubmenuAction),\n/* harmony export */ \"EmptySubmenuAction\": () => (/* binding */ EmptySubmenuAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\nclass Action extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(id, label = '', cssClass = '', enabled = true, actionCallback) {\r\n super();\r\n this._onDidChange = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._enabled = true;\r\n this._checked = false;\r\n this._id = id;\r\n this._label = label;\r\n this._cssClass = cssClass;\r\n this._enabled = enabled;\r\n this._actionCallback = actionCallback;\r\n }\r\n get id() {\r\n return this._id;\r\n }\r\n get label() {\r\n return this._label;\r\n }\r\n set label(value) {\r\n this._setLabel(value);\r\n }\r\n _setLabel(value) {\r\n if (this._label !== value) {\r\n this._label = value;\r\n this._onDidChange.fire({ label: value });\r\n }\r\n }\r\n get tooltip() {\r\n return this._tooltip || '';\r\n }\r\n set tooltip(value) {\r\n this._setTooltip(value);\r\n }\r\n _setTooltip(value) {\r\n if (this._tooltip !== value) {\r\n this._tooltip = value;\r\n this._onDidChange.fire({ tooltip: value });\r\n }\r\n }\r\n get class() {\r\n return this._cssClass;\r\n }\r\n set class(value) {\r\n this._setClass(value);\r\n }\r\n _setClass(value) {\r\n if (this._cssClass !== value) {\r\n this._cssClass = value;\r\n this._onDidChange.fire({ class: value });\r\n }\r\n }\r\n get enabled() {\r\n return this._enabled;\r\n }\r\n set enabled(value) {\r\n this._setEnabled(value);\r\n }\r\n _setEnabled(value) {\r\n if (this._enabled !== value) {\r\n this._enabled = value;\r\n this._onDidChange.fire({ enabled: value });\r\n }\r\n }\r\n get checked() {\r\n return this._checked;\r\n }\r\n set checked(value) {\r\n this._setChecked(value);\r\n }\r\n _setChecked(value) {\r\n if (this._checked !== value) {\r\n this._checked = value;\r\n this._onDidChange.fire({ checked: value });\r\n }\r\n }\r\n run(event, _data) {\r\n if (this._actionCallback) {\r\n return this._actionCallback(event);\r\n }\r\n return Promise.resolve(true);\r\n }\r\n}\r\nclass ActionRunner extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super(...arguments);\r\n this._onBeforeRun = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onBeforeRun = this._onBeforeRun.event;\r\n this._onDidRun = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onDidRun = this._onDidRun.event;\r\n }\r\n run(action, context) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!action.enabled) {\r\n return Promise.resolve(null);\r\n }\r\n this._onBeforeRun.fire({ action: action });\r\n try {\r\n const result = yield this.runAction(action, context);\r\n this._onDidRun.fire({ action: action, result: result });\r\n }\r\n catch (error) {\r\n this._onDidRun.fire({ action: action, error: error });\r\n }\r\n });\r\n }\r\n runAction(action, context) {\r\n const res = context ? action.run(context) : action.run();\r\n return Promise.resolve(res);\r\n }\r\n}\r\nclass Separator extends Action {\r\n constructor(label) {\r\n super(Separator.ID, label, label ? 'separator text' : 'separator');\r\n this.checked = false;\r\n this.enabled = false;\r\n }\r\n}\r\nSeparator.ID = 'vs.actions.separator';\r\nclass SubmenuAction {\r\n constructor(id, label, actions, cssClass) {\r\n this.tooltip = '';\r\n this.enabled = true;\r\n this.checked = false;\r\n this.id = id;\r\n this.label = label;\r\n this.class = cssClass;\r\n this._actions = actions;\r\n }\r\n dispose() {\r\n // there is NOTHING to dispose and the SubmenuAction should\r\n // never have anything to dispose as it is a convenience type\r\n // to bridge into the rendering world.\r\n }\r\n get actions() {\r\n return this._actions;\r\n }\r\n run() {\r\n return __awaiter(this, void 0, void 0, function* () { });\r\n }\r\n}\r\nclass EmptySubmenuAction extends Action {\r\n constructor() {\r\n super(EmptySubmenuAction.ID, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('submenu.empty', '(empty)'), undefined, false);\r\n }\r\n}\r\nEmptySubmenuAction.ID = 'vs.actions.empty';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/actions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/arrays.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"tail\": () => (/* binding */ tail),\n/* harmony export */ \"tail2\": () => (/* binding */ tail2),\n/* harmony export */ \"equals\": () => (/* binding */ equals),\n/* harmony export */ \"binarySearch\": () => (/* binding */ binarySearch),\n/* harmony export */ \"findFirstInSorted\": () => (/* binding */ findFirstInSorted),\n/* harmony export */ \"quickSelect\": () => (/* binding */ quickSelect),\n/* harmony export */ \"mergeSort\": () => (/* binding */ mergeSort),\n/* harmony export */ \"groupBy\": () => (/* binding */ groupBy),\n/* harmony export */ \"coalesce\": () => (/* binding */ coalesce),\n/* harmony export */ \"isFalsyOrEmpty\": () => (/* binding */ isFalsyOrEmpty),\n/* harmony export */ \"isNonEmptyArray\": () => (/* binding */ isNonEmptyArray),\n/* harmony export */ \"distinct\": () => (/* binding */ distinct),\n/* harmony export */ \"distinctES6\": () => (/* binding */ distinctES6),\n/* harmony export */ \"firstOrDefault\": () => (/* binding */ firstOrDefault),\n/* harmony export */ \"flatten\": () => (/* binding */ flatten),\n/* harmony export */ \"range\": () => (/* binding */ range),\n/* harmony export */ \"arrayInsert\": () => (/* binding */ arrayInsert),\n/* harmony export */ \"pushToStart\": () => (/* binding */ pushToStart),\n/* harmony export */ \"pushToEnd\": () => (/* binding */ pushToEnd),\n/* harmony export */ \"asArray\": () => (/* binding */ asArray)\n/* harmony export */ });\n/**\r\n * Returns the last element of an array.\r\n * @param array The array.\r\n * @param n Which element from the end (default is zero).\r\n */\r\nfunction tail(array, n = 0) {\r\n return array[array.length - (1 + n)];\r\n}\r\nfunction tail2(arr) {\r\n if (arr.length === 0) {\r\n throw new Error('Invalid tail call');\r\n }\r\n return [arr.slice(0, arr.length - 1), arr[arr.length - 1]];\r\n}\r\nfunction equals(one, other, itemEquals = (a, b) => a === b) {\r\n if (one === other) {\r\n return true;\r\n }\r\n if (!one || !other) {\r\n return false;\r\n }\r\n if (one.length !== other.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = one.length; i < len; i++) {\r\n if (!itemEquals(one[i], other[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction binarySearch(array, key, comparator) {\r\n let low = 0, high = array.length - 1;\r\n while (low <= high) {\r\n const mid = ((low + high) / 2) | 0;\r\n const comp = comparator(array[mid], key);\r\n if (comp < 0) {\r\n low = mid + 1;\r\n }\r\n else if (comp > 0) {\r\n high = mid - 1;\r\n }\r\n else {\r\n return mid;\r\n }\r\n }\r\n return -(low + 1);\r\n}\r\n/**\r\n * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false\r\n * are located before all elements where p(x) is true.\r\n * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.\r\n */\r\nfunction findFirstInSorted(array, p) {\r\n let low = 0, high = array.length;\r\n if (high === 0) {\r\n return 0; // no children\r\n }\r\n while (low < high) {\r\n const mid = Math.floor((low + high) / 2);\r\n if (p(array[mid])) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n return low;\r\n}\r\nfunction quickSelect(nth, data, compare) {\r\n nth = nth | 0;\r\n if (nth >= data.length) {\r\n throw new TypeError('invalid index');\r\n }\r\n let pivotValue = data[Math.floor(data.length * Math.random())];\r\n let lower = [];\r\n let higher = [];\r\n let pivots = [];\r\n for (let value of data) {\r\n const val = compare(value, pivotValue);\r\n if (val < 0) {\r\n lower.push(value);\r\n }\r\n else if (val > 0) {\r\n higher.push(value);\r\n }\r\n else {\r\n pivots.push(value);\r\n }\r\n }\r\n if (nth < lower.length) {\r\n return quickSelect(nth, lower, compare);\r\n }\r\n else if (nth < lower.length + pivots.length) {\r\n return pivots[0];\r\n }\r\n else {\r\n return quickSelect(nth - (lower.length + pivots.length), higher, compare);\r\n }\r\n}\r\n/**\r\n * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort`\r\n * so only use this when actually needing stable sort.\r\n */\r\nfunction mergeSort(data, compare) {\r\n _sort(data, compare, 0, data.length - 1, []);\r\n return data;\r\n}\r\nfunction _merge(a, compare, lo, mid, hi, aux) {\r\n let leftIdx = lo, rightIdx = mid + 1;\r\n for (let i = lo; i <= hi; i++) {\r\n aux[i] = a[i];\r\n }\r\n for (let i = lo; i <= hi; i++) {\r\n if (leftIdx > mid) {\r\n // left side consumed\r\n a[i] = aux[rightIdx++];\r\n }\r\n else if (rightIdx > hi) {\r\n // right side consumed\r\n a[i] = aux[leftIdx++];\r\n }\r\n else if (compare(aux[rightIdx], aux[leftIdx]) < 0) {\r\n // right element is less -> comes first\r\n a[i] = aux[rightIdx++];\r\n }\r\n else {\r\n // left element comes first (less or equal)\r\n a[i] = aux[leftIdx++];\r\n }\r\n }\r\n}\r\nfunction _sort(a, compare, lo, hi, aux) {\r\n if (hi <= lo) {\r\n return;\r\n }\r\n const mid = lo + ((hi - lo) / 2) | 0;\r\n _sort(a, compare, lo, mid, aux);\r\n _sort(a, compare, mid + 1, hi, aux);\r\n if (compare(a[mid], a[mid + 1]) <= 0) {\r\n // left and right are sorted and if the last-left element is less\r\n // or equals than the first-right element there is nothing else\r\n // to do\r\n return;\r\n }\r\n _merge(a, compare, lo, mid, hi, aux);\r\n}\r\nfunction groupBy(data, compare) {\r\n const result = [];\r\n let currentGroup = undefined;\r\n for (const element of mergeSort(data.slice(0), compare)) {\r\n if (!currentGroup || compare(currentGroup[0], element) !== 0) {\r\n currentGroup = [element];\r\n result.push(currentGroup);\r\n }\r\n else {\r\n currentGroup.push(element);\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * @returns New array with all falsy values removed. The original array IS NOT modified.\r\n */\r\nfunction coalesce(array) {\r\n return array.filter(e => !!e);\r\n}\r\n/**\r\n * @returns false if the provided object is an array and not empty.\r\n */\r\nfunction isFalsyOrEmpty(obj) {\r\n return !Array.isArray(obj) || obj.length === 0;\r\n}\r\nfunction isNonEmptyArray(obj) {\r\n return Array.isArray(obj) && obj.length > 0;\r\n}\r\n/**\r\n * Removes duplicates from the given array. The optional keyFn allows to specify\r\n * how elements are checked for equalness by returning a unique string for each.\r\n */\r\nfunction distinct(array, keyFn) {\r\n if (!keyFn) {\r\n return array.filter((element, position) => {\r\n return array.indexOf(element) === position;\r\n });\r\n }\r\n const seen = Object.create(null);\r\n return array.filter((elem) => {\r\n const key = keyFn(elem);\r\n if (seen[key]) {\r\n return false;\r\n }\r\n seen[key] = true;\r\n return true;\r\n });\r\n}\r\nfunction distinctES6(array) {\r\n const seen = new Set();\r\n return array.filter(element => {\r\n if (seen.has(element)) {\r\n return false;\r\n }\r\n seen.add(element);\r\n return true;\r\n });\r\n}\r\nfunction firstOrDefault(array, notFoundValue) {\r\n return array.length > 0 ? array[0] : notFoundValue;\r\n}\r\nfunction flatten(arr) {\r\n return [].concat(...arr);\r\n}\r\nfunction range(arg, to) {\r\n let from = typeof to === 'number' ? arg : 0;\r\n if (typeof to === 'number') {\r\n from = arg;\r\n }\r\n else {\r\n from = 0;\r\n to = arg;\r\n }\r\n const result = [];\r\n if (from <= to) {\r\n for (let i = from; i < to; i++) {\r\n result.push(i);\r\n }\r\n }\r\n else {\r\n for (let i = from; i > to; i--) {\r\n result.push(i);\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Insert `insertArr` inside `target` at `insertIndex`.\r\n * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array\r\n */\r\nfunction arrayInsert(target, insertIndex, insertArr) {\r\n const before = target.slice(0, insertIndex);\r\n const after = target.slice(insertIndex);\r\n return before.concat(insertArr, after);\r\n}\r\n/**\r\n * Pushes an element to the start of the array, if found.\r\n */\r\nfunction pushToStart(arr, value) {\r\n const index = arr.indexOf(value);\r\n if (index > -1) {\r\n arr.splice(index, 1);\r\n arr.unshift(value);\r\n }\r\n}\r\n/**\r\n * Pushes an element to the end of the array, if found.\r\n */\r\nfunction pushToEnd(arr, value) {\r\n const index = arr.indexOf(value);\r\n if (index > -1) {\r\n arr.splice(index, 1);\r\n arr.push(value);\r\n }\r\n}\r\nfunction asArray(x) {\r\n return Array.isArray(x) ? x : [x];\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/arrays.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/assert.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/assert.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ok\": () => (/* binding */ ok)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.\r\n */\r\nfunction ok(value, message) {\r\n if (!value) {\r\n throw new Error(message ? `Assertion failed (${message})` : 'Assertion Failed');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/assert.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/async.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/async.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isThenable\": () => (/* binding */ isThenable),\n/* harmony export */ \"createCancelablePromise\": () => (/* binding */ createCancelablePromise),\n/* harmony export */ \"raceCancellation\": () => (/* binding */ raceCancellation),\n/* harmony export */ \"Throttler\": () => (/* binding */ Throttler),\n/* harmony export */ \"Delayer\": () => (/* binding */ Delayer),\n/* harmony export */ \"ThrottledDelayer\": () => (/* binding */ ThrottledDelayer),\n/* harmony export */ \"timeout\": () => (/* binding */ timeout),\n/* harmony export */ \"disposableTimeout\": () => (/* binding */ disposableTimeout),\n/* harmony export */ \"first\": () => (/* binding */ first),\n/* harmony export */ \"TimeoutTimer\": () => (/* binding */ TimeoutTimer),\n/* harmony export */ \"IntervalTimer\": () => (/* binding */ IntervalTimer),\n/* harmony export */ \"RunOnceScheduler\": () => (/* binding */ RunOnceScheduler),\n/* harmony export */ \"runWhenIdle\": () => (/* binding */ runWhenIdle),\n/* harmony export */ \"IdleValue\": () => (/* binding */ IdleValue),\n/* harmony export */ \"Promises\": () => (/* binding */ Promises)\n/* harmony export */ });\n/* harmony import */ var _cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\nfunction isThenable(obj) {\r\n return !!obj && typeof obj.then === 'function';\r\n}\r\nfunction createCancelablePromise(callback) {\r\n const source = new _cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource();\r\n const thenable = callback(source.token);\r\n const promise = new Promise((resolve, reject) => {\r\n source.token.onCancellationRequested(() => {\r\n reject((0,_errors_js__WEBPACK_IMPORTED_MODULE_1__.canceled)());\r\n });\r\n Promise.resolve(thenable).then(value => {\r\n source.dispose();\r\n resolve(value);\r\n }, err => {\r\n source.dispose();\r\n reject(err);\r\n });\r\n });\r\n return new class {\r\n cancel() {\r\n source.cancel();\r\n }\r\n then(resolve, reject) {\r\n return promise.then(resolve, reject);\r\n }\r\n catch(reject) {\r\n return this.then(undefined, reject);\r\n }\r\n finally(onfinally) {\r\n return promise.finally(onfinally);\r\n }\r\n };\r\n}\r\nfunction raceCancellation(promise, token, defaultValue) {\r\n return Promise.race([promise, new Promise(resolve => token.onCancellationRequested(() => resolve(defaultValue)))]);\r\n}\r\n/**\r\n * A helper to prevent accumulation of sequential async tasks.\r\n *\r\n * Imagine a mail man with the sole task of delivering letters. As soon as\r\n * a letter submitted for delivery, he drives to the destination, delivers it\r\n * and returns to his base. Imagine that during the trip, N more letters were submitted.\r\n * When the mail man returns, he picks those N letters and delivers them all in a\r\n * single trip. Even though N+1 submissions occurred, only 2 deliveries were made.\r\n *\r\n * The throttler implements this via the queue() method, by providing it a task\r\n * factory. Following the example:\r\n *\r\n * \t\tconst throttler = new Throttler();\r\n * \t\tconst letters = [];\r\n *\r\n * \t\tfunction deliver() {\r\n * \t\t\tconst lettersToDeliver = letters;\r\n * \t\t\tletters = [];\r\n * \t\t\treturn makeTheTrip(lettersToDeliver);\r\n * \t\t}\r\n *\r\n * \t\tfunction onLetterReceived(l) {\r\n * \t\t\tletters.push(l);\r\n * \t\t\tthrottler.queue(deliver);\r\n * \t\t}\r\n */\r\nclass Throttler {\r\n constructor() {\r\n this.activePromise = null;\r\n this.queuedPromise = null;\r\n this.queuedPromiseFactory = null;\r\n }\r\n queue(promiseFactory) {\r\n if (this.activePromise) {\r\n this.queuedPromiseFactory = promiseFactory;\r\n if (!this.queuedPromise) {\r\n const onComplete = () => {\r\n this.queuedPromise = null;\r\n const result = this.queue(this.queuedPromiseFactory);\r\n this.queuedPromiseFactory = null;\r\n return result;\r\n };\r\n this.queuedPromise = new Promise(resolve => {\r\n this.activePromise.then(onComplete, onComplete).then(resolve);\r\n });\r\n }\r\n return new Promise((resolve, reject) => {\r\n this.queuedPromise.then(resolve, reject);\r\n });\r\n }\r\n this.activePromise = promiseFactory();\r\n return new Promise((resolve, reject) => {\r\n this.activePromise.then((result) => {\r\n this.activePromise = null;\r\n resolve(result);\r\n }, (err) => {\r\n this.activePromise = null;\r\n reject(err);\r\n });\r\n });\r\n }\r\n}\r\n/**\r\n * A helper to delay (debounce) execution of a task that is being requested often.\r\n *\r\n * Following the throttler, now imagine the mail man wants to optimize the number of\r\n * trips proactively. The trip itself can be long, so he decides not to make the trip\r\n * as soon as a letter is submitted. Instead he waits a while, in case more\r\n * letters are submitted. After said waiting period, if no letters were submitted, he\r\n * decides to make the trip. Imagine that N more letters were submitted after the first\r\n * one, all within a short period of time between each other. Even though N+1\r\n * submissions occurred, only 1 delivery was made.\r\n *\r\n * The delayer offers this behavior via the trigger() method, into which both the task\r\n * to be executed and the waiting period (delay) must be passed in as arguments. Following\r\n * the example:\r\n *\r\n * \t\tconst delayer = new Delayer(WAITING_PERIOD);\r\n * \t\tconst letters = [];\r\n *\r\n * \t\tfunction letterReceived(l) {\r\n * \t\t\tletters.push(l);\r\n * \t\t\tdelayer.trigger(() => { return makeTheTrip(); });\r\n * \t\t}\r\n */\r\nclass Delayer {\r\n constructor(defaultDelay) {\r\n this.defaultDelay = defaultDelay;\r\n this.timeout = null;\r\n this.completionPromise = null;\r\n this.doResolve = null;\r\n this.doReject = null;\r\n this.task = null;\r\n }\r\n trigger(task, delay = this.defaultDelay) {\r\n this.task = task;\r\n this.cancelTimeout();\r\n if (!this.completionPromise) {\r\n this.completionPromise = new Promise((resolve, reject) => {\r\n this.doResolve = resolve;\r\n this.doReject = reject;\r\n }).then(() => {\r\n this.completionPromise = null;\r\n this.doResolve = null;\r\n if (this.task) {\r\n const task = this.task;\r\n this.task = null;\r\n return task();\r\n }\r\n return undefined;\r\n });\r\n }\r\n this.timeout = setTimeout(() => {\r\n this.timeout = null;\r\n if (this.doResolve) {\r\n this.doResolve(null);\r\n }\r\n }, delay);\r\n return this.completionPromise;\r\n }\r\n isTriggered() {\r\n return this.timeout !== null;\r\n }\r\n cancel() {\r\n this.cancelTimeout();\r\n if (this.completionPromise) {\r\n if (this.doReject) {\r\n this.doReject((0,_errors_js__WEBPACK_IMPORTED_MODULE_1__.canceled)());\r\n }\r\n this.completionPromise = null;\r\n }\r\n }\r\n cancelTimeout() {\r\n if (this.timeout !== null) {\r\n clearTimeout(this.timeout);\r\n this.timeout = null;\r\n }\r\n }\r\n dispose() {\r\n this.cancelTimeout();\r\n }\r\n}\r\n/**\r\n * A helper to delay execution of a task that is being requested often, while\r\n * preventing accumulation of consecutive executions, while the task runs.\r\n *\r\n * The mail man is clever and waits for a certain amount of time, before going\r\n * out to deliver letters. While the mail man is going out, more letters arrive\r\n * and can only be delivered once he is back. Once he is back the mail man will\r\n * do one more trip to deliver the letters that have accumulated while he was out.\r\n */\r\nclass ThrottledDelayer {\r\n constructor(defaultDelay) {\r\n this.delayer = new Delayer(defaultDelay);\r\n this.throttler = new Throttler();\r\n }\r\n trigger(promiseFactory, delay) {\r\n return this.delayer.trigger(() => this.throttler.queue(promiseFactory), delay);\r\n }\r\n cancel() {\r\n this.delayer.cancel();\r\n }\r\n dispose() {\r\n this.delayer.dispose();\r\n }\r\n}\r\nfunction timeout(millis, token) {\r\n if (!token) {\r\n return createCancelablePromise(token => timeout(millis, token));\r\n }\r\n return new Promise((resolve, reject) => {\r\n const handle = setTimeout(resolve, millis);\r\n token.onCancellationRequested(() => {\r\n clearTimeout(handle);\r\n reject((0,_errors_js__WEBPACK_IMPORTED_MODULE_1__.canceled)());\r\n });\r\n });\r\n}\r\nfunction disposableTimeout(handler, timeout = 0) {\r\n const timer = setTimeout(handler, timeout);\r\n return (0,_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => clearTimeout(timer));\r\n}\r\nfunction first(promiseFactories, shouldStop = t => !!t, defaultValue = null) {\r\n let index = 0;\r\n const len = promiseFactories.length;\r\n const loop = () => {\r\n if (index >= len) {\r\n return Promise.resolve(defaultValue);\r\n }\r\n const factory = promiseFactories[index++];\r\n const promise = Promise.resolve(factory());\r\n return promise.then(result => {\r\n if (shouldStop(result)) {\r\n return Promise.resolve(result);\r\n }\r\n return loop();\r\n });\r\n };\r\n return loop();\r\n}\r\nclass TimeoutTimer {\r\n constructor(runner, timeout) {\r\n this._token = -1;\r\n if (typeof runner === 'function' && typeof timeout === 'number') {\r\n this.setIfNotSet(runner, timeout);\r\n }\r\n }\r\n dispose() {\r\n this.cancel();\r\n }\r\n cancel() {\r\n if (this._token !== -1) {\r\n clearTimeout(this._token);\r\n this._token = -1;\r\n }\r\n }\r\n cancelAndSet(runner, timeout) {\r\n this.cancel();\r\n this._token = setTimeout(() => {\r\n this._token = -1;\r\n runner();\r\n }, timeout);\r\n }\r\n setIfNotSet(runner, timeout) {\r\n if (this._token !== -1) {\r\n // timer is already set\r\n return;\r\n }\r\n this._token = setTimeout(() => {\r\n this._token = -1;\r\n runner();\r\n }, timeout);\r\n }\r\n}\r\nclass IntervalTimer {\r\n constructor() {\r\n this._token = -1;\r\n }\r\n dispose() {\r\n this.cancel();\r\n }\r\n cancel() {\r\n if (this._token !== -1) {\r\n clearInterval(this._token);\r\n this._token = -1;\r\n }\r\n }\r\n cancelAndSet(runner, interval) {\r\n this.cancel();\r\n this._token = setInterval(() => {\r\n runner();\r\n }, interval);\r\n }\r\n}\r\nclass RunOnceScheduler {\r\n constructor(runner, delay) {\r\n this.timeoutToken = -1;\r\n this.runner = runner;\r\n this.timeout = delay;\r\n this.timeoutHandler = this.onTimeout.bind(this);\r\n }\r\n /**\r\n * Dispose RunOnceScheduler\r\n */\r\n dispose() {\r\n this.cancel();\r\n this.runner = null;\r\n }\r\n /**\r\n * Cancel current scheduled runner (if any).\r\n */\r\n cancel() {\r\n if (this.isScheduled()) {\r\n clearTimeout(this.timeoutToken);\r\n this.timeoutToken = -1;\r\n }\r\n }\r\n /**\r\n * Cancel previous runner (if any) & schedule a new runner.\r\n */\r\n schedule(delay = this.timeout) {\r\n this.cancel();\r\n this.timeoutToken = setTimeout(this.timeoutHandler, delay);\r\n }\r\n get delay() {\r\n return this.timeout;\r\n }\r\n set delay(value) {\r\n this.timeout = value;\r\n }\r\n /**\r\n * Returns true if scheduled.\r\n */\r\n isScheduled() {\r\n return this.timeoutToken !== -1;\r\n }\r\n onTimeout() {\r\n this.timeoutToken = -1;\r\n if (this.runner) {\r\n this.doRun();\r\n }\r\n }\r\n doRun() {\r\n if (this.runner) {\r\n this.runner();\r\n }\r\n }\r\n}\r\n/**\r\n * Execute the callback the next time the browser is idle\r\n */\r\nlet runWhenIdle;\r\n(function () {\r\n if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') {\r\n const dummyIdle = Object.freeze({\r\n didTimeout: true,\r\n timeRemaining() { return 15; }\r\n });\r\n runWhenIdle = (runner) => {\r\n const handle = setTimeout(() => runner(dummyIdle));\r\n let disposed = false;\r\n return {\r\n dispose() {\r\n if (disposed) {\r\n return;\r\n }\r\n disposed = true;\r\n clearTimeout(handle);\r\n }\r\n };\r\n };\r\n }\r\n else {\r\n runWhenIdle = (runner, timeout) => {\r\n const handle = requestIdleCallback(runner, typeof timeout === 'number' ? { timeout } : undefined);\r\n let disposed = false;\r\n return {\r\n dispose() {\r\n if (disposed) {\r\n return;\r\n }\r\n disposed = true;\r\n cancelIdleCallback(handle);\r\n }\r\n };\r\n };\r\n }\r\n})();\r\n/**\r\n * An implementation of the \"idle-until-urgent\"-strategy as introduced\r\n * here: https://philipwalton.com/articles/idle-until-urgent/\r\n */\r\nclass IdleValue {\r\n constructor(executor) {\r\n this._didRun = false;\r\n this._executor = () => {\r\n try {\r\n this._value = executor();\r\n }\r\n catch (err) {\r\n this._error = err;\r\n }\r\n finally {\r\n this._didRun = true;\r\n }\r\n };\r\n this._handle = runWhenIdle(() => this._executor());\r\n }\r\n dispose() {\r\n this._handle.dispose();\r\n }\r\n get value() {\r\n if (!this._didRun) {\r\n this._handle.dispose();\r\n this._executor();\r\n }\r\n if (this._error) {\r\n throw this._error;\r\n }\r\n return this._value;\r\n }\r\n}\r\n//#endregion\r\n//#region Promises\r\nvar Promises;\r\n(function (Promises) {\r\n /**\r\n * A polyfill of `Promise.allSettled`: returns after all promises have\r\n * resolved or rejected and provides access to each result or error\r\n * in the order of the original passed in promises array.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled\r\n */\r\n function allSettled(promises) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (typeof Promise.allSettled === 'function') {\r\n return allSettledNative(promises); // in some environments we can benefit from native implementation\r\n }\r\n return allSettledShim(promises);\r\n });\r\n }\r\n Promises.allSettled = allSettled;\r\n function allSettledNative(promises) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return Promise.allSettled(promises);\r\n });\r\n }\r\n function allSettledShim(promises) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return Promise.all(promises.map(promise => (promise.then(value => {\r\n const fulfilled = { status: 'fulfilled', value };\r\n return fulfilled;\r\n }, error => {\r\n const rejected = { status: 'rejected', reason: error };\r\n return rejected;\r\n }))));\r\n });\r\n }\r\n /**\r\n * A drop-in replacement for `Promise.all` with the only difference\r\n * that the method awaits every promise to either fulfill or reject.\r\n *\r\n * Similar to `Promise.all`, only the first error will be returned\r\n * if any.\r\n */\r\n function settled(promises) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let firstError = undefined;\r\n const result = yield Promise.all(promises.map(promise => promise.then(value => value, error => {\r\n if (!firstError) {\r\n firstError = error;\r\n }\r\n return undefined; // do not rethrow so that other promises can settle\r\n })));\r\n if (typeof firstError !== 'undefined') {\r\n throw firstError;\r\n }\r\n return result; // cast is needed and protected by the `throw` above\r\n });\r\n }\r\n Promises.settled = settled;\r\n})(Promises || (Promises = {}));\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/async.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/buffer.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"VSBuffer\": () => (/* binding */ VSBuffer),\n/* harmony export */ \"readUInt16LE\": () => (/* binding */ readUInt16LE),\n/* harmony export */ \"writeUInt16LE\": () => (/* binding */ writeUInt16LE),\n/* harmony export */ \"readUInt32BE\": () => (/* binding */ readUInt32BE),\n/* harmony export */ \"writeUInt32BE\": () => (/* binding */ writeUInt32BE),\n/* harmony export */ \"readUInt8\": () => (/* binding */ readUInt8),\n/* harmony export */ \"writeUInt8\": () => (/* binding */ writeUInt8)\n/* harmony export */ });\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst hasBuffer = (typeof Buffer !== 'undefined');\r\nconst hasTextDecoder = (typeof TextDecoder !== 'undefined');\r\nlet textDecoder;\r\nclass VSBuffer {\r\n constructor(buffer) {\r\n this.buffer = buffer;\r\n this.byteLength = this.buffer.byteLength;\r\n }\r\n static wrap(actual) {\r\n if (hasBuffer && !(Buffer.isBuffer(actual))) {\r\n // https://nodejs.org/dist/latest-v10.x/docs/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\r\n // Create a zero-copy Buffer wrapper around the ArrayBuffer pointed to by the Uint8Array\r\n actual = Buffer.from(actual.buffer, actual.byteOffset, actual.byteLength);\r\n }\r\n return new VSBuffer(actual);\r\n }\r\n toString() {\r\n if (hasBuffer) {\r\n return this.buffer.toString();\r\n }\r\n else if (hasTextDecoder) {\r\n if (!textDecoder) {\r\n textDecoder = new TextDecoder();\r\n }\r\n return textDecoder.decode(this.buffer);\r\n }\r\n else {\r\n return _strings_js__WEBPACK_IMPORTED_MODULE_0__.decodeUTF8(this.buffer);\r\n }\r\n }\r\n}\r\nfunction readUInt16LE(source, offset) {\r\n return (((source[offset + 0] << 0) >>> 0) |\r\n ((source[offset + 1] << 8) >>> 0));\r\n}\r\nfunction writeUInt16LE(destination, value, offset) {\r\n destination[offset + 0] = (value & 0b11111111);\r\n value = value >>> 8;\r\n destination[offset + 1] = (value & 0b11111111);\r\n}\r\nfunction readUInt32BE(source, offset) {\r\n return (source[offset] * Math.pow(2, 24)\r\n + source[offset + 1] * Math.pow(2, 16)\r\n + source[offset + 2] * Math.pow(2, 8)\r\n + source[offset + 3]);\r\n}\r\nfunction writeUInt32BE(destination, value, offset) {\r\n destination[offset + 3] = value;\r\n value = value >>> 8;\r\n destination[offset + 2] = value;\r\n value = value >>> 8;\r\n destination[offset + 1] = value;\r\n value = value >>> 8;\r\n destination[offset] = value;\r\n}\r\nfunction readUInt8(source, offset) {\r\n return source[offset];\r\n}\r\nfunction writeUInt8(destination, value, offset) {\r\n destination[offset] = value;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/buffer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/cancellation.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationToken\": () => (/* binding */ CancellationToken),\n/* harmony export */ \"CancellationTokenSource\": () => (/* binding */ CancellationTokenSource)\n/* harmony export */ });\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst shortcutEvent = Object.freeze(function (callback, context) {\r\n const handle = setTimeout(callback.bind(context), 0);\r\n return { dispose() { clearTimeout(handle); } };\r\n});\r\nvar CancellationToken;\r\n(function (CancellationToken) {\r\n function isCancellationToken(thing) {\r\n if (thing === CancellationToken.None || thing === CancellationToken.Cancelled) {\r\n return true;\r\n }\r\n if (thing instanceof MutableToken) {\r\n return true;\r\n }\r\n if (!thing || typeof thing !== 'object') {\r\n return false;\r\n }\r\n return typeof thing.isCancellationRequested === 'boolean'\r\n && typeof thing.onCancellationRequested === 'function';\r\n }\r\n CancellationToken.isCancellationToken = isCancellationToken;\r\n CancellationToken.None = Object.freeze({\r\n isCancellationRequested: false,\r\n onCancellationRequested: _event_js__WEBPACK_IMPORTED_MODULE_0__.Event.None\r\n });\r\n CancellationToken.Cancelled = Object.freeze({\r\n isCancellationRequested: true,\r\n onCancellationRequested: shortcutEvent\r\n });\r\n})(CancellationToken || (CancellationToken = {}));\r\nclass MutableToken {\r\n constructor() {\r\n this._isCancelled = false;\r\n this._emitter = null;\r\n }\r\n cancel() {\r\n if (!this._isCancelled) {\r\n this._isCancelled = true;\r\n if (this._emitter) {\r\n this._emitter.fire(undefined);\r\n this.dispose();\r\n }\r\n }\r\n }\r\n get isCancellationRequested() {\r\n return this._isCancelled;\r\n }\r\n get onCancellationRequested() {\r\n if (this._isCancelled) {\r\n return shortcutEvent;\r\n }\r\n if (!this._emitter) {\r\n this._emitter = new _event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n }\r\n return this._emitter.event;\r\n }\r\n dispose() {\r\n if (this._emitter) {\r\n this._emitter.dispose();\r\n this._emitter = null;\r\n }\r\n }\r\n}\r\nclass CancellationTokenSource {\r\n constructor(parent) {\r\n this._token = undefined;\r\n this._parentListener = undefined;\r\n this._parentListener = parent && parent.onCancellationRequested(this.cancel, this);\r\n }\r\n get token() {\r\n if (!this._token) {\r\n // be lazy and create the token only when\r\n // actually needed\r\n this._token = new MutableToken();\r\n }\r\n return this._token;\r\n }\r\n cancel() {\r\n if (!this._token) {\r\n // save an object by returning the default\r\n // cancelled token when cancellation happens\r\n // before someone asks for the token\r\n this._token = CancellationToken.Cancelled;\r\n }\r\n else if (this._token instanceof MutableToken) {\r\n // actually cancel\r\n this._token.cancel();\r\n }\r\n }\r\n dispose(cancel = false) {\r\n if (cancel) {\r\n this.cancel();\r\n }\r\n if (this._parentListener) {\r\n this._parentListener.dispose();\r\n }\r\n if (!this._token) {\r\n // ensure to initialize with an empty token if we had none\r\n this._token = CancellationToken.None;\r\n }\r\n else if (this._token instanceof MutableToken) {\r\n // actually dispose\r\n this._token.dispose();\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/cancellation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/codicons.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"iconRegistry\": () => (/* binding */ iconRegistry),\n/* harmony export */ \"registerCodicon\": () => (/* binding */ registerCodicon),\n/* harmony export */ \"Codicon\": () => (/* binding */ Codicon),\n/* harmony export */ \"CSSIcon\": () => (/* binding */ CSSIcon)\n/* harmony export */ });\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass Registry {\r\n constructor() {\r\n this._icons = new Map();\r\n this._onDidRegister = new _event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n }\r\n add(icon) {\r\n const existing = this._icons.get(icon.id);\r\n if (!existing) {\r\n this._icons.set(icon.id, icon);\r\n this._onDidRegister.fire(icon);\r\n }\r\n else if (icon.description) {\r\n existing.description = icon.description;\r\n }\r\n else {\r\n console.error(`Duplicate registration of codicon ${icon.id}`);\r\n }\r\n }\r\n get(id) {\r\n return this._icons.get(id);\r\n }\r\n get all() {\r\n return this._icons.values();\r\n }\r\n get onDidRegister() {\r\n return this._onDidRegister.event;\r\n }\r\n}\r\nconst _registry = new Registry();\r\nconst iconRegistry = _registry;\r\nfunction registerCodicon(id, def) {\r\n return new Codicon(id, def);\r\n}\r\nclass Codicon {\r\n constructor(id, definition, description) {\r\n this.id = id;\r\n this.definition = definition;\r\n this.description = description;\r\n _registry.add(this);\r\n }\r\n get classNames() { return 'codicon codicon-' + this.id; }\r\n // classNamesArray is useful for migrating to ES6 classlist\r\n get classNamesArray() { return ['codicon', 'codicon-' + this.id]; }\r\n get cssSelector() { return '.codicon.codicon-' + this.id; }\r\n}\r\nvar CSSIcon;\r\n(function (CSSIcon) {\r\n CSSIcon.iconNameSegment = '[A-Za-z0-9]+';\r\n CSSIcon.iconNameExpression = '[A-Za-z0-9\\\\-]+';\r\n CSSIcon.iconModifierExpression = '~[A-Za-z]+';\r\n const cssIconIdRegex = new RegExp(`^(${CSSIcon.iconNameExpression})(${CSSIcon.iconModifierExpression})?$`);\r\n function asClassNameArray(icon) {\r\n if (icon instanceof Codicon) {\r\n return ['codicon', 'codicon-' + icon.id];\r\n }\r\n const match = cssIconIdRegex.exec(icon.id);\r\n if (!match) {\r\n return asClassNameArray(Codicon.error);\r\n }\r\n let [, id, modifier] = match;\r\n const classNames = ['codicon', 'codicon-' + id];\r\n if (modifier) {\r\n classNames.push('codicon-modifier-' + modifier.substr(1));\r\n }\r\n return classNames;\r\n }\r\n CSSIcon.asClassNameArray = asClassNameArray;\r\n function asClassName(icon) {\r\n return asClassNameArray(icon).join(' ');\r\n }\r\n CSSIcon.asClassName = asClassName;\r\n function asCSSSelector(icon) {\r\n return '.' + asClassNameArray(icon).join('.');\r\n }\r\n CSSIcon.asCSSSelector = asCSSSelector;\r\n})(CSSIcon || (CSSIcon = {}));\r\n(function (Codicon) {\r\n // built-in icons, with image name\r\n Codicon.add = new Codicon('add', { fontCharacter: '\\\\ea60' });\r\n Codicon.plus = new Codicon('plus', { fontCharacter: '\\\\ea60' });\r\n Codicon.gistNew = new Codicon('gist-new', { fontCharacter: '\\\\ea60' });\r\n Codicon.repoCreate = new Codicon('repo-create', { fontCharacter: '\\\\ea60' });\r\n Codicon.lightbulb = new Codicon('lightbulb', { fontCharacter: '\\\\ea61' });\r\n Codicon.lightBulb = new Codicon('light-bulb', { fontCharacter: '\\\\ea61' });\r\n Codicon.repo = new Codicon('repo', { fontCharacter: '\\\\ea62' });\r\n Codicon.repoDelete = new Codicon('repo-delete', { fontCharacter: '\\\\ea62' });\r\n Codicon.gistFork = new Codicon('gist-fork', { fontCharacter: '\\\\ea63' });\r\n Codicon.repoForked = new Codicon('repo-forked', { fontCharacter: '\\\\ea63' });\r\n Codicon.gitPullRequest = new Codicon('git-pull-request', { fontCharacter: '\\\\ea64' });\r\n Codicon.gitPullRequestAbandoned = new Codicon('git-pull-request-abandoned', { fontCharacter: '\\\\ea64' });\r\n Codicon.recordKeys = new Codicon('record-keys', { fontCharacter: '\\\\ea65' });\r\n Codicon.keyboard = new Codicon('keyboard', { fontCharacter: '\\\\ea65' });\r\n Codicon.tag = new Codicon('tag', { fontCharacter: '\\\\ea66' });\r\n Codicon.tagAdd = new Codicon('tag-add', { fontCharacter: '\\\\ea66' });\r\n Codicon.tagRemove = new Codicon('tag-remove', { fontCharacter: '\\\\ea66' });\r\n Codicon.person = new Codicon('person', { fontCharacter: '\\\\ea67' });\r\n Codicon.personAdd = new Codicon('person-add', { fontCharacter: '\\\\ea67' });\r\n Codicon.personFollow = new Codicon('person-follow', { fontCharacter: '\\\\ea67' });\r\n Codicon.personOutline = new Codicon('person-outline', { fontCharacter: '\\\\ea67' });\r\n Codicon.personFilled = new Codicon('person-filled', { fontCharacter: '\\\\ea67' });\r\n Codicon.gitBranch = new Codicon('git-branch', { fontCharacter: '\\\\ea68' });\r\n Codicon.gitBranchCreate = new Codicon('git-branch-create', { fontCharacter: '\\\\ea68' });\r\n Codicon.gitBranchDelete = new Codicon('git-branch-delete', { fontCharacter: '\\\\ea68' });\r\n Codicon.sourceControl = new Codicon('source-control', { fontCharacter: '\\\\ea68' });\r\n Codicon.mirror = new Codicon('mirror', { fontCharacter: '\\\\ea69' });\r\n Codicon.mirrorPublic = new Codicon('mirror-public', { fontCharacter: '\\\\ea69' });\r\n Codicon.star = new Codicon('star', { fontCharacter: '\\\\ea6a' });\r\n Codicon.starAdd = new Codicon('star-add', { fontCharacter: '\\\\ea6a' });\r\n Codicon.starDelete = new Codicon('star-delete', { fontCharacter: '\\\\ea6a' });\r\n Codicon.starEmpty = new Codicon('star-empty', { fontCharacter: '\\\\ea6a' });\r\n Codicon.comment = new Codicon('comment', { fontCharacter: '\\\\ea6b' });\r\n Codicon.commentAdd = new Codicon('comment-add', { fontCharacter: '\\\\ea6b' });\r\n Codicon.alert = new Codicon('alert', { fontCharacter: '\\\\ea6c' });\r\n Codicon.warning = new Codicon('warning', { fontCharacter: '\\\\ea6c' });\r\n Codicon.search = new Codicon('search', { fontCharacter: '\\\\ea6d' });\r\n Codicon.searchSave = new Codicon('search-save', { fontCharacter: '\\\\ea6d' });\r\n Codicon.logOut = new Codicon('log-out', { fontCharacter: '\\\\ea6e' });\r\n Codicon.signOut = new Codicon('sign-out', { fontCharacter: '\\\\ea6e' });\r\n Codicon.logIn = new Codicon('log-in', { fontCharacter: '\\\\ea6f' });\r\n Codicon.signIn = new Codicon('sign-in', { fontCharacter: '\\\\ea6f' });\r\n Codicon.eye = new Codicon('eye', { fontCharacter: '\\\\ea70' });\r\n Codicon.eyeUnwatch = new Codicon('eye-unwatch', { fontCharacter: '\\\\ea70' });\r\n Codicon.eyeWatch = new Codicon('eye-watch', { fontCharacter: '\\\\ea70' });\r\n Codicon.circleFilled = new Codicon('circle-filled', { fontCharacter: '\\\\ea71' });\r\n Codicon.primitiveDot = new Codicon('primitive-dot', { fontCharacter: '\\\\ea71' });\r\n Codicon.closeDirty = new Codicon('close-dirty', { fontCharacter: '\\\\ea71' });\r\n Codicon.debugBreakpoint = new Codicon('debug-breakpoint', { fontCharacter: '\\\\ea71' });\r\n Codicon.debugBreakpointDisabled = new Codicon('debug-breakpoint-disabled', { fontCharacter: '\\\\ea71' });\r\n Codicon.debugHint = new Codicon('debug-hint', { fontCharacter: '\\\\ea71' });\r\n Codicon.primitiveSquare = new Codicon('primitive-square', { fontCharacter: '\\\\ea72' });\r\n Codicon.edit = new Codicon('edit', { fontCharacter: '\\\\ea73' });\r\n Codicon.pencil = new Codicon('pencil', { fontCharacter: '\\\\ea73' });\r\n Codicon.info = new Codicon('info', { fontCharacter: '\\\\ea74' });\r\n Codicon.issueOpened = new Codicon('issue-opened', { fontCharacter: '\\\\ea74' });\r\n Codicon.gistPrivate = new Codicon('gist-private', { fontCharacter: '\\\\ea75' });\r\n Codicon.gitForkPrivate = new Codicon('git-fork-private', { fontCharacter: '\\\\ea75' });\r\n Codicon.lock = new Codicon('lock', { fontCharacter: '\\\\ea75' });\r\n Codicon.mirrorPrivate = new Codicon('mirror-private', { fontCharacter: '\\\\ea75' });\r\n Codicon.close = new Codicon('close', { fontCharacter: '\\\\ea76' });\r\n Codicon.removeClose = new Codicon('remove-close', { fontCharacter: '\\\\ea76' });\r\n Codicon.x = new Codicon('x', { fontCharacter: '\\\\ea76' });\r\n Codicon.repoSync = new Codicon('repo-sync', { fontCharacter: '\\\\ea77' });\r\n Codicon.sync = new Codicon('sync', { fontCharacter: '\\\\ea77' });\r\n Codicon.clone = new Codicon('clone', { fontCharacter: '\\\\ea78' });\r\n Codicon.desktopDownload = new Codicon('desktop-download', { fontCharacter: '\\\\ea78' });\r\n Codicon.beaker = new Codicon('beaker', { fontCharacter: '\\\\ea79' });\r\n Codicon.microscope = new Codicon('microscope', { fontCharacter: '\\\\ea79' });\r\n Codicon.vm = new Codicon('vm', { fontCharacter: '\\\\ea7a' });\r\n Codicon.deviceDesktop = new Codicon('device-desktop', { fontCharacter: '\\\\ea7a' });\r\n Codicon.file = new Codicon('file', { fontCharacter: '\\\\ea7b' });\r\n Codicon.fileText = new Codicon('file-text', { fontCharacter: '\\\\ea7b' });\r\n Codicon.more = new Codicon('more', { fontCharacter: '\\\\ea7c' });\r\n Codicon.ellipsis = new Codicon('ellipsis', { fontCharacter: '\\\\ea7c' });\r\n Codicon.kebabHorizontal = new Codicon('kebab-horizontal', { fontCharacter: '\\\\ea7c' });\r\n Codicon.mailReply = new Codicon('mail-reply', { fontCharacter: '\\\\ea7d' });\r\n Codicon.reply = new Codicon('reply', { fontCharacter: '\\\\ea7d' });\r\n Codicon.organization = new Codicon('organization', { fontCharacter: '\\\\ea7e' });\r\n Codicon.organizationFilled = new Codicon('organization-filled', { fontCharacter: '\\\\ea7e' });\r\n Codicon.organizationOutline = new Codicon('organization-outline', { fontCharacter: '\\\\ea7e' });\r\n Codicon.newFile = new Codicon('new-file', { fontCharacter: '\\\\ea7f' });\r\n Codicon.fileAdd = new Codicon('file-add', { fontCharacter: '\\\\ea7f' });\r\n Codicon.newFolder = new Codicon('new-folder', { fontCharacter: '\\\\ea80' });\r\n Codicon.fileDirectoryCreate = new Codicon('file-directory-create', { fontCharacter: '\\\\ea80' });\r\n Codicon.trash = new Codicon('trash', { fontCharacter: '\\\\ea81' });\r\n Codicon.trashcan = new Codicon('trashcan', { fontCharacter: '\\\\ea81' });\r\n Codicon.history = new Codicon('history', { fontCharacter: '\\\\ea82' });\r\n Codicon.clock = new Codicon('clock', { fontCharacter: '\\\\ea82' });\r\n Codicon.folder = new Codicon('folder', { fontCharacter: '\\\\ea83' });\r\n Codicon.fileDirectory = new Codicon('file-directory', { fontCharacter: '\\\\ea83' });\r\n Codicon.symbolFolder = new Codicon('symbol-folder', { fontCharacter: '\\\\ea83' });\r\n Codicon.logoGithub = new Codicon('logo-github', { fontCharacter: '\\\\ea84' });\r\n Codicon.markGithub = new Codicon('mark-github', { fontCharacter: '\\\\ea84' });\r\n Codicon.github = new Codicon('github', { fontCharacter: '\\\\ea84' });\r\n Codicon.terminal = new Codicon('terminal', { fontCharacter: '\\\\ea85' });\r\n Codicon.console = new Codicon('console', { fontCharacter: '\\\\ea85' });\r\n Codicon.repl = new Codicon('repl', { fontCharacter: '\\\\ea85' });\r\n Codicon.zap = new Codicon('zap', { fontCharacter: '\\\\ea86' });\r\n Codicon.symbolEvent = new Codicon('symbol-event', { fontCharacter: '\\\\ea86' });\r\n Codicon.error = new Codicon('error', { fontCharacter: '\\\\ea87' });\r\n Codicon.stop = new Codicon('stop', { fontCharacter: '\\\\ea87' });\r\n Codicon.variable = new Codicon('variable', { fontCharacter: '\\\\ea88' });\r\n Codicon.symbolVariable = new Codicon('symbol-variable', { fontCharacter: '\\\\ea88' });\r\n Codicon.array = new Codicon('array', { fontCharacter: '\\\\ea8a' });\r\n Codicon.symbolArray = new Codicon('symbol-array', { fontCharacter: '\\\\ea8a' });\r\n Codicon.symbolModule = new Codicon('symbol-module', { fontCharacter: '\\\\ea8b' });\r\n Codicon.symbolPackage = new Codicon('symbol-package', { fontCharacter: '\\\\ea8b' });\r\n Codicon.symbolNamespace = new Codicon('symbol-namespace', { fontCharacter: '\\\\ea8b' });\r\n Codicon.symbolObject = new Codicon('symbol-object', { fontCharacter: '\\\\ea8b' });\r\n Codicon.symbolMethod = new Codicon('symbol-method', { fontCharacter: '\\\\ea8c' });\r\n Codicon.symbolFunction = new Codicon('symbol-function', { fontCharacter: '\\\\ea8c' });\r\n Codicon.symbolConstructor = new Codicon('symbol-constructor', { fontCharacter: '\\\\ea8c' });\r\n Codicon.symbolBoolean = new Codicon('symbol-boolean', { fontCharacter: '\\\\ea8f' });\r\n Codicon.symbolNull = new Codicon('symbol-null', { fontCharacter: '\\\\ea8f' });\r\n Codicon.symbolNumeric = new Codicon('symbol-numeric', { fontCharacter: '\\\\ea90' });\r\n Codicon.symbolNumber = new Codicon('symbol-number', { fontCharacter: '\\\\ea90' });\r\n Codicon.symbolStructure = new Codicon('symbol-structure', { fontCharacter: '\\\\ea91' });\r\n Codicon.symbolStruct = new Codicon('symbol-struct', { fontCharacter: '\\\\ea91' });\r\n Codicon.symbolParameter = new Codicon('symbol-parameter', { fontCharacter: '\\\\ea92' });\r\n Codicon.symbolTypeParameter = new Codicon('symbol-type-parameter', { fontCharacter: '\\\\ea92' });\r\n Codicon.symbolKey = new Codicon('symbol-key', { fontCharacter: '\\\\ea93' });\r\n Codicon.symbolText = new Codicon('symbol-text', { fontCharacter: '\\\\ea93' });\r\n Codicon.symbolReference = new Codicon('symbol-reference', { fontCharacter: '\\\\ea94' });\r\n Codicon.goToFile = new Codicon('go-to-file', { fontCharacter: '\\\\ea94' });\r\n Codicon.symbolEnum = new Codicon('symbol-enum', { fontCharacter: '\\\\ea95' });\r\n Codicon.symbolValue = new Codicon('symbol-value', { fontCharacter: '\\\\ea95' });\r\n Codicon.symbolRuler = new Codicon('symbol-ruler', { fontCharacter: '\\\\ea96' });\r\n Codicon.symbolUnit = new Codicon('symbol-unit', { fontCharacter: '\\\\ea96' });\r\n Codicon.activateBreakpoints = new Codicon('activate-breakpoints', { fontCharacter: '\\\\ea97' });\r\n Codicon.archive = new Codicon('archive', { fontCharacter: '\\\\ea98' });\r\n Codicon.arrowBoth = new Codicon('arrow-both', { fontCharacter: '\\\\ea99' });\r\n Codicon.arrowDown = new Codicon('arrow-down', { fontCharacter: '\\\\ea9a' });\r\n Codicon.arrowLeft = new Codicon('arrow-left', { fontCharacter: '\\\\ea9b' });\r\n Codicon.arrowRight = new Codicon('arrow-right', { fontCharacter: '\\\\ea9c' });\r\n Codicon.arrowSmallDown = new Codicon('arrow-small-down', { fontCharacter: '\\\\ea9d' });\r\n Codicon.arrowSmallLeft = new Codicon('arrow-small-left', { fontCharacter: '\\\\ea9e' });\r\n Codicon.arrowSmallRight = new Codicon('arrow-small-right', { fontCharacter: '\\\\ea9f' });\r\n Codicon.arrowSmallUp = new Codicon('arrow-small-up', { fontCharacter: '\\\\eaa0' });\r\n Codicon.arrowUp = new Codicon('arrow-up', { fontCharacter: '\\\\eaa1' });\r\n Codicon.bell = new Codicon('bell', { fontCharacter: '\\\\eaa2' });\r\n Codicon.bold = new Codicon('bold', { fontCharacter: '\\\\eaa3' });\r\n Codicon.book = new Codicon('book', { fontCharacter: '\\\\eaa4' });\r\n Codicon.bookmark = new Codicon('bookmark', { fontCharacter: '\\\\eaa5' });\r\n Codicon.debugBreakpointConditionalUnverified = new Codicon('debug-breakpoint-conditional-unverified', { fontCharacter: '\\\\eaa6' });\r\n Codicon.debugBreakpointConditional = new Codicon('debug-breakpoint-conditional', { fontCharacter: '\\\\eaa7' });\r\n Codicon.debugBreakpointConditionalDisabled = new Codicon('debug-breakpoint-conditional-disabled', { fontCharacter: '\\\\eaa7' });\r\n Codicon.debugBreakpointDataUnverified = new Codicon('debug-breakpoint-data-unverified', { fontCharacter: '\\\\eaa8' });\r\n Codicon.debugBreakpointData = new Codicon('debug-breakpoint-data', { fontCharacter: '\\\\eaa9' });\r\n Codicon.debugBreakpointDataDisabled = new Codicon('debug-breakpoint-data-disabled', { fontCharacter: '\\\\eaa9' });\r\n Codicon.debugBreakpointLogUnverified = new Codicon('debug-breakpoint-log-unverified', { fontCharacter: '\\\\eaaa' });\r\n Codicon.debugBreakpointLog = new Codicon('debug-breakpoint-log', { fontCharacter: '\\\\eaab' });\r\n Codicon.debugBreakpointLogDisabled = new Codicon('debug-breakpoint-log-disabled', { fontCharacter: '\\\\eaab' });\r\n Codicon.briefcase = new Codicon('briefcase', { fontCharacter: '\\\\eaac' });\r\n Codicon.broadcast = new Codicon('broadcast', { fontCharacter: '\\\\eaad' });\r\n Codicon.browser = new Codicon('browser', { fontCharacter: '\\\\eaae' });\r\n Codicon.bug = new Codicon('bug', { fontCharacter: '\\\\eaaf' });\r\n Codicon.calendar = new Codicon('calendar', { fontCharacter: '\\\\eab0' });\r\n Codicon.caseSensitive = new Codicon('case-sensitive', { fontCharacter: '\\\\eab1' });\r\n Codicon.check = new Codicon('check', { fontCharacter: '\\\\eab2' });\r\n Codicon.checklist = new Codicon('checklist', { fontCharacter: '\\\\eab3' });\r\n Codicon.chevronDown = new Codicon('chevron-down', { fontCharacter: '\\\\eab4' });\r\n Codicon.chevronLeft = new Codicon('chevron-left', { fontCharacter: '\\\\eab5' });\r\n Codicon.chevronRight = new Codicon('chevron-right', { fontCharacter: '\\\\eab6' });\r\n Codicon.chevronUp = new Codicon('chevron-up', { fontCharacter: '\\\\eab7' });\r\n Codicon.chromeClose = new Codicon('chrome-close', { fontCharacter: '\\\\eab8' });\r\n Codicon.chromeMaximize = new Codicon('chrome-maximize', { fontCharacter: '\\\\eab9' });\r\n Codicon.chromeMinimize = new Codicon('chrome-minimize', { fontCharacter: '\\\\eaba' });\r\n Codicon.chromeRestore = new Codicon('chrome-restore', { fontCharacter: '\\\\eabb' });\r\n Codicon.circleOutline = new Codicon('circle-outline', { fontCharacter: '\\\\eabc' });\r\n Codicon.debugBreakpointUnverified = new Codicon('debug-breakpoint-unverified', { fontCharacter: '\\\\eabc' });\r\n Codicon.circleSlash = new Codicon('circle-slash', { fontCharacter: '\\\\eabd' });\r\n Codicon.circuitBoard = new Codicon('circuit-board', { fontCharacter: '\\\\eabe' });\r\n Codicon.clearAll = new Codicon('clear-all', { fontCharacter: '\\\\eabf' });\r\n Codicon.clippy = new Codicon('clippy', { fontCharacter: '\\\\eac0' });\r\n Codicon.closeAll = new Codicon('close-all', { fontCharacter: '\\\\eac1' });\r\n Codicon.cloudDownload = new Codicon('cloud-download', { fontCharacter: '\\\\eac2' });\r\n Codicon.cloudUpload = new Codicon('cloud-upload', { fontCharacter: '\\\\eac3' });\r\n Codicon.code = new Codicon('code', { fontCharacter: '\\\\eac4' });\r\n Codicon.collapseAll = new Codicon('collapse-all', { fontCharacter: '\\\\eac5' });\r\n Codicon.colorMode = new Codicon('color-mode', { fontCharacter: '\\\\eac6' });\r\n Codicon.commentDiscussion = new Codicon('comment-discussion', { fontCharacter: '\\\\eac7' });\r\n Codicon.compareChanges = new Codicon('compare-changes', { fontCharacter: '\\\\eafd' });\r\n Codicon.creditCard = new Codicon('credit-card', { fontCharacter: '\\\\eac9' });\r\n Codicon.dash = new Codicon('dash', { fontCharacter: '\\\\eacc' });\r\n Codicon.dashboard = new Codicon('dashboard', { fontCharacter: '\\\\eacd' });\r\n Codicon.database = new Codicon('database', { fontCharacter: '\\\\eace' });\r\n Codicon.debugContinue = new Codicon('debug-continue', { fontCharacter: '\\\\eacf' });\r\n Codicon.debugDisconnect = new Codicon('debug-disconnect', { fontCharacter: '\\\\ead0' });\r\n Codicon.debugPause = new Codicon('debug-pause', { fontCharacter: '\\\\ead1' });\r\n Codicon.debugRestart = new Codicon('debug-restart', { fontCharacter: '\\\\ead2' });\r\n Codicon.debugStart = new Codicon('debug-start', { fontCharacter: '\\\\ead3' });\r\n Codicon.debugStepInto = new Codicon('debug-step-into', { fontCharacter: '\\\\ead4' });\r\n Codicon.debugStepOut = new Codicon('debug-step-out', { fontCharacter: '\\\\ead5' });\r\n Codicon.debugStepOver = new Codicon('debug-step-over', { fontCharacter: '\\\\ead6' });\r\n Codicon.debugStop = new Codicon('debug-stop', { fontCharacter: '\\\\ead7' });\r\n Codicon.debug = new Codicon('debug', { fontCharacter: '\\\\ead8' });\r\n Codicon.deviceCameraVideo = new Codicon('device-camera-video', { fontCharacter: '\\\\ead9' });\r\n Codicon.deviceCamera = new Codicon('device-camera', { fontCharacter: '\\\\eada' });\r\n Codicon.deviceMobile = new Codicon('device-mobile', { fontCharacter: '\\\\eadb' });\r\n Codicon.diffAdded = new Codicon('diff-added', { fontCharacter: '\\\\eadc' });\r\n Codicon.diffIgnored = new Codicon('diff-ignored', { fontCharacter: '\\\\eadd' });\r\n Codicon.diffModified = new Codicon('diff-modified', { fontCharacter: '\\\\eade' });\r\n Codicon.diffRemoved = new Codicon('diff-removed', { fontCharacter: '\\\\eadf' });\r\n Codicon.diffRenamed = new Codicon('diff-renamed', { fontCharacter: '\\\\eae0' });\r\n Codicon.diff = new Codicon('diff', { fontCharacter: '\\\\eae1' });\r\n Codicon.discard = new Codicon('discard', { fontCharacter: '\\\\eae2' });\r\n Codicon.editorLayout = new Codicon('editor-layout', { fontCharacter: '\\\\eae3' });\r\n Codicon.emptyWindow = new Codicon('empty-window', { fontCharacter: '\\\\eae4' });\r\n Codicon.exclude = new Codicon('exclude', { fontCharacter: '\\\\eae5' });\r\n Codicon.extensions = new Codicon('extensions', { fontCharacter: '\\\\eae6' });\r\n Codicon.eyeClosed = new Codicon('eye-closed', { fontCharacter: '\\\\eae7' });\r\n Codicon.fileBinary = new Codicon('file-binary', { fontCharacter: '\\\\eae8' });\r\n Codicon.fileCode = new Codicon('file-code', { fontCharacter: '\\\\eae9' });\r\n Codicon.fileMedia = new Codicon('file-media', { fontCharacter: '\\\\eaea' });\r\n Codicon.filePdf = new Codicon('file-pdf', { fontCharacter: '\\\\eaeb' });\r\n Codicon.fileSubmodule = new Codicon('file-submodule', { fontCharacter: '\\\\eaec' });\r\n Codicon.fileSymlinkDirectory = new Codicon('file-symlink-directory', { fontCharacter: '\\\\eaed' });\r\n Codicon.fileSymlinkFile = new Codicon('file-symlink-file', { fontCharacter: '\\\\eaee' });\r\n Codicon.fileZip = new Codicon('file-zip', { fontCharacter: '\\\\eaef' });\r\n Codicon.files = new Codicon('files', { fontCharacter: '\\\\eaf0' });\r\n Codicon.filter = new Codicon('filter', { fontCharacter: '\\\\eaf1' });\r\n Codicon.flame = new Codicon('flame', { fontCharacter: '\\\\eaf2' });\r\n Codicon.foldDown = new Codicon('fold-down', { fontCharacter: '\\\\eaf3' });\r\n Codicon.foldUp = new Codicon('fold-up', { fontCharacter: '\\\\eaf4' });\r\n Codicon.fold = new Codicon('fold', { fontCharacter: '\\\\eaf5' });\r\n Codicon.folderActive = new Codicon('folder-active', { fontCharacter: '\\\\eaf6' });\r\n Codicon.folderOpened = new Codicon('folder-opened', { fontCharacter: '\\\\eaf7' });\r\n Codicon.gear = new Codicon('gear', { fontCharacter: '\\\\eaf8' });\r\n Codicon.gift = new Codicon('gift', { fontCharacter: '\\\\eaf9' });\r\n Codicon.gistSecret = new Codicon('gist-secret', { fontCharacter: '\\\\eafa' });\r\n Codicon.gist = new Codicon('gist', { fontCharacter: '\\\\eafb' });\r\n Codicon.gitCommit = new Codicon('git-commit', { fontCharacter: '\\\\eafc' });\r\n Codicon.gitCompare = new Codicon('git-compare', { fontCharacter: '\\\\eafd' });\r\n Codicon.gitMerge = new Codicon('git-merge', { fontCharacter: '\\\\eafe' });\r\n Codicon.githubAction = new Codicon('github-action', { fontCharacter: '\\\\eaff' });\r\n Codicon.githubAlt = new Codicon('github-alt', { fontCharacter: '\\\\eb00' });\r\n Codicon.globe = new Codicon('globe', { fontCharacter: '\\\\eb01' });\r\n Codicon.grabber = new Codicon('grabber', { fontCharacter: '\\\\eb02' });\r\n Codicon.graph = new Codicon('graph', { fontCharacter: '\\\\eb03' });\r\n Codicon.gripper = new Codicon('gripper', { fontCharacter: '\\\\eb04' });\r\n Codicon.heart = new Codicon('heart', { fontCharacter: '\\\\eb05' });\r\n Codicon.home = new Codicon('home', { fontCharacter: '\\\\eb06' });\r\n Codicon.horizontalRule = new Codicon('horizontal-rule', { fontCharacter: '\\\\eb07' });\r\n Codicon.hubot = new Codicon('hubot', { fontCharacter: '\\\\eb08' });\r\n Codicon.inbox = new Codicon('inbox', { fontCharacter: '\\\\eb09' });\r\n Codicon.issueClosed = new Codicon('issue-closed', { fontCharacter: '\\\\eb0a' });\r\n Codicon.issueReopened = new Codicon('issue-reopened', { fontCharacter: '\\\\eb0b' });\r\n Codicon.issues = new Codicon('issues', { fontCharacter: '\\\\eb0c' });\r\n Codicon.italic = new Codicon('italic', { fontCharacter: '\\\\eb0d' });\r\n Codicon.jersey = new Codicon('jersey', { fontCharacter: '\\\\eb0e' });\r\n Codicon.json = new Codicon('json', { fontCharacter: '\\\\eb0f' });\r\n Codicon.kebabVertical = new Codicon('kebab-vertical', { fontCharacter: '\\\\eb10' });\r\n Codicon.key = new Codicon('key', { fontCharacter: '\\\\eb11' });\r\n Codicon.law = new Codicon('law', { fontCharacter: '\\\\eb12' });\r\n Codicon.lightbulbAutofix = new Codicon('lightbulb-autofix', { fontCharacter: '\\\\eb13' });\r\n Codicon.linkExternal = new Codicon('link-external', { fontCharacter: '\\\\eb14' });\r\n Codicon.link = new Codicon('link', { fontCharacter: '\\\\eb15' });\r\n Codicon.listOrdered = new Codicon('list-ordered', { fontCharacter: '\\\\eb16' });\r\n Codicon.listUnordered = new Codicon('list-unordered', { fontCharacter: '\\\\eb17' });\r\n Codicon.liveShare = new Codicon('live-share', { fontCharacter: '\\\\eb18' });\r\n Codicon.loading = new Codicon('loading', { fontCharacter: '\\\\eb19' });\r\n Codicon.location = new Codicon('location', { fontCharacter: '\\\\eb1a' });\r\n Codicon.mailRead = new Codicon('mail-read', { fontCharacter: '\\\\eb1b' });\r\n Codicon.mail = new Codicon('mail', { fontCharacter: '\\\\eb1c' });\r\n Codicon.markdown = new Codicon('markdown', { fontCharacter: '\\\\eb1d' });\r\n Codicon.megaphone = new Codicon('megaphone', { fontCharacter: '\\\\eb1e' });\r\n Codicon.mention = new Codicon('mention', { fontCharacter: '\\\\eb1f' });\r\n Codicon.milestone = new Codicon('milestone', { fontCharacter: '\\\\eb20' });\r\n Codicon.mortarBoard = new Codicon('mortar-board', { fontCharacter: '\\\\eb21' });\r\n Codicon.move = new Codicon('move', { fontCharacter: '\\\\eb22' });\r\n Codicon.multipleWindows = new Codicon('multiple-windows', { fontCharacter: '\\\\eb23' });\r\n Codicon.mute = new Codicon('mute', { fontCharacter: '\\\\eb24' });\r\n Codicon.noNewline = new Codicon('no-newline', { fontCharacter: '\\\\eb25' });\r\n Codicon.note = new Codicon('note', { fontCharacter: '\\\\eb26' });\r\n Codicon.octoface = new Codicon('octoface', { fontCharacter: '\\\\eb27' });\r\n Codicon.openPreview = new Codicon('open-preview', { fontCharacter: '\\\\eb28' });\r\n Codicon.package_ = new Codicon('package', { fontCharacter: '\\\\eb29' });\r\n Codicon.paintcan = new Codicon('paintcan', { fontCharacter: '\\\\eb2a' });\r\n Codicon.pin = new Codicon('pin', { fontCharacter: '\\\\eb2b' });\r\n Codicon.play = new Codicon('play', { fontCharacter: '\\\\eb2c' });\r\n Codicon.run = new Codicon('run', { fontCharacter: '\\\\eb2c' });\r\n Codicon.plug = new Codicon('plug', { fontCharacter: '\\\\eb2d' });\r\n Codicon.preserveCase = new Codicon('preserve-case', { fontCharacter: '\\\\eb2e' });\r\n Codicon.preview = new Codicon('preview', { fontCharacter: '\\\\eb2f' });\r\n Codicon.project = new Codicon('project', { fontCharacter: '\\\\eb30' });\r\n Codicon.pulse = new Codicon('pulse', { fontCharacter: '\\\\eb31' });\r\n Codicon.question = new Codicon('question', { fontCharacter: '\\\\eb32' });\r\n Codicon.quote = new Codicon('quote', { fontCharacter: '\\\\eb33' });\r\n Codicon.radioTower = new Codicon('radio-tower', { fontCharacter: '\\\\eb34' });\r\n Codicon.reactions = new Codicon('reactions', { fontCharacter: '\\\\eb35' });\r\n Codicon.references = new Codicon('references', { fontCharacter: '\\\\eb36' });\r\n Codicon.refresh = new Codicon('refresh', { fontCharacter: '\\\\eb37' });\r\n Codicon.regex = new Codicon('regex', { fontCharacter: '\\\\eb38' });\r\n Codicon.remoteExplorer = new Codicon('remote-explorer', { fontCharacter: '\\\\eb39' });\r\n Codicon.remote = new Codicon('remote', { fontCharacter: '\\\\eb3a' });\r\n Codicon.remove = new Codicon('remove', { fontCharacter: '\\\\eb3b' });\r\n Codicon.replaceAll = new Codicon('replace-all', { fontCharacter: '\\\\eb3c' });\r\n Codicon.replace = new Codicon('replace', { fontCharacter: '\\\\eb3d' });\r\n Codicon.repoClone = new Codicon('repo-clone', { fontCharacter: '\\\\eb3e' });\r\n Codicon.repoForcePush = new Codicon('repo-force-push', { fontCharacter: '\\\\eb3f' });\r\n Codicon.repoPull = new Codicon('repo-pull', { fontCharacter: '\\\\eb40' });\r\n Codicon.repoPush = new Codicon('repo-push', { fontCharacter: '\\\\eb41' });\r\n Codicon.report = new Codicon('report', { fontCharacter: '\\\\eb42' });\r\n Codicon.requestChanges = new Codicon('request-changes', { fontCharacter: '\\\\eb43' });\r\n Codicon.rocket = new Codicon('rocket', { fontCharacter: '\\\\eb44' });\r\n Codicon.rootFolderOpened = new Codicon('root-folder-opened', { fontCharacter: '\\\\eb45' });\r\n Codicon.rootFolder = new Codicon('root-folder', { fontCharacter: '\\\\eb46' });\r\n Codicon.rss = new Codicon('rss', { fontCharacter: '\\\\eb47' });\r\n Codicon.ruby = new Codicon('ruby', { fontCharacter: '\\\\eb48' });\r\n Codicon.saveAll = new Codicon('save-all', { fontCharacter: '\\\\eb49' });\r\n Codicon.saveAs = new Codicon('save-as', { fontCharacter: '\\\\eb4a' });\r\n Codicon.save = new Codicon('save', { fontCharacter: '\\\\eb4b' });\r\n Codicon.screenFull = new Codicon('screen-full', { fontCharacter: '\\\\eb4c' });\r\n Codicon.screenNormal = new Codicon('screen-normal', { fontCharacter: '\\\\eb4d' });\r\n Codicon.searchStop = new Codicon('search-stop', { fontCharacter: '\\\\eb4e' });\r\n Codicon.server = new Codicon('server', { fontCharacter: '\\\\eb50' });\r\n Codicon.settingsGear = new Codicon('settings-gear', { fontCharacter: '\\\\eb51' });\r\n Codicon.settings = new Codicon('settings', { fontCharacter: '\\\\eb52' });\r\n Codicon.shield = new Codicon('shield', { fontCharacter: '\\\\eb53' });\r\n Codicon.smiley = new Codicon('smiley', { fontCharacter: '\\\\eb54' });\r\n Codicon.sortPrecedence = new Codicon('sort-precedence', { fontCharacter: '\\\\eb55' });\r\n Codicon.splitHorizontal = new Codicon('split-horizontal', { fontCharacter: '\\\\eb56' });\r\n Codicon.splitVertical = new Codicon('split-vertical', { fontCharacter: '\\\\eb57' });\r\n Codicon.squirrel = new Codicon('squirrel', { fontCharacter: '\\\\eb58' });\r\n Codicon.starFull = new Codicon('star-full', { fontCharacter: '\\\\eb59' });\r\n Codicon.starHalf = new Codicon('star-half', { fontCharacter: '\\\\eb5a' });\r\n Codicon.symbolClass = new Codicon('symbol-class', { fontCharacter: '\\\\eb5b' });\r\n Codicon.symbolColor = new Codicon('symbol-color', { fontCharacter: '\\\\eb5c' });\r\n Codicon.symbolConstant = new Codicon('symbol-constant', { fontCharacter: '\\\\eb5d' });\r\n Codicon.symbolEnumMember = new Codicon('symbol-enum-member', { fontCharacter: '\\\\eb5e' });\r\n Codicon.symbolField = new Codicon('symbol-field', { fontCharacter: '\\\\eb5f' });\r\n Codicon.symbolFile = new Codicon('symbol-file', { fontCharacter: '\\\\eb60' });\r\n Codicon.symbolInterface = new Codicon('symbol-interface', { fontCharacter: '\\\\eb61' });\r\n Codicon.symbolKeyword = new Codicon('symbol-keyword', { fontCharacter: '\\\\eb62' });\r\n Codicon.symbolMisc = new Codicon('symbol-misc', { fontCharacter: '\\\\eb63' });\r\n Codicon.symbolOperator = new Codicon('symbol-operator', { fontCharacter: '\\\\eb64' });\r\n Codicon.symbolProperty = new Codicon('symbol-property', { fontCharacter: '\\\\eb65' });\r\n Codicon.wrench = new Codicon('wrench', { fontCharacter: '\\\\eb65' });\r\n Codicon.wrenchSubaction = new Codicon('wrench-subaction', { fontCharacter: '\\\\eb65' });\r\n Codicon.symbolSnippet = new Codicon('symbol-snippet', { fontCharacter: '\\\\eb66' });\r\n Codicon.tasklist = new Codicon('tasklist', { fontCharacter: '\\\\eb67' });\r\n Codicon.telescope = new Codicon('telescope', { fontCharacter: '\\\\eb68' });\r\n Codicon.textSize = new Codicon('text-size', { fontCharacter: '\\\\eb69' });\r\n Codicon.threeBars = new Codicon('three-bars', { fontCharacter: '\\\\eb6a' });\r\n Codicon.thumbsdown = new Codicon('thumbsdown', { fontCharacter: '\\\\eb6b' });\r\n Codicon.thumbsup = new Codicon('thumbsup', { fontCharacter: '\\\\eb6c' });\r\n Codicon.tools = new Codicon('tools', { fontCharacter: '\\\\eb6d' });\r\n Codicon.triangleDown = new Codicon('triangle-down', { fontCharacter: '\\\\eb6e' });\r\n Codicon.triangleLeft = new Codicon('triangle-left', { fontCharacter: '\\\\eb6f' });\r\n Codicon.triangleRight = new Codicon('triangle-right', { fontCharacter: '\\\\eb70' });\r\n Codicon.triangleUp = new Codicon('triangle-up', { fontCharacter: '\\\\eb71' });\r\n Codicon.twitter = new Codicon('twitter', { fontCharacter: '\\\\eb72' });\r\n Codicon.unfold = new Codicon('unfold', { fontCharacter: '\\\\eb73' });\r\n Codicon.unlock = new Codicon('unlock', { fontCharacter: '\\\\eb74' });\r\n Codicon.unmute = new Codicon('unmute', { fontCharacter: '\\\\eb75' });\r\n Codicon.unverified = new Codicon('unverified', { fontCharacter: '\\\\eb76' });\r\n Codicon.verified = new Codicon('verified', { fontCharacter: '\\\\eb77' });\r\n Codicon.versions = new Codicon('versions', { fontCharacter: '\\\\eb78' });\r\n Codicon.vmActive = new Codicon('vm-active', { fontCharacter: '\\\\eb79' });\r\n Codicon.vmOutline = new Codicon('vm-outline', { fontCharacter: '\\\\eb7a' });\r\n Codicon.vmRunning = new Codicon('vm-running', { fontCharacter: '\\\\eb7b' });\r\n Codicon.watch = new Codicon('watch', { fontCharacter: '\\\\eb7c' });\r\n Codicon.whitespace = new Codicon('whitespace', { fontCharacter: '\\\\eb7d' });\r\n Codicon.wholeWord = new Codicon('whole-word', { fontCharacter: '\\\\eb7e' });\r\n Codicon.window = new Codicon('window', { fontCharacter: '\\\\eb7f' });\r\n Codicon.wordWrap = new Codicon('word-wrap', { fontCharacter: '\\\\eb80' });\r\n Codicon.zoomIn = new Codicon('zoom-in', { fontCharacter: '\\\\eb81' });\r\n Codicon.zoomOut = new Codicon('zoom-out', { fontCharacter: '\\\\eb82' });\r\n Codicon.listFilter = new Codicon('list-filter', { fontCharacter: '\\\\eb83' });\r\n Codicon.listFlat = new Codicon('list-flat', { fontCharacter: '\\\\eb84' });\r\n Codicon.listSelection = new Codicon('list-selection', { fontCharacter: '\\\\eb85' });\r\n Codicon.selection = new Codicon('selection', { fontCharacter: '\\\\eb85' });\r\n Codicon.listTree = new Codicon('list-tree', { fontCharacter: '\\\\eb86' });\r\n Codicon.debugBreakpointFunctionUnverified = new Codicon('debug-breakpoint-function-unverified', { fontCharacter: '\\\\eb87' });\r\n Codicon.debugBreakpointFunction = new Codicon('debug-breakpoint-function', { fontCharacter: '\\\\eb88' });\r\n Codicon.debugBreakpointFunctionDisabled = new Codicon('debug-breakpoint-function-disabled', { fontCharacter: '\\\\eb88' });\r\n Codicon.debugStackframeActive = new Codicon('debug-stackframe-active', { fontCharacter: '\\\\eb89' });\r\n Codicon.debugStackframeDot = new Codicon('debug-stackframe-dot', { fontCharacter: '\\\\eb8a' });\r\n Codicon.debugStackframe = new Codicon('debug-stackframe', { fontCharacter: '\\\\eb8b' });\r\n Codicon.debugStackframeFocused = new Codicon('debug-stackframe-focused', { fontCharacter: '\\\\eb8b' });\r\n Codicon.debugBreakpointUnsupported = new Codicon('debug-breakpoint-unsupported', { fontCharacter: '\\\\eb8c' });\r\n Codicon.symbolString = new Codicon('symbol-string', { fontCharacter: '\\\\eb8d' });\r\n Codicon.debugReverseContinue = new Codicon('debug-reverse-continue', { fontCharacter: '\\\\eb8e' });\r\n Codicon.debugStepBack = new Codicon('debug-step-back', { fontCharacter: '\\\\eb8f' });\r\n Codicon.debugRestartFrame = new Codicon('debug-restart-frame', { fontCharacter: '\\\\eb90' });\r\n Codicon.callIncoming = new Codicon('call-incoming', { fontCharacter: '\\\\eb92' });\r\n Codicon.callOutgoing = new Codicon('call-outgoing', { fontCharacter: '\\\\eb93' });\r\n Codicon.menu = new Codicon('menu', { fontCharacter: '\\\\eb94' });\r\n Codicon.expandAll = new Codicon('expand-all', { fontCharacter: '\\\\eb95' });\r\n Codicon.feedback = new Codicon('feedback', { fontCharacter: '\\\\eb96' });\r\n Codicon.groupByRefType = new Codicon('group-by-ref-type', { fontCharacter: '\\\\eb97' });\r\n Codicon.ungroupByRefType = new Codicon('ungroup-by-ref-type', { fontCharacter: '\\\\eb98' });\r\n Codicon.account = new Codicon('account', { fontCharacter: '\\\\eb99' });\r\n Codicon.bellDot = new Codicon('bell-dot', { fontCharacter: '\\\\eb9a' });\r\n Codicon.debugConsole = new Codicon('debug-console', { fontCharacter: '\\\\eb9b' });\r\n Codicon.library = new Codicon('library', { fontCharacter: '\\\\eb9c' });\r\n Codicon.output = new Codicon('output', { fontCharacter: '\\\\eb9d' });\r\n Codicon.runAll = new Codicon('run-all', { fontCharacter: '\\\\eb9e' });\r\n Codicon.syncIgnored = new Codicon('sync-ignored', { fontCharacter: '\\\\eb9f' });\r\n Codicon.pinned = new Codicon('pinned', { fontCharacter: '\\\\eba0' });\r\n Codicon.githubInverted = new Codicon('github-inverted', { fontCharacter: '\\\\eba1' });\r\n Codicon.debugAlt = new Codicon('debug-alt', { fontCharacter: '\\\\eb91' });\r\n Codicon.serverProcess = new Codicon('server-process', { fontCharacter: '\\\\eba2' });\r\n Codicon.serverEnvironment = new Codicon('server-environment', { fontCharacter: '\\\\eba3' });\r\n Codicon.pass = new Codicon('pass', { fontCharacter: '\\\\eba4' });\r\n Codicon.stopCircle = new Codicon('stop-circle', { fontCharacter: '\\\\eba5' });\r\n Codicon.playCircle = new Codicon('play-circle', { fontCharacter: '\\\\eba6' });\r\n Codicon.record = new Codicon('record', { fontCharacter: '\\\\eba7' });\r\n Codicon.debugAltSmall = new Codicon('debug-alt-small', { fontCharacter: '\\\\eba8' });\r\n Codicon.vmConnect = new Codicon('vm-connect', { fontCharacter: '\\\\eba9' });\r\n Codicon.cloud = new Codicon('cloud', { fontCharacter: '\\\\ebaa' });\r\n Codicon.merge = new Codicon('merge', { fontCharacter: '\\\\ebab' });\r\n Codicon.exportIcon = new Codicon('export', { fontCharacter: '\\\\ebac' });\r\n Codicon.graphLeft = new Codicon('graph-left', { fontCharacter: '\\\\ebad' });\r\n Codicon.magnet = new Codicon('magnet', { fontCharacter: '\\\\ebae' });\r\n Codicon.notebook = new Codicon('notebook', { fontCharacter: '\\\\ebaf' });\r\n Codicon.redo = new Codicon('redo', { fontCharacter: '\\\\ebb0' });\r\n Codicon.checkAll = new Codicon('check-all', { fontCharacter: '\\\\ebb1' });\r\n Codicon.pinnedDirty = new Codicon('pinned-dirty', { fontCharacter: '\\\\ebb2' });\r\n Codicon.passFilled = new Codicon('pass-filled', { fontCharacter: '\\\\ebb3' });\r\n Codicon.circleLargeFilled = new Codicon('circle-large-filled', { fontCharacter: '\\\\ebb4' });\r\n Codicon.circleLargeOutline = new Codicon('circle-large-outline', { fontCharacter: '\\\\ebb5' });\r\n Codicon.combine = new Codicon('combine', { fontCharacter: '\\\\ebb6' });\r\n Codicon.gather = new Codicon('gather', { fontCharacter: '\\\\ebb6' });\r\n Codicon.table = new Codicon('table', { fontCharacter: '\\\\ebb7' });\r\n Codicon.variableGroup = new Codicon('variable-group', { fontCharacter: '\\\\ebb8' });\r\n Codicon.typeHierarchy = new Codicon('type-hierarchy', { fontCharacter: '\\\\ebb9' });\r\n Codicon.typeHierarchySub = new Codicon('type-hierarchy-sub', { fontCharacter: '\\\\ebba' });\r\n Codicon.typeHierarchySuper = new Codicon('type-hierarchy-super', { fontCharacter: '\\\\ebbb' });\r\n Codicon.gitPullRequestCreate = new Codicon('git-pull-request-create', { fontCharacter: '\\\\ebbc' });\r\n Codicon.runAbove = new Codicon('run-above', { fontCharacter: '\\\\ebbd' });\r\n Codicon.runBelow = new Codicon('run-below', { fontCharacter: '\\\\ebbe' });\r\n Codicon.notebookTemplate = new Codicon('notebook-template', { fontCharacter: '\\\\ebbf' });\r\n Codicon.debugRerun = new Codicon('debug-rerun', { fontCharacter: '\\\\ebc0' });\r\n Codicon.dropDownButton = new Codicon('drop-down-button', Codicon.chevronDown.definition);\r\n})(Codicon || (Codicon = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/codicons.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/collections.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/collections.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"forEach\": () => (/* binding */ forEach),\n/* harmony export */ \"SetMap\": () => (/* binding */ SetMap)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\n/**\r\n * Iterates over each entry in the provided dictionary. The iterator allows\r\n * to remove elements and will stop when the callback returns {{false}}.\r\n */\r\nfunction forEach(from, callback) {\r\n for (let key in from) {\r\n if (hasOwnProperty.call(from, key)) {\r\n const result = callback({ key: key, value: from[key] }, function () {\r\n delete from[key];\r\n });\r\n if (result === false) {\r\n return;\r\n }\r\n }\r\n }\r\n}\r\nclass SetMap {\r\n constructor() {\r\n this.map = new Map();\r\n }\r\n add(key, value) {\r\n let values = this.map.get(key);\r\n if (!values) {\r\n values = new Set();\r\n this.map.set(key, values);\r\n }\r\n values.add(value);\r\n }\r\n delete(key, value) {\r\n const values = this.map.get(key);\r\n if (!values) {\r\n return;\r\n }\r\n values.delete(value);\r\n if (values.size === 0) {\r\n this.map.delete(key);\r\n }\r\n }\r\n forEach(key, fn) {\r\n const values = this.map.get(key);\r\n if (!values) {\r\n return;\r\n }\r\n values.forEach(fn);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/collections.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/color.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/color.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RGBA\": () => (/* binding */ RGBA),\n/* harmony export */ \"HSLA\": () => (/* binding */ HSLA),\n/* harmony export */ \"HSVA\": () => (/* binding */ HSVA),\n/* harmony export */ \"Color\": () => (/* binding */ Color)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction roundFloat(number, decimalPoints) {\r\n const decimal = Math.pow(10, decimalPoints);\r\n return Math.round(number * decimal) / decimal;\r\n}\r\nclass RGBA {\r\n constructor(r, g, b, a = 1) {\r\n this.r = Math.min(255, Math.max(0, r)) | 0;\r\n this.g = Math.min(255, Math.max(0, g)) | 0;\r\n this.b = Math.min(255, Math.max(0, b)) | 0;\r\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\r\n }\r\n static equals(a, b) {\r\n return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a;\r\n }\r\n}\r\nclass HSLA {\r\n constructor(h, s, l, a) {\r\n this.h = Math.max(Math.min(360, h), 0) | 0;\r\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\r\n this.l = roundFloat(Math.max(Math.min(1, l), 0), 3);\r\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\r\n }\r\n static equals(a, b) {\r\n return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a;\r\n }\r\n /**\r\n * Converts an RGB color value to HSL. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes r, g, and b are contained in the set [0, 255] and\r\n * returns h in the set [0, 360], s, and l in the set [0, 1].\r\n */\r\n static fromRGBA(rgba) {\r\n const r = rgba.r / 255;\r\n const g = rgba.g / 255;\r\n const b = rgba.b / 255;\r\n const a = rgba.a;\r\n const max = Math.max(r, g, b);\r\n const min = Math.min(r, g, b);\r\n let h = 0;\r\n let s = 0;\r\n const l = (min + max) / 2;\r\n const chroma = max - min;\r\n if (chroma > 0) {\r\n s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);\r\n switch (max) {\r\n case r:\r\n h = (g - b) / chroma + (g < b ? 6 : 0);\r\n break;\r\n case g:\r\n h = (b - r) / chroma + 2;\r\n break;\r\n case b:\r\n h = (r - g) / chroma + 4;\r\n break;\r\n }\r\n h *= 60;\r\n h = Math.round(h);\r\n }\r\n return new HSLA(h, s, l, a);\r\n }\r\n static _hue2rgb(p, q, t) {\r\n if (t < 0) {\r\n t += 1;\r\n }\r\n if (t > 1) {\r\n t -= 1;\r\n }\r\n if (t < 1 / 6) {\r\n return p + (q - p) * 6 * t;\r\n }\r\n if (t < 1 / 2) {\r\n return q;\r\n }\r\n if (t < 2 / 3) {\r\n return p + (q - p) * (2 / 3 - t) * 6;\r\n }\r\n return p;\r\n }\r\n /**\r\n * Converts an HSL color value to RGB. Conversion formula\r\n * adapted from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and\r\n * returns r, g, and b in the set [0, 255].\r\n */\r\n static toRGBA(hsla) {\r\n const h = hsla.h / 360;\r\n const { s, l, a } = hsla;\r\n let r, g, b;\r\n if (s === 0) {\r\n r = g = b = l; // achromatic\r\n }\r\n else {\r\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n const p = 2 * l - q;\r\n r = HSLA._hue2rgb(p, q, h + 1 / 3);\r\n g = HSLA._hue2rgb(p, q, h);\r\n b = HSLA._hue2rgb(p, q, h - 1 / 3);\r\n }\r\n return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a);\r\n }\r\n}\r\nclass HSVA {\r\n constructor(h, s, v, a) {\r\n this.h = Math.max(Math.min(360, h), 0) | 0;\r\n this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);\r\n this.v = roundFloat(Math.max(Math.min(1, v), 0), 3);\r\n this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);\r\n }\r\n static equals(a, b) {\r\n return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a;\r\n }\r\n // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm\r\n static fromRGBA(rgba) {\r\n const r = rgba.r / 255;\r\n const g = rgba.g / 255;\r\n const b = rgba.b / 255;\r\n const cmax = Math.max(r, g, b);\r\n const cmin = Math.min(r, g, b);\r\n const delta = cmax - cmin;\r\n const s = cmax === 0 ? 0 : (delta / cmax);\r\n let m;\r\n if (delta === 0) {\r\n m = 0;\r\n }\r\n else if (cmax === r) {\r\n m = ((((g - b) / delta) % 6) + 6) % 6;\r\n }\r\n else if (cmax === g) {\r\n m = ((b - r) / delta) + 2;\r\n }\r\n else {\r\n m = ((r - g) / delta) + 4;\r\n }\r\n return new HSVA(Math.round(m * 60), s, cmax, rgba.a);\r\n }\r\n // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm\r\n static toRGBA(hsva) {\r\n const { h, s, v, a } = hsva;\r\n const c = v * s;\r\n const x = c * (1 - Math.abs((h / 60) % 2 - 1));\r\n const m = v - c;\r\n let [r, g, b] = [0, 0, 0];\r\n if (h < 60) {\r\n r = c;\r\n g = x;\r\n }\r\n else if (h < 120) {\r\n r = x;\r\n g = c;\r\n }\r\n else if (h < 180) {\r\n g = c;\r\n b = x;\r\n }\r\n else if (h < 240) {\r\n g = x;\r\n b = c;\r\n }\r\n else if (h < 300) {\r\n r = x;\r\n b = c;\r\n }\r\n else if (h <= 360) {\r\n r = c;\r\n b = x;\r\n }\r\n r = Math.round((r + m) * 255);\r\n g = Math.round((g + m) * 255);\r\n b = Math.round((b + m) * 255);\r\n return new RGBA(r, g, b, a);\r\n }\r\n}\r\nclass Color {\r\n constructor(arg) {\r\n if (!arg) {\r\n throw new Error('Color needs a value');\r\n }\r\n else if (arg instanceof RGBA) {\r\n this.rgba = arg;\r\n }\r\n else if (arg instanceof HSLA) {\r\n this._hsla = arg;\r\n this.rgba = HSLA.toRGBA(arg);\r\n }\r\n else if (arg instanceof HSVA) {\r\n this._hsva = arg;\r\n this.rgba = HSVA.toRGBA(arg);\r\n }\r\n else {\r\n throw new Error('Invalid color ctor argument');\r\n }\r\n }\r\n static fromHex(hex) {\r\n return Color.Format.CSS.parseHex(hex) || Color.red;\r\n }\r\n get hsla() {\r\n if (this._hsla) {\r\n return this._hsla;\r\n }\r\n else {\r\n return HSLA.fromRGBA(this.rgba);\r\n }\r\n }\r\n get hsva() {\r\n if (this._hsva) {\r\n return this._hsva;\r\n }\r\n return HSVA.fromRGBA(this.rgba);\r\n }\r\n equals(other) {\r\n return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);\r\n }\r\n /**\r\n * http://www.w3.org/TR/WCAG20/#relativeluminancedef\r\n * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.\r\n */\r\n getRelativeLuminance() {\r\n const R = Color._relativeLuminanceForComponent(this.rgba.r);\r\n const G = Color._relativeLuminanceForComponent(this.rgba.g);\r\n const B = Color._relativeLuminanceForComponent(this.rgba.b);\r\n const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;\r\n return roundFloat(luminance, 4);\r\n }\r\n static _relativeLuminanceForComponent(color) {\r\n const c = color / 255;\r\n return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4);\r\n }\r\n /**\r\n *\thttp://24ways.org/2010/calculating-color-contrast\r\n * Return 'true' if lighter color otherwise 'false'\r\n */\r\n isLighter() {\r\n const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;\r\n return yiq >= 128;\r\n }\r\n isLighterThan(another) {\r\n const lum1 = this.getRelativeLuminance();\r\n const lum2 = another.getRelativeLuminance();\r\n return lum1 > lum2;\r\n }\r\n isDarkerThan(another) {\r\n const lum1 = this.getRelativeLuminance();\r\n const lum2 = another.getRelativeLuminance();\r\n return lum1 < lum2;\r\n }\r\n lighten(factor) {\r\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a));\r\n }\r\n darken(factor) {\r\n return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a));\r\n }\r\n transparent(factor) {\r\n const { r, g, b, a } = this.rgba;\r\n return new Color(new RGBA(r, g, b, a * factor));\r\n }\r\n isTransparent() {\r\n return this.rgba.a === 0;\r\n }\r\n isOpaque() {\r\n return this.rgba.a === 1;\r\n }\r\n opposite() {\r\n return new Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a));\r\n }\r\n toString() {\r\n return '' + Color.Format.CSS.format(this);\r\n }\r\n static getLighterColor(of, relative, factor) {\r\n if (of.isLighterThan(relative)) {\r\n return of;\r\n }\r\n factor = factor ? factor : 0.5;\r\n const lum1 = of.getRelativeLuminance();\r\n const lum2 = relative.getRelativeLuminance();\r\n factor = factor * (lum2 - lum1) / lum2;\r\n return of.lighten(factor);\r\n }\r\n static getDarkerColor(of, relative, factor) {\r\n if (of.isDarkerThan(relative)) {\r\n return of;\r\n }\r\n factor = factor ? factor : 0.5;\r\n const lum1 = of.getRelativeLuminance();\r\n const lum2 = relative.getRelativeLuminance();\r\n factor = factor * (lum1 - lum2) / lum1;\r\n return of.darken(factor);\r\n }\r\n}\r\nColor.white = new Color(new RGBA(255, 255, 255, 1));\r\nColor.black = new Color(new RGBA(0, 0, 0, 1));\r\nColor.red = new Color(new RGBA(255, 0, 0, 1));\r\nColor.blue = new Color(new RGBA(0, 0, 255, 1));\r\nColor.cyan = new Color(new RGBA(0, 255, 255, 1));\r\nColor.lightgrey = new Color(new RGBA(211, 211, 211, 1));\r\nColor.transparent = new Color(new RGBA(0, 0, 0, 0));\r\n(function (Color) {\r\n let Format;\r\n (function (Format) {\r\n let CSS;\r\n (function (CSS) {\r\n function formatRGB(color) {\r\n if (color.rgba.a === 1) {\r\n return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`;\r\n }\r\n return Color.Format.CSS.formatRGBA(color);\r\n }\r\n CSS.formatRGB = formatRGB;\r\n function formatRGBA(color) {\r\n return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+(color.rgba.a).toFixed(2)})`;\r\n }\r\n CSS.formatRGBA = formatRGBA;\r\n function formatHSL(color) {\r\n if (color.hsla.a === 1) {\r\n return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`;\r\n }\r\n return Color.Format.CSS.formatHSLA(color);\r\n }\r\n CSS.formatHSL = formatHSL;\r\n function formatHSLA(color) {\r\n return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`;\r\n }\r\n CSS.formatHSLA = formatHSLA;\r\n function _toTwoDigitHex(n) {\r\n const r = n.toString(16);\r\n return r.length !== 2 ? '0' + r : r;\r\n }\r\n /**\r\n * Formats the color as #RRGGBB\r\n */\r\n function formatHex(color) {\r\n return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`;\r\n }\r\n CSS.formatHex = formatHex;\r\n /**\r\n * Formats the color as #RRGGBBAA\r\n * If 'compact' is set, colors without transparancy will be printed as #RRGGBB\r\n */\r\n function formatHexA(color, compact = false) {\r\n if (compact && color.rgba.a === 1) {\r\n return Color.Format.CSS.formatHex(color);\r\n }\r\n return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`;\r\n }\r\n CSS.formatHexA = formatHexA;\r\n /**\r\n * The default format will use HEX if opaque and RGBA otherwise.\r\n */\r\n function format(color) {\r\n if (color.isOpaque()) {\r\n return Color.Format.CSS.formatHex(color);\r\n }\r\n return Color.Format.CSS.formatRGBA(color);\r\n }\r\n CSS.format = format;\r\n /**\r\n * Converts an Hex color value to a Color.\r\n * returns r, g, and b are contained in the set [0, 255]\r\n * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).\r\n */\r\n function parseHex(hex) {\r\n const length = hex.length;\r\n if (length === 0) {\r\n // Invalid color\r\n return null;\r\n }\r\n if (hex.charCodeAt(0) !== 35 /* Hash */) {\r\n // Does not begin with a #\r\n return null;\r\n }\r\n if (length === 7) {\r\n // #RRGGBB format\r\n const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\r\n const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\r\n const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\r\n return new Color(new RGBA(r, g, b, 1));\r\n }\r\n if (length === 9) {\r\n // #RRGGBBAA format\r\n const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\r\n const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\r\n const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\r\n const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));\r\n return new Color(new RGBA(r, g, b, a / 255));\r\n }\r\n if (length === 4) {\r\n // #RGB format\r\n const r = _parseHexDigit(hex.charCodeAt(1));\r\n const g = _parseHexDigit(hex.charCodeAt(2));\r\n const b = _parseHexDigit(hex.charCodeAt(3));\r\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));\r\n }\r\n if (length === 5) {\r\n // #RGBA format\r\n const r = _parseHexDigit(hex.charCodeAt(1));\r\n const g = _parseHexDigit(hex.charCodeAt(2));\r\n const b = _parseHexDigit(hex.charCodeAt(3));\r\n const a = _parseHexDigit(hex.charCodeAt(4));\r\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));\r\n }\r\n // Invalid color\r\n return null;\r\n }\r\n CSS.parseHex = parseHex;\r\n function _parseHexDigit(charCode) {\r\n switch (charCode) {\r\n case 48 /* Digit0 */: return 0;\r\n case 49 /* Digit1 */: return 1;\r\n case 50 /* Digit2 */: return 2;\r\n case 51 /* Digit3 */: return 3;\r\n case 52 /* Digit4 */: return 4;\r\n case 53 /* Digit5 */: return 5;\r\n case 54 /* Digit6 */: return 6;\r\n case 55 /* Digit7 */: return 7;\r\n case 56 /* Digit8 */: return 8;\r\n case 57 /* Digit9 */: return 9;\r\n case 97 /* a */: return 10;\r\n case 65 /* A */: return 10;\r\n case 98 /* b */: return 11;\r\n case 66 /* B */: return 11;\r\n case 99 /* c */: return 12;\r\n case 67 /* C */: return 12;\r\n case 100 /* d */: return 13;\r\n case 68 /* D */: return 13;\r\n case 101 /* e */: return 14;\r\n case 69 /* E */: return 14;\r\n case 102 /* f */: return 15;\r\n case 70 /* F */: return 15;\r\n }\r\n return 0;\r\n }\r\n })(CSS = Format.CSS || (Format.CSS = {}));\r\n })(Format = Color.Format || (Color.Format = {}));\r\n})(Color || (Color = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/color.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/comparers.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/comparers.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compareFileNames\": () => (/* binding */ compareFileNames),\n/* harmony export */ \"compareAnything\": () => (/* binding */ compareAnything),\n/* harmony export */ \"compareByPrefix\": () => (/* binding */ compareByPrefix)\n/* harmony export */ });\n/* harmony import */ var _async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n\r\n// When comparing large numbers of strings, such as in sorting large arrays, is better for\r\n// performance to create an Intl.Collator object and use the function provided by its compare\r\n// property than it is to use String.prototype.localeCompare()\r\n// A collator with numeric sorting enabled, and no sensitivity to case or to accents\r\nconst intlFileNameCollatorBaseNumeric = new _async_js__WEBPACK_IMPORTED_MODULE_0__.IdleValue(() => {\r\n const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' });\r\n return {\r\n collator: collator,\r\n collatorIsNumeric: collator.resolvedOptions().numeric\r\n };\r\n}); /** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */\r\nfunction compareFileNames(one, other, caseSensitive = false) {\r\n const a = one || '';\r\n const b = other || '';\r\n const result = intlFileNameCollatorBaseNumeric.value.collator.compare(a, b);\r\n // Using the numeric option in the collator will\r\n // make compare(`foo1`, `foo01`) === 0. We must disambiguate.\r\n if (intlFileNameCollatorBaseNumeric.value.collatorIsNumeric && result === 0 && a !== b) {\r\n return a < b ? -1 : 1;\r\n }\r\n return result;\r\n}\r\nfunction compareAnything(one, other, lookFor) {\r\n const elementAName = one.toLowerCase();\r\n const elementBName = other.toLowerCase();\r\n // Sort prefix matches over non prefix matches\r\n const prefixCompare = compareByPrefix(one, other, lookFor);\r\n if (prefixCompare) {\r\n return prefixCompare;\r\n }\r\n // Sort suffix matches over non suffix matches\r\n const elementASuffixMatch = elementAName.endsWith(lookFor);\r\n const elementBSuffixMatch = elementBName.endsWith(lookFor);\r\n if (elementASuffixMatch !== elementBSuffixMatch) {\r\n return elementASuffixMatch ? -1 : 1;\r\n }\r\n // Understand file names\r\n const r = compareFileNames(elementAName, elementBName);\r\n if (r !== 0) {\r\n return r;\r\n }\r\n // Compare by name\r\n return elementAName.localeCompare(elementBName);\r\n}\r\nfunction compareByPrefix(one, other, lookFor) {\r\n const elementAName = one.toLowerCase();\r\n const elementBName = other.toLowerCase();\r\n // Sort prefix matches over non prefix matches\r\n const elementAPrefixMatch = elementAName.startsWith(lookFor);\r\n const elementBPrefixMatch = elementBName.startsWith(lookFor);\r\n if (elementAPrefixMatch !== elementBPrefixMatch) {\r\n return elementAPrefixMatch ? -1 : 1;\r\n }\r\n // Same prefix: Sort shorter matches to the top to have those on top that match more precisely\r\n else if (elementAPrefixMatch && elementBPrefixMatch) {\r\n if (elementAName.length < elementBName.length) {\r\n return -1;\r\n }\r\n if (elementAName.length > elementBName.length) {\r\n return 1;\r\n }\r\n }\r\n return 0;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/comparers.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/decorators.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createMemoizer\": () => (/* binding */ createMemoizer),\n/* harmony export */ \"memoize\": () => (/* binding */ memoize)\n/* harmony export */ });\nlet memoizeId = 0;\r\nfunction createMemoizer() {\r\n const memoizeKeyPrefix = `$memoize${memoizeId++}`;\r\n let self = undefined;\r\n const result = function memoize(target, key, descriptor) {\r\n let fnKey = null;\r\n let fn = null;\r\n if (typeof descriptor.value === 'function') {\r\n fnKey = 'value';\r\n fn = descriptor.value;\r\n if (fn.length !== 0) {\r\n console.warn('Memoize should only be used in functions with zero parameters');\r\n }\r\n }\r\n else if (typeof descriptor.get === 'function') {\r\n fnKey = 'get';\r\n fn = descriptor.get;\r\n }\r\n if (!fn) {\r\n throw new Error('not supported');\r\n }\r\n const memoizeKey = `${memoizeKeyPrefix}:${key}`;\r\n descriptor[fnKey] = function (...args) {\r\n self = this;\r\n if (!this.hasOwnProperty(memoizeKey)) {\r\n Object.defineProperty(this, memoizeKey, {\r\n configurable: true,\r\n enumerable: false,\r\n writable: true,\r\n value: fn.apply(this, args)\r\n });\r\n }\r\n return this[memoizeKey];\r\n };\r\n };\r\n result.clear = () => {\r\n if (typeof self === 'undefined') {\r\n return;\r\n }\r\n Object.getOwnPropertyNames(self).forEach(property => {\r\n if (property.indexOf(memoizeKeyPrefix) === 0) {\r\n delete self[property];\r\n }\r\n });\r\n };\r\n return result;\r\n}\r\nfunction memoize(target, key, descriptor) {\r\n return createMemoizer()(target, key, descriptor);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/decorators.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StringDiffSequence\": () => (/* binding */ StringDiffSequence),\n/* harmony export */ \"stringDiff\": () => (/* binding */ stringDiff),\n/* harmony export */ \"Debug\": () => (/* binding */ Debug),\n/* harmony export */ \"MyArray\": () => (/* binding */ MyArray),\n/* harmony export */ \"LcsDiff\": () => (/* binding */ LcsDiff)\n/* harmony export */ });\n/* harmony import */ var _diffChange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diffChange.js */ \"./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js\");\n/* harmony import */ var _hash_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass StringDiffSequence {\r\n constructor(source) {\r\n this.source = source;\r\n }\r\n getElements() {\r\n const source = this.source;\r\n const characters = new Int32Array(source.length);\r\n for (let i = 0, len = source.length; i < len; i++) {\r\n characters[i] = source.charCodeAt(i);\r\n }\r\n return characters;\r\n }\r\n}\r\nfunction stringDiff(original, modified, pretty) {\r\n return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes;\r\n}\r\n//\r\n// The code below has been ported from a C# implementation in VS\r\n//\r\nclass Debug {\r\n static Assert(condition, message) {\r\n if (!condition) {\r\n throw new Error(message);\r\n }\r\n }\r\n}\r\nclass MyArray {\r\n /**\r\n * Copies a range of elements from an Array starting at the specified source index and pastes\r\n * them to another Array starting at the specified destination index. The length and the indexes\r\n * are specified as 64-bit integers.\r\n * sourceArray:\r\n *\t\tThe Array that contains the data to copy.\r\n * sourceIndex:\r\n *\t\tA 64-bit integer that represents the index in the sourceArray at which copying begins.\r\n * destinationArray:\r\n *\t\tThe Array that receives the data.\r\n * destinationIndex:\r\n *\t\tA 64-bit integer that represents the index in the destinationArray at which storing begins.\r\n * length:\r\n *\t\tA 64-bit integer that represents the number of elements to copy.\r\n */\r\n static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n}\r\n/**\r\n * A utility class which helps to create the set of DiffChanges from\r\n * a difference operation. This class accepts original DiffElements and\r\n * modified DiffElements that are involved in a particular change. The\r\n * MarktNextChange() method can be called to mark the separation between\r\n * distinct changes. At the end, the Changes property can be called to retrieve\r\n * the constructed changes.\r\n */\r\nclass DiffChangeHelper {\r\n /**\r\n * Constructs a new DiffChangeHelper for the given DiffSequences.\r\n */\r\n constructor() {\r\n this.m_changes = [];\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n }\r\n /**\r\n * Marks the beginning of the next change in the set of differences.\r\n */\r\n MarkNextChange() {\r\n // Only add to the list if there is something to add\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Add the new change to our list\r\n this.m_changes.push(new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));\r\n }\r\n // Reset for the next change\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n /**\r\n * Adds the original element at the given position to the elements\r\n * affected by the current change. The modified index gives context\r\n * to the change position with respect to the original sequence.\r\n * @param originalIndex The index of the original element to add.\r\n * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.\r\n */\r\n AddOriginalElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_originalCount++;\r\n }\r\n /**\r\n * Adds the modified element at the given position to the elements\r\n * affected by the current change. The original index gives context\r\n * to the change position with respect to the modified sequence.\r\n * @param originalIndex The index of the original element that provides corresponding position in the original sequence.\r\n * @param modifiedIndex The index of the modified element to add.\r\n */\r\n AddModifiedElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_modifiedCount++;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class.\r\n */\r\n getChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n return this.m_changes;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class in the reverse order\r\n */\r\n getReverseChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n this.m_changes.reverse();\r\n return this.m_changes;\r\n }\r\n}\r\n/**\r\n * An implementation of the difference algorithm described in\r\n * \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\r\n */\r\nclass LcsDiff {\r\n /**\r\n * Constructs the DiffFinder\r\n */\r\n constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) {\r\n this.ContinueProcessingPredicate = continueProcessingPredicate;\r\n const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence);\r\n const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence);\r\n this._hasStrings = (originalHasStrings && modifiedHasStrings);\r\n this._originalStringElements = originalStringElements;\r\n this._originalElementsOrHash = originalElementsOrHash;\r\n this._modifiedStringElements = modifiedStringElements;\r\n this._modifiedElementsOrHash = modifiedElementsOrHash;\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n }\r\n static _isStringArray(arr) {\r\n return (arr.length > 0 && typeof arr[0] === 'string');\r\n }\r\n static _getElements(sequence) {\r\n const elements = sequence.getElements();\r\n if (LcsDiff._isStringArray(elements)) {\r\n const hashes = new Int32Array(elements.length);\r\n for (let i = 0, len = elements.length; i < len; i++) {\r\n hashes[i] = (0,_hash_js__WEBPACK_IMPORTED_MODULE_1__.stringHash)(elements[i], 0);\r\n }\r\n return [elements, hashes, true];\r\n }\r\n if (elements instanceof Int32Array) {\r\n return [[], elements, false];\r\n }\r\n return [[], new Int32Array(elements), false];\r\n }\r\n ElementsAreEqual(originalIndex, newIndex) {\r\n if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true);\r\n }\r\n OriginalElementsAreEqual(index1, index2) {\r\n if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true);\r\n }\r\n ModifiedElementsAreEqual(index1, index2) {\r\n if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true);\r\n }\r\n ComputeDiff(pretty) {\r\n return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty);\r\n }\r\n /**\r\n * Computes the differences between the original and modified input\r\n * sequences on the bounded range.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {\r\n const quitEarlyArr = [false];\r\n let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);\r\n if (pretty) {\r\n // We have to clean up the computed diff to be more intuitive\r\n // but it turns out this cannot be done correctly until the entire set\r\n // of diffs have been computed\r\n changes = this.PrettifyChanges(changes);\r\n }\r\n return {\r\n quitEarly: quitEarlyArr[0],\r\n changes: changes\r\n };\r\n }\r\n /**\r\n * Private helper method which computes the differences on the bounded range\r\n * recursively.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {\r\n quitEarlyArr[0] = false;\r\n // Find the start of the differences\r\n while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {\r\n originalStart++;\r\n modifiedStart++;\r\n }\r\n // Find the end of the differences\r\n while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {\r\n originalEnd--;\r\n modifiedEnd--;\r\n }\r\n // In the special case where we either have all insertions or all deletions or the sequences are identical\r\n if (originalStart > originalEnd || modifiedStart > modifiedEnd) {\r\n let changes;\r\n if (modifiedStart <= modifiedEnd) {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n // All insertions\r\n changes = [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n else if (originalStart <= originalEnd) {\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // All deletions\r\n changes = [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)\r\n ];\r\n }\r\n else {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // Identical sequences - No differences\r\n changes = [];\r\n }\r\n return changes;\r\n }\r\n // This problem can be solved using the Divide-And-Conquer technique.\r\n const midOriginalArr = [0];\r\n const midModifiedArr = [0];\r\n const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);\r\n const midOriginal = midOriginalArr[0];\r\n const midModified = midModifiedArr[0];\r\n if (result !== null) {\r\n // Result is not-null when there was enough memory to compute the changes while\r\n // searching for the recursion point\r\n return result;\r\n }\r\n else if (!quitEarlyArr[0]) {\r\n // We can break the problem down recursively by finding the changes in the\r\n // First Half: (originalStart, modifiedStart) to (midOriginal, midModified)\r\n // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd)\r\n // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point\r\n const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);\r\n let rightChanges = [];\r\n if (!quitEarlyArr[0]) {\r\n rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);\r\n }\r\n else {\r\n // We did't have time to finish the first half, so we don't have time to compute this half.\r\n // Consider the entire rest of the sequence different.\r\n rightChanges = [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)\r\n ];\r\n }\r\n return this.ConcatenateChanges(leftChanges, rightChanges);\r\n }\r\n // If we hit here, we quit early, and so can't return anything meaningful\r\n return [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {\r\n let forwardChanges = null;\r\n let reverseChanges = null;\r\n // First, walk backward through the forward diagonals history\r\n let changeHelper = new DiffChangeHelper();\r\n let diagonalMin = diagonalForwardStart;\r\n let diagonalMax = diagonalForwardEnd;\r\n let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;\r\n let lastOriginalIndex = -1073741824 /* MIN_SAFE_SMALL_INTEGER */;\r\n let historyIndex = this.m_forwardHistory.length - 1;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalForwardBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n // Vertical line (the element is an insert)\r\n originalIndex = forwardPoints[diagonal + 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);\r\n diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Horizontal line (the element is a deletion)\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex - 1;\r\n changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n forwardPoints = this.m_forwardHistory[historyIndex];\r\n diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = forwardPoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // Ironically, we get the forward changes as the reverse of the\r\n // order we added them since we technically added them backwards\r\n forwardChanges = changeHelper.getReverseChanges();\r\n if (quitEarlyArr[0]) {\r\n // TODO: Calculate a partial from the reverse diagonals.\r\n // For now, just assume everything after the midOriginal/midModified point is a diff\r\n let originalStartPoint = midOriginalArr[0] + 1;\r\n let modifiedStartPoint = midModifiedArr[0] + 1;\r\n if (forwardChanges !== null && forwardChanges.length > 0) {\r\n const lastForwardChange = forwardChanges[forwardChanges.length - 1];\r\n originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());\r\n modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());\r\n }\r\n reverseChanges = [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)\r\n ];\r\n }\r\n else {\r\n // Now walk backward through the reverse diagonals history\r\n changeHelper = new DiffChangeHelper();\r\n diagonalMin = diagonalReverseStart;\r\n diagonalMax = diagonalReverseEnd;\r\n diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset;\r\n lastOriginalIndex = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalReverseBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n // Horizontal line (the element is a deletion))\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex + 1;\r\n changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Vertical line (the element is an insertion)\r\n originalIndex = reversePoints[diagonal - 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n reversePoints = this.m_reverseHistory[historyIndex];\r\n diagonalReverseBase = reversePoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = reversePoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // There are cases where the reverse history will find diffs that\r\n // are correct, but not intuitive, so we need shift them.\r\n reverseChanges = changeHelper.getChanges();\r\n }\r\n return this.ConcatenateChanges(forwardChanges, reverseChanges);\r\n }\r\n /**\r\n * Given the range to compute the diff on, this method finds the point:\r\n * (midOriginal, midModified)\r\n * that exists in the middle of the LCS of the two sequences and\r\n * is the point at which the LCS problem may be broken down recursively.\r\n * This method will try to keep the LCS trace in memory. If the LCS recursion\r\n * point is calculated and the full trace is available in memory, then this method\r\n * will return the change list.\r\n * @param originalStart The start bound of the original sequence range\r\n * @param originalEnd The end bound of the original sequence range\r\n * @param modifiedStart The start bound of the modified sequence range\r\n * @param modifiedEnd The end bound of the modified sequence range\r\n * @param midOriginal The middle point of the original sequence range\r\n * @param midModified The middle point of the modified sequence range\r\n * @returns The diff changes, if available, otherwise null\r\n */\r\n ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {\r\n let originalIndex = 0, modifiedIndex = 0;\r\n let diagonalForwardStart = 0, diagonalForwardEnd = 0;\r\n let diagonalReverseStart = 0, diagonalReverseEnd = 0;\r\n // To traverse the edit graph and produce the proper LCS, our actual\r\n // start position is just outside the given boundary\r\n originalStart--;\r\n modifiedStart--;\r\n // We set these up to make the compiler happy, but they will\r\n // be replaced before we return with the actual recursion point\r\n midOriginalArr[0] = 0;\r\n midModifiedArr[0] = 0;\r\n // Clear out the history\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n // Each cell in the two arrays corresponds to a diagonal in the edit graph.\r\n // The integer value in the cell represents the originalIndex of the furthest\r\n // reaching point found so far that ends in that diagonal.\r\n // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number.\r\n const maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart);\r\n const numDiagonals = maxDifferences + 1;\r\n const forwardPoints = new Int32Array(numDiagonals);\r\n const reversePoints = new Int32Array(numDiagonals);\r\n // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart)\r\n // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd)\r\n const diagonalForwardBase = (modifiedEnd - modifiedStart);\r\n const diagonalReverseBase = (originalEnd - originalStart);\r\n // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalForwardBase)\r\n // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalReverseBase)\r\n const diagonalForwardOffset = (originalStart - modifiedStart);\r\n const diagonalReverseOffset = (originalEnd - modifiedEnd);\r\n // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers\r\n // relative to the start diagonal with diagonal numbers relative to the end diagonal.\r\n // The Even/Oddn-ness of this delta is important for determining when we should check for overlap\r\n const delta = diagonalReverseBase - diagonalForwardBase;\r\n const deltaIsEven = (delta % 2 === 0);\r\n // Here we set up the start and end points as the furthest points found so far\r\n // in both the forward and reverse directions, respectively\r\n forwardPoints[diagonalForwardBase] = originalStart;\r\n reversePoints[diagonalReverseBase] = originalEnd;\r\n // Remember if we quit early, and thus need to do a best-effort result instead of a real result.\r\n quitEarlyArr[0] = false;\r\n // A couple of points:\r\n // --With this method, we iterate on the number of differences between the two sequences.\r\n // The more differences there actually are, the longer this will take.\r\n // --Also, as the number of differences increases, we have to search on diagonals further\r\n // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse).\r\n // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences\r\n // is even and odd diagonals only when numDifferences is odd.\r\n for (let numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) {\r\n let furthestOriginalIndex = 0;\r\n let furthestModifiedIndex = 0;\r\n // Run the algorithm in the forward direction\r\n diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalStart, modifiedStart)\r\n if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n originalIndex = forwardPoints[diagonal + 1];\r\n }\r\n else {\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;\r\n // Save the current originalIndex so we can test for false overlap in step 3\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // so long as the elements are equal.\r\n while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {\r\n originalIndex++;\r\n modifiedIndex++;\r\n }\r\n forwardPoints[diagonal] = originalIndex;\r\n if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {\r\n furthestOriginalIndex = originalIndex;\r\n furthestModifiedIndex = modifiedIndex;\r\n }\r\n // STEP 3: If delta is odd (overlap first happens on forward when delta is odd)\r\n // and diagonal is in the range of reverse diagonals computed for numDifferences-1\r\n // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet)\r\n // then check for overlap.\r\n if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) {\r\n if (originalIndex >= reversePoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex <= reversePoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Check to see if we should be quitting early, before moving on to the next iteration.\r\n const matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;\r\n if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) {\r\n // We can't finish, so skip ahead to generating a result from what we have.\r\n quitEarlyArr[0] = true;\r\n // Use the furthest distance we got in the forward direction.\r\n midOriginalArr[0] = furthestOriginalIndex;\r\n midModifiedArr[0] = furthestModifiedIndex;\r\n if (matchLengthOfLongest > 0 && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // Enough of the history is in memory to walk it backwards\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // We didn't actually remember enough of the history.\r\n //Since we are quiting the diff early, we need to shift back the originalStart and modified start\r\n //back into the boundary limits since we decremented their value above beyond the boundary limit.\r\n originalStart++;\r\n modifiedStart++;\r\n return [\r\n new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n }\r\n // Run the algorithm in the reverse direction\r\n diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalEnd, modifiedEnd)\r\n if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n }\r\n else {\r\n originalIndex = reversePoints[diagonal - 1];\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;\r\n // Save the current originalIndex so we can test for false overlap\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // as long as the elements are equal.\r\n while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {\r\n originalIndex--;\r\n modifiedIndex--;\r\n }\r\n reversePoints[diagonal] = originalIndex;\r\n // STEP 4: If delta is even (overlap first happens on reverse when delta is even)\r\n // and diagonal is in the range of forward diagonals computed for numDifferences\r\n // then check for overlap.\r\n if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {\r\n if (originalIndex <= forwardPoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Save current vectors to history before the next iteration\r\n if (numDifferences <= 1447 /* MaxDifferencesHistory */) {\r\n // We are allocating space for one extra int, which we fill with\r\n // the index of the diagonal base index\r\n let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2);\r\n temp[0] = diagonalForwardBase - diagonalForwardStart + 1;\r\n MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);\r\n this.m_forwardHistory.push(temp);\r\n temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2);\r\n temp[0] = diagonalReverseBase - diagonalReverseStart + 1;\r\n MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);\r\n this.m_reverseHistory.push(temp);\r\n }\r\n }\r\n // If we got here, then we have the full trace in history. We just have to convert it to a change list\r\n // NOTE: This part is a bit messy\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n /**\r\n * Shifts the given changes to provide a more intuitive diff.\r\n * While the first element in a diff matches the first element after the diff,\r\n * we shift the diff down.\r\n *\r\n * @param changes The list of changes to shift\r\n * @returns The shifted changes\r\n */\r\n PrettifyChanges(changes) {\r\n // Shift all the changes down first\r\n for (let i = 0; i < changes.length; i++) {\r\n const change = changes[i];\r\n const originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this._originalElementsOrHash.length;\r\n const modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length;\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n while (change.originalStart + change.originalLength < originalStop &&\r\n change.modifiedStart + change.modifiedLength < modifiedStop &&\r\n (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) &&\r\n (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {\r\n change.originalStart++;\r\n change.modifiedStart++;\r\n }\r\n let mergedChangeArr = [null];\r\n if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {\r\n changes[i] = mergedChangeArr[0];\r\n changes.splice(i + 1, 1);\r\n i--;\r\n continue;\r\n }\r\n }\r\n // Shift changes back up until we hit empty or whitespace-only lines\r\n for (let i = changes.length - 1; i >= 0; i--) {\r\n const change = changes[i];\r\n let originalStop = 0;\r\n let modifiedStop = 0;\r\n if (i > 0) {\r\n const prevChange = changes[i - 1];\r\n if (prevChange.originalLength > 0) {\r\n originalStop = prevChange.originalStart + prevChange.originalLength;\r\n }\r\n if (prevChange.modifiedLength > 0) {\r\n modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;\r\n }\r\n }\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n let bestDelta = 0;\r\n let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);\r\n for (let delta = 1;; delta++) {\r\n const originalStart = change.originalStart - delta;\r\n const modifiedStart = change.modifiedStart - delta;\r\n if (originalStart < originalStop || modifiedStart < modifiedStop) {\r\n break;\r\n }\r\n if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {\r\n break;\r\n }\r\n if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {\r\n break;\r\n }\r\n const score = this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength);\r\n if (score > bestScore) {\r\n bestScore = score;\r\n bestDelta = delta;\r\n }\r\n }\r\n change.originalStart -= bestDelta;\r\n change.modifiedStart -= bestDelta;\r\n }\r\n // There could be multiple longest common substrings.\r\n // Give preference to the ones containing longer lines\r\n if (this._hasStrings) {\r\n for (let i = 1, len = changes.length; i < len; i++) {\r\n const aChange = changes[i - 1];\r\n const bChange = changes[i];\r\n const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength;\r\n const aOriginalStart = aChange.originalStart;\r\n const bOriginalEnd = bChange.originalStart + bChange.originalLength;\r\n const abOriginalLength = bOriginalEnd - aOriginalStart;\r\n const aModifiedStart = aChange.modifiedStart;\r\n const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength;\r\n const abModifiedLength = bModifiedEnd - aModifiedStart;\r\n // Avoid wasting a lot of time with these searches\r\n if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) {\r\n const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength);\r\n if (t) {\r\n const [originalMatchStart, modifiedMatchStart] = t;\r\n if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) {\r\n // switch to another sequence that has a better score\r\n aChange.originalLength = originalMatchStart - aChange.originalStart;\r\n aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart;\r\n bChange.originalStart = originalMatchStart + matchedLength;\r\n bChange.modifiedStart = modifiedMatchStart + matchedLength;\r\n bChange.originalLength = bOriginalEnd - bChange.originalStart;\r\n bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return changes;\r\n }\r\n _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) {\r\n if (originalLength < desiredLength || modifiedLength < desiredLength) {\r\n return null;\r\n }\r\n const originalMax = originalStart + originalLength - desiredLength + 1;\r\n const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1;\r\n let bestScore = 0;\r\n let bestOriginalStart = 0;\r\n let bestModifiedStart = 0;\r\n for (let i = originalStart; i < originalMax; i++) {\r\n for (let j = modifiedStart; j < modifiedMax; j++) {\r\n const score = this._contiguousSequenceScore(i, j, desiredLength);\r\n if (score > 0 && score > bestScore) {\r\n bestScore = score;\r\n bestOriginalStart = i;\r\n bestModifiedStart = j;\r\n }\r\n }\r\n }\r\n if (bestScore > 0) {\r\n return [bestOriginalStart, bestModifiedStart];\r\n }\r\n return null;\r\n }\r\n _contiguousSequenceScore(originalStart, modifiedStart, length) {\r\n let score = 0;\r\n for (let l = 0; l < length; l++) {\r\n if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) {\r\n return 0;\r\n }\r\n score += this._originalStringElements[originalStart + l].length;\r\n }\r\n return score;\r\n }\r\n _OriginalIsBoundary(index) {\r\n if (index <= 0 || index >= this._originalElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._originalStringElements[index]));\r\n }\r\n _OriginalRegionIsBoundary(originalStart, originalLength) {\r\n if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {\r\n return true;\r\n }\r\n if (originalLength > 0) {\r\n const originalEnd = originalStart + originalLength;\r\n if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _ModifiedIsBoundary(index) {\r\n if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._modifiedStringElements[index]));\r\n }\r\n _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) {\r\n if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {\r\n return true;\r\n }\r\n if (modifiedLength > 0) {\r\n const modifiedEnd = modifiedStart + modifiedLength;\r\n if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n const originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0);\r\n const modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0);\r\n return (originalScore + modifiedScore);\r\n }\r\n /**\r\n * Concatenates the two input DiffChange lists and returns the resulting\r\n * list.\r\n * @param The left changes\r\n * @param The right changes\r\n * @returns The concatenated list\r\n */\r\n ConcatenateChanges(left, right) {\r\n let mergedChangeArr = [];\r\n if (left.length === 0 || right.length === 0) {\r\n return (right.length > 0) ? right : left;\r\n }\r\n else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {\r\n // Since we break the problem down recursively, it is possible that we\r\n // might recurse in the middle of a change thereby splitting it into\r\n // two changes. Here in the combining stage, we detect and fuse those\r\n // changes back together\r\n const result = new Array(left.length + right.length - 1);\r\n MyArray.Copy(left, 0, result, 0, left.length - 1);\r\n result[left.length - 1] = mergedChangeArr[0];\r\n MyArray.Copy(right, 1, result, left.length, right.length - 1);\r\n return result;\r\n }\r\n else {\r\n const result = new Array(left.length + right.length);\r\n MyArray.Copy(left, 0, result, 0, left.length);\r\n MyArray.Copy(right, 0, result, left.length, right.length);\r\n return result;\r\n }\r\n }\r\n /**\r\n * Returns true if the two changes overlap and can be merged into a single\r\n * change\r\n * @param left The left change\r\n * @param right The right change\r\n * @param mergedChange The merged change if the two overlap, null otherwise\r\n * @returns True if the two changes overlap\r\n */\r\n ChangesOverlap(left, right, mergedChangeArr) {\r\n Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change');\r\n Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change');\r\n if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n const originalStart = left.originalStart;\r\n let originalLength = left.originalLength;\r\n const modifiedStart = left.modifiedStart;\r\n let modifiedLength = left.modifiedLength;\r\n if (left.originalStart + left.originalLength >= right.originalStart) {\r\n originalLength = right.originalStart + right.originalLength - left.originalStart;\r\n }\r\n if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;\r\n }\r\n mergedChangeArr[0] = new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__.DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);\r\n return true;\r\n }\r\n else {\r\n mergedChangeArr[0] = null;\r\n return false;\r\n }\r\n }\r\n /**\r\n * Helper method used to clip a diagonal index to the range of valid\r\n * diagonals. This also decides whether or not the diagonal index,\r\n * if it exceeds the boundary, should be clipped to the boundary or clipped\r\n * one inside the boundary depending on the Even/Odd status of the boundary\r\n * and numDifferences.\r\n * @param diagonal The index of the diagonal to clip.\r\n * @param numDifferences The current number of differences being iterated upon.\r\n * @param diagonalBaseIndex The base reference diagonal.\r\n * @param numDiagonals The total number of diagonals.\r\n * @returns The clipped diagonal index.\r\n */\r\n ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {\r\n if (diagonal >= 0 && diagonal < numDiagonals) {\r\n // Nothing to clip, its in range\r\n return diagonal;\r\n }\r\n // diagonalsBelow: The number of diagonals below the reference diagonal\r\n // diagonalsAbove: The number of diagonals above the reference diagonal\r\n const diagonalsBelow = diagonalBaseIndex;\r\n const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;\r\n const diffEven = (numDifferences % 2 === 0);\r\n if (diagonal < 0) {\r\n const lowerBoundEven = (diagonalsBelow % 2 === 0);\r\n return (diffEven === lowerBoundEven) ? 0 : 1;\r\n }\r\n else {\r\n const upperBoundEven = (diagonalsAbove % 2 === 0);\r\n return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiffChange\": () => (/* binding */ DiffChange)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Represents information about a specific difference between two sequences.\r\n */\r\nclass DiffChange {\r\n /**\r\n * Constructs a new DiffChange with the given sequence information\r\n * and content.\r\n */\r\n constructor(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n //Debug.Assert(originalLength > 0 || modifiedLength > 0, \"originalLength and modifiedLength cannot both be <= 0\");\r\n this.originalStart = originalStart;\r\n this.originalLength = originalLength;\r\n this.modifiedStart = modifiedStart;\r\n this.modifiedLength = modifiedLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the original sequence.\r\n */\r\n getOriginalEnd() {\r\n return this.originalStart + this.originalLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the modified sequence.\r\n */\r\n getModifiedEnd() {\r\n return this.modifiedStart + this.modifiedLength;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"toErrorMessage\": () => (/* binding */ toErrorMessage)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nfunction exceptionToErrorMessage(exception, verbose) {\r\n if (verbose && (exception.stack || exception.stacktrace)) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('stackTrace.format', \"{0}: {1}\", detectSystemErrorMessage(exception), stackToString(exception.stack) || stackToString(exception.stacktrace));\r\n }\r\n return detectSystemErrorMessage(exception);\r\n}\r\nfunction stackToString(stack) {\r\n if (Array.isArray(stack)) {\r\n return stack.join('\\n');\r\n }\r\n return stack;\r\n}\r\nfunction detectSystemErrorMessage(exception) {\r\n // See https://nodejs.org/api/errors.html#errors_class_system_error\r\n if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('nodeExceptionMessage', \"A system error occurred ({0})\", exception.message);\r\n }\r\n return exception.message || _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n}\r\n/**\r\n * Tries to generate a human readable error message out of the error. If the verbose parameter\r\n * is set to true, the error message will include stacktrace details if provided.\r\n *\r\n * @returns A string containing the error message.\r\n */\r\nfunction toErrorMessage(error = null, verbose = false) {\r\n if (!error) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n }\r\n if (Array.isArray(error)) {\r\n const errors = _arrays_js__WEBPACK_IMPORTED_MODULE_2__.coalesce(error);\r\n const msg = toErrorMessage(errors[0], verbose);\r\n if (errors.length > 1) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('error.moreErrors', \"{0} ({1} errors in total)\", msg, errors.length);\r\n }\r\n return msg;\r\n }\r\n if (_types_js__WEBPACK_IMPORTED_MODULE_1__.isString(error)) {\r\n return error;\r\n }\r\n if (error.detail) {\r\n const detail = error.detail;\r\n if (detail.error) {\r\n return exceptionToErrorMessage(detail.error, verbose);\r\n }\r\n if (detail.exception) {\r\n return exceptionToErrorMessage(detail.exception, verbose);\r\n }\r\n }\r\n if (error.stack) {\r\n return exceptionToErrorMessage(error, verbose);\r\n }\r\n if (error.message) {\r\n return error.message;\r\n }\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/errors.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/errors.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ErrorHandler\": () => (/* binding */ ErrorHandler),\n/* harmony export */ \"errorHandler\": () => (/* binding */ errorHandler),\n/* harmony export */ \"onUnexpectedError\": () => (/* binding */ onUnexpectedError),\n/* harmony export */ \"onUnexpectedExternalError\": () => (/* binding */ onUnexpectedExternalError),\n/* harmony export */ \"transformErrorForSerialization\": () => (/* binding */ transformErrorForSerialization),\n/* harmony export */ \"isPromiseCanceledError\": () => (/* binding */ isPromiseCanceledError),\n/* harmony export */ \"canceled\": () => (/* binding */ canceled),\n/* harmony export */ \"illegalArgument\": () => (/* binding */ illegalArgument),\n/* harmony export */ \"illegalState\": () => (/* binding */ illegalState)\n/* harmony export */ });\n// Avoid circular dependency on EventEmitter by implementing a subset of the interface.\r\nclass ErrorHandler {\r\n constructor() {\r\n this.listeners = [];\r\n this.unexpectedErrorHandler = function (e) {\r\n setTimeout(() => {\r\n if (e.stack) {\r\n throw new Error(e.message + '\\n\\n' + e.stack);\r\n }\r\n throw e;\r\n }, 0);\r\n };\r\n }\r\n emit(e) {\r\n this.listeners.forEach((listener) => {\r\n listener(e);\r\n });\r\n }\r\n onUnexpectedError(e) {\r\n this.unexpectedErrorHandler(e);\r\n this.emit(e);\r\n }\r\n // For external errors, we don't want the listeners to be called\r\n onUnexpectedExternalError(e) {\r\n this.unexpectedErrorHandler(e);\r\n }\r\n}\r\nconst errorHandler = new ErrorHandler();\r\nfunction onUnexpectedError(e) {\r\n // ignore errors from cancelled promises\r\n if (!isPromiseCanceledError(e)) {\r\n errorHandler.onUnexpectedError(e);\r\n }\r\n return undefined;\r\n}\r\nfunction onUnexpectedExternalError(e) {\r\n // ignore errors from cancelled promises\r\n if (!isPromiseCanceledError(e)) {\r\n errorHandler.onUnexpectedExternalError(e);\r\n }\r\n return undefined;\r\n}\r\nfunction transformErrorForSerialization(error) {\r\n if (error instanceof Error) {\r\n let { name, message } = error;\r\n const stack = error.stacktrace || error.stack;\r\n return {\r\n $isError: true,\r\n name,\r\n message,\r\n stack\r\n };\r\n }\r\n // return as is\r\n return error;\r\n}\r\nconst canceledName = 'Canceled';\r\n/**\r\n * Checks if the given error is a promise in canceled state\r\n */\r\nfunction isPromiseCanceledError(error) {\r\n return error instanceof Error && error.name === canceledName && error.message === canceledName;\r\n}\r\n/**\r\n * Returns an error that signals cancellation.\r\n */\r\nfunction canceled() {\r\n const error = new Error(canceledName);\r\n error.name = error.message;\r\n return error;\r\n}\r\nfunction illegalArgument(name) {\r\n if (name) {\r\n return new Error(`Illegal argument: ${name}`);\r\n }\r\n else {\r\n return new Error('Illegal argument');\r\n }\r\n}\r\nfunction illegalState(name) {\r\n if (name) {\r\n return new Error(`Illegal state: ${name}`);\r\n }\r\n else {\r\n return new Error('Illegal state');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/errors.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/event.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/event.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Event\": () => (/* binding */ Event),\n/* harmony export */ \"Emitter\": () => (/* binding */ Emitter),\n/* harmony export */ \"PauseableEmitter\": () => (/* binding */ PauseableEmitter),\n/* harmony export */ \"EventBufferer\": () => (/* binding */ EventBufferer),\n/* harmony export */ \"Relay\": () => (/* binding */ Relay)\n/* harmony export */ });\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _linkedList_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _stopwatch_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nvar Event;\r\n(function (Event) {\r\n Event.None = () => _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n /**\r\n * Given an event, returns another event which only fires once.\r\n */\r\n function once(event) {\r\n return (listener, thisArgs = null, disposables) => {\r\n // we need this, in case the event fires during the listener call\r\n let didFire = false;\r\n let result;\r\n result = event(e => {\r\n if (didFire) {\r\n return;\r\n }\r\n else if (result) {\r\n result.dispose();\r\n }\r\n else {\r\n didFire = true;\r\n }\r\n return listener.call(thisArgs, e);\r\n }, null, disposables);\r\n if (didFire) {\r\n result.dispose();\r\n }\r\n return result;\r\n };\r\n }\r\n Event.once = once;\r\n /**\r\n * Given an event and a `map` function, returns another event which maps each element\r\n * through the mapping function.\r\n */\r\n function map(event, map) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(i => listener.call(thisArgs, map(i)), null, disposables));\r\n }\r\n Event.map = map;\r\n /**\r\n * Given an event and an `each` function, returns another identical event and calls\r\n * the `each` function per each element.\r\n */\r\n function forEach(event, each) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables));\r\n }\r\n Event.forEach = forEach;\r\n function filter(event, filter) {\r\n return snapshot((listener, thisArgs = null, disposables) => event(e => filter(e) && listener.call(thisArgs, e), null, disposables));\r\n }\r\n Event.filter = filter;\r\n /**\r\n * Given an event, returns the same event but typed as `Event<void>`.\r\n */\r\n function signal(event) {\r\n return event;\r\n }\r\n Event.signal = signal;\r\n function any(...events) {\r\n return (listener, thisArgs = null, disposables) => (0,_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.combinedDisposable)(...events.map(event => event(e => listener.call(thisArgs, e), null, disposables)));\r\n }\r\n Event.any = any;\r\n /**\r\n * Given an event and a `merge` function, returns another event which maps each element\r\n * and the cumulative result through the `merge` function. Similar to `map`, but with memory.\r\n */\r\n function reduce(event, merge, initial) {\r\n let output = initial;\r\n return map(event, e => {\r\n output = merge(output, e);\r\n return output;\r\n });\r\n }\r\n Event.reduce = reduce;\r\n /**\r\n * Given a chain of event processing functions (filter, map, etc), each\r\n * function will be invoked per event & per listener. Snapshotting an event\r\n * chain allows each function to be invoked just once per event.\r\n */\r\n function snapshot(event) {\r\n let listener;\r\n const emitter = new Emitter({\r\n onFirstListenerAdd() {\r\n listener = event(emitter.fire, emitter);\r\n },\r\n onLastListenerRemove() {\r\n listener.dispose();\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n Event.snapshot = snapshot;\r\n function debounce(event, merge, delay = 100, leading = false, leakWarningThreshold) {\r\n let subscription;\r\n let output = undefined;\r\n let handle = undefined;\r\n let numDebouncedCalls = 0;\r\n const emitter = new Emitter({\r\n leakWarningThreshold,\r\n onFirstListenerAdd() {\r\n subscription = event(cur => {\r\n numDebouncedCalls++;\r\n output = merge(output, cur);\r\n if (leading && !handle) {\r\n emitter.fire(output);\r\n output = undefined;\r\n }\r\n clearTimeout(handle);\r\n handle = setTimeout(() => {\r\n const _output = output;\r\n output = undefined;\r\n handle = undefined;\r\n if (!leading || numDebouncedCalls > 1) {\r\n emitter.fire(_output);\r\n }\r\n numDebouncedCalls = 0;\r\n }, delay);\r\n });\r\n },\r\n onLastListenerRemove() {\r\n subscription.dispose();\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n Event.debounce = debounce;\r\n /**\r\n * Given an event, it returns another event which fires only once and as soon as\r\n * the input event emits. The event data is the number of millis it took for the\r\n * event to fire.\r\n */\r\n function stopwatch(event) {\r\n const start = new Date().getTime();\r\n return map(once(event), _ => new Date().getTime() - start);\r\n }\r\n Event.stopwatch = stopwatch;\r\n /**\r\n * Given an event, it returns another event which fires only when the event\r\n * element changes.\r\n */\r\n function latch(event) {\r\n let firstCall = true;\r\n let cache;\r\n return filter(event, value => {\r\n const shouldEmit = firstCall || value !== cache;\r\n firstCall = false;\r\n cache = value;\r\n return shouldEmit;\r\n });\r\n }\r\n Event.latch = latch;\r\n /**\r\n * Buffers the provided event until a first listener comes\r\n * along, at which point fire all the events at once and\r\n * pipe the event from then on.\r\n *\r\n * ```typescript\r\n * const emitter = new Emitter<number>();\r\n * const event = emitter.event;\r\n * const bufferedEvent = buffer(event);\r\n *\r\n * emitter.fire(1);\r\n * emitter.fire(2);\r\n * emitter.fire(3);\r\n * // nothing...\r\n *\r\n * const listener = bufferedEvent(num => console.log(num));\r\n * // 1, 2, 3\r\n *\r\n * emitter.fire(4);\r\n * // 4\r\n * ```\r\n */\r\n function buffer(event, nextTick = false, _buffer = []) {\r\n let buffer = _buffer.slice();\r\n let listener = event(e => {\r\n if (buffer) {\r\n buffer.push(e);\r\n }\r\n else {\r\n emitter.fire(e);\r\n }\r\n });\r\n const flush = () => {\r\n if (buffer) {\r\n buffer.forEach(e => emitter.fire(e));\r\n }\r\n buffer = null;\r\n };\r\n const emitter = new Emitter({\r\n onFirstListenerAdd() {\r\n if (!listener) {\r\n listener = event(e => emitter.fire(e));\r\n }\r\n },\r\n onFirstListenerDidAdd() {\r\n if (buffer) {\r\n if (nextTick) {\r\n setTimeout(flush);\r\n }\r\n else {\r\n flush();\r\n }\r\n }\r\n },\r\n onLastListenerRemove() {\r\n if (listener) {\r\n listener.dispose();\r\n }\r\n listener = null;\r\n }\r\n });\r\n return emitter.event;\r\n }\r\n Event.buffer = buffer;\r\n class ChainableEvent {\r\n constructor(event) {\r\n this.event = event;\r\n }\r\n map(fn) {\r\n return new ChainableEvent(map(this.event, fn));\r\n }\r\n forEach(fn) {\r\n return new ChainableEvent(forEach(this.event, fn));\r\n }\r\n filter(fn) {\r\n return new ChainableEvent(filter(this.event, fn));\r\n }\r\n reduce(merge, initial) {\r\n return new ChainableEvent(reduce(this.event, merge, initial));\r\n }\r\n latch() {\r\n return new ChainableEvent(latch(this.event));\r\n }\r\n debounce(merge, delay = 100, leading = false, leakWarningThreshold) {\r\n return new ChainableEvent(debounce(this.event, merge, delay, leading, leakWarningThreshold));\r\n }\r\n on(listener, thisArgs, disposables) {\r\n return this.event(listener, thisArgs, disposables);\r\n }\r\n once(listener, thisArgs, disposables) {\r\n return once(this.event)(listener, thisArgs, disposables);\r\n }\r\n }\r\n function chain(event) {\r\n return new ChainableEvent(event);\r\n }\r\n Event.chain = chain;\r\n function fromNodeEventEmitter(emitter, eventName, map = id => id) {\r\n const fn = (...args) => result.fire(map(...args));\r\n const onFirstListenerAdd = () => emitter.on(eventName, fn);\r\n const onLastListenerRemove = () => emitter.removeListener(eventName, fn);\r\n const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove });\r\n return result.event;\r\n }\r\n Event.fromNodeEventEmitter = fromNodeEventEmitter;\r\n function fromDOMEventEmitter(emitter, eventName, map = id => id) {\r\n const fn = (...args) => result.fire(map(...args));\r\n const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn);\r\n const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn);\r\n const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove });\r\n return result.event;\r\n }\r\n Event.fromDOMEventEmitter = fromDOMEventEmitter;\r\n function fromPromise(promise) {\r\n const emitter = new Emitter();\r\n let shouldEmit = false;\r\n promise\r\n .then(undefined, () => null)\r\n .then(() => {\r\n if (!shouldEmit) {\r\n setTimeout(() => emitter.fire(undefined), 0);\r\n }\r\n else {\r\n emitter.fire(undefined);\r\n }\r\n });\r\n shouldEmit = true;\r\n return emitter.event;\r\n }\r\n Event.fromPromise = fromPromise;\r\n function toPromise(event) {\r\n return new Promise(resolve => once(event)(resolve));\r\n }\r\n Event.toPromise = toPromise;\r\n})(Event || (Event = {}));\r\nclass EventProfiling {\r\n constructor(name) {\r\n this._listenerCount = 0;\r\n this._invocationCount = 0;\r\n this._elapsedOverall = 0;\r\n this._name = `${name}_${EventProfiling._idPool++}`;\r\n }\r\n start(listenerCount) {\r\n this._stopWatch = new _stopwatch_js__WEBPACK_IMPORTED_MODULE_3__.StopWatch(true);\r\n this._listenerCount = listenerCount;\r\n }\r\n stop() {\r\n if (this._stopWatch) {\r\n const elapsed = this._stopWatch.elapsed();\r\n this._elapsedOverall += elapsed;\r\n this._invocationCount += 1;\r\n console.info(`did FIRE ${this._name}: elapsed_ms: ${elapsed.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`);\r\n this._stopWatch = undefined;\r\n }\r\n }\r\n}\r\nEventProfiling._idPool = 0;\r\nlet _globalLeakWarningThreshold = -1;\r\nclass LeakageMonitor {\r\n constructor(customThreshold, name = Math.random().toString(18).slice(2, 5)) {\r\n this.customThreshold = customThreshold;\r\n this.name = name;\r\n this._warnCountdown = 0;\r\n }\r\n dispose() {\r\n if (this._stacks) {\r\n this._stacks.clear();\r\n }\r\n }\r\n check(listenerCount) {\r\n let threshold = _globalLeakWarningThreshold;\r\n if (typeof this.customThreshold === 'number') {\r\n threshold = this.customThreshold;\r\n }\r\n if (threshold <= 0 || listenerCount < threshold) {\r\n return undefined;\r\n }\r\n if (!this._stacks) {\r\n this._stacks = new Map();\r\n }\r\n const stack = new Error().stack.split('\\n').slice(3).join('\\n');\r\n const count = (this._stacks.get(stack) || 0);\r\n this._stacks.set(stack, count + 1);\r\n this._warnCountdown -= 1;\r\n if (this._warnCountdown <= 0) {\r\n // only warn on first exceed and then every time the limit\r\n // is exceeded by 50% again\r\n this._warnCountdown = threshold * 0.5;\r\n // find most frequent listener and print warning\r\n let topStack;\r\n let topCount = 0;\r\n for (const [stack, count] of this._stacks) {\r\n if (!topStack || topCount < count) {\r\n topStack = stack;\r\n topCount = count;\r\n }\r\n }\r\n console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`);\r\n console.warn(topStack);\r\n }\r\n return () => {\r\n const count = (this._stacks.get(stack) || 0);\r\n this._stacks.set(stack, count - 1);\r\n };\r\n }\r\n}\r\n/**\r\n * The Emitter can be used to expose an Event to the public\r\n * to fire it from the insides.\r\n * Sample:\r\n class Document {\r\n\r\n private readonly _onDidChange = new Emitter<(value:string)=>any>();\r\n\r\n public onDidChange = this._onDidChange.event;\r\n\r\n // getter-style\r\n // get onDidChange(): Event<(value:string)=>any> {\r\n // \treturn this._onDidChange.event;\r\n // }\r\n\r\n private _doIt() {\r\n //...\r\n this._onDidChange.fire(value);\r\n }\r\n }\r\n */\r\nclass Emitter {\r\n constructor(options) {\r\n var _a;\r\n this._disposed = false;\r\n this._options = options;\r\n this._leakageMon = _globalLeakWarningThreshold > 0 ? new LeakageMonitor(this._options && this._options.leakWarningThreshold) : undefined;\r\n this._perfMon = ((_a = this._options) === null || _a === void 0 ? void 0 : _a._profName) ? new EventProfiling(this._options._profName) : undefined;\r\n }\r\n /**\r\n * For the public to allow to subscribe\r\n * to events from this Emitter\r\n */\r\n get event() {\r\n if (!this._event) {\r\n this._event = (listener, thisArgs, disposables) => {\r\n var _a;\r\n if (!this._listeners) {\r\n this._listeners = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n }\r\n const firstListener = this._listeners.isEmpty();\r\n if (firstListener && this._options && this._options.onFirstListenerAdd) {\r\n this._options.onFirstListenerAdd(this);\r\n }\r\n const remove = this._listeners.push(!thisArgs ? listener : [listener, thisArgs]);\r\n if (firstListener && this._options && this._options.onFirstListenerDidAdd) {\r\n this._options.onFirstListenerDidAdd(this);\r\n }\r\n if (this._options && this._options.onListenerDidAdd) {\r\n this._options.onListenerDidAdd(this, listener, thisArgs);\r\n }\r\n // check and record this emitter for potential leakage\r\n const removeMonitor = (_a = this._leakageMon) === null || _a === void 0 ? void 0 : _a.check(this._listeners.size);\r\n let result;\r\n result = {\r\n dispose: () => {\r\n if (removeMonitor) {\r\n removeMonitor();\r\n }\r\n result.dispose = Emitter._noop;\r\n if (!this._disposed) {\r\n remove();\r\n if (this._options && this._options.onLastListenerRemove) {\r\n const hasListeners = (this._listeners && !this._listeners.isEmpty());\r\n if (!hasListeners) {\r\n this._options.onLastListenerRemove(this);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n if (disposables instanceof _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore) {\r\n disposables.add(result);\r\n }\r\n else if (Array.isArray(disposables)) {\r\n disposables.push(result);\r\n }\r\n return result;\r\n };\r\n }\r\n return this._event;\r\n }\r\n /**\r\n * To be kept private to fire an event to\r\n * subscribers\r\n */\r\n fire(event) {\r\n var _a, _b;\r\n if (this._listeners) {\r\n // put all [listener,event]-pairs into delivery queue\r\n // then emit all event. an inner/nested event might be\r\n // the driver of this\r\n if (!this._deliveryQueue) {\r\n this._deliveryQueue = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n }\r\n for (let listener of this._listeners) {\r\n this._deliveryQueue.push([listener, event]);\r\n }\r\n // start/stop performance insight collection\r\n (_a = this._perfMon) === null || _a === void 0 ? void 0 : _a.start(this._deliveryQueue.size);\r\n while (this._deliveryQueue.size > 0) {\r\n const [listener, event] = this._deliveryQueue.shift();\r\n try {\r\n if (typeof listener === 'function') {\r\n listener.call(undefined, event);\r\n }\r\n else {\r\n listener[0].call(listener[1], event);\r\n }\r\n }\r\n catch (e) {\r\n (0,_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n }\r\n }\r\n (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop();\r\n }\r\n }\r\n dispose() {\r\n var _a, _b, _c;\r\n (_a = this._listeners) === null || _a === void 0 ? void 0 : _a.clear();\r\n (_b = this._deliveryQueue) === null || _b === void 0 ? void 0 : _b.clear();\r\n (_c = this._leakageMon) === null || _c === void 0 ? void 0 : _c.dispose();\r\n this._disposed = true;\r\n }\r\n}\r\nEmitter._noop = function () { };\r\nclass PauseableEmitter extends Emitter {\r\n constructor(options) {\r\n super(options);\r\n this._isPaused = 0;\r\n this._eventQueue = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;\r\n }\r\n pause() {\r\n this._isPaused++;\r\n }\r\n resume() {\r\n if (this._isPaused !== 0 && --this._isPaused === 0) {\r\n if (this._mergeFn) {\r\n // use the merge function to create a single composite\r\n // event. make a copy in case firing pauses this emitter\r\n const events = Array.from(this._eventQueue);\r\n this._eventQueue.clear();\r\n super.fire(this._mergeFn(events));\r\n }\r\n else {\r\n // no merging, fire each event individually and test\r\n // that this emitter isn't paused halfway through\r\n while (!this._isPaused && this._eventQueue.size !== 0) {\r\n super.fire(this._eventQueue.shift());\r\n }\r\n }\r\n }\r\n }\r\n fire(event) {\r\n if (this._listeners) {\r\n if (this._isPaused !== 0) {\r\n this._eventQueue.push(event);\r\n }\r\n else {\r\n super.fire(event);\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * The EventBufferer is useful in situations in which you want\r\n * to delay firing your events during some code.\r\n * You can wrap that code and be sure that the event will not\r\n * be fired during that wrap.\r\n *\r\n * ```\r\n * const emitter: Emitter;\r\n * const delayer = new EventDelayer();\r\n * const delayedEvent = delayer.wrapEvent(emitter.event);\r\n *\r\n * delayedEvent(console.log);\r\n *\r\n * delayer.bufferEvents(() => {\r\n * emitter.fire(); // event will not be fired yet\r\n * });\r\n *\r\n * // event will only be fired at this point\r\n * ```\r\n */\r\nclass EventBufferer {\r\n constructor() {\r\n this.buffers = [];\r\n }\r\n wrapEvent(event) {\r\n return (listener, thisArgs, disposables) => {\r\n return event(i => {\r\n const buffer = this.buffers[this.buffers.length - 1];\r\n if (buffer) {\r\n buffer.push(() => listener.call(thisArgs, i));\r\n }\r\n else {\r\n listener.call(thisArgs, i);\r\n }\r\n }, undefined, disposables);\r\n };\r\n }\r\n bufferEvents(fn) {\r\n const buffer = [];\r\n this.buffers.push(buffer);\r\n const r = fn();\r\n this.buffers.pop();\r\n buffer.forEach(flush => flush());\r\n return r;\r\n }\r\n}\r\n/**\r\n * A Relay is an event forwarder which functions as a replugabble event pipe.\r\n * Once created, you can connect an input event to it and it will simply forward\r\n * events from that input event through its own `event` property. The `input`\r\n * can be changed at any point in time.\r\n */\r\nclass Relay {\r\n constructor() {\r\n this.listening = false;\r\n this.inputEvent = Event.None;\r\n this.inputEventListener = _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.emitter = new Emitter({\r\n onFirstListenerDidAdd: () => {\r\n this.listening = true;\r\n this.inputEventListener = this.inputEvent(this.emitter.fire, this.emitter);\r\n },\r\n onLastListenerRemove: () => {\r\n this.listening = false;\r\n this.inputEventListener.dispose();\r\n }\r\n });\r\n this.event = this.emitter.event;\r\n }\r\n set input(event) {\r\n this.inputEvent = event;\r\n if (this.listening) {\r\n this.inputEventListener.dispose();\r\n this.inputEventListener = event(this.emitter.fire, this.emitter);\r\n }\r\n }\r\n dispose() {\r\n this.inputEventListener.dispose();\r\n this.emitter.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/event.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/extpath.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/extpath.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"toSlashes\": () => (/* binding */ toSlashes),\n/* harmony export */ \"isEqualOrParent\": () => (/* binding */ isEqualOrParent),\n/* harmony export */ \"isWindowsDriveLetter\": () => (/* binding */ isWindowsDriveLetter),\n/* harmony export */ \"isRootOrDriveLetter\": () => (/* binding */ isRootOrDriveLetter),\n/* harmony export */ \"hasDriveLetter\": () => (/* binding */ hasDriveLetter)\n/* harmony export */ });\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n/**\r\n * Takes a Windows OS path and changes backward slashes to forward slashes.\r\n * This should only be done for OS paths from Windows (or user provided paths potentially from Windows).\r\n * Using it on a Linux or MaxOS path might change it.\r\n */\r\nfunction toSlashes(osPath) {\r\n return osPath.replace(/[\\\\/]/g, _path_js__WEBPACK_IMPORTED_MODULE_2__.posix.sep);\r\n}\r\nfunction isEqualOrParent(base, parentCandidate, ignoreCase, separator = _path_js__WEBPACK_IMPORTED_MODULE_2__.sep) {\r\n if (base === parentCandidate) {\r\n return true;\r\n }\r\n if (!base || !parentCandidate) {\r\n return false;\r\n }\r\n if (parentCandidate.length > base.length) {\r\n return false;\r\n }\r\n if (ignoreCase) {\r\n const beginsWith = (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase)(base, parentCandidate);\r\n if (!beginsWith) {\r\n return false;\r\n }\r\n if (parentCandidate.length === base.length) {\r\n return true; // same path, different casing\r\n }\r\n let sepOffset = parentCandidate.length;\r\n if (parentCandidate.charAt(parentCandidate.length - 1) === separator) {\r\n sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character\r\n }\r\n return base.charAt(sepOffset) === separator;\r\n }\r\n if (parentCandidate.charAt(parentCandidate.length - 1) !== separator) {\r\n parentCandidate += separator;\r\n }\r\n return base.indexOf(parentCandidate) === 0;\r\n}\r\nfunction isWindowsDriveLetter(char0) {\r\n return char0 >= 65 /* A */ && char0 <= 90 /* Z */ || char0 >= 97 /* a */ && char0 <= 122 /* z */;\r\n}\r\nfunction isRootOrDriveLetter(path) {\r\n const pathNormalized = (0,_path_js__WEBPACK_IMPORTED_MODULE_2__.normalize)(path);\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows) {\r\n if (path.length > 3) {\r\n return false;\r\n }\r\n return hasDriveLetter(pathNormalized) &&\r\n (path.length === 2 || pathNormalized.charCodeAt(2) === 92 /* Backslash */);\r\n }\r\n return pathNormalized === _path_js__WEBPACK_IMPORTED_MODULE_2__.posix.sep;\r\n}\r\nfunction hasDriveLetter(path) {\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows) {\r\n return isWindowsDriveLetter(path.charCodeAt(0)) && path.charCodeAt(1) === 58 /* Colon */;\r\n }\r\n return false;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/extpath.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/filters.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/filters.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"or\": () => (/* binding */ or),\n/* harmony export */ \"matchesPrefix\": () => (/* binding */ matchesPrefix),\n/* harmony export */ \"matchesContiguousSubString\": () => (/* binding */ matchesContiguousSubString),\n/* harmony export */ \"matchesSubString\": () => (/* binding */ matchesSubString),\n/* harmony export */ \"isUpper\": () => (/* binding */ isUpper),\n/* harmony export */ \"matchesCamelCase\": () => (/* binding */ matchesCamelCase),\n/* harmony export */ \"matchesWords\": () => (/* binding */ matchesWords),\n/* harmony export */ \"matchesFuzzy\": () => (/* binding */ matchesFuzzy),\n/* harmony export */ \"anyScore\": () => (/* binding */ anyScore),\n/* harmony export */ \"createMatches\": () => (/* binding */ createMatches),\n/* harmony export */ \"isPatternInWord\": () => (/* binding */ isPatternInWord),\n/* harmony export */ \"FuzzyScore\": () => (/* binding */ FuzzyScore),\n/* harmony export */ \"fuzzyScore\": () => (/* binding */ fuzzyScore),\n/* harmony export */ \"fuzzyScoreGracefulAggressive\": () => (/* binding */ fuzzyScoreGracefulAggressive)\n/* harmony export */ });\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n// Combined filters\r\n/**\r\n * @returns A filter which combines the provided set\r\n * of filters with an or. The *first* filters that\r\n * matches defined the return value of the returned\r\n * filter.\r\n */\r\nfunction or(...filter) {\r\n return function (word, wordToMatchAgainst) {\r\n for (let i = 0, len = filter.length; i < len; i++) {\r\n const match = filter[i](word, wordToMatchAgainst);\r\n if (match) {\r\n return match;\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\nconst matchesPrefix = _matchesPrefix.bind(undefined, true);\r\nfunction _matchesPrefix(ignoreCase, word, wordToMatchAgainst) {\r\n if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) {\r\n return null;\r\n }\r\n let matches;\r\n if (ignoreCase) {\r\n matches = _strings_js__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase(wordToMatchAgainst, word);\r\n }\r\n else {\r\n matches = wordToMatchAgainst.indexOf(word) === 0;\r\n }\r\n if (!matches) {\r\n return null;\r\n }\r\n return word.length > 0 ? [{ start: 0, end: word.length }] : [];\r\n}\r\n// Contiguous Substring\r\nfunction matchesContiguousSubString(word, wordToMatchAgainst) {\r\n const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());\r\n if (index === -1) {\r\n return null;\r\n }\r\n return [{ start: index, end: index + word.length }];\r\n}\r\n// Substring\r\nfunction matchesSubString(word, wordToMatchAgainst) {\r\n return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0);\r\n}\r\nfunction _matchesSubString(word, wordToMatchAgainst, i, j) {\r\n if (i === word.length) {\r\n return [];\r\n }\r\n else if (j === wordToMatchAgainst.length) {\r\n return null;\r\n }\r\n else {\r\n if (word[i] === wordToMatchAgainst[j]) {\r\n let result = null;\r\n if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) {\r\n return join({ start: j, end: j + 1 }, result);\r\n }\r\n return null;\r\n }\r\n return _matchesSubString(word, wordToMatchAgainst, i, j + 1);\r\n }\r\n}\r\n// CamelCase\r\nfunction isLower(code) {\r\n return 97 /* a */ <= code && code <= 122 /* z */;\r\n}\r\nfunction isUpper(code) {\r\n return 65 /* A */ <= code && code <= 90 /* Z */;\r\n}\r\nfunction isNumber(code) {\r\n return 48 /* Digit0 */ <= code && code <= 57 /* Digit9 */;\r\n}\r\nfunction isWhitespace(code) {\r\n return (code === 32 /* Space */\r\n || code === 9 /* Tab */\r\n || code === 10 /* LineFeed */\r\n || code === 13 /* CarriageReturn */);\r\n}\r\nconst wordSeparators = new Set();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split('')\r\n .forEach(s => wordSeparators.add(s.charCodeAt(0)));\r\nfunction isWordSeparator(code) {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\nfunction charactersMatch(codeA, codeB) {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\nfunction isAlphanumeric(code) {\r\n return isLower(code) || isUpper(code) || isNumber(code);\r\n}\r\nfunction join(head, tail) {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n }\r\n else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n }\r\n else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\nfunction nextAnchor(camelCaseWord, start) {\r\n for (let i = start; i < camelCaseWord.length; i++) {\r\n const c = camelCaseWord.charCodeAt(i);\r\n if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return camelCaseWord.length;\r\n}\r\nfunction _matchesCamelCase(word, camelCaseWord, i, j) {\r\n if (i === word.length) {\r\n return [];\r\n }\r\n else if (j === camelCaseWord.length) {\r\n return null;\r\n }\r\n else if (word[i] !== camelCaseWord[j].toLowerCase()) {\r\n return null;\r\n }\r\n else {\r\n let result = null;\r\n let nextUpperIndex = j + 1;\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1);\r\n while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) {\r\n result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex);\r\n nextUpperIndex++;\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camelCaseWords.\r\nfunction analyzeCamelCaseWord(word) {\r\n let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0;\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n if (isUpper(code)) {\r\n upper++;\r\n }\r\n if (isLower(code)) {\r\n lower++;\r\n }\r\n if (isAlphanumeric(code)) {\r\n alpha++;\r\n }\r\n if (isNumber(code)) {\r\n numeric++;\r\n }\r\n }\r\n const upperPercent = upper / word.length;\r\n const lowerPercent = lower / word.length;\r\n const alphaPercent = alpha / word.length;\r\n const numericPercent = numeric / word.length;\r\n return { upperPercent, lowerPercent, alphaPercent, numericPercent };\r\n}\r\nfunction isUpperCaseWord(analysis) {\r\n const { upperPercent, lowerPercent } = analysis;\r\n return lowerPercent === 0 && upperPercent > 0.6;\r\n}\r\nfunction isCamelCaseWord(analysis) {\r\n const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis;\r\n return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2;\r\n}\r\n// Heuristic to avoid computing camel case matcher for words that don't\r\n// look like camel case patterns.\r\nfunction isCamelCasePattern(word) {\r\n let upper = 0, lower = 0, code = 0, whitespace = 0;\r\n for (let i = 0; i < word.length; i++) {\r\n code = word.charCodeAt(i);\r\n if (isUpper(code)) {\r\n upper++;\r\n }\r\n if (isLower(code)) {\r\n lower++;\r\n }\r\n if (isWhitespace(code)) {\r\n whitespace++;\r\n }\r\n }\r\n if ((upper === 0 || lower === 0) && whitespace === 0) {\r\n return word.length <= 30;\r\n }\r\n else {\r\n return upper <= 5;\r\n }\r\n}\r\nfunction matchesCamelCase(word, camelCaseWord) {\r\n if (!camelCaseWord) {\r\n return null;\r\n }\r\n camelCaseWord = camelCaseWord.trim();\r\n if (camelCaseWord.length === 0) {\r\n return null;\r\n }\r\n if (!isCamelCasePattern(word)) {\r\n return null;\r\n }\r\n if (camelCaseWord.length > 60) {\r\n return null;\r\n }\r\n const analysis = analyzeCamelCaseWord(camelCaseWord);\r\n if (!isCamelCaseWord(analysis)) {\r\n if (!isUpperCaseWord(analysis)) {\r\n return null;\r\n }\r\n camelCaseWord = camelCaseWord.toLowerCase();\r\n }\r\n let result = null;\r\n let i = 0;\r\n word = word.toLowerCase();\r\n while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) {\r\n i = nextAnchor(camelCaseWord, i + 1);\r\n }\r\n return result;\r\n}\r\n// Matches beginning of words supporting non-ASCII languages\r\n// If `contiguous` is true then matches word with beginnings of the words in the target. E.g. \"pul\" will match \"Git: Pull\"\r\n// Otherwise also matches sub string of the word with beginnings of the words in the target. E.g. \"gp\" or \"g p\" will match \"Git: Pull\"\r\n// Useful in cases where the target is words (e.g. command labels)\r\nfunction matchesWords(word, target, contiguous = false) {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n let result = null;\r\n let i = 0;\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n return result;\r\n}\r\nfunction _matchesWords(word, target, i, j, contiguous) {\r\n if (i === word.length) {\r\n return [];\r\n }\r\n else if (j === target.length) {\r\n return null;\r\n }\r\n else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n }\r\n else {\r\n let result = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\nfunction nextWord(word, start) {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n// Fuzzy\r\nconst fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);\r\nconst fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);\r\nconst fuzzyRegExpCache = new _map_js__WEBPACK_IMPORTED_MODULE_0__.LRUCache(10000); // bounded to 10000 elements\r\nfunction matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) {\r\n if (typeof word !== 'string' || typeof wordToMatchAgainst !== 'string') {\r\n return null; // return early for invalid input\r\n }\r\n // Form RegExp for wildcard matches\r\n let regexp = fuzzyRegExpCache.get(word);\r\n if (!regexp) {\r\n regexp = new RegExp(_strings_js__WEBPACK_IMPORTED_MODULE_1__.convertSimple2RegExpPattern(word), 'i');\r\n fuzzyRegExpCache.set(word, regexp);\r\n }\r\n // RegExp Filter\r\n const match = regexp.exec(wordToMatchAgainst);\r\n if (match) {\r\n return [{ start: match.index, end: match.index + match[0].length }];\r\n }\r\n // Default Filter\r\n return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst);\r\n}\r\nfunction anyScore(pattern, lowPattern, _patternPos, word, lowWord, _wordPos) {\r\n const result = fuzzyScore(pattern, lowPattern, 0, word, lowWord, 0, true);\r\n if (result) {\r\n return result;\r\n }\r\n let matches = [];\r\n let score = 0;\r\n let idx = _wordPos;\r\n for (let patternPos = 0; patternPos < lowPattern.length && patternPos < _maxLen; ++patternPos) {\r\n const wordPos = lowWord.indexOf(lowPattern.charAt(patternPos), idx);\r\n if (wordPos >= 0) {\r\n score += 1;\r\n matches.unshift(wordPos);\r\n idx = wordPos + 1;\r\n }\r\n else if (matches.length > 0) {\r\n // once we have started matching things\r\n // we need to match the remaining pattern\r\n // characters\r\n break;\r\n }\r\n }\r\n return [score, _wordPos, ...matches];\r\n}\r\n//#region --- fuzzyScore ---\r\nfunction createMatches(score) {\r\n if (typeof score === 'undefined') {\r\n return [];\r\n }\r\n const res = [];\r\n const wordPos = score[1];\r\n for (let i = score.length - 1; i > 1; i--) {\r\n const pos = score[i] + wordPos;\r\n const last = res[res.length - 1];\r\n if (last && last.end === pos) {\r\n last.end = pos + 1;\r\n }\r\n else {\r\n res.push({ start: pos, end: pos + 1 });\r\n }\r\n }\r\n return res;\r\n}\r\nconst _maxLen = 128;\r\nfunction initTable() {\r\n const table = [];\r\n const row = [];\r\n for (let i = 0; i <= _maxLen; i++) {\r\n row[i] = 0;\r\n }\r\n for (let i = 0; i <= _maxLen; i++) {\r\n table.push(row.slice(0));\r\n }\r\n return table;\r\n}\r\nfunction initArr(maxLen) {\r\n const row = [];\r\n for (let i = 0; i <= maxLen; i++) {\r\n row[i] = 0;\r\n }\r\n return row;\r\n}\r\nconst _minWordMatchPos = initArr(2 * _maxLen); // min word position for a certain pattern position\r\nconst _maxWordMatchPos = initArr(2 * _maxLen); // max word position for a certain pattern position\r\nconst _diag = initTable(); // the length of a contiguous diagonal match\r\nconst _table = initTable();\r\nconst _arrows = initTable();\r\nconst _debug = false;\r\nfunction printTable(table, pattern, patternLen, word, wordLen) {\r\n function pad(s, n, pad = ' ') {\r\n while (s.length < n) {\r\n s = pad + s;\r\n }\r\n return s;\r\n }\r\n let ret = ` | |${word.split('').map(c => pad(c, 3)).join('|')}\\n`;\r\n for (let i = 0; i <= patternLen; i++) {\r\n if (i === 0) {\r\n ret += ' |';\r\n }\r\n else {\r\n ret += `${pattern[i - 1]}|`;\r\n }\r\n ret += table[i].slice(0, wordLen + 1).map(n => pad(n.toString(), 3)).join('|') + '\\n';\r\n }\r\n return ret;\r\n}\r\nfunction printTables(pattern, patternStart, word, wordStart) {\r\n pattern = pattern.substr(patternStart);\r\n word = word.substr(wordStart);\r\n console.log(printTable(_table, pattern, pattern.length, word, word.length));\r\n console.log(printTable(_arrows, pattern, pattern.length, word, word.length));\r\n console.log(printTable(_diag, pattern, pattern.length, word, word.length));\r\n}\r\nfunction isSeparatorAtPos(value, index) {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.codePointAt(index);\r\n switch (code) {\r\n case 95 /* Underline */:\r\n case 45 /* Dash */:\r\n case 46 /* Period */:\r\n case 32 /* Space */:\r\n case 47 /* Slash */:\r\n case 92 /* Backslash */:\r\n case 39 /* SingleQuote */:\r\n case 34 /* DoubleQuote */:\r\n case 58 /* Colon */:\r\n case 36 /* DollarSign */:\r\n case 60 /* LessThan */:\r\n case 40 /* OpenParen */:\r\n case 91 /* OpenSquareBracket */:\r\n return true;\r\n case undefined:\r\n return false;\r\n default:\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_1__.isEmojiImprecise(code)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nfunction isWhitespaceAtPos(value, index) {\r\n if (index < 0 || index >= value.length) {\r\n return false;\r\n }\r\n const code = value.charCodeAt(index);\r\n switch (code) {\r\n case 32 /* Space */:\r\n case 9 /* Tab */:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\nfunction isUpperCaseAtPos(pos, word, wordLow) {\r\n return word[pos] !== wordLow[pos];\r\n}\r\nfunction isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen, fillMinWordPosArr = false) {\r\n while (patternPos < patternLen && wordPos < wordLen) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n if (fillMinWordPosArr) {\r\n // Remember the min word position for each pattern position\r\n _minWordMatchPos[patternPos] = wordPos;\r\n }\r\n patternPos += 1;\r\n }\r\n wordPos += 1;\r\n }\r\n return patternPos === patternLen; // pattern must be exhausted\r\n}\r\nvar FuzzyScore;\r\n(function (FuzzyScore) {\r\n /**\r\n * No matches and value `-100`\r\n */\r\n FuzzyScore.Default = ([-100, 0]);\r\n function isDefault(score) {\r\n return !score || (score.length === 2 && score[0] === -100 && score[1] === 0);\r\n }\r\n FuzzyScore.isDefault = isDefault;\r\n})(FuzzyScore || (FuzzyScore = {}));\r\nfunction fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) {\r\n const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length;\r\n const wordLen = word.length > _maxLen ? _maxLen : word.length;\r\n if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) {\r\n return undefined;\r\n }\r\n // Run a simple check if the characters of pattern occur\r\n // (in order) at all in word. If that isn't the case we\r\n // stop because no match will be possible\r\n if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen, true)) {\r\n return undefined;\r\n }\r\n // Find the max matching word position for each pattern position\r\n // NOTE: the min matching word position was filled in above, in the `isPatternInWord` call\r\n _fillInMaxWordMatchPos(patternLen, wordLen, patternStart, wordStart, patternLow, wordLow);\r\n let row = 1;\r\n let column = 1;\r\n let patternPos = patternStart;\r\n let wordPos = wordStart;\r\n const hasStrongFirstMatch = [false];\r\n // There will be a match, fill in tables\r\n for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) {\r\n // Reduce search space to possible matching word positions and to possible access from next row\r\n const minWordMatchPos = _minWordMatchPos[patternPos];\r\n const maxWordMatchPos = _maxWordMatchPos[patternPos];\r\n const nextMaxWordMatchPos = (patternPos + 1 < patternLen ? _maxWordMatchPos[patternPos + 1] : wordLen);\r\n for (column = minWordMatchPos - wordStart + 1, wordPos = minWordMatchPos; wordPos < nextMaxWordMatchPos; column++, wordPos++) {\r\n let score = Number.MIN_SAFE_INTEGER;\r\n let canComeDiag = false;\r\n if (wordPos <= maxWordMatchPos) {\r\n score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos, wordLen, wordStart, _diag[row - 1][column - 1] === 0, hasStrongFirstMatch);\r\n }\r\n let diagScore = 0;\r\n if (score !== Number.MAX_SAFE_INTEGER) {\r\n canComeDiag = true;\r\n diagScore = score + _table[row - 1][column - 1];\r\n }\r\n const canComeLeft = wordPos > minWordMatchPos;\r\n const leftScore = canComeLeft ? _table[row][column - 1] + (_diag[row][column - 1] > 0 ? -5 : 0) : 0; // penalty for a gap start\r\n const canComeLeftLeft = wordPos > minWordMatchPos + 1 && _diag[row][column - 1] > 0;\r\n const leftLeftScore = canComeLeftLeft ? _table[row][column - 2] + (_diag[row][column - 2] > 0 ? -5 : 0) : 0; // penalty for a gap start\r\n if (canComeLeftLeft && (!canComeLeft || leftLeftScore >= leftScore) && (!canComeDiag || leftLeftScore >= diagScore)) {\r\n // always prefer choosing left left to jump over a diagonal because that means a match is earlier in the word\r\n _table[row][column] = leftLeftScore;\r\n _arrows[row][column] = 3 /* LeftLeft */;\r\n _diag[row][column] = 0;\r\n }\r\n else if (canComeLeft && (!canComeDiag || leftScore >= diagScore)) {\r\n // always prefer choosing left since that means a match is earlier in the word\r\n _table[row][column] = leftScore;\r\n _arrows[row][column] = 2 /* Left */;\r\n _diag[row][column] = 0;\r\n }\r\n else if (canComeDiag) {\r\n _table[row][column] = diagScore;\r\n _arrows[row][column] = 1 /* Diag */;\r\n _diag[row][column] = _diag[row - 1][column - 1] + 1;\r\n }\r\n else {\r\n throw new Error(`not possible`);\r\n }\r\n }\r\n }\r\n if (_debug) {\r\n printTables(pattern, patternStart, word, wordStart);\r\n }\r\n if (!hasStrongFirstMatch[0] && !firstMatchCanBeWeak) {\r\n return undefined;\r\n }\r\n row--;\r\n column--;\r\n const result = [_table[row][column], wordStart];\r\n let backwardsDiagLength = 0;\r\n let maxMatchColumn = 0;\r\n while (row >= 1) {\r\n // Find the column where we go diagonally up\r\n let diagColumn = column;\r\n do {\r\n const arrow = _arrows[row][diagColumn];\r\n if (arrow === 3 /* LeftLeft */) {\r\n diagColumn = diagColumn - 2;\r\n }\r\n else if (arrow === 2 /* Left */) {\r\n diagColumn = diagColumn - 1;\r\n }\r\n else {\r\n // found the diagonal\r\n break;\r\n }\r\n } while (diagColumn >= 1);\r\n // Overturn the \"forwards\" decision if keeping the \"backwards\" diagonal would give a better match\r\n if (backwardsDiagLength > 1 // only if we would have a contiguous match of 3 characters\r\n && patternLow[patternStart + row - 1] === wordLow[wordStart + column - 1] // only if we can do a contiguous match diagonally\r\n && !isUpperCaseAtPos(diagColumn + wordStart - 1, word, wordLow) // only if the forwards chose diagonal is not an uppercase\r\n && backwardsDiagLength + 1 > _diag[row][diagColumn] // only if our contiguous match would be longer than the \"forwards\" contiguous match\r\n ) {\r\n diagColumn = column;\r\n }\r\n if (diagColumn === column) {\r\n // this is a contiguous match\r\n backwardsDiagLength++;\r\n }\r\n else {\r\n backwardsDiagLength = 1;\r\n }\r\n if (!maxMatchColumn) {\r\n // remember the last matched column\r\n maxMatchColumn = diagColumn;\r\n }\r\n row--;\r\n column = diagColumn - 1;\r\n result.push(column);\r\n }\r\n if (wordLen === patternLen) {\r\n // the word matches the pattern with all characters!\r\n // giving the score a total match boost (to come up ahead other words)\r\n result[0] += 2;\r\n }\r\n // Add 1 penalty for each skipped character in the word\r\n const skippedCharsCount = maxMatchColumn - patternLen;\r\n result[0] -= skippedCharsCount;\r\n return result;\r\n}\r\nfunction _fillInMaxWordMatchPos(patternLen, wordLen, patternStart, wordStart, patternLow, wordLow) {\r\n let patternPos = patternLen - 1;\r\n let wordPos = wordLen - 1;\r\n while (patternPos >= patternStart && wordPos >= wordStart) {\r\n if (patternLow[patternPos] === wordLow[wordPos]) {\r\n _maxWordMatchPos[patternPos] = wordPos;\r\n patternPos--;\r\n }\r\n wordPos--;\r\n }\r\n}\r\nfunction _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos, wordLen, wordStart, newMatchStart, outFirstMatchStrong) {\r\n if (patternLow[patternPos] !== wordLow[wordPos]) {\r\n return Number.MIN_SAFE_INTEGER;\r\n }\r\n let score = 1;\r\n let isGapLocation = false;\r\n if (wordPos === (patternPos - patternStart)) {\r\n // common prefix: `foobar <-> foobaz`\r\n // ^^^^^\r\n score = pattern[patternPos] === word[wordPos] ? 7 : 5;\r\n }\r\n else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) {\r\n // hitting upper-case: `foo <-> forOthers`\r\n // ^^ ^\r\n score = pattern[patternPos] === word[wordPos] ? 7 : 5;\r\n isGapLocation = true;\r\n }\r\n else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) {\r\n // hitting a separator: `. <-> foo.bar`\r\n // ^\r\n score = 5;\r\n }\r\n else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) {\r\n // post separator: `foo <-> bar_foo`\r\n // ^^^\r\n score = 5;\r\n isGapLocation = true;\r\n }\r\n if (score > 1 && patternPos === patternStart) {\r\n outFirstMatchStrong[0] = true;\r\n }\r\n if (!isGapLocation) {\r\n isGapLocation = isUpperCaseAtPos(wordPos, word, wordLow) || isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1);\r\n }\r\n //\r\n if (patternPos === patternStart) { // first character in pattern\r\n if (wordPos > wordStart) {\r\n // the first pattern character would match a word character that is not at the word start\r\n // so introduce a penalty to account for the gap preceding this match\r\n score -= isGapLocation ? 3 : 5;\r\n }\r\n }\r\n else {\r\n if (newMatchStart) {\r\n // this would be the beginning of a new match (i.e. there would be a gap before this location)\r\n score += isGapLocation ? 2 : 0;\r\n }\r\n else {\r\n // this is part of a contiguous match, so give it a slight bonus, but do so only if it would not be a prefered gap location\r\n score += isGapLocation ? 0 : 1;\r\n }\r\n }\r\n if (wordPos + 1 === wordLen) {\r\n // we always penalize gaps, but this gives unfair advantages to a match that would match the last character in the word\r\n // so pretend there is a gap after the last character in the word to normalize things\r\n score -= isGapLocation ? 3 : 5;\r\n }\r\n return score;\r\n}\r\n//#endregion\r\n//#region --- graceful ---\r\nfunction fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) {\r\n return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak);\r\n}\r\nfunction fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) {\r\n let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (top && !aggressive) {\r\n // when using the original pattern yield a result we`\r\n // return it unless we are aggressive and try to find\r\n // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`.\r\n return top;\r\n }\r\n if (pattern.length >= 3) {\r\n // When the pattern is long enough then try a few (max 7)\r\n // permutations of the pattern to find a better match. The\r\n // permutations only swap neighbouring characters, e.g\r\n // `cnoso` becomes `conso`, `cnsoo`, `cnoos`.\r\n const tries = Math.min(7, pattern.length - 1);\r\n for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) {\r\n const newPattern = nextTypoPermutation(pattern, movingPatternPos);\r\n if (newPattern) {\r\n const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak);\r\n if (candidate) {\r\n candidate[0] -= 3; // permutation penalty\r\n if (!top || candidate[0] > top[0]) {\r\n top = candidate;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return top;\r\n}\r\nfunction nextTypoPermutation(pattern, patternPos) {\r\n if (patternPos + 1 >= pattern.length) {\r\n return undefined;\r\n }\r\n const swap1 = pattern[patternPos];\r\n const swap2 = pattern[patternPos + 1];\r\n if (swap1 === swap2) {\r\n return undefined;\r\n }\r\n return pattern.slice(0, patternPos)\r\n + swap2\r\n + swap1\r\n + pattern.slice(patternPos + 2);\r\n}\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/filters.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/functional.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/functional.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"once\": () => (/* binding */ once)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction once(fn) {\r\n const _this = this;\r\n let didCall = false;\r\n let result;\r\n return function () {\r\n if (didCall) {\r\n return result;\r\n }\r\n didCall = true;\r\n result = fn.apply(_this, arguments);\r\n return result;\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/functional.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"scoreFuzzy2\": () => (/* binding */ scoreFuzzy2),\n/* harmony export */ \"prepareQuery\": () => (/* binding */ prepareQuery),\n/* harmony export */ \"pieceToQuery\": () => (/* binding */ pieceToQuery)\n/* harmony export */ });\n/* harmony import */ var _filters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n\r\n\r\n\r\n\r\nconst NO_SCORE2 = [undefined, []];\r\nfunction scoreFuzzy2(target, query, patternStart = 0, wordStart = 0) {\r\n // Score: multiple inputs\r\n const preparedQuery = query;\r\n if (preparedQuery.values && preparedQuery.values.length > 1) {\r\n return doScoreFuzzy2Multiple(target, preparedQuery.values, patternStart, wordStart);\r\n }\r\n // Score: single input\r\n return doScoreFuzzy2Single(target, query, patternStart, wordStart);\r\n}\r\nfunction doScoreFuzzy2Multiple(target, query, patternStart, wordStart) {\r\n let totalScore = 0;\r\n const totalMatches = [];\r\n for (const queryPiece of query) {\r\n const [score, matches] = doScoreFuzzy2Single(target, queryPiece, patternStart, wordStart);\r\n if (typeof score !== 'number') {\r\n // if a single query value does not match, return with\r\n // no score entirely, we require all queries to match\r\n return NO_SCORE2;\r\n }\r\n totalScore += score;\r\n totalMatches.push(...matches);\r\n }\r\n // if we have a score, ensure that the positions are\r\n // sorted in ascending order and distinct\r\n return [totalScore, normalizeMatches(totalMatches)];\r\n}\r\nfunction doScoreFuzzy2Single(target, query, patternStart, wordStart) {\r\n const score = (0,_filters_js__WEBPACK_IMPORTED_MODULE_0__.fuzzyScore)(query.original, query.originalLowercase, patternStart, target, target.toLowerCase(), wordStart, true);\r\n if (!score) {\r\n return NO_SCORE2;\r\n }\r\n return [score[0], (0,_filters_js__WEBPACK_IMPORTED_MODULE_0__.createMatches)(score)];\r\n}\r\nfunction normalizeMatches(matches) {\r\n // sort matches by start to be able to normalize\r\n const sortedMatches = matches.sort((matchA, matchB) => {\r\n return matchA.start - matchB.start;\r\n });\r\n // merge matches that overlap\r\n const normalizedMatches = [];\r\n let currentMatch = undefined;\r\n for (const match of sortedMatches) {\r\n // if we have no current match or the matches\r\n // do not overlap, we take it as is and remember\r\n // it for future merging\r\n if (!currentMatch || !matchOverlaps(currentMatch, match)) {\r\n currentMatch = match;\r\n normalizedMatches.push(match);\r\n }\r\n // otherwise we merge the matches\r\n else {\r\n currentMatch.start = Math.min(currentMatch.start, match.start);\r\n currentMatch.end = Math.max(currentMatch.end, match.end);\r\n }\r\n }\r\n return normalizedMatches;\r\n}\r\nfunction matchOverlaps(matchA, matchB) {\r\n if (matchA.end < matchB.start) {\r\n return false; // A ends before B starts\r\n }\r\n if (matchB.end < matchA.start) {\r\n return false; // B ends before A starts\r\n }\r\n return true;\r\n}\r\n/**\r\n * Helper function to prepare a search value for scoring by removing unwanted characters\r\n * and allowing to score on multiple pieces separated by whitespace character.\r\n */\r\nconst MULTIPLE_QUERY_VALUES_SEPARATOR = ' ';\r\nfunction prepareQuery(original) {\r\n if (typeof original !== 'string') {\r\n original = '';\r\n }\r\n const originalLowercase = original.toLowerCase();\r\n const { pathNormalized, normalized, normalizedLowercase } = normalizeQuery(original);\r\n const containsPathSeparator = pathNormalized.indexOf(_path_js__WEBPACK_IMPORTED_MODULE_1__.sep) >= 0;\r\n let values = undefined;\r\n const originalSplit = original.split(MULTIPLE_QUERY_VALUES_SEPARATOR);\r\n if (originalSplit.length > 1) {\r\n for (const originalPiece of originalSplit) {\r\n const { pathNormalized: pathNormalizedPiece, normalized: normalizedPiece, normalizedLowercase: normalizedLowercasePiece } = normalizeQuery(originalPiece);\r\n if (normalizedPiece) {\r\n if (!values) {\r\n values = [];\r\n }\r\n values.push({\r\n original: originalPiece,\r\n originalLowercase: originalPiece.toLowerCase(),\r\n pathNormalized: pathNormalizedPiece,\r\n normalized: normalizedPiece,\r\n normalizedLowercase: normalizedLowercasePiece\r\n });\r\n }\r\n }\r\n }\r\n return { original, originalLowercase, pathNormalized, normalized, normalizedLowercase, values, containsPathSeparator };\r\n}\r\nfunction normalizeQuery(original) {\r\n let pathNormalized;\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWindows) {\r\n pathNormalized = original.replace(/\\//g, _path_js__WEBPACK_IMPORTED_MODULE_1__.sep); // Help Windows users to search for paths when using slash\r\n }\r\n else {\r\n pathNormalized = original.replace(/\\\\/g, _path_js__WEBPACK_IMPORTED_MODULE_1__.sep); // Help macOS/Linux users to search for paths when using backslash\r\n }\r\n const normalized = (0,_strings_js__WEBPACK_IMPORTED_MODULE_3__.stripWildcards)(pathNormalized).replace(/\\s/g, '');\r\n return {\r\n pathNormalized,\r\n normalized,\r\n normalizedLowercase: normalized.toLowerCase()\r\n };\r\n}\r\nfunction pieceToQuery(arg1) {\r\n if (Array.isArray(arg1)) {\r\n return prepareQuery(arg1.map(piece => piece.original).join(MULTIPLE_QUERY_VALUES_SEPARATOR));\r\n }\r\n return prepareQuery(arg1.original);\r\n}\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/glob.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/glob.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"splitGlobAware\": () => (/* binding */ splitGlobAware),\n/* harmony export */ \"match\": () => (/* binding */ match),\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"isRelativePattern\": () => (/* binding */ isRelativePattern)\n/* harmony export */ });\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _extpath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./extpath.js */ \"./node_modules/monaco-editor/esm/vs/base/common/extpath.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst GLOBSTAR = '**';\r\nconst GLOB_SPLIT = '/';\r\nconst PATH_REGEX = '[/\\\\\\\\]'; // any slash or backslash\r\nconst NO_PATH_REGEX = '[^/\\\\\\\\]'; // any non-slash and non-backslash\r\nconst ALL_FORWARD_SLASHES = /\\//g;\r\nfunction starsToRegExp(starCount) {\r\n switch (starCount) {\r\n case 0:\r\n return '';\r\n case 1:\r\n return `${NO_PATH_REGEX}*?`; // 1 star matches any number of characters except path separator (/ and \\) - non greedy (?)\r\n default:\r\n // Matches: (Path Sep OR Path Val followed by Path Sep OR Path Sep followed by Path Val) 0-many times\r\n // Group is non capturing because we don't need to capture at all (?:...)\r\n // Overall we use non-greedy matching because it could be that we match too much\r\n return `(?:${PATH_REGEX}|${NO_PATH_REGEX}+${PATH_REGEX}|${PATH_REGEX}${NO_PATH_REGEX}+)*?`;\r\n }\r\n}\r\nfunction splitGlobAware(pattern, splitChar) {\r\n if (!pattern) {\r\n return [];\r\n }\r\n const segments = [];\r\n let inBraces = false;\r\n let inBrackets = false;\r\n let curVal = '';\r\n for (const char of pattern) {\r\n switch (char) {\r\n case splitChar:\r\n if (!inBraces && !inBrackets) {\r\n segments.push(curVal);\r\n curVal = '';\r\n continue;\r\n }\r\n break;\r\n case '{':\r\n inBraces = true;\r\n break;\r\n case '}':\r\n inBraces = false;\r\n break;\r\n case '[':\r\n inBrackets = true;\r\n break;\r\n case ']':\r\n inBrackets = false;\r\n break;\r\n }\r\n curVal += char;\r\n }\r\n // Tail\r\n if (curVal) {\r\n segments.push(curVal);\r\n }\r\n return segments;\r\n}\r\nfunction parseRegExp(pattern) {\r\n if (!pattern) {\r\n return '';\r\n }\r\n let regEx = '';\r\n // Split up into segments for each slash found\r\n const segments = splitGlobAware(pattern, GLOB_SPLIT);\r\n // Special case where we only have globstars\r\n if (segments.every(s => s === GLOBSTAR)) {\r\n regEx = '.*';\r\n }\r\n // Build regex over segments\r\n else {\r\n let previousSegmentWasGlobStar = false;\r\n segments.forEach((segment, index) => {\r\n // Globstar is special\r\n if (segment === GLOBSTAR) {\r\n // if we have more than one globstar after another, just ignore it\r\n if (!previousSegmentWasGlobStar) {\r\n regEx += starsToRegExp(2);\r\n previousSegmentWasGlobStar = true;\r\n }\r\n return;\r\n }\r\n // States\r\n let inBraces = false;\r\n let braceVal = '';\r\n let inBrackets = false;\r\n let bracketVal = '';\r\n for (const char of segment) {\r\n // Support brace expansion\r\n if (char !== '}' && inBraces) {\r\n braceVal += char;\r\n continue;\r\n }\r\n // Support brackets\r\n if (inBrackets && (char !== ']' || !bracketVal) /* ] is literally only allowed as first character in brackets to match it */) {\r\n let res;\r\n // range operator\r\n if (char === '-') {\r\n res = char;\r\n }\r\n // negation operator (only valid on first index in bracket)\r\n else if ((char === '^' || char === '!') && !bracketVal) {\r\n res = '^';\r\n }\r\n // glob split matching is not allowed within character ranges\r\n // see http://man7.org/linux/man-pages/man7/glob.7.html\r\n else if (char === GLOB_SPLIT) {\r\n res = '';\r\n }\r\n // anything else gets escaped\r\n else {\r\n res = _strings_js__WEBPACK_IMPORTED_MODULE_0__.escapeRegExpCharacters(char);\r\n }\r\n bracketVal += res;\r\n continue;\r\n }\r\n switch (char) {\r\n case '{':\r\n inBraces = true;\r\n continue;\r\n case '[':\r\n inBrackets = true;\r\n continue;\r\n case '}':\r\n const choices = splitGlobAware(braceVal, ',');\r\n // Converts {foo,bar} => [foo|bar]\r\n const braceRegExp = `(?:${choices.map(c => parseRegExp(c)).join('|')})`;\r\n regEx += braceRegExp;\r\n inBraces = false;\r\n braceVal = '';\r\n break;\r\n case ']':\r\n regEx += ('[' + bracketVal + ']');\r\n inBrackets = false;\r\n bracketVal = '';\r\n break;\r\n case '?':\r\n regEx += NO_PATH_REGEX; // 1 ? matches any single character except path separator (/ and \\)\r\n continue;\r\n case '*':\r\n regEx += starsToRegExp(1);\r\n continue;\r\n default:\r\n regEx += _strings_js__WEBPACK_IMPORTED_MODULE_0__.escapeRegExpCharacters(char);\r\n }\r\n }\r\n // Tail: Add the slash we had split on if there is more to come and the remaining pattern is not a globstar\r\n // For example if pattern: some/**/*.js we want the \"/\" after some to be included in the RegEx to prevent\r\n // a folder called \"something\" to match as well.\r\n // However, if pattern: some/**, we tolerate that we also match on \"something\" because our globstar behaviour\r\n // is to match 0-N segments.\r\n if (index < segments.length - 1 && (segments[index + 1] !== GLOBSTAR || index + 2 < segments.length)) {\r\n regEx += PATH_REGEX;\r\n }\r\n // reset state\r\n previousSegmentWasGlobStar = false;\r\n });\r\n }\r\n return regEx;\r\n}\r\n// regexes to check for trival glob patterns that just check for String#endsWith\r\nconst T1 = /^\\*\\*\\/\\*\\.[\\w\\.-]+$/; // **/*.something\r\nconst T2 = /^\\*\\*\\/([\\w\\.-]+)\\/?$/; // **/something\r\nconst T3 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?)*}$/; // {**/*.something,**/*.else} or {**/package.json,**/project.json}\r\nconst T3_2 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?)*}$/; // Like T3, with optional trailing /**\r\nconst T4 = /^\\*\\*((\\/[\\w\\.-]+)+)\\/?$/; // **/something/else\r\nconst T5 = /^([\\w\\.-]+(\\/[\\w\\.-]+)*)\\/?$/; // something/else\r\nconst CACHE = new _map_js__WEBPACK_IMPORTED_MODULE_3__.LRUCache(10000); // bounded to 10000 elements\r\nconst FALSE = function () {\r\n return false;\r\n};\r\nconst NULL = function () {\r\n return null;\r\n};\r\nfunction parsePattern(arg1, options) {\r\n if (!arg1) {\r\n return NULL;\r\n }\r\n // Handle IRelativePattern\r\n let pattern;\r\n if (typeof arg1 !== 'string') {\r\n pattern = arg1.pattern;\r\n }\r\n else {\r\n pattern = arg1;\r\n }\r\n // Whitespace trimming\r\n pattern = pattern.trim();\r\n // Check cache\r\n const patternKey = `${pattern}_${!!options.trimForExclusions}`;\r\n let parsedPattern = CACHE.get(patternKey);\r\n if (parsedPattern) {\r\n return wrapRelativePattern(parsedPattern, arg1);\r\n }\r\n // Check for Trivias\r\n let match;\r\n if (T1.test(pattern)) { // common pattern: **/*.txt just need endsWith check\r\n const base = pattern.substr(4); // '**/*'.length === 4\r\n parsedPattern = function (path, basename) {\r\n return typeof path === 'string' && path.endsWith(base) ? pattern : null;\r\n };\r\n }\r\n else if (match = T2.exec(trimForExclusions(pattern, options))) { // common pattern: **/some.txt just need basename check\r\n parsedPattern = trivia2(match[1], pattern);\r\n }\r\n else if ((options.trimForExclusions ? T3_2 : T3).test(pattern)) { // repetition of common patterns (see above) {**/*.txt,**/*.png}\r\n parsedPattern = trivia3(pattern, options);\r\n }\r\n else if (match = T4.exec(trimForExclusions(pattern, options))) { // common pattern: **/something/else just need endsWith check\r\n parsedPattern = trivia4and5(match[1].substr(1), pattern, true);\r\n }\r\n else if (match = T5.exec(trimForExclusions(pattern, options))) { // common pattern: something/else just need equals check\r\n parsedPattern = trivia4and5(match[1], pattern, false);\r\n }\r\n // Otherwise convert to pattern\r\n else {\r\n parsedPattern = toRegExp(pattern);\r\n }\r\n // Cache\r\n CACHE.set(patternKey, parsedPattern);\r\n return wrapRelativePattern(parsedPattern, arg1);\r\n}\r\nfunction wrapRelativePattern(parsedPattern, arg2) {\r\n if (typeof arg2 === 'string') {\r\n return parsedPattern;\r\n }\r\n return function (path, basename) {\r\n if (!_extpath_js__WEBPACK_IMPORTED_MODULE_1__.isEqualOrParent(path, arg2.base)) {\r\n return null;\r\n }\r\n return parsedPattern(_path_js__WEBPACK_IMPORTED_MODULE_2__.relative(arg2.base, path), basename);\r\n };\r\n}\r\nfunction trimForExclusions(pattern, options) {\r\n return options.trimForExclusions && pattern.endsWith('/**') ? pattern.substr(0, pattern.length - 2) : pattern; // dropping **, tailing / is dropped later\r\n}\r\n// common pattern: **/some.txt just need basename check\r\nfunction trivia2(base, originalPattern) {\r\n const slashBase = `/${base}`;\r\n const backslashBase = `\\\\${base}`;\r\n const parsedPattern = function (path, basename) {\r\n if (typeof path !== 'string') {\r\n return null;\r\n }\r\n if (basename) {\r\n return basename === base ? originalPattern : null;\r\n }\r\n return path === base || path.endsWith(slashBase) || path.endsWith(backslashBase) ? originalPattern : null;\r\n };\r\n const basenames = [base];\r\n parsedPattern.basenames = basenames;\r\n parsedPattern.patterns = [originalPattern];\r\n parsedPattern.allBasenames = basenames;\r\n return parsedPattern;\r\n}\r\n// repetition of common patterns (see above) {**/*.txt,**/*.png}\r\nfunction trivia3(pattern, options) {\r\n const parsedPatterns = aggregateBasenameMatches(pattern.slice(1, -1).split(',')\r\n .map(pattern => parsePattern(pattern, options))\r\n .filter(pattern => pattern !== NULL), pattern);\r\n const n = parsedPatterns.length;\r\n if (!n) {\r\n return NULL;\r\n }\r\n if (n === 1) {\r\n return parsedPatterns[0];\r\n }\r\n const parsedPattern = function (path, basename) {\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n if (parsedPatterns[i](path, basename)) {\r\n return pattern;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n parsedPattern.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n parsedPattern.allPaths = allPaths;\r\n }\r\n return parsedPattern;\r\n}\r\n// common patterns: **/something/else just need endsWith check, something/else just needs and equals check\r\nfunction trivia4and5(targetPath, pattern, matchPathEnds) {\r\n const usingPosixSep = _path_js__WEBPACK_IMPORTED_MODULE_2__.sep === _path_js__WEBPACK_IMPORTED_MODULE_2__.posix.sep;\r\n const nativePath = usingPosixSep ? targetPath : targetPath.replace(ALL_FORWARD_SLASHES, _path_js__WEBPACK_IMPORTED_MODULE_2__.sep);\r\n const nativePathEnd = _path_js__WEBPACK_IMPORTED_MODULE_2__.sep + nativePath;\r\n const targetPathEnd = _path_js__WEBPACK_IMPORTED_MODULE_2__.posix.sep + targetPath;\r\n const parsedPattern = matchPathEnds ? function (testPath, basename) {\r\n return typeof testPath === 'string' &&\r\n ((testPath === nativePath || testPath.endsWith(nativePathEnd))\r\n || !usingPosixSep && (testPath === targetPath || testPath.endsWith(targetPathEnd)))\r\n ? pattern : null;\r\n } : function (testPath, basename) {\r\n return typeof testPath === 'string' &&\r\n (testPath === nativePath\r\n || (!usingPosixSep && testPath === targetPath))\r\n ? pattern : null;\r\n };\r\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + targetPath];\r\n return parsedPattern;\r\n}\r\nfunction toRegExp(pattern) {\r\n try {\r\n const regExp = new RegExp(`^${parseRegExp(pattern)}$`);\r\n return function (path) {\r\n regExp.lastIndex = 0; // reset RegExp to its initial state to reuse it!\r\n return typeof path === 'string' && regExp.test(path) ? pattern : null;\r\n };\r\n }\r\n catch (error) {\r\n return NULL;\r\n }\r\n}\r\nfunction match(arg1, path, hasSibling) {\r\n if (!arg1 || typeof path !== 'string') {\r\n return false;\r\n }\r\n return parse(arg1)(path, undefined, hasSibling);\r\n}\r\nfunction parse(arg1, options = {}) {\r\n if (!arg1) {\r\n return FALSE;\r\n }\r\n // Glob with String\r\n if (typeof arg1 === 'string' || isRelativePattern(arg1)) {\r\n const parsedPattern = parsePattern(arg1, options);\r\n if (parsedPattern === NULL) {\r\n return FALSE;\r\n }\r\n const resultPattern = function (path, basename) {\r\n return !!parsedPattern(path, basename);\r\n };\r\n if (parsedPattern.allBasenames) {\r\n resultPattern.allBasenames = parsedPattern.allBasenames;\r\n }\r\n if (parsedPattern.allPaths) {\r\n resultPattern.allPaths = parsedPattern.allPaths;\r\n }\r\n return resultPattern;\r\n }\r\n // Glob with Expression\r\n return parsedExpression(arg1, options);\r\n}\r\nfunction isRelativePattern(obj) {\r\n const rp = obj;\r\n return rp && typeof rp.base === 'string' && typeof rp.pattern === 'string';\r\n}\r\nfunction parsedExpression(expression, options) {\r\n const parsedPatterns = aggregateBasenameMatches(Object.getOwnPropertyNames(expression)\r\n .map(pattern => parseExpressionPattern(pattern, expression[pattern], options))\r\n .filter(pattern => pattern !== NULL));\r\n const n = parsedPatterns.length;\r\n if (!n) {\r\n return NULL;\r\n }\r\n if (!parsedPatterns.some(parsedPattern => !!parsedPattern.requiresSiblings)) {\r\n if (n === 1) {\r\n return parsedPatterns[0];\r\n }\r\n const resultExpression = function (path, basename) {\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n // Pattern matches path\r\n const result = parsedPatterns[i](path, basename);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n resultExpression.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n resultExpression.allPaths = allPaths;\r\n }\r\n return resultExpression;\r\n }\r\n const resultExpression = function (path, basename, hasSibling) {\r\n let name = undefined;\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n // Pattern matches path\r\n const parsedPattern = parsedPatterns[i];\r\n if (parsedPattern.requiresSiblings && hasSibling) {\r\n if (!basename) {\r\n basename = _path_js__WEBPACK_IMPORTED_MODULE_2__.basename(path);\r\n }\r\n if (!name) {\r\n name = basename.substr(0, basename.length - _path_js__WEBPACK_IMPORTED_MODULE_2__.extname(path).length);\r\n }\r\n }\r\n const result = parsedPattern(path, basename, name, hasSibling);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n resultExpression.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n resultExpression.allPaths = allPaths;\r\n }\r\n return resultExpression;\r\n}\r\nfunction parseExpressionPattern(pattern, value, options) {\r\n if (value === false) {\r\n return NULL; // pattern is disabled\r\n }\r\n const parsedPattern = parsePattern(pattern, options);\r\n if (parsedPattern === NULL) {\r\n return NULL;\r\n }\r\n // Expression Pattern is <boolean>\r\n if (typeof value === 'boolean') {\r\n return parsedPattern;\r\n }\r\n // Expression Pattern is <SiblingClause>\r\n if (value) {\r\n const when = value.when;\r\n if (typeof when === 'string') {\r\n const result = (path, basename, name, hasSibling) => {\r\n if (!hasSibling || !parsedPattern(path, basename)) {\r\n return null;\r\n }\r\n const clausePattern = when.replace('$(basename)', name);\r\n const matched = hasSibling(clausePattern);\r\n return (0,_async_js__WEBPACK_IMPORTED_MODULE_4__.isThenable)(matched) ?\r\n matched.then(m => m ? pattern : null) :\r\n matched ? pattern : null;\r\n };\r\n result.requiresSiblings = true;\r\n return result;\r\n }\r\n }\r\n // Expression is Anything\r\n return parsedPattern;\r\n}\r\nfunction aggregateBasenameMatches(parsedPatterns, result) {\r\n const basenamePatterns = parsedPatterns.filter(parsedPattern => !!parsedPattern.basenames);\r\n if (basenamePatterns.length < 2) {\r\n return parsedPatterns;\r\n }\r\n const basenames = basenamePatterns.reduce((all, current) => {\r\n const basenames = current.basenames;\r\n return basenames ? all.concat(basenames) : all;\r\n }, []);\r\n let patterns;\r\n if (result) {\r\n patterns = [];\r\n for (let i = 0, n = basenames.length; i < n; i++) {\r\n patterns.push(result);\r\n }\r\n }\r\n else {\r\n patterns = basenamePatterns.reduce((all, current) => {\r\n const patterns = current.patterns;\r\n return patterns ? all.concat(patterns) : all;\r\n }, []);\r\n }\r\n const aggregate = function (path, basename) {\r\n if (typeof path !== 'string') {\r\n return null;\r\n }\r\n if (!basename) {\r\n let i;\r\n for (i = path.length; i > 0; i--) {\r\n const ch = path.charCodeAt(i - 1);\r\n if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) {\r\n break;\r\n }\r\n }\r\n basename = path.substr(i);\r\n }\r\n const index = basenames.indexOf(basename);\r\n return index !== -1 ? patterns[index] : null;\r\n };\r\n aggregate.basenames = basenames;\r\n aggregate.patterns = patterns;\r\n aggregate.allBasenames = basenames;\r\n const aggregatedPatterns = parsedPatterns.filter(parsedPattern => !parsedPattern.basenames);\r\n aggregatedPatterns.push(aggregate);\r\n return aggregatedPatterns;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/glob.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/hash.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/hash.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"hash\": () => (/* binding */ hash),\n/* harmony export */ \"doHash\": () => (/* binding */ doHash),\n/* harmony export */ \"stringHash\": () => (/* binding */ stringHash),\n/* harmony export */ \"toHexString\": () => (/* binding */ toHexString),\n/* harmony export */ \"StringSHA1\": () => (/* binding */ StringSHA1)\n/* harmony export */ });\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * Return a hash value for an object.\r\n */\r\nfunction hash(obj) {\r\n return doHash(obj, 0);\r\n}\r\nfunction doHash(obj, hashVal) {\r\n switch (typeof obj) {\r\n case 'object':\r\n if (obj === null) {\r\n return numberHash(349, hashVal);\r\n }\r\n else if (Array.isArray(obj)) {\r\n return arrayHash(obj, hashVal);\r\n }\r\n return objectHash(obj, hashVal);\r\n case 'string':\r\n return stringHash(obj, hashVal);\r\n case 'boolean':\r\n return booleanHash(obj, hashVal);\r\n case 'number':\r\n return numberHash(obj, hashVal);\r\n case 'undefined':\r\n return numberHash(937, hashVal);\r\n default:\r\n return numberHash(617, hashVal);\r\n }\r\n}\r\nfunction numberHash(val, initialHashVal) {\r\n return (((initialHashVal << 5) - initialHashVal) + val) | 0; // hashVal * 31 + ch, keep as int32\r\n}\r\nfunction booleanHash(b, initialHashVal) {\r\n return numberHash(b ? 433 : 863, initialHashVal);\r\n}\r\nfunction stringHash(s, hashVal) {\r\n hashVal = numberHash(149417, hashVal);\r\n for (let i = 0, length = s.length; i < length; i++) {\r\n hashVal = numberHash(s.charCodeAt(i), hashVal);\r\n }\r\n return hashVal;\r\n}\r\nfunction arrayHash(arr, initialHashVal) {\r\n initialHashVal = numberHash(104579, initialHashVal);\r\n return arr.reduce((hashVal, item) => doHash(item, hashVal), initialHashVal);\r\n}\r\nfunction objectHash(obj, initialHashVal) {\r\n initialHashVal = numberHash(181387, initialHashVal);\r\n return Object.keys(obj).sort().reduce((hashVal, key) => {\r\n hashVal = stringHash(key, hashVal);\r\n return doHash(obj[key], hashVal);\r\n }, initialHashVal);\r\n}\r\nfunction leftRotate(value, bits, totalBits = 32) {\r\n // delta + bits = totalBits\r\n const delta = totalBits - bits;\r\n // All ones, expect `delta` zeros aligned to the right\r\n const mask = ~((1 << delta) - 1);\r\n // Join (value left-shifted `bits` bits) with (masked value right-shifted `delta` bits)\r\n return ((value << bits) | ((mask & value) >>> delta)) >>> 0;\r\n}\r\nfunction fill(dest, index = 0, count = dest.byteLength, value = 0) {\r\n for (let i = 0; i < count; i++) {\r\n dest[index + i] = value;\r\n }\r\n}\r\nfunction leftPad(value, length, char = '0') {\r\n while (value.length < length) {\r\n value = char + value;\r\n }\r\n return value;\r\n}\r\nfunction toHexString(bufferOrValue, bitsize = 32) {\r\n if (bufferOrValue instanceof ArrayBuffer) {\r\n return Array.from(new Uint8Array(bufferOrValue)).map(b => b.toString(16).padStart(2, '0')).join('');\r\n }\r\n return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4);\r\n}\r\n/**\r\n * A SHA1 implementation that works with strings and does not allocate.\r\n */\r\nclass StringSHA1 {\r\n constructor() {\r\n this._h0 = 0x67452301;\r\n this._h1 = 0xEFCDAB89;\r\n this._h2 = 0x98BADCFE;\r\n this._h3 = 0x10325476;\r\n this._h4 = 0xC3D2E1F0;\r\n this._buff = new Uint8Array(64 /* BLOCK_SIZE */ + 3 /* to fit any utf-8 */);\r\n this._buffDV = new DataView(this._buff.buffer);\r\n this._buffLen = 0;\r\n this._totalLen = 0;\r\n this._leftoverHighSurrogate = 0;\r\n this._finished = false;\r\n }\r\n update(str) {\r\n const strLen = str.length;\r\n if (strLen === 0) {\r\n return;\r\n }\r\n const buff = this._buff;\r\n let buffLen = this._buffLen;\r\n let leftoverHighSurrogate = this._leftoverHighSurrogate;\r\n let charCode;\r\n let offset;\r\n if (leftoverHighSurrogate !== 0) {\r\n charCode = leftoverHighSurrogate;\r\n offset = -1;\r\n leftoverHighSurrogate = 0;\r\n }\r\n else {\r\n charCode = str.charCodeAt(0);\r\n offset = 0;\r\n }\r\n while (true) {\r\n let codePoint = charCode;\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCode)) {\r\n if (offset + 1 < strLen) {\r\n const nextCharCode = str.charCodeAt(offset + 1);\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowSurrogate(nextCharCode)) {\r\n offset++;\r\n codePoint = _strings_js__WEBPACK_IMPORTED_MODULE_0__.computeCodePoint(charCode, nextCharCode);\r\n }\r\n else {\r\n // illegal => unicode replacement character\r\n codePoint = 65533 /* UNICODE_REPLACEMENT */;\r\n }\r\n }\r\n else {\r\n // last character is a surrogate pair\r\n leftoverHighSurrogate = charCode;\r\n break;\r\n }\r\n }\r\n else if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowSurrogate(charCode)) {\r\n // illegal => unicode replacement character\r\n codePoint = 65533 /* UNICODE_REPLACEMENT */;\r\n }\r\n buffLen = this._push(buff, buffLen, codePoint);\r\n offset++;\r\n if (offset < strLen) {\r\n charCode = str.charCodeAt(offset);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n this._buffLen = buffLen;\r\n this._leftoverHighSurrogate = leftoverHighSurrogate;\r\n }\r\n _push(buff, buffLen, codePoint) {\r\n if (codePoint < 0x0080) {\r\n buff[buffLen++] = codePoint;\r\n }\r\n else if (codePoint < 0x0800) {\r\n buff[buffLen++] = 0b11000000 | ((codePoint & 0b00000000000000000000011111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n else if (codePoint < 0x10000) {\r\n buff[buffLen++] = 0b11100000 | ((codePoint & 0b00000000000000001111000000000000) >>> 12);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n else {\r\n buff[buffLen++] = 0b11110000 | ((codePoint & 0b00000000000111000000000000000000) >>> 18);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000111111000000000000) >>> 12);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6);\r\n buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0);\r\n }\r\n if (buffLen >= 64 /* BLOCK_SIZE */) {\r\n this._step();\r\n buffLen -= 64 /* BLOCK_SIZE */;\r\n this._totalLen += 64 /* BLOCK_SIZE */;\r\n // take last 3 in case of UTF8 overflow\r\n buff[0] = buff[64 /* BLOCK_SIZE */ + 0];\r\n buff[1] = buff[64 /* BLOCK_SIZE */ + 1];\r\n buff[2] = buff[64 /* BLOCK_SIZE */ + 2];\r\n }\r\n return buffLen;\r\n }\r\n digest() {\r\n if (!this._finished) {\r\n this._finished = true;\r\n if (this._leftoverHighSurrogate) {\r\n // illegal => unicode replacement character\r\n this._leftoverHighSurrogate = 0;\r\n this._buffLen = this._push(this._buff, this._buffLen, 65533 /* UNICODE_REPLACEMENT */);\r\n }\r\n this._totalLen += this._buffLen;\r\n this._wrapUp();\r\n }\r\n return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4);\r\n }\r\n _wrapUp() {\r\n this._buff[this._buffLen++] = 0x80;\r\n fill(this._buff, this._buffLen);\r\n if (this._buffLen > 56) {\r\n this._step();\r\n fill(this._buff);\r\n }\r\n // this will fit because the mantissa can cover up to 52 bits\r\n const ml = 8 * this._totalLen;\r\n this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false);\r\n this._buffDV.setUint32(60, ml % 4294967296, false);\r\n this._step();\r\n }\r\n _step() {\r\n const bigBlock32 = StringSHA1._bigBlock32;\r\n const data = this._buffDV;\r\n for (let j = 0; j < 64 /* 16*4 */; j += 4) {\r\n bigBlock32.setUint32(j, data.getUint32(j, false), false);\r\n }\r\n for (let j = 64; j < 320 /* 80*4 */; j += 4) {\r\n bigBlock32.setUint32(j, leftRotate((bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false)), 1), false);\r\n }\r\n let a = this._h0;\r\n let b = this._h1;\r\n let c = this._h2;\r\n let d = this._h3;\r\n let e = this._h4;\r\n let f, k;\r\n let temp;\r\n for (let j = 0; j < 80; j++) {\r\n if (j < 20) {\r\n f = (b & c) | ((~b) & d);\r\n k = 0x5A827999;\r\n }\r\n else if (j < 40) {\r\n f = b ^ c ^ d;\r\n k = 0x6ED9EBA1;\r\n }\r\n else if (j < 60) {\r\n f = (b & c) | (b & d) | (c & d);\r\n k = 0x8F1BBCDC;\r\n }\r\n else {\r\n f = b ^ c ^ d;\r\n k = 0xCA62C1D6;\r\n }\r\n temp = (leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false)) & 0xffffffff;\r\n e = d;\r\n d = c;\r\n c = leftRotate(b, 30);\r\n b = a;\r\n a = temp;\r\n }\r\n this._h0 = (this._h0 + a) & 0xffffffff;\r\n this._h1 = (this._h1 + b) & 0xffffffff;\r\n this._h2 = (this._h2 + c) & 0xffffffff;\r\n this._h3 = (this._h3 + d) & 0xffffffff;\r\n this._h4 = (this._h4 + e) & 0xffffffff;\r\n }\r\n}\r\nStringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320)); // 80 * 4 = 320\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/hash.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/history.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/history.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HistoryNavigator\": () => (/* binding */ HistoryNavigator)\n/* harmony export */ });\n/* harmony import */ var _navigator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navigator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/navigator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass HistoryNavigator {\r\n constructor(history = [], limit = 10) {\r\n this._initialize(history);\r\n this._limit = limit;\r\n this._onChange();\r\n }\r\n add(t) {\r\n this._history.delete(t);\r\n this._history.add(t);\r\n this._onChange();\r\n }\r\n next() {\r\n if (this._currentPosition() !== this._elements.length - 1) {\r\n return this._navigator.next();\r\n }\r\n return null;\r\n }\r\n previous() {\r\n if (this._currentPosition() !== 0) {\r\n return this._navigator.previous();\r\n }\r\n return null;\r\n }\r\n current() {\r\n return this._navigator.current();\r\n }\r\n first() {\r\n return this._navigator.first();\r\n }\r\n last() {\r\n return this._navigator.last();\r\n }\r\n has(t) {\r\n return this._history.has(t);\r\n }\r\n _onChange() {\r\n this._reduceToLimit();\r\n const elements = this._elements;\r\n this._navigator = new _navigator_js__WEBPACK_IMPORTED_MODULE_0__.ArrayNavigator(elements, 0, elements.length, elements.length);\r\n }\r\n _reduceToLimit() {\r\n const data = this._elements;\r\n if (data.length > this._limit) {\r\n this._initialize(data.slice(data.length - this._limit));\r\n }\r\n }\r\n _currentPosition() {\r\n const currentElement = this._navigator.current();\r\n if (!currentElement) {\r\n return -1;\r\n }\r\n return this._elements.indexOf(currentElement);\r\n }\r\n _initialize(history) {\r\n this._history = new Set();\r\n for (const entry of history) {\r\n this._history.add(entry);\r\n }\r\n }\r\n get _elements() {\r\n const elements = [];\r\n this._history.forEach(e => elements.push(e));\r\n return elements;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/history.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkdownString\": () => (/* binding */ MarkdownString),\n/* harmony export */ \"isEmptyMarkdownString\": () => (/* binding */ isEmptyMarkdownString),\n/* harmony export */ \"isMarkdownString\": () => (/* binding */ isMarkdownString),\n/* harmony export */ \"markedStringsEquals\": () => (/* binding */ markedStringsEquals),\n/* harmony export */ \"escapeMarkdownSyntaxTokens\": () => (/* binding */ escapeMarkdownSyntaxTokens),\n/* harmony export */ \"removeMarkdownEscapes\": () => (/* binding */ removeMarkdownEscapes),\n/* harmony export */ \"parseHrefAndDimensions\": () => (/* binding */ parseHrefAndDimensions)\n/* harmony export */ });\n/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _iconLabels_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass MarkdownString {\r\n constructor(value = '', isTrustedOrOptions = false) {\r\n var _a, _b;\r\n this.value = value;\r\n if (typeof this.value !== 'string') {\r\n throw (0,_errors_js__WEBPACK_IMPORTED_MODULE_2__.illegalArgument)('value');\r\n }\r\n if (typeof isTrustedOrOptions === 'boolean') {\r\n this.isTrusted = isTrustedOrOptions;\r\n this.supportThemeIcons = false;\r\n }\r\n else {\r\n this.isTrusted = (_a = isTrustedOrOptions.isTrusted) !== null && _a !== void 0 ? _a : undefined;\r\n this.supportThemeIcons = (_b = isTrustedOrOptions.supportThemeIcons) !== null && _b !== void 0 ? _b : false;\r\n }\r\n }\r\n appendText(value, newlineStyle = 0 /* Paragraph */) {\r\n this.value += escapeMarkdownSyntaxTokens(this.supportThemeIcons ? (0,_iconLabels_js__WEBPACK_IMPORTED_MODULE_1__.escapeIcons)(value) : value)\r\n .replace(/([ \\t]+)/g, (_match, g1) => ' '.repeat(g1.length))\r\n .replace(/^>/gm, '\\\\>')\r\n .replace(/\\n/g, newlineStyle === 1 /* Break */ ? '\\\\\\n' : '\\n\\n');\r\n return this;\r\n }\r\n appendMarkdown(value) {\r\n this.value += value;\r\n return this;\r\n }\r\n appendCodeblock(langId, code) {\r\n this.value += '\\n```';\r\n this.value += langId;\r\n this.value += '\\n';\r\n this.value += code;\r\n this.value += '\\n```\\n';\r\n return this;\r\n }\r\n}\r\nfunction isEmptyMarkdownString(oneOrMany) {\r\n if (isMarkdownString(oneOrMany)) {\r\n return !oneOrMany.value;\r\n }\r\n else if (Array.isArray(oneOrMany)) {\r\n return oneOrMany.every(isEmptyMarkdownString);\r\n }\r\n else {\r\n return true;\r\n }\r\n}\r\nfunction isMarkdownString(thing) {\r\n if (thing instanceof MarkdownString) {\r\n return true;\r\n }\r\n else if (thing && typeof thing === 'object') {\r\n return typeof thing.value === 'string'\r\n && (typeof thing.isTrusted === 'boolean' || thing.isTrusted === undefined)\r\n && (typeof thing.supportThemeIcons === 'boolean' || thing.supportThemeIcons === undefined);\r\n }\r\n return false;\r\n}\r\nfunction markedStringsEquals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n else if (!a || !b) {\r\n return false;\r\n }\r\n else if (Array.isArray(a) && Array.isArray(b)) {\r\n return (0,_arrays_js__WEBPACK_IMPORTED_MODULE_0__.equals)(a, b, markdownStringEqual);\r\n }\r\n else if (isMarkdownString(a) && isMarkdownString(b)) {\r\n return markdownStringEqual(a, b);\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\nfunction markdownStringEqual(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n else if (!a || !b) {\r\n return false;\r\n }\r\n else {\r\n return a.value === b.value && a.isTrusted === b.isTrusted && a.supportThemeIcons === b.supportThemeIcons;\r\n }\r\n}\r\nfunction escapeMarkdownSyntaxTokens(text) {\r\n // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\r\n return text.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&');\r\n}\r\nfunction removeMarkdownEscapes(text) {\r\n if (!text) {\r\n return text;\r\n }\r\n return text.replace(/\\\\([\\\\`*_{}[\\]()#+\\-.!])/g, '$1');\r\n}\r\nfunction parseHrefAndDimensions(href) {\r\n const dimensions = [];\r\n const splitted = href.split('|').map(s => s.trim());\r\n href = splitted[0];\r\n const parameters = splitted[1];\r\n if (parameters) {\r\n const heightFromParams = /height=(\\d+)/.exec(parameters);\r\n const widthFromParams = /width=(\\d+)/.exec(parameters);\r\n const height = heightFromParams ? heightFromParams[1] : '';\r\n const width = widthFromParams ? widthFromParams[1] : '';\r\n const widthIsFinite = isFinite(parseInt(width));\r\n const heightIsFinite = isFinite(parseInt(height));\r\n if (widthIsFinite) {\r\n dimensions.push(`width=\"${width}\"`);\r\n }\r\n if (heightIsFinite) {\r\n dimensions.push(`height=\"${height}\"`);\r\n }\r\n }\r\n return { href, dimensions };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"iconStartMarker\": () => (/* binding */ iconStartMarker),\n/* harmony export */ \"escapeIcons\": () => (/* binding */ escapeIcons),\n/* harmony export */ \"markdownEscapeEscapedIcons\": () => (/* binding */ markdownEscapeEscapedIcons),\n/* harmony export */ \"stripIcons\": () => (/* binding */ stripIcons),\n/* harmony export */ \"parseLabelWithIcons\": () => (/* binding */ parseLabelWithIcons),\n/* harmony export */ \"matchesFuzzyIconAware\": () => (/* binding */ matchesFuzzyIconAware)\n/* harmony export */ });\n/* harmony import */ var _codicons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _filters_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst iconStartMarker = '$(';\r\nconst iconsRegex = new RegExp(`\\\\$\\\\(${_codicons_js__WEBPACK_IMPORTED_MODULE_0__.CSSIcon.iconNameExpression}(?:${_codicons_js__WEBPACK_IMPORTED_MODULE_0__.CSSIcon.iconModifierExpression})?\\\\)`, 'g'); // no capturing groups\r\nconst escapeIconsRegex = new RegExp(`(\\\\\\\\)?${iconsRegex.source}`, 'g');\r\nfunction escapeIcons(text) {\r\n return text.replace(escapeIconsRegex, (match, escaped) => escaped ? match : `\\\\${match}`);\r\n}\r\nconst markdownEscapedIconsRegex = new RegExp(`\\\\\\\\${iconsRegex.source}`, 'g');\r\nfunction markdownEscapeEscapedIcons(text) {\r\n // Need to add an extra \\ for escaping in markdown\r\n return text.replace(markdownEscapedIconsRegex, match => `\\\\${match}`);\r\n}\r\nconst stripIconsRegex = new RegExp(`(\\\\s)?(\\\\\\\\)?${iconsRegex.source}(\\\\s)?`, 'g');\r\nfunction stripIcons(text) {\r\n if (text.indexOf(iconStartMarker) === -1) {\r\n return text;\r\n }\r\n return text.replace(stripIconsRegex, (match, preWhitespace, escaped, postWhitespace) => escaped ? match : preWhitespace || postWhitespace || '');\r\n}\r\nfunction parseLabelWithIcons(text) {\r\n const firstIconIndex = text.indexOf(iconStartMarker);\r\n if (firstIconIndex === -1) {\r\n return { text }; // return early if the word does not include an icon\r\n }\r\n return doParseLabelWithIcons(text, firstIconIndex);\r\n}\r\nfunction doParseLabelWithIcons(text, firstIconIndex) {\r\n const iconOffsets = [];\r\n let textWithoutIcons = '';\r\n function appendChars(chars) {\r\n if (chars) {\r\n textWithoutIcons += chars;\r\n for (const _ of chars) {\r\n iconOffsets.push(iconsOffset); // make sure to fill in icon offsets\r\n }\r\n }\r\n }\r\n let currentIconStart = -1;\r\n let currentIconValue = '';\r\n let iconsOffset = 0;\r\n let char;\r\n let nextChar;\r\n let offset = firstIconIndex;\r\n const length = text.length;\r\n // Append all characters until the first icon\r\n appendChars(text.substr(0, firstIconIndex));\r\n // example: $(file-symlink-file) my cool $(other-icon) entry\r\n while (offset < length) {\r\n char = text[offset];\r\n nextChar = text[offset + 1];\r\n // beginning of icon: some value $( <--\r\n if (char === iconStartMarker[0] && nextChar === iconStartMarker[1]) {\r\n currentIconStart = offset;\r\n // if we had a previous potential icon value without\r\n // the closing ')', it was actually not an icon and\r\n // so we have to add it to the actual value\r\n appendChars(currentIconValue);\r\n currentIconValue = iconStartMarker;\r\n offset++; // jump over '('\r\n }\r\n // end of icon: some value $(some-icon) <--\r\n else if (char === ')' && currentIconStart !== -1) {\r\n const currentIconLength = offset - currentIconStart + 1; // +1 to include the closing ')'\r\n iconsOffset += currentIconLength;\r\n currentIconStart = -1;\r\n currentIconValue = '';\r\n }\r\n // within icon\r\n else if (currentIconStart !== -1) {\r\n // Make sure this is a real icon name\r\n if (/^[a-z0-9\\-]$/i.test(char)) {\r\n currentIconValue += char;\r\n }\r\n else {\r\n // This is not a real icon, treat it as text\r\n appendChars(currentIconValue);\r\n currentIconStart = -1;\r\n currentIconValue = '';\r\n }\r\n }\r\n // any value outside of icon\r\n else {\r\n appendChars(char);\r\n }\r\n offset++;\r\n }\r\n // if we had a previous potential icon value without\r\n // the closing ')', it was actually not an icon and\r\n // so we have to add it to the actual value\r\n appendChars(currentIconValue);\r\n return { text: textWithoutIcons, iconOffsets };\r\n}\r\nfunction matchesFuzzyIconAware(query, target, enableSeparateSubstringMatching = false) {\r\n const { text, iconOffsets } = target;\r\n // Return early if there are no icon markers in the word to match against\r\n if (!iconOffsets || iconOffsets.length === 0) {\r\n return (0,_filters_js__WEBPACK_IMPORTED_MODULE_1__.matchesFuzzy)(query, text, enableSeparateSubstringMatching);\r\n }\r\n // Trim the word to match against because it could have leading\r\n // whitespace now if the word started with an icon\r\n const wordToMatchAgainstWithoutIconsTrimmed = (0,_strings_js__WEBPACK_IMPORTED_MODULE_2__.ltrim)(text, ' ');\r\n const leadingWhitespaceOffset = text.length - wordToMatchAgainstWithoutIconsTrimmed.length;\r\n // match on value without icon\r\n const matches = (0,_filters_js__WEBPACK_IMPORTED_MODULE_1__.matchesFuzzy)(query, wordToMatchAgainstWithoutIconsTrimmed, enableSeparateSubstringMatching);\r\n // Map matches back to offsets with icon and trimming\r\n if (matches) {\r\n for (const match of matches) {\r\n const iconOffset = iconOffsets[match.start + leadingWhitespaceOffset] /* icon offsets at index */ + leadingWhitespaceOffset /* overall leading whitespace offset */;\r\n match.start += iconOffset;\r\n match.end += iconOffset;\r\n }\r\n }\r\n return matches;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IdGenerator\": () => (/* binding */ IdGenerator),\n/* harmony export */ \"defaultGenerator\": () => (/* binding */ defaultGenerator)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass IdGenerator {\r\n constructor(prefix) {\r\n this._prefix = prefix;\r\n this._lastId = 0;\r\n }\r\n nextId() {\r\n return this._prefix + (++this._lastId);\r\n }\r\n}\r\nconst defaultGenerator = new IdGenerator('id#');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"insane\": () => (/* binding */ insane)\n/* harmony export */ });\n/*\nThe MIT License (MIT)\n\nCopyright © 2015 Nicolas Bevacqua\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nlet __insane_func;\n\n(function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = undefined; if (!f && c) return require(i, !0); if (u) return u(i, !0); var a = new Error(\"Cannot find module '\" + i + \"'\"); throw a.code = \"MODULE_NOT_FOUND\", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = undefined, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({\n\t1: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar toMap = require('./toMap');\n\t\tvar uris = ['background', 'base', 'cite', 'href', 'longdesc', 'src', 'usemap'];\n\n\t\tmodule.exports = {\n\t\t\turis: toMap(uris) // attributes that have an href and hence need to be sanitized\n\t\t};\n\n\t}, { \"./toMap\": 10 }], 2: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar defaults = {\n\t\t\tallowedAttributes: {\n\t\t\t\t'*': ['title', 'accesskey'],\n\t\t\t\ta: ['href', 'name', 'target', 'aria-label'],\n\t\t\t\tiframe: ['allowfullscreen', 'frameborder', 'src'],\n\t\t\t\timg: ['src', 'alt', 'title', 'aria-label']\n\t\t\t},\n\t\t\tallowedClasses: {},\n\t\t\tallowedSchemes: ['http', 'https', 'mailto'],\n\t\t\tallowedTags: [\n\t\t\t\t'a', 'abbr', 'article', 'b', 'blockquote', 'br', 'caption', 'code', 'del', 'details', 'div', 'em',\n\t\t\t\t'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'main', 'mark',\n\t\t\t\t'ol', 'p', 'pre', 'section', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table',\n\t\t\t\t'tbody', 'td', 'th', 'thead', 'tr', 'u', 'ul'\n\t\t\t],\n\t\t\tfilter: null\n\t\t};\n\n\t\tmodule.exports = defaults;\n\n\t}, {}], 3: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar toMap = require('./toMap');\n\t\tvar voids = ['area', 'br', 'col', 'hr', 'img', 'wbr', 'input', 'base', 'basefont', 'link', 'meta'];\n\n\t\tmodule.exports = {\n\t\t\tvoids: toMap(voids)\n\t\t};\n\n\t}, { \"./toMap\": 10 }], 4: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar assign = require('assignment');\n\t\tvar parser = require('./parser');\n\t\tvar sanitizer = require('./sanitizer');\n\t\tvar defaults = require('./defaults');\n\n\t\tfunction insane(html, options, strict) {\n\t\t\tvar buffer = [];\n\t\t\tvar configuration = strict === true ? options : assign({}, defaults, options);\n\t\t\tvar handler = sanitizer(buffer, configuration);\n\n\t\t\tparser(html, handler);\n\n\t\t\treturn buffer.join('');\n\t\t}\n\n\t\tinsane.defaults = defaults;\n\t\tmodule.exports = insane;\n\t\t__insane_func = insane;\n\n\t}, { \"./defaults\": 2, \"./parser\": 7, \"./sanitizer\": 8, \"assignment\": 6, \"he\": 9 }], 5: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tmodule.exports = function lowercase(string) {\n\t\t\treturn typeof string === 'string' ? string.toLowerCase() : string;\n\t\t};\n\n\t}, {}], 6: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tfunction assignment(result) {\n\t\t\tvar stack = Array.prototype.slice.call(arguments, 1);\n\t\t\tvar item;\n\t\t\tvar key;\n\t\t\twhile (stack.length) {\n\t\t\t\titem = stack.shift();\n\t\t\t\tfor (key in item) {\n\t\t\t\t\tif (item.hasOwnProperty(key)) {\n\t\t\t\t\t\tif (Object.prototype.toString.call(result[key]) === '[object Object]') {\n\t\t\t\t\t\t\tresult[key] = assignment(result[key], item[key]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult[key] = item[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\tmodule.exports = assignment;\n\n\t}, {}], 7: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar lowercase = require('./lowercase');\n\t\tvar attributes = require('./attributes');\n\t\tvar elements = require('./elements');\n\t\tvar rstart = /^<\\s*([\\w:-]+)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*>/;\n\t\tvar rend = /^<\\s*\\/\\s*([\\w:-]+)[^>]*>/;\n\t\tvar rattrs = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g;\n\t\tvar rtag = /^</;\n\t\tvar rtagend = /^<\\s*\\//;\n\n\t\tfunction createStack() {\n\t\t\tvar stack = [];\n\t\t\tstack.lastItem = function lastItem() {\n\t\t\t\treturn stack[stack.length - 1];\n\t\t\t};\n\t\t\treturn stack;\n\t\t}\n\n\t\tfunction parser(html, handler) {\n\t\t\tvar stack = createStack();\n\t\t\tvar last = html;\n\t\t\tvar chars;\n\n\t\t\twhile (html) {\n\t\t\t\tparsePart();\n\t\t\t}\n\t\t\tparseEndTag(); // clean up any remaining tags\n\n\t\t\tfunction parsePart() {\n\t\t\t\tchars = true;\n\t\t\t\tparseTag();\n\n\t\t\t\tvar same = html === last;\n\t\t\t\tlast = html;\n\n\t\t\t\tif (same) { // discard, because it's invalid\n\t\t\t\t\thtml = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseTag() {\n\t\t\t\tif (html.substr(0, 4) === '<!--') { // comments\n\t\t\t\t\tparseComment();\n\t\t\t\t} else if (rtagend.test(html)) {\n\t\t\t\t\tparseEdge(rend, parseEndTag);\n\t\t\t\t} else if (rtag.test(html)) {\n\t\t\t\t\tparseEdge(rstart, parseStartTag);\n\t\t\t\t}\n\t\t\t\tparseTagDecode();\n\t\t\t}\n\n\t\t\tfunction parseEdge(regex, parser) {\n\t\t\t\tvar match = html.match(regex);\n\t\t\t\tif (match) {\n\t\t\t\t\thtml = html.substring(match[0].length);\n\t\t\t\t\tmatch[0].replace(regex, parser);\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseComment() {\n\t\t\t\tvar index = html.indexOf('-->');\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tif (handler.comment) {\n\t\t\t\t\t\thandler.comment(html.substring(4, index));\n\t\t\t\t\t}\n\t\t\t\t\thtml = html.substring(index + 3);\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseTagDecode() {\n\t\t\t\tif (!chars) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar text;\n\t\t\t\tvar index = html.indexOf('<');\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\ttext = html.substring(0, index);\n\t\t\t\t\thtml = html.substring(index);\n\t\t\t\t} else {\n\t\t\t\t\ttext = html;\n\t\t\t\t\thtml = '';\n\t\t\t\t}\n\t\t\t\tif (handler.chars) {\n\t\t\t\t\thandler.chars(text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseStartTag(tag, tagName, rest, unary) {\n\t\t\t\tvar attrs = {};\n\t\t\t\tvar low = lowercase(tagName);\n\t\t\t\tvar u = elements.voids[low] || !!unary;\n\n\t\t\t\trest.replace(rattrs, attrReplacer);\n\n\t\t\t\tif (!u) {\n\t\t\t\t\tstack.push(low);\n\t\t\t\t}\n\t\t\t\tif (handler.start) {\n\t\t\t\t\thandler.start(low, attrs, u);\n\t\t\t\t}\n\n\t\t\t\tfunction attrReplacer(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n\t\t\t\t\tif (doubleQuotedValue === void 0 && singleQuotedValue === void 0 && unquotedValue === void 0) {\n\t\t\t\t\t\tattrs[name] = void 0; // attribute is like <button disabled></button>\n\t\t\t\t\t} else {\n\t\t\t\t\t\tattrs[name] = he.decode(doubleQuotedValue || singleQuotedValue || unquotedValue || '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseEndTag(tag, tagName) {\n\t\t\t\tvar i;\n\t\t\t\tvar pos = 0;\n\t\t\t\tvar low = lowercase(tagName);\n\t\t\t\tif (low) {\n\t\t\t\t\tfor (pos = stack.length - 1; pos >= 0; pos--) {\n\t\t\t\t\t\tif (stack[pos] === low) {\n\t\t\t\t\t\t\tbreak; // find the closest opened tag of the same type\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (pos >= 0) {\n\t\t\t\t\tfor (i = stack.length - 1; i >= pos; i--) {\n\t\t\t\t\t\tif (handler.end) { // close all the open elements, up the stack\n\t\t\t\t\t\t\thandler.end(stack[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstack.length = pos;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmodule.exports = parser;\n\n\t}, { \"./attributes\": 1, \"./elements\": 3, \"./lowercase\": 5, \"he\": 9 }], 8: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar lowercase = require('./lowercase');\n\t\tvar attributes = require('./attributes');\n\t\tvar elements = require('./elements');\n\n\t\tfunction sanitizer(buffer, options) {\n\t\t\tvar last;\n\t\t\tvar context;\n\t\t\tvar o = options || {};\n\n\t\t\treset();\n\n\t\t\treturn {\n\t\t\t\tstart: start,\n\t\t\t\tend: end,\n\t\t\t\tchars: chars\n\t\t\t};\n\n\t\t\tfunction out(value) {\n\t\t\t\tbuffer.push(value);\n\t\t\t}\n\n\t\t\tfunction start(tag, attrs, unary) {\n\t\t\t\tvar low = lowercase(tag);\n\n\t\t\t\tif (context.ignoring) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\t\t\t\tif ((o.allowedTags || []).indexOf(low) === -1) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\t\t\t\tif (o.filter && !o.filter({ tag: low, attrs: attrs })) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\n\t\t\t\tout('<');\n\t\t\t\tout(low);\n\t\t\t\tObject.keys(attrs).forEach(parse);\n\t\t\t\tout(unary ? '/>' : '>');\n\n\t\t\t\tfunction parse(key) {\n\t\t\t\t\tvar value = attrs[key];\n\t\t\t\t\tvar classesOk = (o.allowedClasses || {})[low] || [];\n\t\t\t\t\tvar attrsOk = (o.allowedAttributes || {})[low] || [];\n\t\t\t\t\tattrsOk = attrsOk.concat((o.allowedAttributes || {})['*'] || []);\n\t\t\t\t\tvar valid;\n\t\t\t\t\tvar lkey = lowercase(key);\n\t\t\t\t\tif (lkey === 'class' && attrsOk.indexOf(lkey) === -1) {\n\t\t\t\t\t\tvalue = value.split(' ').filter(isValidClass).join(' ').trim();\n\t\t\t\t\t\tvalid = value.length;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalid = attrsOk.indexOf(lkey) !== -1 && (attributes.uris[lkey] !== true || testUrl(value));\n\t\t\t\t\t}\n\t\t\t\t\tif (valid) {\n\t\t\t\t\t\tout(' ');\n\t\t\t\t\t\tout(key);\n\t\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\t\tout('=\"');\n\t\t\t\t\t\t\tout(he.encode(value));\n\t\t\t\t\t\t\tout('\"');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction isValidClass(className) {\n\t\t\t\t\t\treturn classesOk && classesOk.indexOf(className) !== -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction end(tag) {\n\t\t\t\tvar low = lowercase(tag);\n\t\t\t\tvar allowed = (o.allowedTags || []).indexOf(low) !== -1;\n\t\t\t\tif (allowed) {\n\t\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\t\tout('</');\n\t\t\t\t\t\tout(low);\n\t\t\t\t\t\tout('>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunignore(low);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunignore(low);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction testUrl(text) {\n\t\t\t\tvar start = text[0];\n\t\t\t\tif (start === '#' || start === '/') {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar colon = text.indexOf(':');\n\t\t\t\tif (colon === -1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar questionmark = text.indexOf('?');\n\t\t\t\tif (questionmark !== -1 && colon > questionmark) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar hash = text.indexOf('#');\n\t\t\t\tif (hash !== -1 && colon > hash) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn o.allowedSchemes.some(matches);\n\n\t\t\t\tfunction matches(scheme) {\n\t\t\t\t\treturn text.indexOf(scheme + ':') === 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction chars(text) {\n\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\tout(o.transformText ? o.transformText(text) : text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction ignore(tag) {\n\t\t\t\tif (elements.voids[tag]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\tcontext = { ignoring: tag, depth: 1 };\n\t\t\t\t} else if (context.ignoring === tag) {\n\t\t\t\t\tcontext.depth++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction unignore(tag) {\n\t\t\t\tif (context.ignoring === tag) {\n\t\t\t\t\tif (--context.depth <= 0) {\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reset() {\n\t\t\t\tcontext = { ignoring: false, depth: 0 };\n\t\t\t}\n\t\t}\n\n\t\tmodule.exports = sanitizer;\n\n\t}, { \"./attributes\": 1, \"./elements\": 3, \"./lowercase\": 5, \"he\": 9 }], 9: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar escapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'\"': '"',\n\t\t\t\"'\": '''\n\t\t};\n\t\tvar unescapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'"': '\"',\n\t\t\t''': \"'\"\n\t\t};\n\t\tvar rescaped = /(&|<|>|"|')/g;\n\t\tvar runescaped = /[&<>\"']/g;\n\n\t\tfunction escapeHtmlChar(match) {\n\t\t\treturn escapes[match];\n\t\t}\n\t\tfunction unescapeHtmlChar(match) {\n\t\t\treturn unescapes[match];\n\t\t}\n\n\t\tfunction escapeHtml(text) {\n\t\t\treturn text == null ? '' : String(text).replace(runescaped, escapeHtmlChar);\n\t\t}\n\n\t\tfunction unescapeHtml(html) {\n\t\t\treturn html == null ? '' : String(html).replace(rescaped, unescapeHtmlChar);\n\t\t}\n\n\t\tescapeHtml.options = unescapeHtml.options = {};\n\n\t\tmodule.exports = {\n\t\t\tencode: escapeHtml,\n\t\t\tescape: escapeHtml,\n\t\t\tdecode: unescapeHtml,\n\t\t\tunescape: unescapeHtml,\n\t\t\tversion: '1.0.0-browser'\n\t\t};\n\n\t}, {}], 10: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tfunction toMap(list) {\n\t\t\treturn list.reduce(asKey, {});\n\t\t}\n\n\t\tfunction asKey(accumulator, item) {\n\t\t\taccumulator[item] = true;\n\t\t\treturn accumulator;\n\t\t}\n\n\t\tmodule.exports = toMap;\n\n\t}, {}]\n}, {}, [4]);\n\n// ESM-comment-begin\n// define(function() { return { insane: __insane_func }; });\n// ESM-comment-end\n\n// ESM-uncomment-begin\nvar insane = __insane_func;\n// ESM-uncomment-end\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/iterator.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Iterable\": () => (/* binding */ Iterable)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar Iterable;\r\n(function (Iterable) {\r\n function is(thing) {\r\n return thing && typeof thing === 'object' && typeof thing[Symbol.iterator] === 'function';\r\n }\r\n Iterable.is = is;\r\n const _empty = Object.freeze([]);\r\n function empty() {\r\n return _empty;\r\n }\r\n Iterable.empty = empty;\r\n function* single(element) {\r\n yield element;\r\n }\r\n Iterable.single = single;\r\n function from(iterable) {\r\n return iterable || _empty;\r\n }\r\n Iterable.from = from;\r\n function isEmpty(iterable) {\r\n return !iterable || iterable[Symbol.iterator]().next().done === true;\r\n }\r\n Iterable.isEmpty = isEmpty;\r\n function first(iterable) {\r\n return iterable[Symbol.iterator]().next().value;\r\n }\r\n Iterable.first = first;\r\n function some(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n Iterable.some = some;\r\n function find(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n return element;\r\n }\r\n }\r\n return undefined;\r\n }\r\n Iterable.find = find;\r\n function* filter(iterable, predicate) {\r\n for (const element of iterable) {\r\n if (predicate(element)) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.filter = filter;\r\n function* map(iterable, fn) {\r\n for (const element of iterable) {\r\n yield fn(element);\r\n }\r\n }\r\n Iterable.map = map;\r\n function* concat(...iterables) {\r\n for (const iterable of iterables) {\r\n for (const element of iterable) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.concat = concat;\r\n function* concatNested(iterables) {\r\n for (const iterable of iterables) {\r\n for (const element of iterable) {\r\n yield element;\r\n }\r\n }\r\n }\r\n Iterable.concatNested = concatNested;\r\n function reduce(iterable, reducer, initialValue) {\r\n let value = initialValue;\r\n for (const element of iterable) {\r\n value = reducer(value, element);\r\n }\r\n return value;\r\n }\r\n Iterable.reduce = reduce;\r\n /**\r\n * Returns an iterable slice of the array, with the same semantics as `array.slice()`.\r\n */\r\n function* slice(arr, from, to = arr.length) {\r\n if (from < 0) {\r\n from += arr.length;\r\n }\r\n if (to < 0) {\r\n to += arr.length;\r\n }\r\n else if (to > arr.length) {\r\n to = arr.length;\r\n }\r\n for (; from < to; from++) {\r\n yield arr[from];\r\n }\r\n }\r\n Iterable.slice = slice;\r\n /**\r\n * Consumes `atMost` elements from iterable and returns the consumed elements,\r\n * and an iterable for the rest of the elements.\r\n */\r\n function consume(iterable, atMost = Number.POSITIVE_INFINITY) {\r\n const consumed = [];\r\n if (atMost === 0) {\r\n return [consumed, iterable];\r\n }\r\n const iterator = iterable[Symbol.iterator]();\r\n for (let i = 0; i < atMost; i++) {\r\n const next = iterator.next();\r\n if (next.done) {\r\n return [consumed, Iterable.empty()];\r\n }\r\n consumed.push(next.value);\r\n }\r\n return [consumed, { [Symbol.iterator]() { return iterator; } }];\r\n }\r\n Iterable.consume = consume;\r\n /**\r\n * Returns whether the iterables are the same length and all items are\r\n * equal using the comparator function.\r\n */\r\n function equals(a, b, comparator = (at, bt) => at === bt) {\r\n const ai = a[Symbol.iterator]();\r\n const bi = b[Symbol.iterator]();\r\n while (true) {\r\n const an = ai.next();\r\n const bn = bi.next();\r\n if (an.done !== bn.done) {\r\n return false;\r\n }\r\n else if (an.done) {\r\n return true;\r\n }\r\n else if (!comparator(an.value, bn.value)) {\r\n return false;\r\n }\r\n }\r\n }\r\n Iterable.equals = equals;\r\n})(Iterable || (Iterable = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/iterator.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KeyCodeUtils\": () => (/* binding */ KeyCodeUtils),\n/* harmony export */ \"KeyChord\": () => (/* binding */ KeyChord),\n/* harmony export */ \"createKeybinding\": () => (/* binding */ createKeybinding),\n/* harmony export */ \"createSimpleKeybinding\": () => (/* binding */ createSimpleKeybinding),\n/* harmony export */ \"SimpleKeybinding\": () => (/* binding */ SimpleKeybinding),\n/* harmony export */ \"ChordKeybinding\": () => (/* binding */ ChordKeybinding),\n/* harmony export */ \"ResolvedKeybindingPart\": () => (/* binding */ ResolvedKeybindingPart),\n/* harmony export */ \"ResolvedKeybinding\": () => (/* binding */ ResolvedKeybinding)\n/* harmony export */ });\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass KeyCodeStrMap {\r\n constructor() {\r\n this._keyCodeToStr = [];\r\n this._strToKeyCode = Object.create(null);\r\n }\r\n define(keyCode, str) {\r\n this._keyCodeToStr[keyCode] = str;\r\n this._strToKeyCode[str.toLowerCase()] = keyCode;\r\n }\r\n keyCodeToStr(keyCode) {\r\n return this._keyCodeToStr[keyCode];\r\n }\r\n strToKeyCode(str) {\r\n return this._strToKeyCode[str.toLowerCase()] || 0 /* Unknown */;\r\n }\r\n}\r\nconst uiMap = new KeyCodeStrMap();\r\nconst userSettingsUSMap = new KeyCodeStrMap();\r\nconst userSettingsGeneralMap = new KeyCodeStrMap();\r\n(function () {\r\n function define(keyCode, uiLabel, usUserSettingsLabel = uiLabel, generalUserSettingsLabel = usUserSettingsLabel) {\r\n uiMap.define(keyCode, uiLabel);\r\n userSettingsUSMap.define(keyCode, usUserSettingsLabel);\r\n userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel);\r\n }\r\n define(0 /* Unknown */, 'unknown');\r\n define(1 /* Backspace */, 'Backspace');\r\n define(2 /* Tab */, 'Tab');\r\n define(3 /* Enter */, 'Enter');\r\n define(4 /* Shift */, 'Shift');\r\n define(5 /* Ctrl */, 'Ctrl');\r\n define(6 /* Alt */, 'Alt');\r\n define(7 /* PauseBreak */, 'PauseBreak');\r\n define(8 /* CapsLock */, 'CapsLock');\r\n define(9 /* Escape */, 'Escape');\r\n define(10 /* Space */, 'Space');\r\n define(11 /* PageUp */, 'PageUp');\r\n define(12 /* PageDown */, 'PageDown');\r\n define(13 /* End */, 'End');\r\n define(14 /* Home */, 'Home');\r\n define(15 /* LeftArrow */, 'LeftArrow', 'Left');\r\n define(16 /* UpArrow */, 'UpArrow', 'Up');\r\n define(17 /* RightArrow */, 'RightArrow', 'Right');\r\n define(18 /* DownArrow */, 'DownArrow', 'Down');\r\n define(19 /* Insert */, 'Insert');\r\n define(20 /* Delete */, 'Delete');\r\n define(21 /* KEY_0 */, '0');\r\n define(22 /* KEY_1 */, '1');\r\n define(23 /* KEY_2 */, '2');\r\n define(24 /* KEY_3 */, '3');\r\n define(25 /* KEY_4 */, '4');\r\n define(26 /* KEY_5 */, '5');\r\n define(27 /* KEY_6 */, '6');\r\n define(28 /* KEY_7 */, '7');\r\n define(29 /* KEY_8 */, '8');\r\n define(30 /* KEY_9 */, '9');\r\n define(31 /* KEY_A */, 'A');\r\n define(32 /* KEY_B */, 'B');\r\n define(33 /* KEY_C */, 'C');\r\n define(34 /* KEY_D */, 'D');\r\n define(35 /* KEY_E */, 'E');\r\n define(36 /* KEY_F */, 'F');\r\n define(37 /* KEY_G */, 'G');\r\n define(38 /* KEY_H */, 'H');\r\n define(39 /* KEY_I */, 'I');\r\n define(40 /* KEY_J */, 'J');\r\n define(41 /* KEY_K */, 'K');\r\n define(42 /* KEY_L */, 'L');\r\n define(43 /* KEY_M */, 'M');\r\n define(44 /* KEY_N */, 'N');\r\n define(45 /* KEY_O */, 'O');\r\n define(46 /* KEY_P */, 'P');\r\n define(47 /* KEY_Q */, 'Q');\r\n define(48 /* KEY_R */, 'R');\r\n define(49 /* KEY_S */, 'S');\r\n define(50 /* KEY_T */, 'T');\r\n define(51 /* KEY_U */, 'U');\r\n define(52 /* KEY_V */, 'V');\r\n define(53 /* KEY_W */, 'W');\r\n define(54 /* KEY_X */, 'X');\r\n define(55 /* KEY_Y */, 'Y');\r\n define(56 /* KEY_Z */, 'Z');\r\n define(57 /* Meta */, 'Meta');\r\n define(58 /* ContextMenu */, 'ContextMenu');\r\n define(59 /* F1 */, 'F1');\r\n define(60 /* F2 */, 'F2');\r\n define(61 /* F3 */, 'F3');\r\n define(62 /* F4 */, 'F4');\r\n define(63 /* F5 */, 'F5');\r\n define(64 /* F6 */, 'F6');\r\n define(65 /* F7 */, 'F7');\r\n define(66 /* F8 */, 'F8');\r\n define(67 /* F9 */, 'F9');\r\n define(68 /* F10 */, 'F10');\r\n define(69 /* F11 */, 'F11');\r\n define(70 /* F12 */, 'F12');\r\n define(71 /* F13 */, 'F13');\r\n define(72 /* F14 */, 'F14');\r\n define(73 /* F15 */, 'F15');\r\n define(74 /* F16 */, 'F16');\r\n define(75 /* F17 */, 'F17');\r\n define(76 /* F18 */, 'F18');\r\n define(77 /* F19 */, 'F19');\r\n define(78 /* NumLock */, 'NumLock');\r\n define(79 /* ScrollLock */, 'ScrollLock');\r\n define(80 /* US_SEMICOLON */, ';', ';', 'OEM_1');\r\n define(81 /* US_EQUAL */, '=', '=', 'OEM_PLUS');\r\n define(82 /* US_COMMA */, ',', ',', 'OEM_COMMA');\r\n define(83 /* US_MINUS */, '-', '-', 'OEM_MINUS');\r\n define(84 /* US_DOT */, '.', '.', 'OEM_PERIOD');\r\n define(85 /* US_SLASH */, '/', '/', 'OEM_2');\r\n define(86 /* US_BACKTICK */, '`', '`', 'OEM_3');\r\n define(110 /* ABNT_C1 */, 'ABNT_C1');\r\n define(111 /* ABNT_C2 */, 'ABNT_C2');\r\n define(87 /* US_OPEN_SQUARE_BRACKET */, '[', '[', 'OEM_4');\r\n define(88 /* US_BACKSLASH */, '\\\\', '\\\\', 'OEM_5');\r\n define(89 /* US_CLOSE_SQUARE_BRACKET */, ']', ']', 'OEM_6');\r\n define(90 /* US_QUOTE */, '\\'', '\\'', 'OEM_7');\r\n define(91 /* OEM_8 */, 'OEM_8');\r\n define(92 /* OEM_102 */, 'OEM_102');\r\n define(93 /* NUMPAD_0 */, 'NumPad0');\r\n define(94 /* NUMPAD_1 */, 'NumPad1');\r\n define(95 /* NUMPAD_2 */, 'NumPad2');\r\n define(96 /* NUMPAD_3 */, 'NumPad3');\r\n define(97 /* NUMPAD_4 */, 'NumPad4');\r\n define(98 /* NUMPAD_5 */, 'NumPad5');\r\n define(99 /* NUMPAD_6 */, 'NumPad6');\r\n define(100 /* NUMPAD_7 */, 'NumPad7');\r\n define(101 /* NUMPAD_8 */, 'NumPad8');\r\n define(102 /* NUMPAD_9 */, 'NumPad9');\r\n define(103 /* NUMPAD_MULTIPLY */, 'NumPad_Multiply');\r\n define(104 /* NUMPAD_ADD */, 'NumPad_Add');\r\n define(105 /* NUMPAD_SEPARATOR */, 'NumPad_Separator');\r\n define(106 /* NUMPAD_SUBTRACT */, 'NumPad_Subtract');\r\n define(107 /* NUMPAD_DECIMAL */, 'NumPad_Decimal');\r\n define(108 /* NUMPAD_DIVIDE */, 'NumPad_Divide');\r\n})();\r\nvar KeyCodeUtils;\r\n(function (KeyCodeUtils) {\r\n function toString(keyCode) {\r\n return uiMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toString = toString;\r\n function fromString(key) {\r\n return uiMap.strToKeyCode(key);\r\n }\r\n KeyCodeUtils.fromString = fromString;\r\n function toUserSettingsUS(keyCode) {\r\n return userSettingsUSMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toUserSettingsUS = toUserSettingsUS;\r\n function toUserSettingsGeneral(keyCode) {\r\n return userSettingsGeneralMap.keyCodeToStr(keyCode);\r\n }\r\n KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral;\r\n function fromUserSettings(key) {\r\n return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key);\r\n }\r\n KeyCodeUtils.fromUserSettings = fromUserSettings;\r\n})(KeyCodeUtils || (KeyCodeUtils = {}));\r\nfunction KeyChord(firstPart, secondPart) {\r\n const chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0;\r\n return (firstPart | chordPart) >>> 0;\r\n}\r\nfunction createKeybinding(keybinding, OS) {\r\n if (keybinding === 0) {\r\n return null;\r\n }\r\n const firstPart = (keybinding & 0x0000FFFF) >>> 0;\r\n const chordPart = (keybinding & 0xFFFF0000) >>> 16;\r\n if (chordPart !== 0) {\r\n return new ChordKeybinding([\r\n createSimpleKeybinding(firstPart, OS),\r\n createSimpleKeybinding(chordPart, OS)\r\n ]);\r\n }\r\n return new ChordKeybinding([createSimpleKeybinding(firstPart, OS)]);\r\n}\r\nfunction createSimpleKeybinding(keybinding, OS) {\r\n const ctrlCmd = (keybinding & 2048 /* CtrlCmd */ ? true : false);\r\n const winCtrl = (keybinding & 256 /* WinCtrl */ ? true : false);\r\n const ctrlKey = (OS === 2 /* Macintosh */ ? winCtrl : ctrlCmd);\r\n const shiftKey = (keybinding & 1024 /* Shift */ ? true : false);\r\n const altKey = (keybinding & 512 /* Alt */ ? true : false);\r\n const metaKey = (OS === 2 /* Macintosh */ ? ctrlCmd : winCtrl);\r\n const keyCode = (keybinding & 255 /* KeyCode */);\r\n return new SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode);\r\n}\r\nclass SimpleKeybinding {\r\n constructor(ctrlKey, shiftKey, altKey, metaKey, keyCode) {\r\n this.ctrlKey = ctrlKey;\r\n this.shiftKey = shiftKey;\r\n this.altKey = altKey;\r\n this.metaKey = metaKey;\r\n this.keyCode = keyCode;\r\n }\r\n equals(other) {\r\n return (this.ctrlKey === other.ctrlKey\r\n && this.shiftKey === other.shiftKey\r\n && this.altKey === other.altKey\r\n && this.metaKey === other.metaKey\r\n && this.keyCode === other.keyCode);\r\n }\r\n isModifierKey() {\r\n return (this.keyCode === 0 /* Unknown */\r\n || this.keyCode === 5 /* Ctrl */\r\n || this.keyCode === 57 /* Meta */\r\n || this.keyCode === 6 /* Alt */\r\n || this.keyCode === 4 /* Shift */);\r\n }\r\n toChord() {\r\n return new ChordKeybinding([this]);\r\n }\r\n /**\r\n * Does this keybinding refer to the key code of a modifier and it also has the modifier flag?\r\n */\r\n isDuplicateModifierCase() {\r\n return ((this.ctrlKey && this.keyCode === 5 /* Ctrl */)\r\n || (this.shiftKey && this.keyCode === 4 /* Shift */)\r\n || (this.altKey && this.keyCode === 6 /* Alt */)\r\n || (this.metaKey && this.keyCode === 57 /* Meta */));\r\n }\r\n}\r\nclass ChordKeybinding {\r\n constructor(parts) {\r\n if (parts.length === 0) {\r\n throw (0,_errors_js__WEBPACK_IMPORTED_MODULE_0__.illegalArgument)(`parts`);\r\n }\r\n this.parts = parts;\r\n }\r\n}\r\nclass ResolvedKeybindingPart {\r\n constructor(ctrlKey, shiftKey, altKey, metaKey, kbLabel, kbAriaLabel) {\r\n this.ctrlKey = ctrlKey;\r\n this.shiftKey = shiftKey;\r\n this.altKey = altKey;\r\n this.metaKey = metaKey;\r\n this.keyLabel = kbLabel;\r\n this.keyAriaLabel = kbAriaLabel;\r\n }\r\n}\r\n/**\r\n * A resolved keybinding. Can be a simple keybinding or a chord keybinding.\r\n */\r\nclass ResolvedKeybinding {\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModifierLabelProvider\": () => (/* binding */ ModifierLabelProvider),\n/* harmony export */ \"UILabelProvider\": () => (/* binding */ UILabelProvider),\n/* harmony export */ \"AriaLabelProvider\": () => (/* binding */ AriaLabelProvider)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ModifierLabelProvider {\r\n constructor(mac, windows, linux = windows) {\r\n this.modifierLabels = [null]; // index 0 will never me accessed.\r\n this.modifierLabels[2 /* Macintosh */] = mac;\r\n this.modifierLabels[1 /* Windows */] = windows;\r\n this.modifierLabels[3 /* Linux */] = linux;\r\n }\r\n toLabel(OS, parts, keyLabelProvider) {\r\n if (parts.length === 0) {\r\n return null;\r\n }\r\n const result = [];\r\n for (let i = 0, len = parts.length; i < len; i++) {\r\n const part = parts[i];\r\n const keyLabel = keyLabelProvider(part);\r\n if (keyLabel === null) {\r\n // this keybinding cannot be expressed...\r\n return null;\r\n }\r\n result[i] = _simpleAsString(part, keyLabel, this.modifierLabels[OS]);\r\n }\r\n return result.join(' ');\r\n }\r\n}\r\n/**\r\n * A label provider that prints modifiers in a suitable format for displaying in the UI.\r\n */\r\nconst UILabelProvider = new ModifierLabelProvider({\r\n ctrlKey: '⌃',\r\n shiftKey: '⇧',\r\n altKey: '⌥',\r\n metaKey: '⌘',\r\n separator: '',\r\n}, {\r\n ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, \"Ctrl\"),\r\n shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, \"Shift\"),\r\n altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, \"Alt\"),\r\n metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'windowsKey', comment: ['This is the short form for the Windows key on the keyboard'] }, \"Windows\"),\r\n separator: '+',\r\n}, {\r\n ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, \"Ctrl\"),\r\n shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, \"Shift\"),\r\n altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, \"Alt\"),\r\n metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'superKey', comment: ['This is the short form for the Super key on the keyboard'] }, \"Super\"),\r\n separator: '+',\r\n});\r\n/**\r\n * A label provider that prints modifiers in a suitable format for ARIA.\r\n */\r\nconst AriaLabelProvider = new ModifierLabelProvider({\r\n ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\r\n shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\r\n altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\r\n metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cmdKey.long', comment: ['This is the long form for the Command key on the keyboard'] }, \"Command\"),\r\n separator: '+',\r\n}, {\r\n ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\r\n shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\r\n altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\r\n metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'windowsKey.long', comment: ['This is the long form for the Windows key on the keyboard'] }, \"Windows\"),\r\n separator: '+',\r\n}, {\r\n ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, \"Control\"),\r\n shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, \"Shift\"),\r\n altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, \"Alt\"),\r\n metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'superKey.long', comment: ['This is the long form for the Super key on the keyboard'] }, \"Super\"),\r\n separator: '+',\r\n});\r\nfunction _simpleAsString(modifiers, key, labels) {\r\n if (key === null) {\r\n return '';\r\n }\r\n const result = [];\r\n // translate modifier keys: Ctrl-Shift-Alt-Meta\r\n if (modifiers.ctrlKey) {\r\n result.push(labels.ctrlKey);\r\n }\r\n if (modifiers.shiftKey) {\r\n result.push(labels.shiftKey);\r\n }\r\n if (modifiers.altKey) {\r\n result.push(labels.altKey);\r\n }\r\n if (modifiers.metaKey) {\r\n result.push(labels.metaKey);\r\n }\r\n // the actual key\r\n if (key !== '') {\r\n result.push(key);\r\n }\r\n return result.join(labels.separator);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/labels.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/labels.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getBaseLabel\": () => (/* binding */ getBaseLabel),\n/* harmony export */ \"normalizeDriveLetter\": () => (/* binding */ normalizeDriveLetter)\n/* harmony export */ });\n/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _resources_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _extpath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./extpath.js */ \"./node_modules/monaco-editor/esm/vs/base/common/extpath.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nfunction getBaseLabel(resource) {\r\n if (!resource) {\r\n return undefined;\r\n }\r\n if (typeof resource === 'string') {\r\n resource = _uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.file(resource);\r\n }\r\n const base = (0,_resources_js__WEBPACK_IMPORTED_MODULE_3__.basename)(resource) || (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.file ? resource.fsPath : resource.path) /* can be empty string if '/' is passed in */;\r\n // convert c: => C:\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWindows && (0,_extpath_js__WEBPACK_IMPORTED_MODULE_4__.isRootOrDriveLetter)(base)) {\r\n return normalizeDriveLetter(base);\r\n }\r\n return base;\r\n}\r\nfunction normalizeDriveLetter(path) {\r\n if ((0,_extpath_js__WEBPACK_IMPORTED_MODULE_4__.hasDriveLetter)(path)) {\r\n return path.charAt(0).toUpperCase() + path.slice(1);\r\n }\r\n return path;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/labels.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/lazy.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/lazy.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Lazy\": () => (/* binding */ Lazy)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Lazy {\r\n constructor(executor) {\r\n this.executor = executor;\r\n this._didRun = false;\r\n }\r\n /**\r\n * Get the wrapped value.\r\n *\r\n * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only\r\n * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value\r\n */\r\n getValue() {\r\n if (!this._didRun) {\r\n try {\r\n this._value = this.executor();\r\n }\r\n catch (err) {\r\n this._error = err;\r\n }\r\n finally {\r\n this._didRun = true;\r\n }\r\n }\r\n if (this._error) {\r\n throw this._error;\r\n }\r\n return this._value;\r\n }\r\n /**\r\n * Get the wrapped value without forcing evaluation.\r\n */\r\n get rawValue() { return this._value; }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/lazy.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"trackDisposable\": () => (/* binding */ trackDisposable),\n/* harmony export */ \"MultiDisposeError\": () => (/* binding */ MultiDisposeError),\n/* harmony export */ \"isDisposable\": () => (/* binding */ isDisposable),\n/* harmony export */ \"dispose\": () => (/* binding */ dispose),\n/* harmony export */ \"combinedDisposable\": () => (/* binding */ combinedDisposable),\n/* harmony export */ \"toDisposable\": () => (/* binding */ toDisposable),\n/* harmony export */ \"DisposableStore\": () => (/* binding */ DisposableStore),\n/* harmony export */ \"Disposable\": () => (/* binding */ Disposable),\n/* harmony export */ \"MutableDisposable\": () => (/* binding */ MutableDisposable),\n/* harmony export */ \"ImmortalReference\": () => (/* binding */ ImmortalReference)\n/* harmony export */ });\n/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n\r\n/**\r\n * Enables logging of potentially leaked disposables.\r\n *\r\n * A disposable is considered leaked if it is not disposed or not registered as the child of\r\n * another disposable. This tracking is very simple an only works for classes that either\r\n * extend Disposable or use a DisposableStore. This means there are a lot of false positives.\r\n */\r\nconst TRACK_DISPOSABLES = false;\r\nlet disposableTracker = null;\r\nif (TRACK_DISPOSABLES) {\r\n const __is_disposable_tracked__ = '__is_disposable_tracked__';\r\n disposableTracker = new class {\r\n trackDisposable(x) {\r\n const stack = new Error('Potentially leaked disposable').stack;\r\n setTimeout(() => {\r\n if (!x[__is_disposable_tracked__]) {\r\n console.log(stack);\r\n }\r\n }, 3000);\r\n }\r\n markTracked(x) {\r\n if (x && x !== Disposable.None) {\r\n try {\r\n x[__is_disposable_tracked__] = true;\r\n }\r\n catch (_a) {\r\n // noop\r\n }\r\n }\r\n }\r\n };\r\n}\r\nfunction markTracked(x) {\r\n if (!disposableTracker) {\r\n return;\r\n }\r\n disposableTracker.markTracked(x);\r\n}\r\nfunction trackDisposable(x) {\r\n if (!disposableTracker) {\r\n return x;\r\n }\r\n disposableTracker.trackDisposable(x);\r\n return x;\r\n}\r\nclass MultiDisposeError extends Error {\r\n constructor(errors) {\r\n super(`Encountered errors while disposing of store. Errors: [${errors.join(', ')}]`);\r\n this.errors = errors;\r\n }\r\n}\r\nfunction isDisposable(thing) {\r\n return typeof thing.dispose === 'function' && thing.dispose.length === 0;\r\n}\r\nfunction dispose(arg) {\r\n if (_iterator_js__WEBPACK_IMPORTED_MODULE_0__.Iterable.is(arg)) {\r\n let errors = [];\r\n for (const d of arg) {\r\n if (d) {\r\n markTracked(d);\r\n try {\r\n d.dispose();\r\n }\r\n catch (e) {\r\n errors.push(e);\r\n }\r\n }\r\n }\r\n if (errors.length === 1) {\r\n throw errors[0];\r\n }\r\n else if (errors.length > 1) {\r\n throw new MultiDisposeError(errors);\r\n }\r\n return Array.isArray(arg) ? [] : arg;\r\n }\r\n else if (arg) {\r\n markTracked(arg);\r\n arg.dispose();\r\n return arg;\r\n }\r\n}\r\nfunction combinedDisposable(...disposables) {\r\n disposables.forEach(markTracked);\r\n return toDisposable(() => dispose(disposables));\r\n}\r\nfunction toDisposable(fn) {\r\n const self = trackDisposable({\r\n dispose: () => {\r\n markTracked(self);\r\n fn();\r\n }\r\n });\r\n return self;\r\n}\r\nclass DisposableStore {\r\n constructor() {\r\n this._toDispose = new Set();\r\n this._isDisposed = false;\r\n }\r\n /**\r\n * Dispose of all registered disposables and mark this object as disposed.\r\n *\r\n * Any future disposables added to this object will be disposed of on `add`.\r\n */\r\n dispose() {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n markTracked(this);\r\n this._isDisposed = true;\r\n this.clear();\r\n }\r\n /**\r\n * Dispose of all registered disposables but do not mark this object as disposed.\r\n */\r\n clear() {\r\n try {\r\n dispose(this._toDispose.values());\r\n }\r\n finally {\r\n this._toDispose.clear();\r\n }\r\n }\r\n add(t) {\r\n if (!t) {\r\n return t;\r\n }\r\n if (t === this) {\r\n throw new Error('Cannot register a disposable on itself!');\r\n }\r\n markTracked(t);\r\n if (this._isDisposed) {\r\n if (!DisposableStore.DISABLE_DISPOSED_WARNING) {\r\n console.warn(new Error('Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!').stack);\r\n }\r\n }\r\n else {\r\n this._toDispose.add(t);\r\n }\r\n return t;\r\n }\r\n}\r\nDisposableStore.DISABLE_DISPOSED_WARNING = false;\r\nclass Disposable {\r\n constructor() {\r\n this._store = new DisposableStore();\r\n trackDisposable(this);\r\n }\r\n dispose() {\r\n markTracked(this);\r\n this._store.dispose();\r\n }\r\n _register(t) {\r\n if (t === this) {\r\n throw new Error('Cannot register a disposable on itself!');\r\n }\r\n return this._store.add(t);\r\n }\r\n}\r\nDisposable.None = Object.freeze({ dispose() { } });\r\n/**\r\n * Manages the lifecycle of a disposable value that may be changed.\r\n *\r\n * This ensures that when the disposable value is changed, the previously held disposable is disposed of. You can\r\n * also register a `MutableDisposable` on a `Disposable` to ensure it is automatically cleaned up.\r\n */\r\nclass MutableDisposable {\r\n constructor() {\r\n this._isDisposed = false;\r\n trackDisposable(this);\r\n }\r\n get value() {\r\n return this._isDisposed ? undefined : this._value;\r\n }\r\n set value(value) {\r\n var _a;\r\n if (this._isDisposed || value === this._value) {\r\n return;\r\n }\r\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\r\n if (value) {\r\n markTracked(value);\r\n }\r\n this._value = value;\r\n }\r\n clear() {\r\n this.value = undefined;\r\n }\r\n dispose() {\r\n var _a;\r\n this._isDisposed = true;\r\n markTracked(this);\r\n (_a = this._value) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._value = undefined;\r\n }\r\n}\r\nclass ImmortalReference {\r\n constructor(object) {\r\n this.object = object;\r\n }\r\n dispose() { }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LinkedList\": () => (/* binding */ LinkedList)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Node {\r\n constructor(element) {\r\n this.element = element;\r\n this.next = Node.Undefined;\r\n this.prev = Node.Undefined;\r\n }\r\n}\r\nNode.Undefined = new Node(undefined);\r\nclass LinkedList {\r\n constructor() {\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n this._size = 0;\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n isEmpty() {\r\n return this._first === Node.Undefined;\r\n }\r\n clear() {\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n this._size = 0;\r\n }\r\n unshift(element) {\r\n return this._insert(element, false);\r\n }\r\n push(element) {\r\n return this._insert(element, true);\r\n }\r\n _insert(element, atTheEnd) {\r\n const newNode = new Node(element);\r\n if (this._first === Node.Undefined) {\r\n this._first = newNode;\r\n this._last = newNode;\r\n }\r\n else if (atTheEnd) {\r\n // push\r\n const oldLast = this._last;\r\n this._last = newNode;\r\n newNode.prev = oldLast;\r\n oldLast.next = newNode;\r\n }\r\n else {\r\n // unshift\r\n const oldFirst = this._first;\r\n this._first = newNode;\r\n newNode.next = oldFirst;\r\n oldFirst.prev = newNode;\r\n }\r\n this._size += 1;\r\n let didRemove = false;\r\n return () => {\r\n if (!didRemove) {\r\n didRemove = true;\r\n this._remove(newNode);\r\n }\r\n };\r\n }\r\n shift() {\r\n if (this._first === Node.Undefined) {\r\n return undefined;\r\n }\r\n else {\r\n const res = this._first.element;\r\n this._remove(this._first);\r\n return res;\r\n }\r\n }\r\n pop() {\r\n if (this._last === Node.Undefined) {\r\n return undefined;\r\n }\r\n else {\r\n const res = this._last.element;\r\n this._remove(this._last);\r\n return res;\r\n }\r\n }\r\n _remove(node) {\r\n if (node.prev !== Node.Undefined && node.next !== Node.Undefined) {\r\n // middle\r\n const anchor = node.prev;\r\n anchor.next = node.next;\r\n node.next.prev = anchor;\r\n }\r\n else if (node.prev === Node.Undefined && node.next === Node.Undefined) {\r\n // only node\r\n this._first = Node.Undefined;\r\n this._last = Node.Undefined;\r\n }\r\n else if (node.next === Node.Undefined) {\r\n // last\r\n this._last = this._last.prev;\r\n this._last.next = Node.Undefined;\r\n }\r\n else if (node.prev === Node.Undefined) {\r\n // first\r\n this._first = this._first.next;\r\n this._first.prev = Node.Undefined;\r\n }\r\n // done\r\n this._size -= 1;\r\n }\r\n *[Symbol.iterator]() {\r\n let node = this._first;\r\n while (node !== Node.Undefined) {\r\n yield node.element;\r\n node = node.next;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/linkedList.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/map.js":
|
||
/*!**************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/map.js ***!
|
||
\**************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StringIterator\": () => (/* binding */ StringIterator),\n/* harmony export */ \"ConfigKeysIterator\": () => (/* binding */ ConfigKeysIterator),\n/* harmony export */ \"PathIterator\": () => (/* binding */ PathIterator),\n/* harmony export */ \"UriIterator\": () => (/* binding */ UriIterator),\n/* harmony export */ \"TernarySearchTree\": () => (/* binding */ TernarySearchTree),\n/* harmony export */ \"ResourceMap\": () => (/* binding */ ResourceMap),\n/* harmony export */ \"LinkedMap\": () => (/* binding */ LinkedMap),\n/* harmony export */ \"LRUCache\": () => (/* binding */ LRUCache)\n/* harmony export */ });\n/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass StringIterator {\r\n constructor() {\r\n this._value = '';\r\n this._pos = 0;\r\n }\r\n reset(key) {\r\n this._value = key;\r\n this._pos = 0;\r\n return this;\r\n }\r\n next() {\r\n this._pos += 1;\r\n return this;\r\n }\r\n hasNext() {\r\n return this._pos < this._value.length - 1;\r\n }\r\n cmp(a) {\r\n const aCode = a.charCodeAt(0);\r\n const thisCode = this._value.charCodeAt(this._pos);\r\n return aCode - thisCode;\r\n }\r\n value() {\r\n return this._value[this._pos];\r\n }\r\n}\r\nclass ConfigKeysIterator {\r\n constructor(_caseSensitive = true) {\r\n this._caseSensitive = _caseSensitive;\r\n }\r\n reset(key) {\r\n this._value = key;\r\n this._from = 0;\r\n this._to = 0;\r\n return this.next();\r\n }\r\n hasNext() {\r\n return this._to < this._value.length;\r\n }\r\n next() {\r\n // this._data = key.split(/[\\\\/]/).filter(s => !!s);\r\n this._from = this._to;\r\n let justSeps = true;\r\n for (; this._to < this._value.length; this._to++) {\r\n const ch = this._value.charCodeAt(this._to);\r\n if (ch === 46 /* Period */) {\r\n if (justSeps) {\r\n this._from++;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n else {\r\n justSeps = false;\r\n }\r\n }\r\n return this;\r\n }\r\n cmp(a) {\r\n return this._caseSensitive\r\n ? (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareSubstring)(a, this._value, 0, a.length, this._from, this._to)\r\n : (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareSubstringIgnoreCase)(a, this._value, 0, a.length, this._from, this._to);\r\n }\r\n value() {\r\n return this._value.substring(this._from, this._to);\r\n }\r\n}\r\nclass PathIterator {\r\n constructor(_splitOnBackslash = true, _caseSensitive = true) {\r\n this._splitOnBackslash = _splitOnBackslash;\r\n this._caseSensitive = _caseSensitive;\r\n }\r\n reset(key) {\r\n this._value = key.replace(/\\\\$|\\/$/, '');\r\n this._from = 0;\r\n this._to = 0;\r\n return this.next();\r\n }\r\n hasNext() {\r\n return this._to < this._value.length;\r\n }\r\n next() {\r\n // this._data = key.split(/[\\\\/]/).filter(s => !!s);\r\n this._from = this._to;\r\n let justSeps = true;\r\n for (; this._to < this._value.length; this._to++) {\r\n const ch = this._value.charCodeAt(this._to);\r\n if (ch === 47 /* Slash */ || this._splitOnBackslash && ch === 92 /* Backslash */) {\r\n if (justSeps) {\r\n this._from++;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n else {\r\n justSeps = false;\r\n }\r\n }\r\n return this;\r\n }\r\n cmp(a) {\r\n return this._caseSensitive\r\n ? (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareSubstring)(a, this._value, 0, a.length, this._from, this._to)\r\n : (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareSubstringIgnoreCase)(a, this._value, 0, a.length, this._from, this._to);\r\n }\r\n value() {\r\n return this._value.substring(this._from, this._to);\r\n }\r\n}\r\nclass UriIterator {\r\n constructor(_ignorePathCasing) {\r\n this._ignorePathCasing = _ignorePathCasing;\r\n this._states = [];\r\n this._stateIdx = 0;\r\n }\r\n reset(key) {\r\n this._value = key;\r\n this._states = [];\r\n if (this._value.scheme) {\r\n this._states.push(1 /* Scheme */);\r\n }\r\n if (this._value.authority) {\r\n this._states.push(2 /* Authority */);\r\n }\r\n if (this._value.path) {\r\n this._pathIterator = new PathIterator(false, !this._ignorePathCasing(key));\r\n this._pathIterator.reset(key.path);\r\n if (this._pathIterator.value()) {\r\n this._states.push(3 /* Path */);\r\n }\r\n }\r\n if (this._value.query) {\r\n this._states.push(4 /* Query */);\r\n }\r\n if (this._value.fragment) {\r\n this._states.push(5 /* Fragment */);\r\n }\r\n this._stateIdx = 0;\r\n return this;\r\n }\r\n next() {\r\n if (this._states[this._stateIdx] === 3 /* Path */ && this._pathIterator.hasNext()) {\r\n this._pathIterator.next();\r\n }\r\n else {\r\n this._stateIdx += 1;\r\n }\r\n return this;\r\n }\r\n hasNext() {\r\n return (this._states[this._stateIdx] === 3 /* Path */ && this._pathIterator.hasNext())\r\n || this._stateIdx < this._states.length - 1;\r\n }\r\n cmp(a) {\r\n if (this._states[this._stateIdx] === 1 /* Scheme */) {\r\n return (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareIgnoreCase)(a, this._value.scheme);\r\n }\r\n else if (this._states[this._stateIdx] === 2 /* Authority */) {\r\n return (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareIgnoreCase)(a, this._value.authority);\r\n }\r\n else if (this._states[this._stateIdx] === 3 /* Path */) {\r\n return this._pathIterator.cmp(a);\r\n }\r\n else if (this._states[this._stateIdx] === 4 /* Query */) {\r\n return (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compare)(a, this._value.query);\r\n }\r\n else if (this._states[this._stateIdx] === 5 /* Fragment */) {\r\n return (0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.compare)(a, this._value.fragment);\r\n }\r\n throw new Error();\r\n }\r\n value() {\r\n if (this._states[this._stateIdx] === 1 /* Scheme */) {\r\n return this._value.scheme;\r\n }\r\n else if (this._states[this._stateIdx] === 2 /* Authority */) {\r\n return this._value.authority;\r\n }\r\n else if (this._states[this._stateIdx] === 3 /* Path */) {\r\n return this._pathIterator.value();\r\n }\r\n else if (this._states[this._stateIdx] === 4 /* Query */) {\r\n return this._value.query;\r\n }\r\n else if (this._states[this._stateIdx] === 5 /* Fragment */) {\r\n return this._value.fragment;\r\n }\r\n throw new Error();\r\n }\r\n}\r\nclass TernarySearchTreeNode {\r\n isEmpty() {\r\n return !this.left && !this.mid && !this.right && !this.value;\r\n }\r\n}\r\nclass TernarySearchTree {\r\n constructor(segments) {\r\n this._iter = segments;\r\n }\r\n static forUris(ignorePathCasing = () => false) {\r\n return new TernarySearchTree(new UriIterator(ignorePathCasing));\r\n }\r\n static forStrings() {\r\n return new TernarySearchTree(new StringIterator());\r\n }\r\n static forConfigKeys() {\r\n return new TernarySearchTree(new ConfigKeysIterator());\r\n }\r\n clear() {\r\n this._root = undefined;\r\n }\r\n set(key, element) {\r\n const iter = this._iter.reset(key);\r\n let node;\r\n if (!this._root) {\r\n this._root = new TernarySearchTreeNode();\r\n this._root.segment = iter.value();\r\n }\r\n node = this._root;\r\n while (true) {\r\n const val = iter.cmp(node.segment);\r\n if (val > 0) {\r\n // left\r\n if (!node.left) {\r\n node.left = new TernarySearchTreeNode();\r\n node.left.segment = iter.value();\r\n }\r\n node = node.left;\r\n }\r\n else if (val < 0) {\r\n // right\r\n if (!node.right) {\r\n node.right = new TernarySearchTreeNode();\r\n node.right.segment = iter.value();\r\n }\r\n node = node.right;\r\n }\r\n else if (iter.hasNext()) {\r\n // mid\r\n iter.next();\r\n if (!node.mid) {\r\n node.mid = new TernarySearchTreeNode();\r\n node.mid.segment = iter.value();\r\n }\r\n node = node.mid;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n const oldElement = node.value;\r\n node.value = element;\r\n node.key = key;\r\n return oldElement;\r\n }\r\n get(key) {\r\n var _a;\r\n return (_a = this._getNode(key)) === null || _a === void 0 ? void 0 : _a.value;\r\n }\r\n _getNode(key) {\r\n const iter = this._iter.reset(key);\r\n let node = this._root;\r\n while (node) {\r\n const val = iter.cmp(node.segment);\r\n if (val > 0) {\r\n // left\r\n node = node.left;\r\n }\r\n else if (val < 0) {\r\n // right\r\n node = node.right;\r\n }\r\n else if (iter.hasNext()) {\r\n // mid\r\n iter.next();\r\n node = node.mid;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return node;\r\n }\r\n has(key) {\r\n const node = this._getNode(key);\r\n return !((node === null || node === void 0 ? void 0 : node.value) === undefined && (node === null || node === void 0 ? void 0 : node.mid) === undefined);\r\n }\r\n delete(key) {\r\n return this._delete(key, false);\r\n }\r\n deleteSuperstr(key) {\r\n return this._delete(key, true);\r\n }\r\n _delete(key, superStr) {\r\n const iter = this._iter.reset(key);\r\n const stack = [];\r\n let node = this._root;\r\n // find and unset node\r\n while (node) {\r\n const val = iter.cmp(node.segment);\r\n if (val > 0) {\r\n // left\r\n stack.push([1, node]);\r\n node = node.left;\r\n }\r\n else if (val < 0) {\r\n // right\r\n stack.push([-1, node]);\r\n node = node.right;\r\n }\r\n else if (iter.hasNext()) {\r\n // mid\r\n iter.next();\r\n stack.push([0, node]);\r\n node = node.mid;\r\n }\r\n else {\r\n if (superStr) {\r\n // remove children\r\n node.left = undefined;\r\n node.mid = undefined;\r\n node.right = undefined;\r\n }\r\n else {\r\n // remove element\r\n node.value = undefined;\r\n }\r\n // clean up empty nodes\r\n while (stack.length > 0 && node.isEmpty()) {\r\n let [dir, parent] = stack.pop();\r\n switch (dir) {\r\n case 1:\r\n parent.left = undefined;\r\n break;\r\n case 0:\r\n parent.mid = undefined;\r\n break;\r\n case -1:\r\n parent.right = undefined;\r\n break;\r\n }\r\n node = parent;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n findSubstr(key) {\r\n const iter = this._iter.reset(key);\r\n let node = this._root;\r\n let candidate = undefined;\r\n while (node) {\r\n const val = iter.cmp(node.segment);\r\n if (val > 0) {\r\n // left\r\n node = node.left;\r\n }\r\n else if (val < 0) {\r\n // right\r\n node = node.right;\r\n }\r\n else if (iter.hasNext()) {\r\n // mid\r\n iter.next();\r\n candidate = node.value || candidate;\r\n node = node.mid;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return node && node.value || candidate;\r\n }\r\n findSuperstr(key) {\r\n const iter = this._iter.reset(key);\r\n let node = this._root;\r\n while (node) {\r\n const val = iter.cmp(node.segment);\r\n if (val > 0) {\r\n // left\r\n node = node.left;\r\n }\r\n else if (val < 0) {\r\n // right\r\n node = node.right;\r\n }\r\n else if (iter.hasNext()) {\r\n // mid\r\n iter.next();\r\n node = node.mid;\r\n }\r\n else {\r\n // collect\r\n if (!node.mid) {\r\n return undefined;\r\n }\r\n else {\r\n return this._entries(node.mid);\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n forEach(callback) {\r\n for (const [key, value] of this) {\r\n callback(value, key);\r\n }\r\n }\r\n *[Symbol.iterator]() {\r\n yield* this._entries(this._root);\r\n }\r\n *_entries(node) {\r\n if (node) {\r\n // left\r\n yield* this._entries(node.left);\r\n // node\r\n if (node.value) {\r\n // callback(node.value, this._iter.join(parts));\r\n yield [node.key, node.value];\r\n }\r\n // mid\r\n yield* this._entries(node.mid);\r\n // right\r\n yield* this._entries(node.right);\r\n }\r\n }\r\n}\r\nclass ResourceMap {\r\n constructor(mapOrKeyFn, toKey) {\r\n this[Symbol.toStringTag] = 'ResourceMap';\r\n if (mapOrKeyFn instanceof ResourceMap) {\r\n this.map = new Map(mapOrKeyFn.map);\r\n this.toKey = toKey !== null && toKey !== void 0 ? toKey : ResourceMap.defaultToKey;\r\n }\r\n else {\r\n this.map = new Map();\r\n this.toKey = mapOrKeyFn !== null && mapOrKeyFn !== void 0 ? mapOrKeyFn : ResourceMap.defaultToKey;\r\n }\r\n }\r\n set(resource, value) {\r\n this.map.set(this.toKey(resource), value);\r\n return this;\r\n }\r\n get(resource) {\r\n return this.map.get(this.toKey(resource));\r\n }\r\n has(resource) {\r\n return this.map.has(this.toKey(resource));\r\n }\r\n get size() {\r\n return this.map.size;\r\n }\r\n clear() {\r\n this.map.clear();\r\n }\r\n delete(resource) {\r\n return this.map.delete(this.toKey(resource));\r\n }\r\n forEach(clb, thisArg) {\r\n if (typeof thisArg !== 'undefined') {\r\n clb = clb.bind(thisArg);\r\n }\r\n for (let [index, value] of this.map) {\r\n clb(value, _uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.parse(index), this);\r\n }\r\n }\r\n values() {\r\n return this.map.values();\r\n }\r\n *keys() {\r\n for (let key of this.map.keys()) {\r\n yield _uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.parse(key);\r\n }\r\n }\r\n *entries() {\r\n for (let tuple of this.map.entries()) {\r\n yield [_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.parse(tuple[0]), tuple[1]];\r\n }\r\n }\r\n *[Symbol.iterator]() {\r\n for (let item of this.map) {\r\n yield [_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.parse(item[0]), item[1]];\r\n }\r\n }\r\n}\r\nResourceMap.defaultToKey = (resource) => resource.toString();\r\nclass LinkedMap {\r\n constructor() {\r\n this[Symbol.toStringTag] = 'LinkedMap';\r\n this._map = new Map();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n this._state = 0;\r\n }\r\n clear() {\r\n this._map.clear();\r\n this._head = undefined;\r\n this._tail = undefined;\r\n this._size = 0;\r\n this._state++;\r\n }\r\n isEmpty() {\r\n return !this._head && !this._tail;\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n get first() {\r\n var _a;\r\n return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;\r\n }\r\n get last() {\r\n var _a;\r\n return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;\r\n }\r\n has(key) {\r\n return this._map.has(key);\r\n }\r\n get(key, touch = 0 /* None */) {\r\n const item = this._map.get(key);\r\n if (!item) {\r\n return undefined;\r\n }\r\n if (touch !== 0 /* None */) {\r\n this.touch(item, touch);\r\n }\r\n return item.value;\r\n }\r\n set(key, value, touch = 0 /* None */) {\r\n let item = this._map.get(key);\r\n if (item) {\r\n item.value = value;\r\n if (touch !== 0 /* None */) {\r\n this.touch(item, touch);\r\n }\r\n }\r\n else {\r\n item = { key, value, next: undefined, previous: undefined };\r\n switch (touch) {\r\n case 0 /* None */:\r\n this.addItemLast(item);\r\n break;\r\n case 1 /* AsOld */:\r\n this.addItemFirst(item);\r\n break;\r\n case 2 /* AsNew */:\r\n this.addItemLast(item);\r\n break;\r\n default:\r\n this.addItemLast(item);\r\n break;\r\n }\r\n this._map.set(key, item);\r\n this._size++;\r\n }\r\n return this;\r\n }\r\n delete(key) {\r\n return !!this.remove(key);\r\n }\r\n remove(key) {\r\n const item = this._map.get(key);\r\n if (!item) {\r\n return undefined;\r\n }\r\n this._map.delete(key);\r\n this.removeItem(item);\r\n this._size--;\r\n return item.value;\r\n }\r\n shift() {\r\n if (!this._head && !this._tail) {\r\n return undefined;\r\n }\r\n if (!this._head || !this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n const item = this._head;\r\n this._map.delete(item.key);\r\n this.removeItem(item);\r\n this._size--;\r\n return item.value;\r\n }\r\n forEach(callbackfn, thisArg) {\r\n const state = this._state;\r\n let current = this._head;\r\n while (current) {\r\n if (thisArg) {\r\n callbackfn.bind(thisArg)(current.value, current.key, this);\r\n }\r\n else {\r\n callbackfn(current.value, current.key, this);\r\n }\r\n if (this._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n current = current.next;\r\n }\r\n }\r\n keys() {\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next() {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result = { value: current.key, done: false };\r\n current = current.next;\r\n return result;\r\n }\r\n else {\r\n return { value: undefined, done: true };\r\n }\r\n }\r\n };\r\n return iterator;\r\n }\r\n values() {\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next() {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result = { value: current.value, done: false };\r\n current = current.next;\r\n return result;\r\n }\r\n else {\r\n return { value: undefined, done: true };\r\n }\r\n }\r\n };\r\n return iterator;\r\n }\r\n entries() {\r\n const map = this;\r\n const state = this._state;\r\n let current = this._head;\r\n const iterator = {\r\n [Symbol.iterator]() {\r\n return iterator;\r\n },\r\n next() {\r\n if (map._state !== state) {\r\n throw new Error(`LinkedMap got modified during iteration.`);\r\n }\r\n if (current) {\r\n const result = { value: [current.key, current.value], done: false };\r\n current = current.next;\r\n return result;\r\n }\r\n else {\r\n return { value: undefined, done: true };\r\n }\r\n }\r\n };\r\n return iterator;\r\n }\r\n [Symbol.iterator]() {\r\n return this.entries();\r\n }\r\n trimOld(newSize) {\r\n if (newSize >= this.size) {\r\n return;\r\n }\r\n if (newSize === 0) {\r\n this.clear();\r\n return;\r\n }\r\n let current = this._head;\r\n let currentSize = this.size;\r\n while (current && currentSize > newSize) {\r\n this._map.delete(current.key);\r\n current = current.next;\r\n currentSize--;\r\n }\r\n this._head = current;\r\n this._size = currentSize;\r\n if (current) {\r\n current.previous = undefined;\r\n }\r\n this._state++;\r\n }\r\n addItemFirst(item) {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._tail = item;\r\n }\r\n else if (!this._head) {\r\n throw new Error('Invalid list');\r\n }\r\n else {\r\n item.next = this._head;\r\n this._head.previous = item;\r\n }\r\n this._head = item;\r\n this._state++;\r\n }\r\n addItemLast(item) {\r\n // First time Insert\r\n if (!this._head && !this._tail) {\r\n this._head = item;\r\n }\r\n else if (!this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n else {\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n }\r\n this._tail = item;\r\n this._state++;\r\n }\r\n removeItem(item) {\r\n if (item === this._head && item === this._tail) {\r\n this._head = undefined;\r\n this._tail = undefined;\r\n }\r\n else if (item === this._head) {\r\n // This can only happend if size === 1 which is handle\r\n // by the case above.\r\n if (!item.next) {\r\n throw new Error('Invalid list');\r\n }\r\n item.next.previous = undefined;\r\n this._head = item.next;\r\n }\r\n else if (item === this._tail) {\r\n // This can only happend if size === 1 which is handle\r\n // by the case above.\r\n if (!item.previous) {\r\n throw new Error('Invalid list');\r\n }\r\n item.previous.next = undefined;\r\n this._tail = item.previous;\r\n }\r\n else {\r\n const next = item.next;\r\n const previous = item.previous;\r\n if (!next || !previous) {\r\n throw new Error('Invalid list');\r\n }\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n item.next = undefined;\r\n item.previous = undefined;\r\n this._state++;\r\n }\r\n touch(item, touch) {\r\n if (!this._head || !this._tail) {\r\n throw new Error('Invalid list');\r\n }\r\n if ((touch !== 1 /* AsOld */ && touch !== 2 /* AsNew */)) {\r\n return;\r\n }\r\n if (touch === 1 /* AsOld */) {\r\n if (item === this._head) {\r\n return;\r\n }\r\n const next = item.next;\r\n const previous = item.previous;\r\n // Unlink the item\r\n if (item === this._tail) {\r\n // previous must be defined since item was not head but is tail\r\n // So there are more than on item in the map\r\n previous.next = undefined;\r\n this._tail = previous;\r\n }\r\n else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n // Insert the node at head\r\n item.previous = undefined;\r\n item.next = this._head;\r\n this._head.previous = item;\r\n this._head = item;\r\n this._state++;\r\n }\r\n else if (touch === 2 /* AsNew */) {\r\n if (item === this._tail) {\r\n return;\r\n }\r\n const next = item.next;\r\n const previous = item.previous;\r\n // Unlink the item.\r\n if (item === this._head) {\r\n // next must be defined since item was not tail but is head\r\n // So there are more than on item in the map\r\n next.previous = undefined;\r\n this._head = next;\r\n }\r\n else {\r\n // Both next and previous are not undefined since item was neither head nor tail.\r\n next.previous = previous;\r\n previous.next = next;\r\n }\r\n item.next = undefined;\r\n item.previous = this._tail;\r\n this._tail.next = item;\r\n this._tail = item;\r\n this._state++;\r\n }\r\n }\r\n toJSON() {\r\n const data = [];\r\n this.forEach((value, key) => {\r\n data.push([key, value]);\r\n });\r\n return data;\r\n }\r\n fromJSON(data) {\r\n this.clear();\r\n for (const [key, value] of data) {\r\n this.set(key, value);\r\n }\r\n }\r\n}\r\nclass LRUCache extends LinkedMap {\r\n constructor(limit, ratio = 1) {\r\n super();\r\n this._limit = limit;\r\n this._ratio = Math.min(Math.max(0, ratio), 1);\r\n }\r\n get limit() {\r\n return this._limit;\r\n }\r\n set limit(limit) {\r\n this._limit = limit;\r\n this.checkTrim();\r\n }\r\n get(key, touch = 2 /* AsNew */) {\r\n return super.get(key, touch);\r\n }\r\n peek(key) {\r\n return super.get(key, 0 /* None */);\r\n }\r\n set(key, value) {\r\n super.set(key, value, 2 /* AsNew */);\r\n this.checkTrim();\r\n return this;\r\n }\r\n checkTrim() {\r\n if (this.size > this._limit) {\r\n this.trimOld(Math.round(this._limit * this._ratio));\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/map.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js ***!
|
||
\************************************************************************/
|
||
/***/ (function(module) {
|
||
|
||
eval("/**\n * marked - a markdown parser\n * Copyright (c) 2011-2021, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, (function () { 'use strict';\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n }\n\n function createCommonjsModule(fn) {\n var module = { exports: {} };\n \treturn fn(module, module.exports), module.exports;\n }\n\n var defaults = createCommonjsModule(function (module) {\n function getDefaults() {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n }\n\n function changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n }\n\n module.exports = {\n defaults: getDefaults(),\n getDefaults: getDefaults,\n changeDefaults: changeDefaults\n };\n });\n\n /**\n * Helpers\n */\n var escapeTest = /[&<>\"']/;\n var escapeReplace = /[&<>\"']/g;\n var escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\n var escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n var escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n var getEscapeReplacement = function getEscapeReplacement(ch) {\n return escapeReplacements[ch];\n };\n\n function escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n }\n\n var unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n function unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, function (_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n\n return '';\n });\n }\n\n var caret = /(^|[^\\[])\\^/g;\n\n function edit(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n var obj = {\n replace: function replace(name, val) {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: function getRegex() {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n }\n\n var nonWordAndColonTest = /[^\\w:]/g;\n var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n function cleanUrl(sanitize, base, href) {\n if (sanitize) {\n var prot;\n\n try {\n prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n\n return href;\n }\n\n var baseUrls = {};\n var justDomain = /^[^:]+:\\/*[^/]*$/;\n var protocol = /^([^:]+:)[\\s\\S]*$/;\n var domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n function resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n\n base = baseUrls[' ' + base];\n var relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n }\n\n var noopTest = {\n exec: function noopTest() {}\n };\n\n function merge(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n }\n\n function splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n\n while (--curr >= 0 && str[curr] === '\\\\') {\n escaped = !escaped;\n }\n\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n var i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) {\n cells.push('');\n }\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n\n return cells;\n } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n // /c*$/ is vulnerable to REDOS.\n // invert: Remove suffix of non-c chars instead. Default falsey.\n\n\n function rtrim(str, c, invert) {\n var l = str.length;\n\n if (l === 0) {\n return '';\n } // Length of suffix matching the invert condition.\n\n\n var suffLen = 0; // Step left until we fail to match the invert condition.\n\n while (suffLen < l) {\n var currChar = str.charAt(l - suffLen - 1);\n\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, l - suffLen);\n }\n\n function findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n\n var l = str.length;\n var level = 0,\n i = 0;\n\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n\n if (level < 0) {\n return i;\n }\n }\n }\n\n return -1;\n }\n\n function checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n } // copied from https://stackoverflow.com/a/5450113/806777\n\n\n function repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n\n var result = '';\n\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n\n count >>= 1;\n pattern += pattern;\n }\n\n return result + pattern;\n }\n\n var helpers = {\n escape: escape,\n unescape: unescape,\n edit: edit,\n cleanUrl: cleanUrl,\n resolveUrl: resolveUrl,\n noopTest: noopTest,\n merge: merge,\n splitCells: splitCells,\n rtrim: rtrim,\n findClosingBracket: findClosingBracket,\n checkSanitizeDeprecation: checkSanitizeDeprecation,\n repeatString: repeatString\n };\n\n var defaults$1 = defaults.defaults;\n var rtrim$1 = helpers.rtrim,\n splitCells$1 = helpers.splitCells,\n _escape = helpers.escape,\n findClosingBracket$1 = helpers.findClosingBracket;\n\n function outputLink(cap, link, raw) {\n var href = link.href;\n var title = link.title ? _escape(link.title) : null;\n var text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n return {\n type: 'link',\n raw: raw,\n href: href,\n title: title,\n text: text\n };\n } else {\n return {\n type: 'image',\n raw: raw,\n href: href,\n title: title,\n text: _escape(text)\n };\n }\n }\n\n function indentCodeCompensation(raw, text) {\n var matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n var indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(function (node) {\n var matchIndentInNode = node.match(/^\\s+/);\n\n if (matchIndentInNode === null) {\n return node;\n }\n\n var indentInNode = matchIndentInNode[0];\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n }).join('\\n');\n }\n /**\n * Tokenizer\n */\n\n\n var Tokenizer_1 = /*#__PURE__*/function () {\n function Tokenizer(options) {\n this.options = options || defaults$1;\n }\n\n var _proto = Tokenizer.prototype;\n\n _proto.space = function space(src) {\n var cap = this.rules.block.newline.exec(src);\n\n if (cap) {\n if (cap[0].length > 1) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n\n return {\n raw: '\\n'\n };\n }\n };\n\n _proto.code = function code(src) {\n var cap = this.rules.block.code.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim$1(text, '\\n') : text\n };\n }\n };\n\n _proto.fences = function fences(src) {\n var cap = this.rules.block.fences.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw: raw,\n lang: cap[2] ? cap[2].trim() : cap[2],\n text: text\n };\n }\n };\n\n _proto.heading = function heading(src) {\n var cap = this.rules.block.heading.exec(src);\n\n if (cap) {\n var text = cap[2].trim(); // remove trailing #s\n\n if (/#$/.test(text)) {\n var trimmed = rtrim$1(text, '#');\n\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text: text\n };\n }\n };\n\n _proto.nptable = function nptable(src) {\n var cap = this.rules.block.nptable.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells$1(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : [],\n raw: cap[0]\n };\n\n if (item.header.length === item.align.length) {\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells$1(item.cells[i], item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.hr = function hr(src) {\n var cap = this.rules.block.hr.exec(src);\n\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n };\n\n _proto.blockquote = function blockquote(src) {\n var cap = this.rules.block.blockquote.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ *> ?/gm, '');\n return {\n type: 'blockquote',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.list = function list(src) {\n var cap = this.rules.block.list.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var bull = cap[2];\n var isordered = bull.length > 1;\n var list = {\n type: 'list',\n raw: raw,\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n }; // Get each top-level item.\n\n var itemMatch = cap[0].match(this.rules.block.item);\n var next = false,\n item,\n space,\n bcurr,\n bnext,\n addBack,\n loose,\n istask,\n ischecked;\n var l = itemMatch.length;\n bcurr = this.rules.block.listItemStart.exec(itemMatch[0]);\n\n for (var i = 0; i < l; i++) {\n item = itemMatch[i];\n raw = item; // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n\n if (i !== l - 1) {\n bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);\n\n if (!this.options.pedantic ? bnext[1].length > bcurr[0].length || bnext[1].length > 3 : bnext[1].length > bcurr[1].length) {\n // nested list\n itemMatch.splice(i, 2, itemMatch[i] + '\\n' + itemMatch[i + 1]);\n i--;\n l--;\n continue;\n } else {\n if ( // different bullet style\n !this.options.pedantic || this.options.smartLists ? bnext[2][bnext[2].length - 1] !== bull[bull.length - 1] : isordered === (bnext[2].length === 1)) {\n addBack = itemMatch.slice(i + 1).join('\\n');\n list.raw = list.raw.substring(0, list.raw.length - addBack.length);\n i = l - 1;\n }\n }\n\n bcurr = bnext;\n } // Remove the list item's bullet\n // so it is seen as the next token.\n\n\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+[.)]) ?/, ''); // Outdent whatever the\n // list item contains. Hacky.\n\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');\n } // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n\n\n loose = next || /\\n\\n(?!\\s*$)/.test(item);\n\n if (i !== l - 1) {\n next = item.charAt(item.length - 1) === '\\n';\n if (!loose) loose = next;\n }\n\n if (loose) {\n list.loose = true;\n } // Check for task list items\n\n\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n\n list.items.push({\n type: 'list_item',\n raw: raw,\n task: istask,\n checked: ischecked,\n loose: loose,\n text: item\n });\n }\n\n return list;\n }\n };\n\n _proto.html = function html(src) {\n var cap = this.rules.block.html.exec(src);\n\n if (cap) {\n return {\n type: this.options.sanitize ? 'paragraph' : 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.def = function def(src) {\n var cap = this.rules.block.def.exec(src);\n\n if (cap) {\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n var tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n return {\n tag: tag,\n raw: cap[0],\n href: cap[2],\n title: cap[3]\n };\n }\n };\n\n _proto.table = function table(src) {\n var cap = this.rules.block.table.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells$1(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''), item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.lheading = function lheading(src) {\n var cap = this.rules.block.lheading.exec(src);\n\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1]\n };\n }\n };\n\n _proto.paragraph = function paragraph(src) {\n var cap = this.rules.block.paragraph.exec(src);\n\n if (cap) {\n return {\n type: 'paragraph',\n raw: cap[0],\n text: cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1]\n };\n }\n };\n\n _proto.text = function text(src) {\n var cap = this.rules.block.text.exec(src);\n\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0]\n };\n }\n };\n\n _proto.escape = function escape(src) {\n var cap = this.rules.inline.escape.exec(src);\n\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: _escape(cap[1])\n };\n }\n };\n\n _proto.tag = function tag(src, inLink, inRawBlock) {\n var cap = this.rules.inline.tag.exec(src);\n\n if (cap) {\n if (!inLink && /^<a /i.test(cap[0])) {\n inLink = true;\n } else if (inLink && /^<\\/a>/i.test(cap[0])) {\n inLink = false;\n }\n\n if (!inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = true;\n } else if (inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: inLink,\n inRawBlock: inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.link = function link(src) {\n var cap = this.rules.inline.link.exec(src);\n\n if (cap) {\n var trimmedUrl = cap[2].trim();\n\n if (!this.options.pedantic && /^</.test(trimmedUrl)) {\n // commonmark requires matching angle brackets\n if (!/>$/.test(trimmedUrl)) {\n return;\n } // ending angle bracket cannot be escaped\n\n\n var rtrimSlash = rtrim$1(trimmedUrl.slice(0, -1), '\\\\');\n\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n var lastParenIndex = findClosingBracket$1(cap[2], '()');\n\n if (lastParenIndex > -1) {\n var start = cap[0].indexOf('!') === 0 ? 5 : 4;\n var linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n\n var href = cap[2];\n var title = '';\n\n if (this.options.pedantic) {\n // split pedantic href and title\n var link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim();\n\n if (/^</.test(href)) {\n if (this.options.pedantic && !/>$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0]);\n }\n };\n\n _proto.reflink = function reflink(src, links) {\n var cap;\n\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n var link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n\n if (!link || !link.href) {\n var text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text: text\n };\n }\n\n return outputLink(cap, link, cap[0]);\n }\n };\n\n _proto.emStrong = function emStrong(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n if (match[3] && prevChar.match(/(?:[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xBC-\\xBE\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u0660-\\u0669\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0966-\\u096F\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09F9\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AEF\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\\u0B71-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0BE6-\\u0BF2\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D58-\\u0D61\\u0D66-\\u0D78\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DE6-\\u0DEF\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F20-\\u0F33\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F-\\u1049\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1090-\\u1099\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B50-\\u1B59\\u1B83-\\u1BA0\\u1BAE-\\u1BE5\\u1C00-\\u1C23\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2150-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2CFD\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3192-\\u3195\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA830-\\uA835\\uA840-\\uA873\\uA882-\\uA8B3\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA900-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF-\\uA9D9\\uA9E0-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD07-\\uDD33\\uDD40-\\uDD78\\uDD8A\\uDD8B\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE1-\\uDEFB\\uDF00-\\uDF23\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC58-\\uDC76\\uDC79-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE40-\\uDE48\\uDE60-\\uDE7E\\uDE80-\\uDE9F\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDEEB-\\uDEEF\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD23\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF27\\uDF30-\\uDF45\\uDF51-\\uDF54\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC52-\\uDC6F\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD03-\\uDD26\\uDD36-\\uDD3F\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDD0-\\uDDDA\\uDDDC\\uDDE1-\\uDDF4\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDEF0-\\uDEF9\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC50-\\uDC59\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEAA\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF30-\\uDF3B]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCF2\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC50-\\uDC6C\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF2\\uDFB0\\uDFC0-\\uDFD4]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF5B-\\uDF61\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE96\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD834[\\uDEE0-\\uDEF3\\uDF60-\\uDF78]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEEB\\uDEF0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCCF\\uDD00-\\uDD43\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDC71-\\uDCAB\\uDCAD-\\uDCAF\\uDCB1-\\uDCB4\\uDD01-\\uDD2D\\uDD2F-\\uDD3D\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83C[\\uDD00-\\uDD0C]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/)) return; // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n\n var nextChar = match[1] || match[2] || '';\n\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n var lLength = match[0].length - 1;\n var rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n var endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength); // Bump maskedSrc to same section of string as src (move to lexer?)\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // matched the first alternative in rules.js (skip the * in __abc*abc__)\n\n rLength = rDelim.length;\n\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n // If this is the last rDelimiter, remove extra characters. *a*** -> *a*\n\n if (delimTotal + midDelimTotal - rLength <= 0 && !maskedSrc.slice(endReg.lastIndex).match(endReg)) {\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n }\n\n if (Math.min(lLength, rLength) % 2) {\n return {\n type: 'em',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(1, lLength + match.index + rLength)\n };\n }\n\n if (Math.min(lLength, rLength) % 2 === 0) {\n return {\n type: 'strong',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(2, lLength + match.index + rLength - 1)\n };\n }\n }\n }\n };\n\n _proto.codespan = function codespan(src) {\n var cap = this.rules.inline.code.exec(src);\n\n if (cap) {\n var text = cap[2].replace(/\\n/g, ' ');\n var hasNonSpaceChars = /[^ ]/.test(text);\n var hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n\n text = _escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.br = function br(src) {\n var cap = this.rules.inline.br.exec(src);\n\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n };\n\n _proto.del = function del(src) {\n var cap = this.rules.inline.del.exec(src);\n\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2]\n };\n }\n };\n\n _proto.autolink = function autolink(src, mangle) {\n var cap = this.rules.inline.autolink.exec(src);\n\n if (cap) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = _escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.url = function url(src, mangle) {\n var cap;\n\n if (cap = this.rules.inline.url.exec(src)) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n var prevCapZero;\n\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n\n text = _escape(cap[0]);\n\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.inlineText = function inlineText(src, inRawBlock, smartypants) {\n var cap = this.rules.inline.text.exec(src);\n\n if (cap) {\n var text;\n\n if (inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0];\n } else {\n text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n\n return {\n type: 'text',\n raw: cap[0],\n text: text\n };\n }\n };\n\n return Tokenizer;\n }();\n\n var noopTest$1 = helpers.noopTest,\n edit$1 = helpers.edit,\n merge$1 = helpers.merge;\n /**\n * Block-Level Grammar\n */\n\n var block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?! {0,3}bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)' // (4)\n + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)' // (5)\n + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|</(?!script|pre|style)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *<?([^\\s>]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noopTest$1,\n table: noopTest$1,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n };\n block._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\n block._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\n block.def = edit$1(block.def).replace('label', block._label).replace('title', block._title).getRegex();\n block.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\n block.item = /^( *)(bull) ?[^\\n]*(?:\\n(?! *bull ?)[^\\n]*)*/;\n block.item = edit$1(block.item, 'gm').replace(/bull/g, block.bullet).getRegex();\n block.listItemStart = edit$1(/^( *)(bull)/).replace('bull', block.bullet).getRegex();\n block.list = edit$1(block.list).replace(/bull/g, block.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block.def.source + ')').getRegex();\n block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\n block._comment = /<!--(?!-?>)[\\s\\S]*?(?:-->|$)/;\n block.html = edit$1(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\n block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n block.blockquote = edit$1(block.blockquote).replace('paragraph', block.paragraph).getRegex();\n /**\n * Normal Block Grammar\n */\n\n block.normal = merge$1({}, block);\n /**\n * GFM Block Grammar\n */\n\n block.gfm = merge$1({}, block.normal, {\n nptable: '^ *([^|\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}([-:]+ *\\\\|[-| :]*)' // Align\n + '(?:\\\\n((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)',\n // Cells\n table: '^ *\\\\|(.+)\\\\n' // Header\n + ' {0,3}\\\\|?( *[-:]+[-| :]*)' // Align\n + '(?:\\\\n *((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n\n });\n block.gfm.nptable = edit$1(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n /**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\n block.pedantic = merge$1({}, block.normal, {\n html: edit$1('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest$1,\n // fences not supported\n paragraph: edit$1(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n });\n /**\n * Inline-Level Grammar\n */\n\n var inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest$1,\n tag: '^comment' + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /\\_\\_[^_]*?\\*[^_]*?\\_\\_|[punct_](\\*+)(?=[\\s]|$)|[^punct*_\\s](\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|[^punct*_\\s](\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /\\*\\*[^*]*?\\_[^*]*?\\*\\*|[punct*](\\_+)(?=[\\s]|$)|[^punct*_\\s](\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest$1,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,\n punctuation: /^([\\spunctuation])/\n }; // list of punctuation marks from CommonMark spec\n // without * and _ to handle the different emphasis markers * and _\n\n inline._punctuation = '!\"#$%&\\'()+\\\\-.,/:;<=>?@\\\\[\\\\]`^{|}~';\n inline.punctuation = edit$1(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, <html>\n\n inline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n inline.escapedEmSt = /\\\\\\*|\\\\_/g;\n inline._comment = edit$1(block._comment).replace('(?:-->|$)', '-->').getRegex();\n inline.emStrong.lDelim = edit$1(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();\n inline.emStrong.rDelimAst = edit$1(inline.emStrong.rDelimAst, 'g').replace(/punct/g, inline._punctuation).getRegex();\n inline.emStrong.rDelimUnd = edit$1(inline.emStrong.rDelimUnd, 'g').replace(/punct/g, inline._punctuation).getRegex();\n inline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\n inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\n inline.autolink = edit$1(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();\n inline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n inline.tag = edit$1(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();\n inline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\n inline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\n inline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n inline.link = edit$1(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();\n inline.reflink = edit$1(inline.reflink).replace('label', inline._label).getRegex();\n inline.reflinkSearch = edit$1(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();\n /**\n * Normal Inline Grammar\n */\n\n inline.normal = merge$1({}, inline);\n /**\n * Pedantic Inline Grammar\n */\n\n inline.pedantic = merge$1({}, inline.normal, {\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit$1(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline._label).getRegex(),\n reflink: edit$1(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline._label).getRegex()\n });\n /**\n * GFM Inline Grammar\n */\n\n inline.gfm = merge$1({}, inline.normal, {\n escape: edit$1(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))/\n });\n inline.gfm.url = edit$1(inline.gfm.url, 'i').replace('email', inline.gfm._extended_email).getRegex();\n /**\n * GFM + Line Breaks Inline Grammar\n */\n\n inline.breaks = merge$1({}, inline.gfm, {\n br: edit$1(inline.br).replace('{2,}', '*').getRegex(),\n text: edit$1(inline.gfm.text).replace('\\\\b_', '\\\\b_| {2,}\\\\n').replace(/\\{2,\\}/g, '*').getRegex()\n });\n var rules = {\n block: block,\n inline: inline\n };\n\n var defaults$2 = defaults.defaults;\n var block$1 = rules.block,\n inline$1 = rules.inline;\n var repeatString$1 = helpers.repeatString;\n /**\n * smartypants text replacement\n */\n\n function smartypants(text) {\n return text // em-dashes\n .replace(/---/g, \"\\u2014\") // en-dashes\n .replace(/--/g, \"\\u2013\") // opening singles\n .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, \"$1\\u2018\") // closing singles & apostrophes\n .replace(/'/g, \"\\u2019\") // opening doubles\n .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, \"$1\\u201C\") // closing doubles\n .replace(/\"/g, \"\\u201D\") // ellipses\n .replace(/\\.{3}/g, \"\\u2026\");\n }\n /**\n * mangle email addresses\n */\n\n\n function mangle(text) {\n var out = '',\n i,\n ch;\n var l = text.length;\n\n for (i = 0; i < l; i++) {\n ch = text.charCodeAt(i);\n\n if (Math.random() > 0.5) {\n ch = 'x' + ch.toString(16);\n }\n\n out += '&#' + ch + ';';\n }\n\n return out;\n }\n /**\n * Block Lexer\n */\n\n\n var Lexer_1 = /*#__PURE__*/function () {\n function Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults$2;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n var rules = {\n block: block$1.normal,\n inline: inline$1.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block$1.pedantic;\n rules.inline = inline$1.pedantic;\n } else if (this.options.gfm) {\n rules.block = block$1.gfm;\n\n if (this.options.breaks) {\n rules.inline = inline$1.breaks;\n } else {\n rules.inline = inline$1.gfm;\n }\n }\n\n this.tokenizer.rules = rules;\n }\n /**\n * Expose Rules\n */\n\n\n /**\n * Static Lex Method\n */\n Lexer.lex = function lex(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n }\n /**\n * Static Lex Inline Method\n */\n ;\n\n Lexer.lexInline = function lexInline(src, options) {\n var lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n /**\n * Preprocessing\n */\n ;\n\n var _proto = Lexer.prototype;\n\n _proto.lex = function lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n').replace(/\\t/g, ' ');\n this.blockTokens(src, this.tokens, true);\n this.inline(this.tokens);\n return this.tokens;\n }\n /**\n * Lexing\n */\n ;\n\n _proto.blockTokens = function blockTokens(src, tokens, top) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (top === void 0) {\n top = true;\n }\n\n if (this.options.pedantic) {\n src = src.replace(/^ +$/gm, '');\n }\n\n var token, i, l, lastToken;\n\n while (src) {\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n }\n\n continue;\n } // code\n\n\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.\n\n if (lastToken && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // fences\n\n\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // heading\n\n\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // table no leading pipe (gfm)\n\n\n if (token = this.tokenizer.nptable(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // hr\n\n\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // blockquote\n\n\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.blockTokens(token.text, [], top);\n tokens.push(token);\n continue;\n } // list\n\n\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n l = token.items.length;\n\n for (i = 0; i < l; i++) {\n token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);\n }\n\n tokens.push(token);\n continue;\n } // html\n\n\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // def\n\n\n if (top && (token = this.tokenizer.def(src))) {\n src = src.substring(token.raw.length);\n\n if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n\n continue;\n } // table (gfm)\n\n\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // lheading\n\n\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // top-level paragraph\n\n\n if (top && (token = this.tokenizer.paragraph(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _proto.inline = function inline(tokens) {\n var i, j, k, l2, row, token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'paragraph':\n case 'text':\n case 'heading':\n {\n token.tokens = [];\n this.inlineTokens(token.text, token.tokens);\n break;\n }\n\n case 'table':\n {\n token.tokens = {\n header: [],\n cells: []\n }; // header\n\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n token.tokens.header[j] = [];\n this.inlineTokens(token.header[j], token.tokens.header[j]);\n } // cells\n\n\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.cells[j];\n token.tokens.cells[j] = [];\n\n for (k = 0; k < row.length; k++) {\n token.tokens.cells[j][k] = [];\n this.inlineTokens(row[k], token.tokens.cells[j][k]);\n }\n }\n\n break;\n }\n\n case 'blockquote':\n {\n this.inline(token.tokens);\n break;\n }\n\n case 'list':\n {\n l2 = token.items.length;\n\n for (j = 0; j < l2; j++) {\n this.inline(token.items[j].tokens);\n }\n\n break;\n }\n }\n }\n\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n ;\n\n _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (inLink === void 0) {\n inLink = false;\n }\n\n if (inRawBlock === void 0) {\n inRawBlock = false;\n }\n\n var token, lastToken; // String with links masked to avoid interference with em and strong\n\n var maskedSrc = src;\n var match;\n var keepPrevChar, prevChar; // Mask out reflinks\n\n if (this.tokens.links) {\n var links = Object.keys(this.tokens.links);\n\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString$1('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n } // Mask out other blocks\n\n\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString$1('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n } // Mask out escaped em & strong delimiters\n\n\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n }\n\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n\n keepPrevChar = false; // escape\n\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // tag\n\n\n if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {\n src = src.substring(token.raw.length);\n inLink = token.inLink;\n inRawBlock = token.inRawBlock;\n var _lastToken = tokens[tokens.length - 1];\n\n if (_lastToken && token.type === 'text' && _lastToken.type === 'text') {\n _lastToken.raw += token.raw;\n _lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // link\n\n\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n }\n\n tokens.push(token);\n continue;\n } // reflink, nolink\n\n\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n var _lastToken2 = tokens[tokens.length - 1];\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n tokens.push(token);\n } else if (_lastToken2 && token.type === 'text' && _lastToken2.type === 'text') {\n _lastToken2.raw += token.raw;\n _lastToken2.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // em & strong\n\n\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // code\n\n\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // br\n\n\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // del (gfm)\n\n\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // autolink\n\n\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // url (gfm)\n\n\n if (!inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {\n src = src.substring(token.raw.length);\n\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _createClass(Lexer, null, [{\n key: \"rules\",\n get: function get() {\n return {\n block: block$1,\n inline: inline$1\n };\n }\n }]);\n\n return Lexer;\n }();\n\n var defaults$3 = defaults.defaults;\n var cleanUrl$1 = helpers.cleanUrl,\n escape$1 = helpers.escape;\n /**\n * Renderer\n */\n\n var Renderer_1 = /*#__PURE__*/function () {\n function Renderer(options) {\n this.options = options || defaults$3;\n }\n\n var _proto = Renderer.prototype;\n\n _proto.code = function code(_code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n\n if (this.options.highlight) {\n var out = this.options.highlight(_code, lang);\n\n if (out != null && out !== _code) {\n escaped = true;\n _code = out;\n }\n }\n\n _code = _code.replace(/\\n$/, '') + '\\n';\n\n if (!lang) {\n return '<pre><code>' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\\n';\n }\n\n return '<pre><code class=\"' + this.options.langPrefix + escape$1(lang, true) + '\">' + (escaped ? _code : escape$1(_code, true)) + '</code></pre>\\n';\n };\n\n _proto.blockquote = function blockquote(quote) {\n return '<blockquote>\\n' + quote + '</blockquote>\\n';\n };\n\n _proto.html = function html(_html) {\n return _html;\n };\n\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '<h' + level + ' id=\"' + this.options.headerPrefix + slugger.slug(raw) + '\">' + text + '</h' + level + '>\\n';\n } // ignore IDs\n\n\n return '<h' + level + '>' + text + '</h' + level + '>\\n';\n };\n\n _proto.hr = function hr() {\n return this.options.xhtml ? '<hr/>\\n' : '<hr>\\n';\n };\n\n _proto.list = function list(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n };\n\n _proto.listitem = function listitem(text) {\n return '<li>' + text + '</li>\\n';\n };\n\n _proto.checkbox = function checkbox(checked) {\n return '<input ' + (checked ? 'checked=\"\" ' : '') + 'disabled=\"\" type=\"checkbox\"' + (this.options.xhtml ? ' /' : '') + '> ';\n };\n\n _proto.paragraph = function paragraph(text) {\n return '<p>' + text + '</p>\\n';\n };\n\n _proto.table = function table(header, body) {\n if (body) body = '<tbody>' + body + '</tbody>';\n return '<table>\\n' + '<thead>\\n' + header + '</thead>\\n' + body + '</table>\\n';\n };\n\n _proto.tablerow = function tablerow(content) {\n return '<tr>\\n' + content + '</tr>\\n';\n };\n\n _proto.tablecell = function tablecell(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align ? '<' + type + ' align=\"' + flags.align + '\">' : '<' + type + '>';\n return tag + content + '</' + type + '>\\n';\n } // span level renderer\n ;\n\n _proto.strong = function strong(text) {\n return '<strong>' + text + '</strong>';\n };\n\n _proto.em = function em(text) {\n return '<em>' + text + '</em>';\n };\n\n _proto.codespan = function codespan(text) {\n return '<code>' + text + '</code>';\n };\n\n _proto.br = function br() {\n return this.options.xhtml ? '<br/>' : '<br>';\n };\n\n _proto.del = function del(text) {\n return '<del>' + text + '</del>';\n };\n\n _proto.link = function link(href, title, text) {\n href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '<a href=\"' + escape$1(href) + '\"';\n\n if (title) {\n out += ' title=\"' + title + '\"';\n }\n\n out += '>' + text + '</a>';\n return out;\n };\n\n _proto.image = function image(href, title, text) {\n href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '<img src=\"' + href + '\" alt=\"' + text + '\"';\n\n if (title) {\n out += ' title=\"' + title + '\"';\n }\n\n out += this.options.xhtml ? '/>' : '>';\n return out;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n return Renderer;\n }();\n\n /**\n * TextRenderer\n * returns only the textual part of the token\n */\n var TextRenderer_1 = /*#__PURE__*/function () {\n function TextRenderer() {}\n\n var _proto = TextRenderer.prototype;\n\n // no need for block level renderers\n _proto.strong = function strong(text) {\n return text;\n };\n\n _proto.em = function em(text) {\n return text;\n };\n\n _proto.codespan = function codespan(text) {\n return text;\n };\n\n _proto.del = function del(text) {\n return text;\n };\n\n _proto.html = function html(text) {\n return text;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n _proto.link = function link(href, title, text) {\n return '' + text;\n };\n\n _proto.image = function image(href, title, text) {\n return '' + text;\n };\n\n _proto.br = function br() {\n return '';\n };\n\n return TextRenderer;\n }();\n\n /**\n * Slugger generates header id\n */\n var Slugger_1 = /*#__PURE__*/function () {\n function Slugger() {\n this.seen = {};\n }\n\n var _proto = Slugger.prototype;\n\n _proto.serialize = function serialize(value) {\n return value.toLowerCase().trim() // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '') // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n /**\n * Finds the next safe (unique) slug to use\n */\n ;\n\n _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {\n var slug = originalSlug;\n var occurenceAccumulator = 0;\n\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n\n return slug;\n }\n /**\n * Convert string to unique id\n * @param {object} options\n * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.\n */\n ;\n\n _proto.slug = function slug(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n };\n\n return Slugger;\n }();\n\n var defaults$4 = defaults.defaults;\n var unescape$1 = helpers.unescape;\n /**\n * Parsing & Compiling\n */\n\n var Parser_1 = /*#__PURE__*/function () {\n function Parser(options) {\n this.options = options || defaults$4;\n this.options.renderer = this.options.renderer || new Renderer_1();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer_1();\n this.slugger = new Slugger_1();\n }\n /**\n * Static Parse Method\n */\n\n\n Parser.parse = function parse(tokens, options) {\n var parser = new Parser(options);\n return parser.parse(tokens);\n }\n /**\n * Static Parse Inline Method\n */\n ;\n\n Parser.parseInline = function parseInline(tokens, options) {\n var parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n /**\n * Parse Loop\n */\n ;\n\n var _proto = Parser.prototype;\n\n _proto.parse = function parse(tokens, top) {\n if (top === void 0) {\n top = true;\n }\n\n var out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape$1(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n\n case 'table':\n {\n header = ''; // header\n\n cell = '';\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), {\n header: true,\n align: token.align[j]\n });\n }\n\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.tokens.cells[j];\n cell = '';\n l3 = row.length;\n\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k]), {\n header: false,\n align: token.align[k]\n });\n }\n\n body += this.renderer.tablerow(cell);\n }\n\n out += this.renderer.table(header, body);\n continue;\n }\n\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'text') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n /**\n * Parse Inline Tokens\n */\n ;\n\n _proto.parseInline = function parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n var out = '',\n i,\n token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n\n case 'br':\n {\n out += renderer.br();\n break;\n }\n\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n };\n\n return Parser;\n }();\n\n var merge$2 = helpers.merge,\n checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation,\n escape$2 = helpers.escape;\n var getDefaults = defaults.getDefaults,\n changeDefaults = defaults.changeDefaults,\n defaults$5 = defaults.defaults;\n /**\n * Marked\n */\n\n function marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n opt = merge$2({}, marked.defaults, opt || {});\n checkSanitizeDeprecation$1(opt);\n\n if (callback) {\n var highlight = opt.highlight;\n var tokens;\n\n try {\n tokens = Lexer_1.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n var done = function done(err) {\n var out;\n\n if (!err) {\n try {\n out = Parser_1.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n return err ? callback(err) : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n if (!tokens.length) return done();\n var pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(function () {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n try {\n var _tokens = Lexer_1.lex(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(_tokens, opt.walkTokens);\n }\n\n return Parser_1.parse(_tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '<p>An error occurred:</p><pre>' + escape$2(e.message + '', true) + '</pre>';\n }\n\n throw e;\n }\n }\n /**\n * Options\n */\n\n\n marked.options = marked.setOptions = function (opt) {\n merge$2(marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n };\n\n marked.getDefaults = getDefaults;\n marked.defaults = defaults$5;\n /**\n * Use Extension\n */\n\n marked.use = function (extension) {\n var opts = merge$2({}, extension);\n\n if (extension.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer_1();\n\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n\n renderer[prop] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var ret = extension.renderer[prop].apply(renderer, args);\n\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.renderer) {\n _loop(prop);\n }\n\n opts.renderer = renderer;\n })();\n }\n\n if (extension.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();\n\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n\n tokenizer[prop] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var ret = extension.tokenizer[prop].apply(tokenizer, args);\n\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.tokenizer) {\n _loop2(prop);\n }\n\n opts.tokenizer = tokenizer;\n })();\n }\n\n if (extension.walkTokens) {\n var walkTokens = marked.defaults.walkTokens;\n\n opts.walkTokens = function (token) {\n extension.walkTokens(token);\n\n if (walkTokens) {\n walkTokens(token);\n }\n };\n }\n\n marked.setOptions(opts);\n };\n /**\n * Run callback for every token\n */\n\n\n marked.walkTokens = function (tokens, callback) {\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n callback(token);\n\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n marked.walkTokens(cell, callback);\n }\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n marked.walkTokens(_cell, callback);\n }\n }\n\n break;\n }\n\n case 'list':\n {\n marked.walkTokens(token.items, callback);\n break;\n }\n\n default:\n {\n if (token.tokens) {\n marked.walkTokens(token.tokens, callback);\n }\n }\n }\n }\n };\n /**\n * Parse Inline\n */\n\n\n marked.parseInline = function (src, opt) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked.parseInline(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n opt = merge$2({}, marked.defaults, opt || {});\n checkSanitizeDeprecation$1(opt);\n\n try {\n var tokens = Lexer_1.lexInline(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n\n return Parser_1.parseInline(tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '<p>An error occurred:</p><pre>' + escape$2(e.message + '', true) + '</pre>';\n }\n\n throw e;\n }\n };\n /**\n * Expose\n */\n\n\n marked.Parser = Parser_1;\n marked.parser = Parser_1.parse;\n marked.Renderer = Renderer_1;\n marked.TextRenderer = TextRenderer_1;\n marked.Lexer = Lexer_1;\n marked.lexer = Lexer_1.lex;\n marked.Tokenizer = Tokenizer_1;\n marked.Slugger = Slugger_1;\n marked.parse = marked;\n var marked_1 = marked;\n\n return marked_1;\n\n})));\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/marshalling.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/marshalling.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"revive\": () => (/* binding */ revive)\n/* harmony export */ });\n/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/buffer.js\");\n/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nfunction parse(text) {\r\n let data = JSON.parse(text);\r\n data = revive(data);\r\n return data;\r\n}\r\nfunction revive(obj, depth = 0) {\r\n if (!obj || depth > 200) {\r\n return obj;\r\n }\r\n if (typeof obj === 'object') {\r\n switch (obj.$mid) {\r\n case 1: return _uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.revive(obj);\r\n case 2: return new RegExp(obj.source, obj.flags);\r\n }\r\n if (obj instanceof _buffer_js__WEBPACK_IMPORTED_MODULE_0__.VSBuffer\r\n || obj instanceof Uint8Array) {\r\n return obj;\r\n }\r\n if (Array.isArray(obj)) {\r\n for (let i = 0; i < obj.length; ++i) {\r\n obj[i] = revive(obj[i], depth + 1);\r\n }\r\n }\r\n else {\r\n // walk object\r\n for (const key in obj) {\r\n if (Object.hasOwnProperty.call(obj, key)) {\r\n obj[key] = revive(obj[key], depth + 1);\r\n }\r\n }\r\n }\r\n }\r\n return obj;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/marshalling.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/mime.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/mime.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MIME_TEXT\": () => (/* binding */ MIME_TEXT),\n/* harmony export */ \"MIME_UNKNOWN\": () => (/* binding */ MIME_UNKNOWN),\n/* harmony export */ \"registerTextMime\": () => (/* binding */ registerTextMime),\n/* harmony export */ \"guessMimeTypes\": () => (/* binding */ guessMimeTypes)\n/* harmony export */ });\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _glob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./glob.js */ \"./node_modules/monaco-editor/esm/vs/base/common/glob.js\");\n/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _resources_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst MIME_TEXT = 'text/plain';\r\nconst MIME_UNKNOWN = 'application/unknown';\r\nlet registeredAssociations = [];\r\nlet nonUserRegisteredAssociations = [];\r\nlet userRegisteredAssociations = [];\r\n/**\r\n * Associate a text mime to the registry.\r\n */\r\nfunction registerTextMime(association, warnOnOverwrite = false) {\r\n // Register\r\n const associationItem = toTextMimeAssociationItem(association);\r\n registeredAssociations.push(associationItem);\r\n if (!associationItem.userConfigured) {\r\n nonUserRegisteredAssociations.push(associationItem);\r\n }\r\n else {\r\n userRegisteredAssociations.push(associationItem);\r\n }\r\n // Check for conflicts unless this is a user configured association\r\n if (warnOnOverwrite && !associationItem.userConfigured) {\r\n registeredAssociations.forEach(a => {\r\n if (a.mime === associationItem.mime || a.userConfigured) {\r\n return; // same mime or userConfigured is ok\r\n }\r\n if (associationItem.extension && a.extension === associationItem.extension) {\r\n console.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`);\r\n }\r\n if (associationItem.filename && a.filename === associationItem.filename) {\r\n console.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`);\r\n }\r\n if (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\r\n console.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`);\r\n }\r\n if (associationItem.firstline && a.firstline === associationItem.firstline) {\r\n console.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`);\r\n }\r\n });\r\n }\r\n}\r\nfunction toTextMimeAssociationItem(association) {\r\n return {\r\n id: association.id,\r\n mime: association.mime,\r\n filename: association.filename,\r\n extension: association.extension,\r\n filepattern: association.filepattern,\r\n firstline: association.firstline,\r\n userConfigured: association.userConfigured,\r\n filenameLowercase: association.filename ? association.filename.toLowerCase() : undefined,\r\n extensionLowercase: association.extension ? association.extension.toLowerCase() : undefined,\r\n filepatternLowercase: association.filepattern ? association.filepattern.toLowerCase() : undefined,\r\n filepatternOnPath: association.filepattern ? association.filepattern.indexOf(_path_js__WEBPACK_IMPORTED_MODULE_0__.posix.sep) >= 0 : false\r\n };\r\n}\r\n/**\r\n * Given a file, return the best matching mime type for it\r\n */\r\nfunction guessMimeTypes(resource, firstLine) {\r\n let path;\r\n if (resource) {\r\n switch (resource.scheme) {\r\n case _network_js__WEBPACK_IMPORTED_MODULE_3__.Schemas.file:\r\n path = resource.fsPath;\r\n break;\r\n case _network_js__WEBPACK_IMPORTED_MODULE_3__.Schemas.data:\r\n const metadata = _resources_js__WEBPACK_IMPORTED_MODULE_4__.DataUri.parseMetaData(resource);\r\n path = metadata.get(_resources_js__WEBPACK_IMPORTED_MODULE_4__.DataUri.META_DATA_LABEL);\r\n break;\r\n default:\r\n path = resource.path;\r\n }\r\n }\r\n if (!path) {\r\n return [MIME_UNKNOWN];\r\n }\r\n path = path.toLowerCase();\r\n const filename = (0,_path_js__WEBPACK_IMPORTED_MODULE_0__.basename)(path);\r\n // 1.) User configured mappings have highest priority\r\n const configuredMime = guessMimeTypeByPath(path, filename, userRegisteredAssociations);\r\n if (configuredMime) {\r\n return [configuredMime, MIME_TEXT];\r\n }\r\n // 2.) Registered mappings have middle priority\r\n const registeredMime = guessMimeTypeByPath(path, filename, nonUserRegisteredAssociations);\r\n if (registeredMime) {\r\n return [registeredMime, MIME_TEXT];\r\n }\r\n // 3.) Firstline has lowest priority\r\n if (firstLine) {\r\n const firstlineMime = guessMimeTypeByFirstline(firstLine);\r\n if (firstlineMime) {\r\n return [firstlineMime, MIME_TEXT];\r\n }\r\n }\r\n return [MIME_UNKNOWN];\r\n}\r\nfunction guessMimeTypeByPath(path, filename, associations) {\r\n let filenameMatch = null;\r\n let patternMatch = null;\r\n let extensionMatch = null;\r\n // We want to prioritize associations based on the order they are registered so that the last registered\r\n // association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\r\n for (let i = associations.length - 1; i >= 0; i--) {\r\n const association = associations[i];\r\n // First exact name match\r\n if (filename === association.filenameLowercase) {\r\n filenameMatch = association;\r\n break; // take it!\r\n }\r\n // Longest pattern match\r\n if (association.filepattern) {\r\n if (!patternMatch || association.filepattern.length > patternMatch.filepattern.length) {\r\n const target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\r\n if ((0,_glob_js__WEBPACK_IMPORTED_MODULE_2__.match)(association.filepatternLowercase, target)) {\r\n patternMatch = association;\r\n }\r\n }\r\n }\r\n // Longest extension match\r\n if (association.extension) {\r\n if (!extensionMatch || association.extension.length > extensionMatch.extension.length) {\r\n if (filename.endsWith(association.extensionLowercase)) {\r\n extensionMatch = association;\r\n }\r\n }\r\n }\r\n }\r\n // 1.) Exact name match has second highest prio\r\n if (filenameMatch) {\r\n return filenameMatch.mime;\r\n }\r\n // 2.) Match on pattern\r\n if (patternMatch) {\r\n return patternMatch.mime;\r\n }\r\n // 3.) Match on extension comes next\r\n if (extensionMatch) {\r\n return extensionMatch.mime;\r\n }\r\n return null;\r\n}\r\nfunction guessMimeTypeByFirstline(firstLine) {\r\n if ((0,_strings_js__WEBPACK_IMPORTED_MODULE_1__.startsWithUTF8BOM)(firstLine)) {\r\n firstLine = firstLine.substr(1);\r\n }\r\n if (firstLine.length > 0) {\r\n // We want to prioritize associations based on the order they are registered so that the last registered\r\n // association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\r\n for (let i = registeredAssociations.length - 1; i >= 0; i--) {\r\n const association = registeredAssociations[i];\r\n if (!association.firstline) {\r\n continue;\r\n }\r\n const matches = firstLine.match(association.firstline);\r\n if (matches && matches.length > 0) {\r\n return association.mime;\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/mime.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/navigator.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/navigator.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ArrayNavigator\": () => (/* binding */ ArrayNavigator)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ArrayNavigator {\r\n constructor(items, start = 0, end = items.length, index = start - 1) {\r\n this.items = items;\r\n this.start = start;\r\n this.end = end;\r\n this.index = index;\r\n }\r\n current() {\r\n if (this.index === this.start - 1 || this.index === this.end) {\r\n return null;\r\n }\r\n return this.items[this.index];\r\n }\r\n next() {\r\n this.index = Math.min(this.index + 1, this.end);\r\n return this.current();\r\n }\r\n previous() {\r\n this.index = Math.max(this.index - 1, this.start - 1);\r\n return this.current();\r\n }\r\n first() {\r\n this.index = this.start;\r\n return this.current();\r\n }\r\n last() {\r\n this.index = this.end - 1;\r\n return this.current();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/navigator.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/network.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/network.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Schemas\": () => (/* binding */ Schemas),\n/* harmony export */ \"RemoteAuthorities\": () => (/* binding */ RemoteAuthorities),\n/* harmony export */ \"FileAccess\": () => (/* binding */ FileAccess)\n/* harmony export */ });\n/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nvar Schemas;\r\n(function (Schemas) {\r\n /**\r\n * A schema that is used for models that exist in memory\r\n * only and that have no correspondence on a server or such.\r\n */\r\n Schemas.inMemory = 'inmemory';\r\n /**\r\n * A schema that is used for setting files\r\n */\r\n Schemas.vscode = 'vscode';\r\n /**\r\n * A schema that is used for internal private files\r\n */\r\n Schemas.internal = 'private';\r\n /**\r\n * A walk-through document.\r\n */\r\n Schemas.walkThrough = 'walkThrough';\r\n /**\r\n * An embedded code snippet.\r\n */\r\n Schemas.walkThroughSnippet = 'walkThroughSnippet';\r\n Schemas.http = 'http';\r\n Schemas.https = 'https';\r\n Schemas.file = 'file';\r\n Schemas.mailto = 'mailto';\r\n Schemas.untitled = 'untitled';\r\n Schemas.data = 'data';\r\n Schemas.command = 'command';\r\n Schemas.vscodeRemote = 'vscode-remote';\r\n Schemas.vscodeRemoteResource = 'vscode-remote-resource';\r\n Schemas.userData = 'vscode-userdata';\r\n Schemas.vscodeCustomEditor = 'vscode-custom-editor';\r\n Schemas.vscodeNotebook = 'vscode-notebook';\r\n Schemas.vscodeNotebookCell = 'vscode-notebook-cell';\r\n Schemas.vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';\r\n Schemas.vscodeSettings = 'vscode-settings';\r\n Schemas.vscodeWorkspaceTrust = 'vscode-workspace-trust';\r\n Schemas.webviewPanel = 'webview-panel';\r\n /**\r\n * Scheme used for loading the wrapper html and script in webviews.\r\n */\r\n Schemas.vscodeWebview = 'vscode-webview';\r\n /**\r\n * Scheme used for loading resources inside of webviews.\r\n */\r\n Schemas.vscodeWebviewResource = 'vscode-webview-resource';\r\n /**\r\n * Scheme used for extension pages\r\n */\r\n Schemas.extension = 'extension';\r\n /**\r\n * Scheme used as a replacement of `file` scheme to load\r\n * files with our custom protocol handler (desktop only).\r\n */\r\n Schemas.vscodeFileResource = 'vscode-file';\r\n})(Schemas || (Schemas = {}));\r\nclass RemoteAuthoritiesImpl {\r\n constructor() {\r\n this._hosts = Object.create(null);\r\n this._ports = Object.create(null);\r\n this._connectionTokens = Object.create(null);\r\n this._preferredWebSchema = 'http';\r\n this._delegate = null;\r\n }\r\n setPreferredWebSchema(schema) {\r\n this._preferredWebSchema = schema;\r\n }\r\n rewrite(uri) {\r\n if (this._delegate) {\r\n return this._delegate(uri);\r\n }\r\n const authority = uri.authority;\r\n let host = this._hosts[authority];\r\n if (host && host.indexOf(':') !== -1) {\r\n host = `[${host}]`;\r\n }\r\n const port = this._ports[authority];\r\n const connectionToken = this._connectionTokens[authority];\r\n let query = `path=${encodeURIComponent(uri.path)}`;\r\n if (typeof connectionToken === 'string') {\r\n query += `&tkn=${encodeURIComponent(connectionToken)}`;\r\n }\r\n return _uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.from({\r\n scheme: _platform_js__WEBPACK_IMPORTED_MODULE_1__.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,\r\n authority: `${host}:${port}`,\r\n path: `/vscode-remote-resource`,\r\n query\r\n });\r\n }\r\n}\r\nconst RemoteAuthorities = new RemoteAuthoritiesImpl();\r\nclass FileAccessImpl {\r\n constructor() {\r\n this.FALLBACK_AUTHORITY = 'vscode-app';\r\n }\r\n asBrowserUri(uriOrModule, moduleIdToUrl, __forceCodeFileUri) {\r\n const uri = this.toUri(uriOrModule, moduleIdToUrl);\r\n // Handle remote URIs via `RemoteAuthorities`\r\n if (uri.scheme === Schemas.vscodeRemote) {\r\n return RemoteAuthorities.rewrite(uri);\r\n }\r\n // Only convert the URI if we are in a native context and it has `file:` scheme\r\n // and we have explicitly enabled the conversion (sandbox, or ENABLE_VSCODE_BROWSER_CODE_LOADING)\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_1__.isNative && (__forceCodeFileUri || _platform_js__WEBPACK_IMPORTED_MODULE_1__.isPreferringBrowserCodeLoad) && uri.scheme === Schemas.file) {\r\n return uri.with({\r\n scheme: Schemas.vscodeFileResource,\r\n // We need to provide an authority here so that it can serve\r\n // as origin for network and loading matters in chromium.\r\n // If the URI is not coming with an authority already, we\r\n // add our own\r\n authority: uri.authority || this.FALLBACK_AUTHORITY,\r\n query: null,\r\n fragment: null\r\n });\r\n }\r\n return uri;\r\n }\r\n toUri(uriOrModule, moduleIdToUrl) {\r\n if (_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.isUri(uriOrModule)) {\r\n return uriOrModule;\r\n }\r\n return _uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.parse(moduleIdToUrl.toUrl(uriOrModule));\r\n }\r\n}\r\nconst FileAccess = new FileAccessImpl();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/network.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/numbers.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"clamp\": () => (/* binding */ clamp),\n/* harmony export */ \"MovingAverage\": () => (/* binding */ MovingAverage)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction clamp(value, min, max) {\r\n return Math.min(Math.max(value, min), max);\r\n}\r\nclass MovingAverage {\r\n constructor() {\r\n this._n = 1;\r\n this._val = 0;\r\n }\r\n update(value) {\r\n this._val = this._val + (value - this._val) / this._n;\r\n this._n += 1;\r\n return this;\r\n }\r\n get value() {\r\n return this._val;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/numbers.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/objects.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/objects.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"deepClone\": () => (/* binding */ deepClone),\n/* harmony export */ \"deepFreeze\": () => (/* binding */ deepFreeze),\n/* harmony export */ \"cloneAndChange\": () => (/* binding */ cloneAndChange),\n/* harmony export */ \"mixin\": () => (/* binding */ mixin),\n/* harmony export */ \"equals\": () => (/* binding */ equals),\n/* harmony export */ \"getOrDefault\": () => (/* binding */ getOrDefault)\n/* harmony export */ });\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction deepClone(obj) {\r\n if (!obj || typeof obj !== 'object') {\r\n return obj;\r\n }\r\n if (obj instanceof RegExp) {\r\n // See https://github.com/microsoft/TypeScript/issues/10990\r\n return obj;\r\n }\r\n const result = Array.isArray(obj) ? [] : {};\r\n Object.keys(obj).forEach((key) => {\r\n if (obj[key] && typeof obj[key] === 'object') {\r\n result[key] = deepClone(obj[key]);\r\n }\r\n else {\r\n result[key] = obj[key];\r\n }\r\n });\r\n return result;\r\n}\r\nfunction deepFreeze(obj) {\r\n if (!obj || typeof obj !== 'object') {\r\n return obj;\r\n }\r\n const stack = [obj];\r\n while (stack.length > 0) {\r\n const obj = stack.shift();\r\n Object.freeze(obj);\r\n for (const key in obj) {\r\n if (_hasOwnProperty.call(obj, key)) {\r\n const prop = obj[key];\r\n if (typeof prop === 'object' && !Object.isFrozen(prop)) {\r\n stack.push(prop);\r\n }\r\n }\r\n }\r\n }\r\n return obj;\r\n}\r\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\r\nfunction cloneAndChange(obj, changer) {\r\n return _cloneAndChange(obj, changer, new Set());\r\n}\r\nfunction _cloneAndChange(obj, changer, seen) {\r\n if ((0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isUndefinedOrNull)(obj)) {\r\n return obj;\r\n }\r\n const changed = changer(obj);\r\n if (typeof changed !== 'undefined') {\r\n return changed;\r\n }\r\n if ((0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isArray)(obj)) {\r\n const r1 = [];\r\n for (const e of obj) {\r\n r1.push(_cloneAndChange(e, changer, seen));\r\n }\r\n return r1;\r\n }\r\n if ((0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(obj)) {\r\n if (seen.has(obj)) {\r\n throw new Error('Cannot clone recursive data-structure');\r\n }\r\n seen.add(obj);\r\n const r2 = {};\r\n for (let i2 in obj) {\r\n if (_hasOwnProperty.call(obj, i2)) {\r\n r2[i2] = _cloneAndChange(obj[i2], changer, seen);\r\n }\r\n }\r\n seen.delete(obj);\r\n return r2;\r\n }\r\n return obj;\r\n}\r\n/**\r\n * Copies all properties of source into destination. The optional parameter \"overwrite\" allows to control\r\n * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite).\r\n */\r\nfunction mixin(destination, source, overwrite = true) {\r\n if (!(0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(destination)) {\r\n return source;\r\n }\r\n if ((0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(source)) {\r\n Object.keys(source).forEach(key => {\r\n if (key in destination) {\r\n if (overwrite) {\r\n if ((0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(destination[key]) && (0,_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(source[key])) {\r\n mixin(destination[key], source[key], overwrite);\r\n }\r\n else {\r\n destination[key] = source[key];\r\n }\r\n }\r\n }\r\n else {\r\n destination[key] = source[key];\r\n }\r\n });\r\n }\r\n return destination;\r\n}\r\nfunction equals(one, other) {\r\n if (one === other) {\r\n return true;\r\n }\r\n if (one === null || one === undefined || other === null || other === undefined) {\r\n return false;\r\n }\r\n if (typeof one !== typeof other) {\r\n return false;\r\n }\r\n if (typeof one !== 'object') {\r\n return false;\r\n }\r\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\r\n return false;\r\n }\r\n let i;\r\n let key;\r\n if (Array.isArray(one)) {\r\n if (one.length !== other.length) {\r\n return false;\r\n }\r\n for (i = 0; i < one.length; i++) {\r\n if (!equals(one[i], other[i])) {\r\n return false;\r\n }\r\n }\r\n }\r\n else {\r\n const oneKeys = [];\r\n for (key in one) {\r\n oneKeys.push(key);\r\n }\r\n oneKeys.sort();\r\n const otherKeys = [];\r\n for (key in other) {\r\n otherKeys.push(key);\r\n }\r\n otherKeys.sort();\r\n if (!equals(oneKeys, otherKeys)) {\r\n return false;\r\n }\r\n for (i = 0; i < oneKeys.length; i++) {\r\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\nfunction getOrDefault(obj, fn, defaultValue) {\r\n const result = fn(obj);\r\n return typeof result === 'undefined' ? defaultValue : result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/objects.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/path.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/path.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"win32\": () => (/* binding */ win32),\n/* harmony export */ \"posix\": () => (/* binding */ posix),\n/* harmony export */ \"normalize\": () => (/* binding */ normalize),\n/* harmony export */ \"resolve\": () => (/* binding */ resolve),\n/* harmony export */ \"relative\": () => (/* binding */ relative),\n/* harmony export */ \"dirname\": () => (/* binding */ dirname),\n/* harmony export */ \"basename\": () => (/* binding */ basename),\n/* harmony export */ \"extname\": () => (/* binding */ extname),\n/* harmony export */ \"sep\": () => (/* binding */ sep)\n/* harmony export */ });\n/* harmony import */ var _process_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./process.js */ \"./node_modules/monaco-editor/esm/vs/base/common/process.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace\r\n// Copied from: https://github.com/nodejs/node/blob/v12.8.1/lib/path.js\r\n/**\r\n * Copyright Joyent, Inc. and other Node contributors.\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a\r\n * copy of this software and associated documentation files (the\r\n * \"Software\"), to deal in the Software without restriction, including\r\n * without limitation the rights to use, copy, modify, merge, publish,\r\n * distribute, sublicense, and/or sell copies of the Software, and to permit\r\n * persons to whom the Software is furnished to do so, subject to the\r\n * following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included\r\n * in all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\r\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\r\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n */\r\n\r\nconst CHAR_UPPERCASE_A = 65; /* A */\r\nconst CHAR_LOWERCASE_A = 97; /* a */\r\nconst CHAR_UPPERCASE_Z = 90; /* Z */\r\nconst CHAR_LOWERCASE_Z = 122; /* z */\r\nconst CHAR_DOT = 46; /* . */\r\nconst CHAR_FORWARD_SLASH = 47; /* / */\r\nconst CHAR_BACKWARD_SLASH = 92; /* \\ */\r\nconst CHAR_COLON = 58; /* : */\r\nconst CHAR_QUESTION_MARK = 63; /* ? */\r\nclass ErrorInvalidArgType extends Error {\r\n constructor(name, expected, actual) {\r\n // determiner: 'must be' or 'must not be'\r\n let determiner;\r\n if (typeof expected === 'string' && expected.indexOf('not ') === 0) {\r\n determiner = 'must not be';\r\n expected = expected.replace(/^not /, '');\r\n }\r\n else {\r\n determiner = 'must be';\r\n }\r\n const type = name.indexOf('.') !== -1 ? 'property' : 'argument';\r\n let msg = `The \"${name}\" ${type} ${determiner} of type ${expected}`;\r\n msg += `. Received type ${typeof actual}`;\r\n super(msg);\r\n this.code = 'ERR_INVALID_ARG_TYPE';\r\n }\r\n}\r\nfunction validateString(value, name) {\r\n if (typeof value !== 'string') {\r\n throw new ErrorInvalidArgType(name, 'string', value);\r\n }\r\n}\r\nfunction isPathSeparator(code) {\r\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\r\n}\r\nfunction isPosixPathSeparator(code) {\r\n return code === CHAR_FORWARD_SLASH;\r\n}\r\nfunction isWindowsDeviceRoot(code) {\r\n return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z ||\r\n code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z;\r\n}\r\n// Resolves . and .. elements in a path with directory names\r\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\r\n let res = '';\r\n let lastSegmentLength = 0;\r\n let lastSlash = -1;\r\n let dots = 0;\r\n let code = 0;\r\n for (let i = 0; i <= path.length; ++i) {\r\n if (i < path.length) {\r\n code = path.charCodeAt(i);\r\n }\r\n else if (isPathSeparator(code)) {\r\n break;\r\n }\r\n else {\r\n code = CHAR_FORWARD_SLASH;\r\n }\r\n if (isPathSeparator(code)) {\r\n if (lastSlash === i - 1 || dots === 1) {\r\n // NOOP\r\n }\r\n else if (dots === 2) {\r\n if (res.length < 2 || lastSegmentLength !== 2 ||\r\n res.charCodeAt(res.length - 1) !== CHAR_DOT ||\r\n res.charCodeAt(res.length - 2) !== CHAR_DOT) {\r\n if (res.length > 2) {\r\n const lastSlashIndex = res.lastIndexOf(separator);\r\n if (lastSlashIndex === -1) {\r\n res = '';\r\n lastSegmentLength = 0;\r\n }\r\n else {\r\n res = res.slice(0, lastSlashIndex);\r\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\r\n }\r\n lastSlash = i;\r\n dots = 0;\r\n continue;\r\n }\r\n else if (res.length !== 0) {\r\n res = '';\r\n lastSegmentLength = 0;\r\n lastSlash = i;\r\n dots = 0;\r\n continue;\r\n }\r\n }\r\n if (allowAboveRoot) {\r\n res += res.length > 0 ? `${separator}..` : '..';\r\n lastSegmentLength = 2;\r\n }\r\n }\r\n else {\r\n if (res.length > 0) {\r\n res += `${separator}${path.slice(lastSlash + 1, i)}`;\r\n }\r\n else {\r\n res = path.slice(lastSlash + 1, i);\r\n }\r\n lastSegmentLength = i - lastSlash - 1;\r\n }\r\n lastSlash = i;\r\n dots = 0;\r\n }\r\n else if (code === CHAR_DOT && dots !== -1) {\r\n ++dots;\r\n }\r\n else {\r\n dots = -1;\r\n }\r\n }\r\n return res;\r\n}\r\nfunction _format(sep, pathObject) {\r\n if (pathObject === null || typeof pathObject !== 'object') {\r\n throw new ErrorInvalidArgType('pathObject', 'Object', pathObject);\r\n }\r\n const dir = pathObject.dir || pathObject.root;\r\n const base = pathObject.base ||\r\n `${pathObject.name || ''}${pathObject.ext || ''}`;\r\n if (!dir) {\r\n return base;\r\n }\r\n return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;\r\n}\r\nconst win32 = {\r\n // path.resolve([from ...], to)\r\n resolve(...pathSegments) {\r\n let resolvedDevice = '';\r\n let resolvedTail = '';\r\n let resolvedAbsolute = false;\r\n for (let i = pathSegments.length - 1; i >= -1; i--) {\r\n let path;\r\n if (i >= 0) {\r\n path = pathSegments[i];\r\n validateString(path, 'path');\r\n // Skip empty entries\r\n if (path.length === 0) {\r\n continue;\r\n }\r\n }\r\n else if (resolvedDevice.length === 0) {\r\n path = _process_js__WEBPACK_IMPORTED_MODULE_0__.cwd();\r\n }\r\n else {\r\n // Windows has the concept of drive-specific current working\r\n // directories. If we've resolved a drive letter but not yet an\r\n // absolute path, get cwd for that drive, or the process cwd if\r\n // the drive cwd is not available. We're sure the device is not\r\n // a UNC path at this points, because UNC paths are always absolute.\r\n path = _process_js__WEBPACK_IMPORTED_MODULE_0__.env[`=${resolvedDevice}`] || _process_js__WEBPACK_IMPORTED_MODULE_0__.cwd();\r\n // Verify that a cwd was found and that it actually points\r\n // to our drive. If not, default to the drive's root.\r\n if (path === undefined ||\r\n path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&\r\n path.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\r\n path = `${resolvedDevice}\\\\`;\r\n }\r\n }\r\n const len = path.length;\r\n let rootEnd = 0;\r\n let device = '';\r\n let isAbsolute = false;\r\n const code = path.charCodeAt(0);\r\n // Try to match a root\r\n if (len === 1) {\r\n if (isPathSeparator(code)) {\r\n // `path` contains just a path separator\r\n rootEnd = 1;\r\n isAbsolute = true;\r\n }\r\n }\r\n else if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n // If we started with a separator, we know we at least have an\r\n // absolute path of some kind (UNC or otherwise)\r\n isAbsolute = true;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n const firstPart = path.slice(last, j);\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len || j !== last) {\r\n // We matched a UNC root\r\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\r\n rootEnd = j;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n rootEnd = 1;\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) &&\r\n path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n device = path.slice(0, 2);\r\n rootEnd = 2;\r\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\r\n // Treat separator following drive name as an absolute path\r\n // indicator\r\n isAbsolute = true;\r\n rootEnd = 3;\r\n }\r\n }\r\n if (device.length > 0) {\r\n if (resolvedDevice.length > 0) {\r\n if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {\r\n // This path points to another device so it is not applicable\r\n continue;\r\n }\r\n }\r\n else {\r\n resolvedDevice = device;\r\n }\r\n }\r\n if (resolvedAbsolute) {\r\n if (resolvedDevice.length > 0) {\r\n break;\r\n }\r\n }\r\n else {\r\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\r\n resolvedAbsolute = isAbsolute;\r\n if (isAbsolute && resolvedDevice.length > 0) {\r\n break;\r\n }\r\n }\r\n }\r\n // At this point the path should be resolved to a full absolute path,\r\n // but handle relative paths to be safe (might happen when process.cwd()\r\n // fails)\r\n // Normalize the tail path\r\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\\\', isPathSeparator);\r\n return resolvedAbsolute ?\r\n `${resolvedDevice}\\\\${resolvedTail}` :\r\n `${resolvedDevice}${resolvedTail}` || '.';\r\n },\r\n normalize(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return '.';\r\n }\r\n let rootEnd = 0;\r\n let device;\r\n let isAbsolute = false;\r\n const code = path.charCodeAt(0);\r\n // Try to match a root\r\n if (len === 1) {\r\n // `path` contains just a single char, exit early to avoid\r\n // unnecessary work\r\n return isPosixPathSeparator(code) ? '\\\\' : path;\r\n }\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n // If we started with a separator, we know we at least have an absolute\r\n // path of some kind (UNC or otherwise)\r\n isAbsolute = true;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n const firstPart = path.slice(last, j);\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n // Return the normalized version of the UNC root since there\r\n // is nothing left to process\r\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\r\n }\r\n if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\r\n rootEnd = j;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n rootEnd = 1;\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n device = path.slice(0, 2);\r\n rootEnd = 2;\r\n if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\r\n // Treat separator following drive name as an absolute path\r\n // indicator\r\n isAbsolute = true;\r\n rootEnd = 3;\r\n }\r\n }\r\n let tail = rootEnd < len ?\r\n normalizeString(path.slice(rootEnd), !isAbsolute, '\\\\', isPathSeparator) :\r\n '';\r\n if (tail.length === 0 && !isAbsolute) {\r\n tail = '.';\r\n }\r\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\r\n tail += '\\\\';\r\n }\r\n if (device === undefined) {\r\n return isAbsolute ? `\\\\${tail}` : tail;\r\n }\r\n return isAbsolute ? `${device}\\\\${tail}` : `${device}${tail}`;\r\n },\r\n isAbsolute(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return false;\r\n }\r\n const code = path.charCodeAt(0);\r\n return isPathSeparator(code) ||\r\n // Possible device root\r\n len > 2 &&\r\n isWindowsDeviceRoot(code) &&\r\n path.charCodeAt(1) === CHAR_COLON &&\r\n isPathSeparator(path.charCodeAt(2));\r\n },\r\n join(...paths) {\r\n if (paths.length === 0) {\r\n return '.';\r\n }\r\n let joined;\r\n let firstPart;\r\n for (let i = 0; i < paths.length; ++i) {\r\n const arg = paths[i];\r\n validateString(arg, 'path');\r\n if (arg.length > 0) {\r\n if (joined === undefined) {\r\n joined = firstPart = arg;\r\n }\r\n else {\r\n joined += `\\\\${arg}`;\r\n }\r\n }\r\n }\r\n if (joined === undefined) {\r\n return '.';\r\n }\r\n // Make sure that the joined path doesn't start with two slashes, because\r\n // normalize() will mistake it for an UNC path then.\r\n //\r\n // This step is skipped when it is very clear that the user actually\r\n // intended to point at an UNC path. This is assumed when the first\r\n // non-empty string arguments starts with exactly two slashes followed by\r\n // at least one more non-slash character.\r\n //\r\n // Note that for normalize() to treat a path as an UNC path it needs to\r\n // have at least 2 components, so we don't filter for that here.\r\n // This means that the user can use join to construct UNC paths from\r\n // a server name and a share name; for example:\r\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\')\r\n let needsReplace = true;\r\n let slashCount = 0;\r\n if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) {\r\n ++slashCount;\r\n const firstLen = firstPart.length;\r\n if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {\r\n ++slashCount;\r\n if (firstLen > 2) {\r\n if (isPathSeparator(firstPart.charCodeAt(2))) {\r\n ++slashCount;\r\n }\r\n else {\r\n // We matched a UNC path in the first part\r\n needsReplace = false;\r\n }\r\n }\r\n }\r\n }\r\n if (needsReplace) {\r\n // Find any more consecutive slashes we need to replace\r\n while (slashCount < joined.length &&\r\n isPathSeparator(joined.charCodeAt(slashCount))) {\r\n slashCount++;\r\n }\r\n // Replace the slashes if needed\r\n if (slashCount >= 2) {\r\n joined = `\\\\${joined.slice(slashCount)}`;\r\n }\r\n }\r\n return win32.normalize(joined);\r\n },\r\n // It will solve the relative path from `from` to `to`, for instance:\r\n // from = 'C:\\\\orandea\\\\test\\\\aaa'\r\n // to = 'C:\\\\orandea\\\\impl\\\\bbb'\r\n // The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\r\n relative(from, to) {\r\n validateString(from, 'from');\r\n validateString(to, 'to');\r\n if (from === to) {\r\n return '';\r\n }\r\n const fromOrig = win32.resolve(from);\r\n const toOrig = win32.resolve(to);\r\n if (fromOrig === toOrig) {\r\n return '';\r\n }\r\n from = fromOrig.toLowerCase();\r\n to = toOrig.toLowerCase();\r\n if (from === to) {\r\n return '';\r\n }\r\n // Trim any leading backslashes\r\n let fromStart = 0;\r\n while (fromStart < from.length &&\r\n from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {\r\n fromStart++;\r\n }\r\n // Trim trailing backslashes (applicable to UNC paths only)\r\n let fromEnd = from.length;\r\n while (fromEnd - 1 > fromStart &&\r\n from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {\r\n fromEnd--;\r\n }\r\n const fromLen = fromEnd - fromStart;\r\n // Trim any leading backslashes\r\n let toStart = 0;\r\n while (toStart < to.length &&\r\n to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\r\n toStart++;\r\n }\r\n // Trim trailing backslashes (applicable to UNC paths only)\r\n let toEnd = to.length;\r\n while (toEnd - 1 > toStart &&\r\n to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {\r\n toEnd--;\r\n }\r\n const toLen = toEnd - toStart;\r\n // Compare paths to find the longest common path from root\r\n const length = fromLen < toLen ? fromLen : toLen;\r\n let lastCommonSep = -1;\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const fromCode = from.charCodeAt(fromStart + i);\r\n if (fromCode !== to.charCodeAt(toStart + i)) {\r\n break;\r\n }\r\n else if (fromCode === CHAR_BACKWARD_SLASH) {\r\n lastCommonSep = i;\r\n }\r\n }\r\n // We found a mismatch before the first common path separator was seen, so\r\n // return the original `to`.\r\n if (i !== length) {\r\n if (lastCommonSep === -1) {\r\n return toOrig;\r\n }\r\n }\r\n else {\r\n if (toLen > length) {\r\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\r\n // We get here if `from` is the exact base path for `to`.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\r\n return toOrig.slice(toStart + i + 1);\r\n }\r\n if (i === 2) {\r\n // We get here if `from` is the device root.\r\n // For example: from='C:\\\\'; to='C:\\\\foo'\r\n return toOrig.slice(toStart + i);\r\n }\r\n }\r\n if (fromLen > length) {\r\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\r\n // We get here if `to` is the exact base path for `from`.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\r\n lastCommonSep = i;\r\n }\r\n else if (i === 2) {\r\n // We get here if `to` is the device root.\r\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\r\n lastCommonSep = 3;\r\n }\r\n }\r\n if (lastCommonSep === -1) {\r\n lastCommonSep = 0;\r\n }\r\n }\r\n let out = '';\r\n // Generate the relative path based on the path difference between `to` and\r\n // `from`\r\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\r\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\r\n out += out.length === 0 ? '..' : '\\\\..';\r\n }\r\n }\r\n toStart += lastCommonSep;\r\n // Lastly, append the rest of the destination (`to`) path that comes after\r\n // the common path parts\r\n if (out.length > 0) {\r\n return `${out}${toOrig.slice(toStart, toEnd)}`;\r\n }\r\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\r\n ++toStart;\r\n }\r\n return toOrig.slice(toStart, toEnd);\r\n },\r\n toNamespacedPath(path) {\r\n // Note: this will *probably* throw somewhere.\r\n if (typeof path !== 'string') {\r\n return path;\r\n }\r\n if (path.length === 0) {\r\n return '';\r\n }\r\n const resolvedPath = win32.resolve(path);\r\n if (resolvedPath.length <= 2) {\r\n return path;\r\n }\r\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\r\n // Possible UNC root\r\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\r\n const code = resolvedPath.charCodeAt(2);\r\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\r\n // Matched non-long UNC root, convert the path to a long UNC path\r\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\r\n }\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&\r\n resolvedPath.charCodeAt(1) === CHAR_COLON &&\r\n resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\r\n // Matched device root, convert the path to a long UNC path\r\n return `\\\\\\\\?\\\\${resolvedPath}`;\r\n }\r\n return path;\r\n },\r\n dirname(path) {\r\n validateString(path, 'path');\r\n const len = path.length;\r\n if (len === 0) {\r\n return '.';\r\n }\r\n let rootEnd = -1;\r\n let offset = 0;\r\n const code = path.charCodeAt(0);\r\n if (len === 1) {\r\n // `path` contains just a path separator, exit early to avoid\r\n // unnecessary work or a dot.\r\n return isPathSeparator(code) ? path : '.';\r\n }\r\n // Try to match a root\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n rootEnd = offset = 1;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n return path;\r\n }\r\n if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n // Offset by 1 to include the separator after the UNC root to\r\n // treat it as a \"normal root\" on top of a (UNC) root\r\n rootEnd = offset = j + 1;\r\n }\r\n }\r\n }\r\n }\r\n // Possible device root\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;\r\n offset = rootEnd;\r\n }\r\n let end = -1;\r\n let matchedSlash = true;\r\n for (let i = len - 1; i >= offset; --i) {\r\n if (isPathSeparator(path.charCodeAt(i))) {\r\n if (!matchedSlash) {\r\n end = i;\r\n break;\r\n }\r\n }\r\n else {\r\n // We saw the first non-path separator\r\n matchedSlash = false;\r\n }\r\n }\r\n if (end === -1) {\r\n if (rootEnd === -1) {\r\n return '.';\r\n }\r\n end = rootEnd;\r\n }\r\n return path.slice(0, end);\r\n },\r\n basename(path, ext) {\r\n if (ext !== undefined) {\r\n validateString(ext, 'ext');\r\n }\r\n validateString(path, 'path');\r\n let start = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i;\r\n // Check for a drive letter prefix so as not to mistake the following\r\n // path separator as an extra separator at the end of the path that can be\r\n // disregarded\r\n if (path.length >= 2 &&\r\n isWindowsDeviceRoot(path.charCodeAt(0)) &&\r\n path.charCodeAt(1) === CHAR_COLON) {\r\n start = 2;\r\n }\r\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\r\n if (ext === path) {\r\n return '';\r\n }\r\n let extIdx = ext.length - 1;\r\n let firstNonSlashEnd = -1;\r\n for (i = path.length - 1; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else {\r\n if (firstNonSlashEnd === -1) {\r\n // We saw the first non-path separator, remember this index in case\r\n // we need it if the extension ends up not matching\r\n matchedSlash = false;\r\n firstNonSlashEnd = i + 1;\r\n }\r\n if (extIdx >= 0) {\r\n // Try to match the explicit extension\r\n if (code === ext.charCodeAt(extIdx)) {\r\n if (--extIdx === -1) {\r\n // We matched the extension, so mark this as the end of our path\r\n // component\r\n end = i;\r\n }\r\n }\r\n else {\r\n // Extension does not match, so our result is the entire path\r\n // component\r\n extIdx = -1;\r\n end = firstNonSlashEnd;\r\n }\r\n }\r\n }\r\n }\r\n if (start === end) {\r\n end = firstNonSlashEnd;\r\n }\r\n else if (end === -1) {\r\n end = path.length;\r\n }\r\n return path.slice(start, end);\r\n }\r\n for (i = path.length - 1; i >= start; --i) {\r\n if (isPathSeparator(path.charCodeAt(i))) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // path component\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n }\r\n if (end === -1) {\r\n return '';\r\n }\r\n return path.slice(start, end);\r\n },\r\n extname(path) {\r\n validateString(path, 'path');\r\n let start = 0;\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Check for a drive letter prefix so as not to mistake the following\r\n // path separator as an extra separator at the end of the path that can be\r\n // disregarded\r\n if (path.length >= 2 &&\r\n path.charCodeAt(1) === CHAR_COLON &&\r\n isWindowsDeviceRoot(path.charCodeAt(0))) {\r\n start = startPart = 2;\r\n }\r\n for (let i = path.length - 1; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (startDot === -1 ||\r\n end === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n return '';\r\n }\r\n return path.slice(startDot, end);\r\n },\r\n format: _format.bind(null, '\\\\'),\r\n parse(path) {\r\n validateString(path, 'path');\r\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\r\n if (path.length === 0) {\r\n return ret;\r\n }\r\n const len = path.length;\r\n let rootEnd = 0;\r\n let code = path.charCodeAt(0);\r\n if (len === 1) {\r\n if (isPathSeparator(code)) {\r\n // `path` contains just a path separator, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n ret.base = ret.name = path;\r\n return ret;\r\n }\r\n // Try to match a root\r\n if (isPathSeparator(code)) {\r\n // Possible UNC root\r\n rootEnd = 1;\r\n if (isPathSeparator(path.charCodeAt(1))) {\r\n // Matched double path separator at beginning\r\n let j = 2;\r\n let last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more path separators\r\n while (j < len && isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j < len && j !== last) {\r\n // Matched!\r\n last = j;\r\n // Match 1 or more non-path separators\r\n while (j < len && !isPathSeparator(path.charCodeAt(j))) {\r\n j++;\r\n }\r\n if (j === len) {\r\n // We matched a UNC root only\r\n rootEnd = j;\r\n }\r\n else if (j !== last) {\r\n // We matched a UNC root with leftovers\r\n rootEnd = j + 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\r\n // Possible device root\r\n if (len <= 2) {\r\n // `path` contains just a drive root, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n rootEnd = 2;\r\n if (isPathSeparator(path.charCodeAt(2))) {\r\n if (len === 3) {\r\n // `path` contains just a drive root, exit early to avoid\r\n // unnecessary work\r\n ret.root = ret.dir = path;\r\n return ret;\r\n }\r\n rootEnd = 3;\r\n }\r\n }\r\n if (rootEnd > 0) {\r\n ret.root = path.slice(0, rootEnd);\r\n }\r\n let startDot = -1;\r\n let startPart = rootEnd;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i = path.length - 1;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Get non-dir info\r\n for (; i >= rootEnd; --i) {\r\n code = path.charCodeAt(i);\r\n if (isPathSeparator(code)) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (end !== -1) {\r\n if (startDot === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n ret.base = ret.name = path.slice(startPart, end);\r\n }\r\n else {\r\n ret.name = path.slice(startPart, startDot);\r\n ret.base = path.slice(startPart, end);\r\n ret.ext = path.slice(startDot, end);\r\n }\r\n }\r\n // If the directory is the root, use the entire root as the `dir` including\r\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\r\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\r\n if (startPart > 0 && startPart !== rootEnd) {\r\n ret.dir = path.slice(0, startPart - 1);\r\n }\r\n else {\r\n ret.dir = ret.root;\r\n }\r\n return ret;\r\n },\r\n sep: '\\\\',\r\n delimiter: ';',\r\n win32: null,\r\n posix: null\r\n};\r\nconst posix = {\r\n // path.resolve([from ...], to)\r\n resolve(...pathSegments) {\r\n let resolvedPath = '';\r\n let resolvedAbsolute = false;\r\n for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\r\n const path = i >= 0 ? pathSegments[i] : _process_js__WEBPACK_IMPORTED_MODULE_0__.cwd();\r\n validateString(path, 'path');\r\n // Skip empty entries\r\n if (path.length === 0) {\r\n continue;\r\n }\r\n resolvedPath = `${path}/${resolvedPath}`;\r\n resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n }\r\n // At this point the path should be resolved to a full absolute path, but\r\n // handle relative paths to be safe (might happen when process.cwd() fails)\r\n // Normalize the path\r\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);\r\n if (resolvedAbsolute) {\r\n return `/${resolvedPath}`;\r\n }\r\n return resolvedPath.length > 0 ? resolvedPath : '.';\r\n },\r\n normalize(path) {\r\n validateString(path, 'path');\r\n if (path.length === 0) {\r\n return '.';\r\n }\r\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;\r\n // Normalize the path\r\n path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator);\r\n if (path.length === 0) {\r\n if (isAbsolute) {\r\n return '/';\r\n }\r\n return trailingSeparator ? './' : '.';\r\n }\r\n if (trailingSeparator) {\r\n path += '/';\r\n }\r\n return isAbsolute ? `/${path}` : path;\r\n },\r\n isAbsolute(path) {\r\n validateString(path, 'path');\r\n return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n },\r\n join(...paths) {\r\n if (paths.length === 0) {\r\n return '.';\r\n }\r\n let joined;\r\n for (let i = 0; i < paths.length; ++i) {\r\n const arg = paths[i];\r\n validateString(arg, 'path');\r\n if (arg.length > 0) {\r\n if (joined === undefined) {\r\n joined = arg;\r\n }\r\n else {\r\n joined += `/${arg}`;\r\n }\r\n }\r\n }\r\n if (joined === undefined) {\r\n return '.';\r\n }\r\n return posix.normalize(joined);\r\n },\r\n relative(from, to) {\r\n validateString(from, 'from');\r\n validateString(to, 'to');\r\n if (from === to) {\r\n return '';\r\n }\r\n // Trim leading forward slashes.\r\n from = posix.resolve(from);\r\n to = posix.resolve(to);\r\n if (from === to) {\r\n return '';\r\n }\r\n const fromStart = 1;\r\n const fromEnd = from.length;\r\n const fromLen = fromEnd - fromStart;\r\n const toStart = 1;\r\n const toLen = to.length - toStart;\r\n // Compare paths to find the longest common path from root\r\n const length = (fromLen < toLen ? fromLen : toLen);\r\n let lastCommonSep = -1;\r\n let i = 0;\r\n for (; i < length; i++) {\r\n const fromCode = from.charCodeAt(fromStart + i);\r\n if (fromCode !== to.charCodeAt(toStart + i)) {\r\n break;\r\n }\r\n else if (fromCode === CHAR_FORWARD_SLASH) {\r\n lastCommonSep = i;\r\n }\r\n }\r\n if (i === length) {\r\n if (toLen > length) {\r\n if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {\r\n // We get here if `from` is the exact base path for `to`.\r\n // For example: from='/foo/bar'; to='/foo/bar/baz'\r\n return to.slice(toStart + i + 1);\r\n }\r\n if (i === 0) {\r\n // We get here if `from` is the root\r\n // For example: from='/'; to='/foo'\r\n return to.slice(toStart + i);\r\n }\r\n }\r\n else if (fromLen > length) {\r\n if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {\r\n // We get here if `to` is the exact base path for `from`.\r\n // For example: from='/foo/bar/baz'; to='/foo/bar'\r\n lastCommonSep = i;\r\n }\r\n else if (i === 0) {\r\n // We get here if `to` is the root.\r\n // For example: from='/foo/bar'; to='/'\r\n lastCommonSep = 0;\r\n }\r\n }\r\n }\r\n let out = '';\r\n // Generate the relative path based on the path difference between `to`\r\n // and `from`.\r\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\r\n if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n out += out.length === 0 ? '..' : '/..';\r\n }\r\n }\r\n // Lastly, append the rest of the destination (`to`) path that comes after\r\n // the common path parts.\r\n return `${out}${to.slice(toStart + lastCommonSep)}`;\r\n },\r\n toNamespacedPath(path) {\r\n // Non-op on posix systems\r\n return path;\r\n },\r\n dirname(path) {\r\n validateString(path, 'path');\r\n if (path.length === 0) {\r\n return '.';\r\n }\r\n const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n let end = -1;\r\n let matchedSlash = true;\r\n for (let i = path.length - 1; i >= 1; --i) {\r\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n if (!matchedSlash) {\r\n end = i;\r\n break;\r\n }\r\n }\r\n else {\r\n // We saw the first non-path separator\r\n matchedSlash = false;\r\n }\r\n }\r\n if (end === -1) {\r\n return hasRoot ? '/' : '.';\r\n }\r\n if (hasRoot && end === 1) {\r\n return '//';\r\n }\r\n return path.slice(0, end);\r\n },\r\n basename(path, ext) {\r\n if (ext !== undefined) {\r\n validateString(ext, 'ext');\r\n }\r\n validateString(path, 'path');\r\n let start = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i;\r\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\r\n if (ext === path) {\r\n return '';\r\n }\r\n let extIdx = ext.length - 1;\r\n let firstNonSlashEnd = -1;\r\n for (i = path.length - 1; i >= 0; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else {\r\n if (firstNonSlashEnd === -1) {\r\n // We saw the first non-path separator, remember this index in case\r\n // we need it if the extension ends up not matching\r\n matchedSlash = false;\r\n firstNonSlashEnd = i + 1;\r\n }\r\n if (extIdx >= 0) {\r\n // Try to match the explicit extension\r\n if (code === ext.charCodeAt(extIdx)) {\r\n if (--extIdx === -1) {\r\n // We matched the extension, so mark this as the end of our path\r\n // component\r\n end = i;\r\n }\r\n }\r\n else {\r\n // Extension does not match, so our result is the entire path\r\n // component\r\n extIdx = -1;\r\n end = firstNonSlashEnd;\r\n }\r\n }\r\n }\r\n }\r\n if (start === end) {\r\n end = firstNonSlashEnd;\r\n }\r\n else if (end === -1) {\r\n end = path.length;\r\n }\r\n return path.slice(start, end);\r\n }\r\n for (i = path.length - 1; i >= 0; --i) {\r\n if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n start = i + 1;\r\n break;\r\n }\r\n }\r\n else if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // path component\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n }\r\n if (end === -1) {\r\n return '';\r\n }\r\n return path.slice(start, end);\r\n },\r\n extname(path) {\r\n validateString(path, 'path');\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n for (let i = path.length - 1; i >= 0; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (startDot === -1 ||\r\n end === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n return '';\r\n }\r\n return path.slice(startDot, end);\r\n },\r\n format: _format.bind(null, '/'),\r\n parse(path) {\r\n validateString(path, 'path');\r\n const ret = { root: '', dir: '', base: '', ext: '', name: '' };\r\n if (path.length === 0) {\r\n return ret;\r\n }\r\n const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\r\n let start;\r\n if (isAbsolute) {\r\n ret.root = '/';\r\n start = 1;\r\n }\r\n else {\r\n start = 0;\r\n }\r\n let startDot = -1;\r\n let startPart = 0;\r\n let end = -1;\r\n let matchedSlash = true;\r\n let i = path.length - 1;\r\n // Track the state of characters (if any) we see before our first dot and\r\n // after any path separator we find\r\n let preDotState = 0;\r\n // Get non-dir info\r\n for (; i >= start; --i) {\r\n const code = path.charCodeAt(i);\r\n if (code === CHAR_FORWARD_SLASH) {\r\n // If we reached a path separator that was not part of a set of path\r\n // separators at the end of the string, stop now\r\n if (!matchedSlash) {\r\n startPart = i + 1;\r\n break;\r\n }\r\n continue;\r\n }\r\n if (end === -1) {\r\n // We saw the first non-path separator, mark this as the end of our\r\n // extension\r\n matchedSlash = false;\r\n end = i + 1;\r\n }\r\n if (code === CHAR_DOT) {\r\n // If this is our first dot, mark it as the start of our extension\r\n if (startDot === -1) {\r\n startDot = i;\r\n }\r\n else if (preDotState !== 1) {\r\n preDotState = 1;\r\n }\r\n }\r\n else if (startDot !== -1) {\r\n // We saw a non-dot and non-path separator before our dot, so we should\r\n // have a good chance at having a non-empty extension\r\n preDotState = -1;\r\n }\r\n }\r\n if (end !== -1) {\r\n const start = startPart === 0 && isAbsolute ? 1 : startPart;\r\n if (startDot === -1 ||\r\n // We saw a non-dot character immediately before the dot\r\n preDotState === 0 ||\r\n // The (right-most) trimmed path component is exactly '..'\r\n (preDotState === 1 &&\r\n startDot === end - 1 &&\r\n startDot === startPart + 1)) {\r\n ret.base = ret.name = path.slice(start, end);\r\n }\r\n else {\r\n ret.name = path.slice(start, startDot);\r\n ret.base = path.slice(start, end);\r\n ret.ext = path.slice(startDot, end);\r\n }\r\n }\r\n if (startPart > 0) {\r\n ret.dir = path.slice(0, startPart - 1);\r\n }\r\n else if (isAbsolute) {\r\n ret.dir = '/';\r\n }\r\n return ret;\r\n },\r\n sep: '/',\r\n delimiter: ':',\r\n win32: null,\r\n posix: null\r\n};\r\nposix.win32 = win32.win32 = win32;\r\nposix.posix = win32.posix = posix;\r\nconst normalize = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.normalize : posix.normalize);\r\nconst resolve = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.resolve : posix.resolve);\r\nconst relative = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.relative : posix.relative);\r\nconst dirname = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.dirname : posix.dirname);\r\nconst basename = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.basename : posix.basename);\r\nconst extname = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.extname : posix.extname);\r\nconst sep = (_process_js__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32' ? win32.sep : posix.sep);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/path.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/platform.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/platform.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isElectronSandboxed\": () => (/* binding */ isElectronSandboxed),\n/* harmony export */ \"browserCodeLoadingCacheStrategy\": () => (/* binding */ browserCodeLoadingCacheStrategy),\n/* harmony export */ \"isPreferringBrowserCodeLoad\": () => (/* binding */ isPreferringBrowserCodeLoad),\n/* harmony export */ \"isWindows\": () => (/* binding */ isWindows),\n/* harmony export */ \"isMacintosh\": () => (/* binding */ isMacintosh),\n/* harmony export */ \"isLinux\": () => (/* binding */ isLinux),\n/* harmony export */ \"isNative\": () => (/* binding */ isNative),\n/* harmony export */ \"isWeb\": () => (/* binding */ isWeb),\n/* harmony export */ \"isIOS\": () => (/* binding */ isIOS),\n/* harmony export */ \"userAgent\": () => (/* binding */ userAgent),\n/* harmony export */ \"globals\": () => (/* binding */ globals),\n/* harmony export */ \"setImmediate\": () => (/* binding */ setImmediate),\n/* harmony export */ \"OS\": () => (/* binding */ OS),\n/* harmony export */ \"isLittleEndian\": () => (/* binding */ isLittleEndian)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nconst LANGUAGE_DEFAULT = 'en';\r\nlet _isWindows = false;\r\nlet _isMacintosh = false;\r\nlet _isLinux = false;\r\nlet _isLinuxSnap = false;\r\nlet _isNative = false;\r\nlet _isWeb = false;\r\nlet _isIOS = false;\r\nlet _locale = undefined;\r\nlet _language = LANGUAGE_DEFAULT;\r\nlet _translationsConfigFile = undefined;\r\nlet _userAgent = undefined;\r\nconst _globals = (typeof self === 'object' ? self : typeof __webpack_require__.g === 'object' ? __webpack_require__.g : {});\r\nlet nodeProcess = undefined;\r\nif (typeof process !== 'undefined') {\r\n // Native environment (non-sandboxed)\r\n nodeProcess = process;\r\n}\r\nelse if (typeof _globals.vscode !== 'undefined') {\r\n // Native environment (sandboxed)\r\n nodeProcess = _globals.vscode.process;\r\n}\r\nconst isElectronRenderer = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === 'string' && nodeProcess.type === 'renderer';\r\nconst isElectronSandboxed = isElectronRenderer && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.sandboxed);\r\nconst browserCodeLoadingCacheStrategy = (() => {\r\n // Always enabled when sandbox is enabled\r\n if (isElectronSandboxed) {\r\n return 'bypassHeatCheck';\r\n }\r\n // Otherwise, only enabled conditionally\r\n const env = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.env['ENABLE_VSCODE_BROWSER_CODE_LOADING'];\r\n if (typeof env === 'string') {\r\n if (env === 'none' || env === 'code' || env === 'bypassHeatCheck' || env === 'bypassHeatCheckAndEagerCompile') {\r\n return env;\r\n }\r\n return 'bypassHeatCheck';\r\n }\r\n return undefined;\r\n})();\r\nconst isPreferringBrowserCodeLoad = typeof browserCodeLoadingCacheStrategy === 'string';\r\n// Web environment\r\nif (typeof navigator === 'object' && !isElectronRenderer) {\r\n _userAgent = navigator.userAgent;\r\n _isWindows = _userAgent.indexOf('Windows') >= 0;\r\n _isMacintosh = _userAgent.indexOf('Macintosh') >= 0;\r\n _isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;\r\n _isLinux = _userAgent.indexOf('Linux') >= 0;\r\n _isWeb = true;\r\n _locale = navigator.language;\r\n _language = _locale;\r\n}\r\n// Native environment\r\nelse if (typeof nodeProcess === 'object') {\r\n _isWindows = (nodeProcess.platform === 'win32');\r\n _isMacintosh = (nodeProcess.platform === 'darwin');\r\n _isLinux = (nodeProcess.platform === 'linux');\r\n _isLinuxSnap = _isLinux && !!nodeProcess.env['SNAP'] && !!nodeProcess.env['SNAP_REVISION'];\r\n _locale = LANGUAGE_DEFAULT;\r\n _language = LANGUAGE_DEFAULT;\r\n const rawNlsConfig = nodeProcess.env['VSCODE_NLS_CONFIG'];\r\n if (rawNlsConfig) {\r\n try {\r\n const nlsConfig = JSON.parse(rawNlsConfig);\r\n const resolved = nlsConfig.availableLanguages['*'];\r\n _locale = nlsConfig.locale;\r\n // VSCode's default language is 'en'\r\n _language = resolved ? resolved : LANGUAGE_DEFAULT;\r\n _translationsConfigFile = nlsConfig._translationsConfigFile;\r\n }\r\n catch (e) {\r\n }\r\n }\r\n _isNative = true;\r\n}\r\n// Unknown environment\r\nelse {\r\n console.error('Unable to resolve platform.');\r\n}\r\nlet _platform = 0 /* Web */;\r\nif (_isMacintosh) {\r\n _platform = 1 /* Mac */;\r\n}\r\nelse if (_isWindows) {\r\n _platform = 3 /* Windows */;\r\n}\r\nelse if (_isLinux) {\r\n _platform = 2 /* Linux */;\r\n}\r\nconst isWindows = _isWindows;\r\nconst isMacintosh = _isMacintosh;\r\nconst isLinux = _isLinux;\r\nconst isNative = _isNative;\r\nconst isWeb = _isWeb;\r\nconst isIOS = _isIOS;\r\nconst userAgent = _userAgent;\r\nconst globals = _globals;\r\nconst setImmediate = (function defineSetImmediate() {\r\n if (globals.setImmediate) {\r\n return globals.setImmediate.bind(globals);\r\n }\r\n if (typeof globals.postMessage === 'function' && !globals.importScripts) {\r\n let pending = [];\r\n globals.addEventListener('message', (e) => {\r\n if (e.data && e.data.vscodeSetImmediateId) {\r\n for (let i = 0, len = pending.length; i < len; i++) {\r\n const candidate = pending[i];\r\n if (candidate.id === e.data.vscodeSetImmediateId) {\r\n pending.splice(i, 1);\r\n candidate.callback();\r\n return;\r\n }\r\n }\r\n }\r\n });\r\n let lastId = 0;\r\n return (callback) => {\r\n const myId = ++lastId;\r\n pending.push({\r\n id: myId,\r\n callback: callback\r\n });\r\n globals.postMessage({ vscodeSetImmediateId: myId }, '*');\r\n };\r\n }\r\n if (nodeProcess && typeof nodeProcess.nextTick === 'function') {\r\n return nodeProcess.nextTick.bind(nodeProcess);\r\n }\r\n const _promise = Promise.resolve();\r\n return (callback) => _promise.then(callback);\r\n})();\r\nconst OS = (_isMacintosh || _isIOS ? 2 /* Macintosh */ : (_isWindows ? 1 /* Windows */ : 3 /* Linux */));\r\nlet _isLittleEndian = true;\r\nlet _isLittleEndianComputed = false;\r\nfunction isLittleEndian() {\r\n if (!_isLittleEndianComputed) {\r\n _isLittleEndianComputed = true;\r\n const test = new Uint8Array(2);\r\n test[0] = 1;\r\n test[1] = 2;\r\n const view = new Uint16Array(test.buffer);\r\n _isLittleEndian = (view[0] === (2 << 8) + 1);\r\n }\r\n return _isLittleEndian;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/platform.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/process.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/process.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cwd\": () => (/* binding */ cwd),\n/* harmony export */ \"env\": () => (/* binding */ env),\n/* harmony export */ \"platform\": () => (/* binding */ platform)\n/* harmony export */ });\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nlet safeProcess;\r\n// Native node.js environment\r\nif (typeof process !== 'undefined') {\r\n safeProcess = process;\r\n}\r\n// Native sandbox environment\r\nelse if (typeof _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode !== 'undefined') {\r\n safeProcess = {\r\n // Supported\r\n get platform() { return _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.platform; },\r\n get env() { return _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.env; },\r\n nextTick(callback) { return (0,_platform_js__WEBPACK_IMPORTED_MODULE_0__.setImmediate)(callback); },\r\n // Unsupported\r\n cwd() { return _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.env.VSCODE_CWD || _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.execPath.substr(0, _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.execPath.lastIndexOf(_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.vscode.process.platform === 'win32' ? '\\\\' : '/')); }\r\n };\r\n}\r\n// Web environment\r\nelse {\r\n safeProcess = {\r\n // Supported\r\n get platform() { return _platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows ? 'win32' : _platform_js__WEBPACK_IMPORTED_MODULE_0__.isMacintosh ? 'darwin' : 'linux'; },\r\n nextTick(callback) { return (0,_platform_js__WEBPACK_IMPORTED_MODULE_0__.setImmediate)(callback); },\r\n // Unsupported\r\n get env() { return Object.create(null); },\r\n cwd() { return '/'; }\r\n };\r\n}\r\nconst cwd = safeProcess.cwd;\r\nconst env = safeProcess.env;\r\nconst platform = safeProcess.platform;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/process.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/range.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/range.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Range\": () => (/* binding */ Range)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar Range;\r\n(function (Range) {\r\n /**\r\n * Returns the intersection between two ranges as a range itself.\r\n * Returns `{ start: 0, end: 0 }` if the intersection is empty.\r\n */\r\n function intersect(one, other) {\r\n if (one.start >= other.end || other.start >= one.end) {\r\n return { start: 0, end: 0 };\r\n }\r\n const start = Math.max(one.start, other.start);\r\n const end = Math.min(one.end, other.end);\r\n if (end - start <= 0) {\r\n return { start: 0, end: 0 };\r\n }\r\n return { start, end };\r\n }\r\n Range.intersect = intersect;\r\n function isEmpty(range) {\r\n return range.end - range.start <= 0;\r\n }\r\n Range.isEmpty = isEmpty;\r\n function intersects(one, other) {\r\n return !isEmpty(intersect(one, other));\r\n }\r\n Range.intersects = intersects;\r\n function relativeComplement(one, other) {\r\n const result = [];\r\n const first = { start: one.start, end: Math.min(other.start, one.end) };\r\n const second = { start: Math.max(other.end, one.start), end: one.end };\r\n if (!isEmpty(first)) {\r\n result.push(first);\r\n }\r\n if (!isEmpty(second)) {\r\n result.push(second);\r\n }\r\n return result;\r\n }\r\n Range.relativeComplement = relativeComplement;\r\n})(Range || (Range = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/range.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/resources.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/resources.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"originalFSPath\": () => (/* binding */ originalFSPath),\n/* harmony export */ \"ExtUri\": () => (/* binding */ ExtUri),\n/* harmony export */ \"extUri\": () => (/* binding */ extUri),\n/* harmony export */ \"isEqual\": () => (/* binding */ isEqual),\n/* harmony export */ \"basenameOrAuthority\": () => (/* binding */ basenameOrAuthority),\n/* harmony export */ \"basename\": () => (/* binding */ basename),\n/* harmony export */ \"dirname\": () => (/* binding */ dirname),\n/* harmony export */ \"joinPath\": () => (/* binding */ joinPath),\n/* harmony export */ \"normalizePath\": () => (/* binding */ normalizePath),\n/* harmony export */ \"resolvePath\": () => (/* binding */ resolvePath),\n/* harmony export */ \"DataUri\": () => (/* binding */ DataUri)\n/* harmony export */ });\n/* harmony import */ var _extpath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./extpath.js */ \"./node_modules/monaco-editor/esm/vs/base/common/extpath.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nfunction originalFSPath(uri) {\r\n return (0,_uri_js__WEBPACK_IMPORTED_MODULE_2__.uriToFsPath)(uri, true);\r\n}\r\nclass ExtUri {\r\n constructor(_ignorePathCasing) {\r\n this._ignorePathCasing = _ignorePathCasing;\r\n }\r\n compare(uri1, uri2, ignoreFragment = false) {\r\n if (uri1 === uri2) {\r\n return 0;\r\n }\r\n return (0,_strings_js__WEBPACK_IMPORTED_MODULE_3__.compare)(this.getComparisonKey(uri1, ignoreFragment), this.getComparisonKey(uri2, ignoreFragment));\r\n }\r\n isEqual(uri1, uri2, ignoreFragment = false) {\r\n if (uri1 === uri2) {\r\n return true;\r\n }\r\n if (!uri1 || !uri2) {\r\n return false;\r\n }\r\n return this.getComparisonKey(uri1, ignoreFragment) === this.getComparisonKey(uri2, ignoreFragment);\r\n }\r\n getComparisonKey(uri, ignoreFragment = false) {\r\n return uri.with({\r\n path: this._ignorePathCasing(uri) ? uri.path.toLowerCase() : undefined,\r\n fragment: ignoreFragment ? null : undefined\r\n }).toString();\r\n }\r\n // --- path math\r\n joinPath(resource, ...pathFragment) {\r\n return _uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.joinPath(resource, ...pathFragment);\r\n }\r\n basenameOrAuthority(resource) {\r\n return basename(resource) || resource.authority;\r\n }\r\n basename(resource) {\r\n return _path_js__WEBPACK_IMPORTED_MODULE_1__.posix.basename(resource.path);\r\n }\r\n dirname(resource) {\r\n if (resource.path.length === 0) {\r\n return resource;\r\n }\r\n let dirname;\r\n if (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__.Schemas.file) {\r\n dirname = _uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.file(_path_js__WEBPACK_IMPORTED_MODULE_1__.dirname(originalFSPath(resource))).path;\r\n }\r\n else {\r\n dirname = _path_js__WEBPACK_IMPORTED_MODULE_1__.posix.dirname(resource.path);\r\n if (resource.authority && dirname.length && dirname.charCodeAt(0) !== 47 /* Slash */) {\r\n console.error(`dirname(\"${resource.toString})) resulted in a relative path`);\r\n dirname = '/'; // If a URI contains an authority component, then the path component must either be empty or begin with a CharCode.Slash (\"/\") character\r\n }\r\n }\r\n return resource.with({\r\n path: dirname\r\n });\r\n }\r\n normalizePath(resource) {\r\n if (!resource.path.length) {\r\n return resource;\r\n }\r\n let normalizedPath;\r\n if (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__.Schemas.file) {\r\n normalizedPath = _uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.file(_path_js__WEBPACK_IMPORTED_MODULE_1__.normalize(originalFSPath(resource))).path;\r\n }\r\n else {\r\n normalizedPath = _path_js__WEBPACK_IMPORTED_MODULE_1__.posix.normalize(resource.path);\r\n }\r\n return resource.with({\r\n path: normalizedPath\r\n });\r\n }\r\n resolvePath(base, path) {\r\n if (base.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__.Schemas.file) {\r\n const newURI = _uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.file(_path_js__WEBPACK_IMPORTED_MODULE_1__.resolve(originalFSPath(base), path));\r\n return base.with({\r\n authority: newURI.authority,\r\n path: newURI.path\r\n });\r\n }\r\n if (path.indexOf('/') === -1) { // no slashes? it's likely a Windows path\r\n path = _extpath_js__WEBPACK_IMPORTED_MODULE_0__.toSlashes(path);\r\n if (/^[a-zA-Z]:(\\/|$)/.test(path)) { // starts with a drive letter\r\n path = '/' + path;\r\n }\r\n }\r\n return base.with({\r\n path: _path_js__WEBPACK_IMPORTED_MODULE_1__.posix.resolve(base.path, path)\r\n });\r\n }\r\n}\r\n/**\r\n * Unbiased utility that takes uris \"as they are\". This means it can be interchanged with\r\n * uri#toString() usages. The following is true\r\n * ```\r\n * assertEqual(aUri.toString() === bUri.toString(), exturi.isEqual(aUri, bUri))\r\n * ```\r\n */\r\nconst extUri = new ExtUri(() => false);\r\nconst isEqual = extUri.isEqual.bind(extUri);\r\nconst basenameOrAuthority = extUri.basenameOrAuthority.bind(extUri);\r\nconst basename = extUri.basename.bind(extUri);\r\nconst dirname = extUri.dirname.bind(extUri);\r\nconst joinPath = extUri.joinPath.bind(extUri);\r\nconst normalizePath = extUri.normalizePath.bind(extUri);\r\nconst resolvePath = extUri.resolvePath.bind(extUri);\r\n/**\r\n * Data URI related helpers.\r\n */\r\nvar DataUri;\r\n(function (DataUri) {\r\n DataUri.META_DATA_LABEL = 'label';\r\n DataUri.META_DATA_DESCRIPTION = 'description';\r\n DataUri.META_DATA_SIZE = 'size';\r\n DataUri.META_DATA_MIME = 'mime';\r\n function parseMetaData(dataUri) {\r\n const metadata = new Map();\r\n // Given a URI of: data:image/png;size:2313;label:SomeLabel;description:SomeDescription;base64,77+9UE5...\r\n // the metadata is: size:2313;label:SomeLabel;description:SomeDescription\r\n const meta = dataUri.path.substring(dataUri.path.indexOf(';') + 1, dataUri.path.lastIndexOf(';'));\r\n meta.split(';').forEach(property => {\r\n const [key, value] = property.split(':');\r\n if (key && value) {\r\n metadata.set(key, value);\r\n }\r\n });\r\n // Given a URI of: data:image/png;size:2313;label:SomeLabel;description:SomeDescription;base64,77+9UE5...\r\n // the mime is: image/png\r\n const mime = dataUri.path.substring(0, dataUri.path.indexOf(';'));\r\n if (mime) {\r\n metadata.set(DataUri.META_DATA_MIME, mime);\r\n }\r\n return metadata;\r\n }\r\n DataUri.parseMetaData = parseMetaData;\r\n})(DataUri || (DataUri = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/resources.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/scrollable.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ScrollState\": () => (/* binding */ ScrollState),\n/* harmony export */ \"Scrollable\": () => (/* binding */ Scrollable),\n/* harmony export */ \"SmoothScrollingUpdate\": () => (/* binding */ SmoothScrollingUpdate),\n/* harmony export */ \"SmoothScrollingOperation\": () => (/* binding */ SmoothScrollingOperation)\n/* harmony export */ });\n/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass ScrollState {\r\n constructor(width, scrollWidth, scrollLeft, height, scrollHeight, scrollTop) {\r\n width = width | 0;\r\n scrollWidth = scrollWidth | 0;\r\n scrollLeft = scrollLeft | 0;\r\n height = height | 0;\r\n scrollHeight = scrollHeight | 0;\r\n scrollTop = scrollTop | 0;\r\n this.rawScrollLeft = scrollLeft; // before validation\r\n this.rawScrollTop = scrollTop; // before validation\r\n if (width < 0) {\r\n width = 0;\r\n }\r\n if (scrollLeft + width > scrollWidth) {\r\n scrollLeft = scrollWidth - width;\r\n }\r\n if (scrollLeft < 0) {\r\n scrollLeft = 0;\r\n }\r\n if (height < 0) {\r\n height = 0;\r\n }\r\n if (scrollTop + height > scrollHeight) {\r\n scrollTop = scrollHeight - height;\r\n }\r\n if (scrollTop < 0) {\r\n scrollTop = 0;\r\n }\r\n this.width = width;\r\n this.scrollWidth = scrollWidth;\r\n this.scrollLeft = scrollLeft;\r\n this.height = height;\r\n this.scrollHeight = scrollHeight;\r\n this.scrollTop = scrollTop;\r\n }\r\n equals(other) {\r\n return (this.rawScrollLeft === other.rawScrollLeft\r\n && this.rawScrollTop === other.rawScrollTop\r\n && this.width === other.width\r\n && this.scrollWidth === other.scrollWidth\r\n && this.scrollLeft === other.scrollLeft\r\n && this.height === other.height\r\n && this.scrollHeight === other.scrollHeight\r\n && this.scrollTop === other.scrollTop);\r\n }\r\n withScrollDimensions(update, useRawScrollPositions) {\r\n return new ScrollState((typeof update.width !== 'undefined' ? update.width : this.width), (typeof update.scrollWidth !== 'undefined' ? update.scrollWidth : this.scrollWidth), useRawScrollPositions ? this.rawScrollLeft : this.scrollLeft, (typeof update.height !== 'undefined' ? update.height : this.height), (typeof update.scrollHeight !== 'undefined' ? update.scrollHeight : this.scrollHeight), useRawScrollPositions ? this.rawScrollTop : this.scrollTop);\r\n }\r\n withScrollPosition(update) {\r\n return new ScrollState(this.width, this.scrollWidth, (typeof update.scrollLeft !== 'undefined' ? update.scrollLeft : this.rawScrollLeft), this.height, this.scrollHeight, (typeof update.scrollTop !== 'undefined' ? update.scrollTop : this.rawScrollTop));\r\n }\r\n createScrollEvent(previous, inSmoothScrolling) {\r\n const widthChanged = (this.width !== previous.width);\r\n const scrollWidthChanged = (this.scrollWidth !== previous.scrollWidth);\r\n const scrollLeftChanged = (this.scrollLeft !== previous.scrollLeft);\r\n const heightChanged = (this.height !== previous.height);\r\n const scrollHeightChanged = (this.scrollHeight !== previous.scrollHeight);\r\n const scrollTopChanged = (this.scrollTop !== previous.scrollTop);\r\n return {\r\n inSmoothScrolling: inSmoothScrolling,\r\n oldWidth: previous.width,\r\n oldScrollWidth: previous.scrollWidth,\r\n oldScrollLeft: previous.scrollLeft,\r\n width: this.width,\r\n scrollWidth: this.scrollWidth,\r\n scrollLeft: this.scrollLeft,\r\n oldHeight: previous.height,\r\n oldScrollHeight: previous.scrollHeight,\r\n oldScrollTop: previous.scrollTop,\r\n height: this.height,\r\n scrollHeight: this.scrollHeight,\r\n scrollTop: this.scrollTop,\r\n widthChanged: widthChanged,\r\n scrollWidthChanged: scrollWidthChanged,\r\n scrollLeftChanged: scrollLeftChanged,\r\n heightChanged: heightChanged,\r\n scrollHeightChanged: scrollHeightChanged,\r\n scrollTopChanged: scrollTopChanged,\r\n };\r\n }\r\n}\r\nclass Scrollable extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(smoothScrollDuration, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._onScroll = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onScroll = this._onScroll.event;\r\n this._smoothScrollDuration = smoothScrollDuration;\r\n this._scheduleAtNextAnimationFrame = scheduleAtNextAnimationFrame;\r\n this._state = new ScrollState(0, 0, 0, 0, 0, 0);\r\n this._smoothScrolling = null;\r\n }\r\n dispose() {\r\n if (this._smoothScrolling) {\r\n this._smoothScrolling.dispose();\r\n this._smoothScrolling = null;\r\n }\r\n super.dispose();\r\n }\r\n setSmoothScrollDuration(smoothScrollDuration) {\r\n this._smoothScrollDuration = smoothScrollDuration;\r\n }\r\n validateScrollPosition(scrollPosition) {\r\n return this._state.withScrollPosition(scrollPosition);\r\n }\r\n getScrollDimensions() {\r\n return this._state;\r\n }\r\n setScrollDimensions(dimensions, useRawScrollPositions) {\r\n const newState = this._state.withScrollDimensions(dimensions, useRawScrollPositions);\r\n this._setState(newState, Boolean(this._smoothScrolling));\r\n // Validate outstanding animated scroll position target\r\n if (this._smoothScrolling) {\r\n this._smoothScrolling.acceptScrollDimensions(this._state);\r\n }\r\n }\r\n /**\r\n * Returns the final scroll position that the instance will have once the smooth scroll animation concludes.\r\n * If no scroll animation is occurring, it will return the current scroll position instead.\r\n */\r\n getFutureScrollPosition() {\r\n if (this._smoothScrolling) {\r\n return this._smoothScrolling.to;\r\n }\r\n return this._state;\r\n }\r\n /**\r\n * Returns the current scroll position.\r\n * Note: This result might be an intermediate scroll position, as there might be an ongoing smooth scroll animation.\r\n */\r\n getCurrentScrollPosition() {\r\n return this._state;\r\n }\r\n setScrollPositionNow(update) {\r\n // no smooth scrolling requested\r\n const newState = this._state.withScrollPosition(update);\r\n // Terminate any outstanding smooth scrolling\r\n if (this._smoothScrolling) {\r\n this._smoothScrolling.dispose();\r\n this._smoothScrolling = null;\r\n }\r\n this._setState(newState, false);\r\n }\r\n setScrollPositionSmooth(update, reuseAnimation) {\r\n if (this._smoothScrollDuration === 0) {\r\n // Smooth scrolling not supported.\r\n return this.setScrollPositionNow(update);\r\n }\r\n if (this._smoothScrolling) {\r\n // Combine our pending scrollLeft/scrollTop with incoming scrollLeft/scrollTop\r\n update = {\r\n scrollLeft: (typeof update.scrollLeft === 'undefined' ? this._smoothScrolling.to.scrollLeft : update.scrollLeft),\r\n scrollTop: (typeof update.scrollTop === 'undefined' ? this._smoothScrolling.to.scrollTop : update.scrollTop)\r\n };\r\n // Validate `update`\r\n const validTarget = this._state.withScrollPosition(update);\r\n if (this._smoothScrolling.to.scrollLeft === validTarget.scrollLeft && this._smoothScrolling.to.scrollTop === validTarget.scrollTop) {\r\n // No need to interrupt or extend the current animation since we're going to the same place\r\n return;\r\n }\r\n let newSmoothScrolling;\r\n if (reuseAnimation) {\r\n newSmoothScrolling = new SmoothScrollingOperation(this._smoothScrolling.from, validTarget, this._smoothScrolling.startTime, this._smoothScrolling.duration);\r\n }\r\n else {\r\n newSmoothScrolling = this._smoothScrolling.combine(this._state, validTarget, this._smoothScrollDuration);\r\n }\r\n this._smoothScrolling.dispose();\r\n this._smoothScrolling = newSmoothScrolling;\r\n }\r\n else {\r\n // Validate `update`\r\n const validTarget = this._state.withScrollPosition(update);\r\n this._smoothScrolling = SmoothScrollingOperation.start(this._state, validTarget, this._smoothScrollDuration);\r\n }\r\n // Begin smooth scrolling animation\r\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => {\r\n if (!this._smoothScrolling) {\r\n return;\r\n }\r\n this._smoothScrolling.animationFrameDisposable = null;\r\n this._performSmoothScrolling();\r\n });\r\n }\r\n _performSmoothScrolling() {\r\n if (!this._smoothScrolling) {\r\n return;\r\n }\r\n const update = this._smoothScrolling.tick();\r\n const newState = this._state.withScrollPosition(update);\r\n this._setState(newState, true);\r\n if (!this._smoothScrolling) {\r\n // Looks like someone canceled the smooth scrolling\r\n // from the scroll event handler\r\n return;\r\n }\r\n if (update.isDone) {\r\n this._smoothScrolling.dispose();\r\n this._smoothScrolling = null;\r\n return;\r\n }\r\n // Continue smooth scrolling animation\r\n this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => {\r\n if (!this._smoothScrolling) {\r\n return;\r\n }\r\n this._smoothScrolling.animationFrameDisposable = null;\r\n this._performSmoothScrolling();\r\n });\r\n }\r\n _setState(newState, inSmoothScrolling) {\r\n const oldState = this._state;\r\n if (oldState.equals(newState)) {\r\n // no change\r\n return;\r\n }\r\n this._state = newState;\r\n this._onScroll.fire(this._state.createScrollEvent(oldState, inSmoothScrolling));\r\n }\r\n}\r\nclass SmoothScrollingUpdate {\r\n constructor(scrollLeft, scrollTop, isDone) {\r\n this.scrollLeft = scrollLeft;\r\n this.scrollTop = scrollTop;\r\n this.isDone = isDone;\r\n }\r\n}\r\nfunction createEaseOutCubic(from, to) {\r\n const delta = to - from;\r\n return function (completion) {\r\n return from + delta * easeOutCubic(completion);\r\n };\r\n}\r\nfunction createComposed(a, b, cut) {\r\n return function (completion) {\r\n if (completion < cut) {\r\n return a(completion / cut);\r\n }\r\n return b((completion - cut) / (1 - cut));\r\n };\r\n}\r\nclass SmoothScrollingOperation {\r\n constructor(from, to, startTime, duration) {\r\n this.from = from;\r\n this.to = to;\r\n this.duration = duration;\r\n this.startTime = startTime;\r\n this.animationFrameDisposable = null;\r\n this._initAnimations();\r\n }\r\n _initAnimations() {\r\n this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width);\r\n this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height);\r\n }\r\n _initAnimation(from, to, viewportSize) {\r\n const delta = Math.abs(from - to);\r\n if (delta > 2.5 * viewportSize) {\r\n let stop1, stop2;\r\n if (from < to) {\r\n // scroll to 75% of the viewportSize\r\n stop1 = from + 0.75 * viewportSize;\r\n stop2 = to - 0.75 * viewportSize;\r\n }\r\n else {\r\n stop1 = from - 0.75 * viewportSize;\r\n stop2 = to + 0.75 * viewportSize;\r\n }\r\n return createComposed(createEaseOutCubic(from, stop1), createEaseOutCubic(stop2, to), 0.33);\r\n }\r\n return createEaseOutCubic(from, to);\r\n }\r\n dispose() {\r\n if (this.animationFrameDisposable !== null) {\r\n this.animationFrameDisposable.dispose();\r\n this.animationFrameDisposable = null;\r\n }\r\n }\r\n acceptScrollDimensions(state) {\r\n this.to = state.withScrollPosition(this.to);\r\n this._initAnimations();\r\n }\r\n tick() {\r\n return this._tick(Date.now());\r\n }\r\n _tick(now) {\r\n const completion = (now - this.startTime) / this.duration;\r\n if (completion < 1) {\r\n const newScrollLeft = this.scrollLeft(completion);\r\n const newScrollTop = this.scrollTop(completion);\r\n return new SmoothScrollingUpdate(newScrollLeft, newScrollTop, false);\r\n }\r\n return new SmoothScrollingUpdate(this.to.scrollLeft, this.to.scrollTop, true);\r\n }\r\n combine(from, to, duration) {\r\n return SmoothScrollingOperation.start(from, to, duration);\r\n }\r\n static start(from, to, duration) {\r\n // +10 / -10 : pretend the animation already started for a quicker response to a scroll request\r\n duration = duration + 10;\r\n const startTime = Date.now() - 10;\r\n return new SmoothScrollingOperation(from, to, startTime, duration);\r\n }\r\n}\r\nfunction easeInCubic(t) {\r\n return Math.pow(t, 3);\r\n}\r\nfunction easeOutCubic(t) {\r\n return 1 - easeInCubic(1 - t);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/scrollable.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/search.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/search.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"buildReplaceStringWithCasePreserved\": () => (/* binding */ buildReplaceStringWithCasePreserved)\n/* harmony export */ });\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction buildReplaceStringWithCasePreserved(matches, pattern) {\r\n if (matches && (matches[0] !== '')) {\r\n const containsHyphens = validateSpecificSpecialCharacter(matches, pattern, '-');\r\n const containsUnderscores = validateSpecificSpecialCharacter(matches, pattern, '_');\r\n if (containsHyphens && !containsUnderscores) {\r\n return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '-');\r\n }\r\n else if (!containsHyphens && containsUnderscores) {\r\n return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '_');\r\n }\r\n if (matches[0].toUpperCase() === matches[0]) {\r\n return pattern.toUpperCase();\r\n }\r\n else if (matches[0].toLowerCase() === matches[0]) {\r\n return pattern.toLowerCase();\r\n }\r\n else if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsUppercaseCharacter(matches[0][0]) && pattern.length > 0) {\r\n return pattern[0].toUpperCase() + pattern.substr(1);\r\n }\r\n else {\r\n // we don't understand its pattern yet.\r\n return pattern;\r\n }\r\n }\r\n else {\r\n return pattern;\r\n }\r\n}\r\nfunction validateSpecificSpecialCharacter(matches, pattern, specialCharacter) {\r\n const doesContainSpecialCharacter = matches[0].indexOf(specialCharacter) !== -1 && pattern.indexOf(specialCharacter) !== -1;\r\n return doesContainSpecialCharacter && matches[0].split(specialCharacter).length === pattern.split(specialCharacter).length;\r\n}\r\nfunction buildReplaceStringForSpecificSpecialCharacter(matches, pattern, specialCharacter) {\r\n const splitPatternAtSpecialCharacter = pattern.split(specialCharacter);\r\n const splitMatchAtSpecialCharacter = matches[0].split(specialCharacter);\r\n let replaceString = '';\r\n splitPatternAtSpecialCharacter.forEach((splitValue, index) => {\r\n replaceString += buildReplaceStringWithCasePreserved([splitMatchAtSpecialCharacter[index]], splitValue) + specialCharacter;\r\n });\r\n return replaceString.slice(0, -1);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/search.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/severity.js":
|
||
/*!*******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/severity.js ***!
|
||
\*******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar Severity;\r\n(function (Severity) {\r\n Severity[Severity[\"Ignore\"] = 0] = \"Ignore\";\r\n Severity[Severity[\"Info\"] = 1] = \"Info\";\r\n Severity[Severity[\"Warning\"] = 2] = \"Warning\";\r\n Severity[Severity[\"Error\"] = 3] = \"Error\";\r\n})(Severity || (Severity = {}));\r\n(function (Severity) {\r\n const _error = 'error';\r\n const _warning = 'warning';\r\n const _warn = 'warn';\r\n const _info = 'info';\r\n /**\r\n * Parses 'error', 'warning', 'warn', 'info' in call casings\r\n * and falls back to ignore.\r\n */\r\n function fromValue(value) {\r\n if (!value) {\r\n return Severity.Ignore;\r\n }\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.equalsIgnoreCase(_error, value)) {\r\n return Severity.Error;\r\n }\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.equalsIgnoreCase(_warning, value) || _strings_js__WEBPACK_IMPORTED_MODULE_0__.equalsIgnoreCase(_warn, value)) {\r\n return Severity.Warning;\r\n }\r\n if (_strings_js__WEBPACK_IMPORTED_MODULE_0__.equalsIgnoreCase(_info, value)) {\r\n return Severity.Info;\r\n }\r\n return Severity.Ignore;\r\n }\r\n Severity.fromValue = fromValue;\r\n})(Severity || (Severity = {}));\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Severity);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/severity.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js ***!
|
||
\********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StopWatch\": () => (/* binding */ StopWatch)\n/* harmony export */ });\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst hasPerformanceNow = (_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.performance && typeof _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.performance.now === 'function');\r\nclass StopWatch {\r\n constructor(highResolution) {\r\n this._highResolution = hasPerformanceNow && highResolution;\r\n this._startTime = this._now();\r\n this._stopTime = -1;\r\n }\r\n static create(highResolution = true) {\r\n return new StopWatch(highResolution);\r\n }\r\n stop() {\r\n this._stopTime = this._now();\r\n }\r\n elapsed() {\r\n if (this._stopTime !== -1) {\r\n return this._stopTime - this._startTime;\r\n }\r\n return this._now() - this._startTime;\r\n }\r\n _now() {\r\n return this._highResolution ? _platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.performance.now() : Date.now();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/strings.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/strings.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isFalsyOrWhitespace\": () => (/* binding */ isFalsyOrWhitespace),\n/* harmony export */ \"format\": () => (/* binding */ format),\n/* harmony export */ \"escape\": () => (/* binding */ escape),\n/* harmony export */ \"escapeRegExpCharacters\": () => (/* binding */ escapeRegExpCharacters),\n/* harmony export */ \"trim\": () => (/* binding */ trim),\n/* harmony export */ \"ltrim\": () => (/* binding */ ltrim),\n/* harmony export */ \"rtrim\": () => (/* binding */ rtrim),\n/* harmony export */ \"convertSimple2RegExpPattern\": () => (/* binding */ convertSimple2RegExpPattern),\n/* harmony export */ \"stripWildcards\": () => (/* binding */ stripWildcards),\n/* harmony export */ \"createRegExp\": () => (/* binding */ createRegExp),\n/* harmony export */ \"regExpLeadsToEndlessLoop\": () => (/* binding */ regExpLeadsToEndlessLoop),\n/* harmony export */ \"regExpFlags\": () => (/* binding */ regExpFlags),\n/* harmony export */ \"splitLines\": () => (/* binding */ splitLines),\n/* harmony export */ \"firstNonWhitespaceIndex\": () => (/* binding */ firstNonWhitespaceIndex),\n/* harmony export */ \"getLeadingWhitespace\": () => (/* binding */ getLeadingWhitespace),\n/* harmony export */ \"lastNonWhitespaceIndex\": () => (/* binding */ lastNonWhitespaceIndex),\n/* harmony export */ \"compare\": () => (/* binding */ compare),\n/* harmony export */ \"compareSubstring\": () => (/* binding */ compareSubstring),\n/* harmony export */ \"compareIgnoreCase\": () => (/* binding */ compareIgnoreCase),\n/* harmony export */ \"compareSubstringIgnoreCase\": () => (/* binding */ compareSubstringIgnoreCase),\n/* harmony export */ \"isLowerAsciiLetter\": () => (/* binding */ isLowerAsciiLetter),\n/* harmony export */ \"isUpperAsciiLetter\": () => (/* binding */ isUpperAsciiLetter),\n/* harmony export */ \"equalsIgnoreCase\": () => (/* binding */ equalsIgnoreCase),\n/* harmony export */ \"startsWithIgnoreCase\": () => (/* binding */ startsWithIgnoreCase),\n/* harmony export */ \"commonPrefixLength\": () => (/* binding */ commonPrefixLength),\n/* harmony export */ \"commonSuffixLength\": () => (/* binding */ commonSuffixLength),\n/* harmony export */ \"isHighSurrogate\": () => (/* binding */ isHighSurrogate),\n/* harmony export */ \"isLowSurrogate\": () => (/* binding */ isLowSurrogate),\n/* harmony export */ \"computeCodePoint\": () => (/* binding */ computeCodePoint),\n/* harmony export */ \"getNextCodePoint\": () => (/* binding */ getNextCodePoint),\n/* harmony export */ \"nextCharLength\": () => (/* binding */ nextCharLength),\n/* harmony export */ \"prevCharLength\": () => (/* binding */ prevCharLength),\n/* harmony export */ \"decodeUTF8\": () => (/* binding */ decodeUTF8),\n/* harmony export */ \"containsRTL\": () => (/* binding */ containsRTL),\n/* harmony export */ \"containsEmoji\": () => (/* binding */ containsEmoji),\n/* harmony export */ \"isBasicASCII\": () => (/* binding */ isBasicASCII),\n/* harmony export */ \"UNUSUAL_LINE_TERMINATORS\": () => (/* binding */ UNUSUAL_LINE_TERMINATORS),\n/* harmony export */ \"containsUnusualLineTerminators\": () => (/* binding */ containsUnusualLineTerminators),\n/* harmony export */ \"containsFullWidthCharacter\": () => (/* binding */ containsFullWidthCharacter),\n/* harmony export */ \"isFullWidthCharacter\": () => (/* binding */ isFullWidthCharacter),\n/* harmony export */ \"isEmojiImprecise\": () => (/* binding */ isEmojiImprecise),\n/* harmony export */ \"UTF8_BOM_CHARACTER\": () => (/* binding */ UTF8_BOM_CHARACTER),\n/* harmony export */ \"startsWithUTF8BOM\": () => (/* binding */ startsWithUTF8BOM),\n/* harmony export */ \"containsUppercaseCharacter\": () => (/* binding */ containsUppercaseCharacter),\n/* harmony export */ \"singleLetterHash\": () => (/* binding */ singleLetterHash),\n/* harmony export */ \"getGraphemeBreakType\": () => (/* binding */ getGraphemeBreakType),\n/* harmony export */ \"breakBetweenGraphemeBreakType\": () => (/* binding */ breakBetweenGraphemeBreakType)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction isFalsyOrWhitespace(str) {\r\n if (!str || typeof str !== 'string') {\r\n return true;\r\n }\r\n return str.trim().length === 0;\r\n}\r\nconst _formatRegexp = /{(\\d+)}/g;\r\n/**\r\n * Helper to produce a string with a variable number of arguments. Insert variable segments\r\n * into the string using the {n} notation where N is the index of the argument following the string.\r\n * @param value string to which formatting is applied\r\n * @param args replacements for {n}-entries\r\n */\r\nfunction format(value, ...args) {\r\n if (args.length === 0) {\r\n return value;\r\n }\r\n return value.replace(_formatRegexp, function (match, group) {\r\n const idx = parseInt(group, 10);\r\n return isNaN(idx) || idx < 0 || idx >= args.length ?\r\n match :\r\n args[idx];\r\n });\r\n}\r\n/**\r\n * Converts HTML characters inside the string to use entities instead. Makes the string safe from\r\n * being used e.g. in HTMLElement.innerHTML.\r\n */\r\nfunction escape(html) {\r\n return html.replace(/[<>&]/g, function (match) {\r\n switch (match) {\r\n case '<': return '<';\r\n case '>': return '>';\r\n case '&': return '&';\r\n default: return match;\r\n }\r\n });\r\n}\r\n/**\r\n * Escapes regular expression characters in a given string\r\n */\r\nfunction escapeRegExpCharacters(value) {\r\n return value.replace(/[\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)]/g, '\\\\$&');\r\n}\r\n/**\r\n * Removes all occurrences of needle from the beginning and end of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim (default is a blank)\r\n */\r\nfunction trim(haystack, needle = ' ') {\r\n const trimmed = ltrim(haystack, needle);\r\n return rtrim(trimmed, needle);\r\n}\r\n/**\r\n * Removes all occurrences of needle from the beginning of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim\r\n */\r\nfunction ltrim(haystack, needle) {\r\n if (!haystack || !needle) {\r\n return haystack;\r\n }\r\n const needleLen = needle.length;\r\n if (needleLen === 0 || haystack.length === 0) {\r\n return haystack;\r\n }\r\n let offset = 0;\r\n while (haystack.indexOf(needle, offset) === offset) {\r\n offset = offset + needleLen;\r\n }\r\n return haystack.substring(offset);\r\n}\r\n/**\r\n * Removes all occurrences of needle from the end of haystack.\r\n * @param haystack string to trim\r\n * @param needle the thing to trim\r\n */\r\nfunction rtrim(haystack, needle) {\r\n if (!haystack || !needle) {\r\n return haystack;\r\n }\r\n const needleLen = needle.length, haystackLen = haystack.length;\r\n if (needleLen === 0 || haystackLen === 0) {\r\n return haystack;\r\n }\r\n let offset = haystackLen, idx = -1;\r\n while (true) {\r\n idx = haystack.lastIndexOf(needle, offset - 1);\r\n if (idx === -1 || idx + needleLen !== offset) {\r\n break;\r\n }\r\n if (idx === 0) {\r\n return '';\r\n }\r\n offset = idx;\r\n }\r\n return haystack.substring(0, offset);\r\n}\r\nfunction convertSimple2RegExpPattern(pattern) {\r\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\r\n}\r\nfunction stripWildcards(pattern) {\r\n return pattern.replace(/\\*/g, '');\r\n}\r\nfunction createRegExp(searchString, isRegex, options = {}) {\r\n if (!searchString) {\r\n throw new Error('Cannot create regex from empty string');\r\n }\r\n if (!isRegex) {\r\n searchString = escapeRegExpCharacters(searchString);\r\n }\r\n if (options.wholeWord) {\r\n if (!/\\B/.test(searchString.charAt(0))) {\r\n searchString = '\\\\b' + searchString;\r\n }\r\n if (!/\\B/.test(searchString.charAt(searchString.length - 1))) {\r\n searchString = searchString + '\\\\b';\r\n }\r\n }\r\n let modifiers = '';\r\n if (options.global) {\r\n modifiers += 'g';\r\n }\r\n if (!options.matchCase) {\r\n modifiers += 'i';\r\n }\r\n if (options.multiline) {\r\n modifiers += 'm';\r\n }\r\n if (options.unicode) {\r\n modifiers += 'u';\r\n }\r\n return new RegExp(searchString, modifiers);\r\n}\r\nfunction regExpLeadsToEndlessLoop(regexp) {\r\n // Exit early if it's one of these special cases which are meant to match\r\n // against an empty string\r\n if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\\\s*$') {\r\n return false;\r\n }\r\n // We check against an empty string. If the regular expression doesn't advance\r\n // (e.g. ends in an endless loop) it will match an empty string.\r\n const match = regexp.exec('');\r\n return !!(match && regexp.lastIndex === 0);\r\n}\r\nfunction regExpFlags(regexp) {\r\n return (regexp.global ? 'g' : '')\r\n + (regexp.ignoreCase ? 'i' : '')\r\n + (regexp.multiline ? 'm' : '')\r\n + (regexp /* standalone editor compilation */.unicode ? 'u' : '');\r\n}\r\nfunction splitLines(str) {\r\n return str.split(/\\r\\n|\\r|\\n/);\r\n}\r\n/**\r\n * Returns first index of the string that is not whitespace.\r\n * If string is empty or contains only whitespaces, returns -1\r\n */\r\nfunction firstNonWhitespaceIndex(str) {\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\n/**\r\n * Returns the leading whitespace of the string.\r\n * If the string contains only whitespaces, returns entire string\r\n */\r\nfunction getLeadingWhitespace(str, start = 0, end = str.length) {\r\n for (let i = start; i < end; i++) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return str.substring(start, i);\r\n }\r\n }\r\n return str.substring(start, end);\r\n}\r\n/**\r\n * Returns last index of the string that is not whitespace.\r\n * If string is empty or contains only whitespaces, returns -1\r\n */\r\nfunction lastNonWhitespaceIndex(str, startIndex = str.length - 1) {\r\n for (let i = startIndex; i >= 0; i--) {\r\n const chCode = str.charCodeAt(i);\r\n if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\nfunction compare(a, b) {\r\n if (a < b) {\r\n return -1;\r\n }\r\n else if (a > b) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n}\r\nfunction compareSubstring(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\r\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\r\n let codeA = a.charCodeAt(aStart);\r\n let codeB = b.charCodeAt(bStart);\r\n if (codeA < codeB) {\r\n return -1;\r\n }\r\n else if (codeA > codeB) {\r\n return 1;\r\n }\r\n }\r\n const aLen = aEnd - aStart;\r\n const bLen = bEnd - bStart;\r\n if (aLen < bLen) {\r\n return -1;\r\n }\r\n else if (aLen > bLen) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nfunction compareIgnoreCase(a, b) {\r\n return compareSubstringIgnoreCase(a, b, 0, a.length, 0, b.length);\r\n}\r\nfunction compareSubstringIgnoreCase(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {\r\n for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {\r\n let codeA = a.charCodeAt(aStart);\r\n let codeB = b.charCodeAt(bStart);\r\n if (codeA === codeB) {\r\n // equal\r\n continue;\r\n }\r\n const diff = codeA - codeB;\r\n if (diff === 32 && isUpperAsciiLetter(codeB)) { //codeB =[65-90] && codeA =[97-122]\r\n continue;\r\n }\r\n else if (diff === -32 && isUpperAsciiLetter(codeA)) { //codeB =[97-122] && codeA =[65-90]\r\n continue;\r\n }\r\n if (isLowerAsciiLetter(codeA) && isLowerAsciiLetter(codeB)) {\r\n //\r\n return diff;\r\n }\r\n else {\r\n return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd);\r\n }\r\n }\r\n const aLen = aEnd - aStart;\r\n const bLen = bEnd - bStart;\r\n if (aLen < bLen) {\r\n return -1;\r\n }\r\n else if (aLen > bLen) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nfunction isLowerAsciiLetter(code) {\r\n return code >= 97 /* a */ && code <= 122 /* z */;\r\n}\r\nfunction isUpperAsciiLetter(code) {\r\n return code >= 65 /* A */ && code <= 90 /* Z */;\r\n}\r\nfunction isAsciiLetter(code) {\r\n return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);\r\n}\r\nfunction equalsIgnoreCase(a, b) {\r\n return a.length === b.length && doEqualsIgnoreCase(a, b);\r\n}\r\nfunction doEqualsIgnoreCase(a, b, stopAt = a.length) {\r\n for (let i = 0; i < stopAt; i++) {\r\n const codeA = a.charCodeAt(i);\r\n const codeB = b.charCodeAt(i);\r\n if (codeA === codeB) {\r\n continue;\r\n }\r\n // a-z A-Z\r\n if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) {\r\n const diff = Math.abs(codeA - codeB);\r\n if (diff !== 0 && diff !== 32) {\r\n return false;\r\n }\r\n }\r\n // Any other charcode\r\n else {\r\n if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\nfunction startsWithIgnoreCase(str, candidate) {\r\n const candidateLength = candidate.length;\r\n if (candidate.length > str.length) {\r\n return false;\r\n }\r\n return doEqualsIgnoreCase(str, candidate, candidateLength);\r\n}\r\n/**\r\n * @returns the length of the common prefix of the two strings.\r\n */\r\nfunction commonPrefixLength(a, b) {\r\n let i, len = Math.min(a.length, b.length);\r\n for (i = 0; i < len; i++) {\r\n if (a.charCodeAt(i) !== b.charCodeAt(i)) {\r\n return i;\r\n }\r\n }\r\n return len;\r\n}\r\n/**\r\n * @returns the length of the common suffix of the two strings.\r\n */\r\nfunction commonSuffixLength(a, b) {\r\n let i, len = Math.min(a.length, b.length);\r\n const aLastIndex = a.length - 1;\r\n const bLastIndex = b.length - 1;\r\n for (i = 0; i < len; i++) {\r\n if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) {\r\n return i;\r\n }\r\n }\r\n return len;\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nfunction isHighSurrogate(charCode) {\r\n return (0xD800 <= charCode && charCode <= 0xDBFF);\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nfunction isLowSurrogate(charCode) {\r\n return (0xDC00 <= charCode && charCode <= 0xDFFF);\r\n}\r\n/**\r\n * See http://en.wikipedia.org/wiki/Surrogate_pair\r\n */\r\nfunction computeCodePoint(highSurrogate, lowSurrogate) {\r\n return ((highSurrogate - 0xD800) << 10) + (lowSurrogate - 0xDC00) + 0x10000;\r\n}\r\n/**\r\n * get the code point that begins at offset `offset`\r\n */\r\nfunction getNextCodePoint(str, len, offset) {\r\n const charCode = str.charCodeAt(offset);\r\n if (isHighSurrogate(charCode) && offset + 1 < len) {\r\n const nextCharCode = str.charCodeAt(offset + 1);\r\n if (isLowSurrogate(nextCharCode)) {\r\n return computeCodePoint(charCode, nextCharCode);\r\n }\r\n }\r\n return charCode;\r\n}\r\n/**\r\n * get the code point that ends right before offset `offset`\r\n */\r\nfunction getPrevCodePoint(str, offset) {\r\n const charCode = str.charCodeAt(offset - 1);\r\n if (isLowSurrogate(charCode) && offset > 1) {\r\n const prevCharCode = str.charCodeAt(offset - 2);\r\n if (isHighSurrogate(prevCharCode)) {\r\n return computeCodePoint(prevCharCode, charCode);\r\n }\r\n }\r\n return charCode;\r\n}\r\nfunction nextCharLength(str, offset) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n const initialOffset = offset;\r\n const len = str.length;\r\n const initialCodePoint = getNextCodePoint(str, len, offset);\r\n offset += (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint);\r\n while (offset < len) {\r\n const nextCodePoint = getNextCodePoint(str, len, offset);\r\n const nextGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(nextCodePoint);\r\n if (breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {\r\n break;\r\n }\r\n offset += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = nextGraphemeBreakType;\r\n }\r\n return (offset - initialOffset);\r\n}\r\nfunction prevCharLength(str, offset) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n const initialOffset = offset;\r\n const initialCodePoint = getPrevCodePoint(str, offset);\r\n offset -= (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint);\r\n while (offset > 0) {\r\n const prevCodePoint = getPrevCodePoint(str, offset);\r\n const prevGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(prevCodePoint);\r\n if (breakBetweenGraphemeBreakType(prevGraphemeBreakType, graphemeBreakType)) {\r\n break;\r\n }\r\n offset -= (prevCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = prevGraphemeBreakType;\r\n }\r\n return (initialOffset - offset);\r\n}\r\n/**\r\n * A manual decoding of a UTF8 string.\r\n * Use only in environments which do not offer native conversion methods!\r\n */\r\nfunction decodeUTF8(buffer) {\r\n // https://en.wikipedia.org/wiki/UTF-8\r\n const len = buffer.byteLength;\r\n const result = [];\r\n let offset = 0;\r\n while (offset < len) {\r\n const v0 = buffer[offset];\r\n let codePoint;\r\n if (v0 >= 0b11110000 && offset + 3 < len) {\r\n // 4 bytes\r\n codePoint = ((((buffer[offset++] & 0b00000111) << 18) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 12) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else if (v0 >= 0b11100000 && offset + 2 < len) {\r\n // 3 bytes\r\n codePoint = ((((buffer[offset++] & 0b00001111) << 12) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else if (v0 >= 0b11000000 && offset + 1 < len) {\r\n // 2 bytes\r\n codePoint = ((((buffer[offset++] & 0b00011111) << 6) >>> 0)\r\n | (((buffer[offset++] & 0b00111111) << 0) >>> 0));\r\n }\r\n else {\r\n // 1 byte\r\n codePoint = buffer[offset++];\r\n }\r\n if ((codePoint >= 0 && codePoint <= 0xD7FF) || (codePoint >= 0xE000 && codePoint <= 0xFFFF)) {\r\n // Basic Multilingual Plane\r\n result.push(String.fromCharCode(codePoint));\r\n }\r\n else if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\r\n // Supplementary Planes\r\n const uPrime = codePoint - 0x10000;\r\n const w1 = 0xD800 + ((uPrime & 0b11111111110000000000) >>> 10);\r\n const w2 = 0xDC00 + ((uPrime & 0b00000000001111111111) >>> 0);\r\n result.push(String.fromCharCode(w1));\r\n result.push(String.fromCharCode(w2));\r\n }\r\n else {\r\n // illegal code point\r\n result.push(String.fromCharCode(0xFFFD));\r\n }\r\n }\r\n return result.join('');\r\n}\r\n/**\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-rtl-test.js\r\n */\r\nconst CONTAINS_RTL = /(?:[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1-\\u07EA\\u07F4\\u07F5\\u07FA-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u0858\\u085E-\\u08BD\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFD3D\\uFD50-\\uFDFC\\uFE70-\\uFEFC]|\\uD802[\\uDC00-\\uDD1B\\uDD20-\\uDE00\\uDE10-\\uDE33\\uDE40-\\uDEE4\\uDEEB-\\uDF35\\uDF40-\\uDFFF]|\\uD803[\\uDC00-\\uDCFF]|\\uD83A[\\uDC00-\\uDCCF\\uDD00-\\uDD43\\uDD50-\\uDFFF]|\\uD83B[\\uDC00-\\uDEBB])/;\r\n/**\r\n * Returns true if `str` contains any Unicode character that is classified as \"R\" or \"AL\".\r\n */\r\nfunction containsRTL(str) {\r\n return CONTAINS_RTL.test(str);\r\n}\r\n/**\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-emoji-test.js\r\n */\r\nconst CONTAINS_EMOJI = /(?:[\\u231A\\u231B\\u23F0\\u23F3\\u2600-\\u27BF\\u2B50\\u2B55]|\\uD83C[\\uDDE6-\\uDDFF\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDE4F\\uDE80-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD00-\\uDDFF\\uDE70-\\uDED6])/;\r\nfunction containsEmoji(str) {\r\n return CONTAINS_EMOJI.test(str);\r\n}\r\nconst IS_BASIC_ASCII = /^[\\t\\n\\r\\x20-\\x7E]*$/;\r\n/**\r\n * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \\n, \\r, \\t\r\n */\r\nfunction isBasicASCII(str) {\r\n return IS_BASIC_ASCII.test(str);\r\n}\r\nconst UNUSUAL_LINE_TERMINATORS = /[\\u2028\\u2029]/; // LINE SEPARATOR (LS) or PARAGRAPH SEPARATOR (PS)\r\n/**\r\n * Returns true if `str` contains unusual line terminators, like LS or PS\r\n */\r\nfunction containsUnusualLineTerminators(str) {\r\n return UNUSUAL_LINE_TERMINATORS.test(str);\r\n}\r\nfunction containsFullWidthCharacter(str) {\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n if (isFullWidthCharacter(str.charCodeAt(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction isFullWidthCharacter(charCode) {\r\n // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns\r\n // http://jrgraphix.net/research/unicode_blocks.php\r\n // 2E80 — 2EFF CJK Radicals Supplement\r\n // 2F00 — 2FDF Kangxi Radicals\r\n // 2FF0 — 2FFF Ideographic Description Characters\r\n // 3000 — 303F CJK Symbols and Punctuation\r\n // 3040 — 309F Hiragana\r\n // 30A0 — 30FF Katakana\r\n // 3100 — 312F Bopomofo\r\n // 3130 — 318F Hangul Compatibility Jamo\r\n // 3190 — 319F Kanbun\r\n // 31A0 — 31BF Bopomofo Extended\r\n // 31F0 — 31FF Katakana Phonetic Extensions\r\n // 3200 — 32FF Enclosed CJK Letters and Months\r\n // 3300 — 33FF CJK Compatibility\r\n // 3400 — 4DBF CJK Unified Ideographs Extension A\r\n // 4DC0 — 4DFF Yijing Hexagram Symbols\r\n // 4E00 — 9FFF CJK Unified Ideographs\r\n // A000 — A48F Yi Syllables\r\n // A490 — A4CF Yi Radicals\r\n // AC00 — D7AF Hangul Syllables\r\n // [IGNORE] D800 — DB7F High Surrogates\r\n // [IGNORE] DB80 — DBFF High Private Use Surrogates\r\n // [IGNORE] DC00 — DFFF Low Surrogates\r\n // [IGNORE] E000 — F8FF Private Use Area\r\n // F900 — FAFF CJK Compatibility Ideographs\r\n // [IGNORE] FB00 — FB4F Alphabetic Presentation Forms\r\n // [IGNORE] FB50 — FDFF Arabic Presentation Forms-A\r\n // [IGNORE] FE00 — FE0F Variation Selectors\r\n // [IGNORE] FE20 — FE2F Combining Half Marks\r\n // [IGNORE] FE30 — FE4F CJK Compatibility Forms\r\n // [IGNORE] FE50 — FE6F Small Form Variants\r\n // [IGNORE] FE70 — FEFF Arabic Presentation Forms-B\r\n // FF00 — FFEF Halfwidth and Fullwidth Forms\r\n // [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms]\r\n // of which FF01 - FF5E fullwidth ASCII of 21 to 7E\r\n // [IGNORE] and FF65 - FFDC halfwidth of Katakana and Hangul\r\n // [IGNORE] FFF0 — FFFF Specials\r\n charCode = +charCode; // @perf\r\n return ((charCode >= 0x2E80 && charCode <= 0xD7AF)\r\n || (charCode >= 0xF900 && charCode <= 0xFAFF)\r\n || (charCode >= 0xFF01 && charCode <= 0xFF5E));\r\n}\r\n/**\r\n * A fast function (therefore imprecise) to check if code points are emojis.\r\n * Generated using https://github.com/alexdima/unicode-utils/blob/master/generate-emoji-test.js\r\n */\r\nfunction isEmojiImprecise(x) {\r\n return ((x >= 0x1F1E6 && x <= 0x1F1FF) || (x === 8986) || (x === 8987) || (x === 9200)\r\n || (x === 9203) || (x >= 9728 && x <= 10175) || (x === 11088) || (x === 11093)\r\n || (x >= 127744 && x <= 128591) || (x >= 128640 && x <= 128764)\r\n || (x >= 128992 && x <= 129003) || (x >= 129280 && x <= 129535)\r\n || (x >= 129648 && x <= 129750));\r\n}\r\n// -- UTF-8 BOM\r\nconst UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* UTF8_BOM */);\r\nfunction startsWithUTF8BOM(str) {\r\n return !!(str && str.length > 0 && str.charCodeAt(0) === 65279 /* UTF8_BOM */);\r\n}\r\nfunction containsUppercaseCharacter(target, ignoreEscapedChars = false) {\r\n if (!target) {\r\n return false;\r\n }\r\n if (ignoreEscapedChars) {\r\n target = target.replace(/\\\\./g, '');\r\n }\r\n return target.toLowerCase() !== target;\r\n}\r\n/**\r\n * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc.\r\n */\r\nfunction singleLetterHash(n) {\r\n const LETTERS_CNT = (90 /* Z */ - 65 /* A */ + 1);\r\n n = n % (2 * LETTERS_CNT);\r\n if (n < LETTERS_CNT) {\r\n return String.fromCharCode(97 /* a */ + n);\r\n }\r\n return String.fromCharCode(65 /* A */ + n - LETTERS_CNT);\r\n}\r\n//#region Unicode Grapheme Break\r\nfunction getGraphemeBreakType(codePoint) {\r\n const graphemeBreakTree = GraphemeBreakTree.getInstance();\r\n return graphemeBreakTree.getGraphemeBreakType(codePoint);\r\n}\r\nfunction breakBetweenGraphemeBreakType(breakTypeA, breakTypeB) {\r\n // http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules\r\n // !!! Let's make the common case a bit faster\r\n if (breakTypeA === 0 /* Other */) {\r\n // see https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest-13.0.0d10.html#table\r\n return (breakTypeB !== 5 /* Extend */ && breakTypeB !== 7 /* SpacingMark */);\r\n }\r\n // Do not break between a CR and LF. Otherwise, break before and after controls.\r\n // GB3 CR × LF\r\n // GB4 (Control | CR | LF) ÷\r\n // GB5 ÷ (Control | CR | LF)\r\n if (breakTypeA === 2 /* CR */) {\r\n if (breakTypeB === 3 /* LF */) {\r\n return false; // GB3\r\n }\r\n }\r\n if (breakTypeA === 4 /* Control */ || breakTypeA === 2 /* CR */ || breakTypeA === 3 /* LF */) {\r\n return true; // GB4\r\n }\r\n if (breakTypeB === 4 /* Control */ || breakTypeB === 2 /* CR */ || breakTypeB === 3 /* LF */) {\r\n return true; // GB5\r\n }\r\n // Do not break Hangul syllable sequences.\r\n // GB6 L × (L | V | LV | LVT)\r\n // GB7 (LV | V) × (V | T)\r\n // GB8 (LVT | T) × T\r\n if (breakTypeA === 8 /* L */) {\r\n if (breakTypeB === 8 /* L */ || breakTypeB === 9 /* V */ || breakTypeB === 11 /* LV */ || breakTypeB === 12 /* LVT */) {\r\n return false; // GB6\r\n }\r\n }\r\n if (breakTypeA === 11 /* LV */ || breakTypeA === 9 /* V */) {\r\n if (breakTypeB === 9 /* V */ || breakTypeB === 10 /* T */) {\r\n return false; // GB7\r\n }\r\n }\r\n if (breakTypeA === 12 /* LVT */ || breakTypeA === 10 /* T */) {\r\n if (breakTypeB === 10 /* T */) {\r\n return false; // GB8\r\n }\r\n }\r\n // Do not break before extending characters or ZWJ.\r\n // GB9 × (Extend | ZWJ)\r\n if (breakTypeB === 5 /* Extend */ || breakTypeB === 13 /* ZWJ */) {\r\n return false; // GB9\r\n }\r\n // The GB9a and GB9b rules only apply to extended grapheme clusters:\r\n // Do not break before SpacingMarks, or after Prepend characters.\r\n // GB9a × SpacingMark\r\n // GB9b Prepend ×\r\n if (breakTypeB === 7 /* SpacingMark */) {\r\n return false; // GB9a\r\n }\r\n if (breakTypeA === 1 /* Prepend */) {\r\n return false; // GB9b\r\n }\r\n // Do not break within emoji modifier sequences or emoji zwj sequences.\r\n // GB11 \\p{Extended_Pictographic} Extend* ZWJ × \\p{Extended_Pictographic}\r\n if (breakTypeA === 13 /* ZWJ */ && breakTypeB === 14 /* Extended_Pictographic */) {\r\n // Note: we are not implementing the rule entirely here to avoid introducing states\r\n return false; // GB11\r\n }\r\n // GB12 sot (RI RI)* RI × RI\r\n // GB13 [^RI] (RI RI)* RI × RI\r\n if (breakTypeA === 6 /* Regional_Indicator */ && breakTypeB === 6 /* Regional_Indicator */) {\r\n // Note: we are not implementing the rule entirely here to avoid introducing states\r\n return false; // GB12 & GB13\r\n }\r\n // GB999 Any ÷ Any\r\n return true;\r\n}\r\nclass GraphemeBreakTree {\r\n constructor() {\r\n this._data = getGraphemeBreakRawData();\r\n }\r\n static getInstance() {\r\n if (!GraphemeBreakTree._INSTANCE) {\r\n GraphemeBreakTree._INSTANCE = new GraphemeBreakTree();\r\n }\r\n return GraphemeBreakTree._INSTANCE;\r\n }\r\n getGraphemeBreakType(codePoint) {\r\n // !!! Let's make 7bit ASCII a bit faster: 0..31\r\n if (codePoint < 32) {\r\n if (codePoint === 10 /* LineFeed */) {\r\n return 3 /* LF */;\r\n }\r\n if (codePoint === 13 /* CarriageReturn */) {\r\n return 2 /* CR */;\r\n }\r\n return 4 /* Control */;\r\n }\r\n // !!! Let's make 7bit ASCII a bit faster: 32..126\r\n if (codePoint < 127) {\r\n return 0 /* Other */;\r\n }\r\n const data = this._data;\r\n const nodeCount = data.length / 3;\r\n let nodeIndex = 1;\r\n while (nodeIndex <= nodeCount) {\r\n if (codePoint < data[3 * nodeIndex]) {\r\n // go left\r\n nodeIndex = 2 * nodeIndex;\r\n }\r\n else if (codePoint > data[3 * nodeIndex + 1]) {\r\n // go right\r\n nodeIndex = 2 * nodeIndex + 1;\r\n }\r\n else {\r\n // hit\r\n return data[3 * nodeIndex + 2];\r\n }\r\n }\r\n return 0 /* Other */;\r\n }\r\n}\r\nGraphemeBreakTree._INSTANCE = null;\r\nfunction getGraphemeBreakRawData() {\r\n // generated using https://github.com/alexdima/unicode-utils/blob/master/generate-grapheme-break.js\r\n return JSON.parse('[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]');\r\n}\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/strings.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/types.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/types.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isArray\": () => (/* binding */ isArray),\n/* harmony export */ \"isString\": () => (/* binding */ isString),\n/* harmony export */ \"isObject\": () => (/* binding */ isObject),\n/* harmony export */ \"isNumber\": () => (/* binding */ isNumber),\n/* harmony export */ \"isBoolean\": () => (/* binding */ isBoolean),\n/* harmony export */ \"isUndefined\": () => (/* binding */ isUndefined),\n/* harmony export */ \"isUndefinedOrNull\": () => (/* binding */ isUndefinedOrNull),\n/* harmony export */ \"assertType\": () => (/* binding */ assertType),\n/* harmony export */ \"assertIsDefined\": () => (/* binding */ assertIsDefined),\n/* harmony export */ \"isFunction\": () => (/* binding */ isFunction),\n/* harmony export */ \"validateConstraints\": () => (/* binding */ validateConstraints),\n/* harmony export */ \"validateConstraint\": () => (/* binding */ validateConstraint),\n/* harmony export */ \"getAllPropertyNames\": () => (/* binding */ getAllPropertyNames),\n/* harmony export */ \"getAllMethodNames\": () => (/* binding */ getAllMethodNames),\n/* harmony export */ \"createProxyObject\": () => (/* binding */ createProxyObject),\n/* harmony export */ \"withNullAsUndefined\": () => (/* binding */ withNullAsUndefined)\n/* harmony export */ });\n/**\r\n * @returns whether the provided parameter is a JavaScript Array or not.\r\n */\r\nfunction isArray(array) {\r\n return Array.isArray(array);\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript String or not.\r\n */\r\nfunction isString(str) {\r\n return (typeof str === 'string');\r\n}\r\n/**\r\n *\r\n * @returns whether the provided parameter is of type `object` but **not**\r\n *\t`null`, an `array`, a `regexp`, nor a `date`.\r\n */\r\nfunction isObject(obj) {\r\n // The method can't do a type cast since there are type (like strings) which\r\n // are subclasses of any put not positvely matched by the function. Hence type\r\n // narrowing results in wrong results.\r\n return typeof obj === 'object'\r\n && obj !== null\r\n && !Array.isArray(obj)\r\n && !(obj instanceof RegExp)\r\n && !(obj instanceof Date);\r\n}\r\n/**\r\n * In **contrast** to just checking `typeof` this will return `false` for `NaN`.\r\n * @returns whether the provided parameter is a JavaScript Number or not.\r\n */\r\nfunction isNumber(obj) {\r\n return (typeof obj === 'number' && !isNaN(obj));\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Boolean or not.\r\n */\r\nfunction isBoolean(obj) {\r\n return (obj === true || obj === false);\r\n}\r\n/**\r\n * @returns whether the provided parameter is undefined.\r\n */\r\nfunction isUndefined(obj) {\r\n return (typeof obj === 'undefined');\r\n}\r\n/**\r\n * @returns whether the provided parameter is undefined or null.\r\n */\r\nfunction isUndefinedOrNull(obj) {\r\n return (isUndefined(obj) || obj === null);\r\n}\r\nfunction assertType(condition, type) {\r\n if (!condition) {\r\n throw new Error(type ? `Unexpected type, expected '${type}'` : 'Unexpected type');\r\n }\r\n}\r\n/**\r\n * Asserts that the argument passed in is neither undefined nor null.\r\n */\r\nfunction assertIsDefined(arg) {\r\n if (isUndefinedOrNull(arg)) {\r\n throw new Error('Assertion Failed: argument is undefined or null');\r\n }\r\n return arg;\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Function or not.\r\n */\r\nfunction isFunction(obj) {\r\n return (typeof obj === 'function');\r\n}\r\nfunction validateConstraints(args, constraints) {\r\n const len = Math.min(args.length, constraints.length);\r\n for (let i = 0; i < len; i++) {\r\n validateConstraint(args[i], constraints[i]);\r\n }\r\n}\r\nfunction validateConstraint(arg, constraint) {\r\n if (isString(constraint)) {\r\n if (typeof arg !== constraint) {\r\n throw new Error(`argument does not match constraint: typeof ${constraint}`);\r\n }\r\n }\r\n else if (isFunction(constraint)) {\r\n try {\r\n if (arg instanceof constraint) {\r\n return;\r\n }\r\n }\r\n catch (_a) {\r\n // ignore\r\n }\r\n if (!isUndefinedOrNull(arg) && arg.constructor === constraint) {\r\n return;\r\n }\r\n if (constraint.length === 1 && constraint.call(undefined, arg) === true) {\r\n return;\r\n }\r\n throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`);\r\n }\r\n}\r\nfunction getAllPropertyNames(obj) {\r\n let res = [];\r\n let proto = Object.getPrototypeOf(obj);\r\n while (Object.prototype !== proto) {\r\n res = res.concat(Object.getOwnPropertyNames(proto));\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return res;\r\n}\r\nfunction getAllMethodNames(obj) {\r\n const methods = [];\r\n for (const prop of getAllPropertyNames(obj)) {\r\n if (typeof obj[prop] === 'function') {\r\n methods.push(prop);\r\n }\r\n }\r\n return methods;\r\n}\r\nfunction createProxyObject(methodNames, invoke) {\r\n const createProxyMethod = (method) => {\r\n return function () {\r\n const args = Array.prototype.slice.call(arguments, 0);\r\n return invoke(method, args);\r\n };\r\n };\r\n let result = {};\r\n for (const methodName of methodNames) {\r\n result[methodName] = createProxyMethod(methodName);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Converts null to undefined, passes all other values through.\r\n */\r\nfunction withNullAsUndefined(x) {\r\n return x === null ? undefined : x;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/types.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/uint.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/uint.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"toUint8\": () => (/* binding */ toUint8),\n/* harmony export */ \"toUint32\": () => (/* binding */ toUint32)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction toUint8(v) {\r\n if (v < 0) {\r\n return 0;\r\n }\r\n if (v > 255 /* MAX_UINT_8 */) {\r\n return 255 /* MAX_UINT_8 */;\r\n }\r\n return v | 0;\r\n}\r\nfunction toUint32(v) {\r\n if (v < 0) {\r\n return 0;\r\n }\r\n if (v > 4294967295 /* MAX_UINT_32 */) {\r\n return 4294967295 /* MAX_UINT_32 */;\r\n }\r\n return v | 0;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/uint.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/uri.js":
|
||
/*!**************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/uri.js ***!
|
||
\**************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"URI\": () => (/* binding */ URI),\n/* harmony export */ \"uriToFsPath\": () => (/* binding */ uriToFsPath)\n/* harmony export */ });\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\r\nconst _singleSlashStart = /^\\//;\r\nconst _doubleSlashStart = /^\\/\\//;\r\nfunction _validateUri(ret, _strict) {\r\n // scheme, must be set\r\n if (!ret.scheme && _strict) {\r\n throw new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\r\n }\r\n // scheme, https://tools.ietf.org/html/rfc3986#section-3.1\r\n // ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\r\n if (ret.scheme && !_schemePattern.test(ret.scheme)) {\r\n throw new Error('[UriError]: Scheme contains illegal characters.');\r\n }\r\n // path, http://tools.ietf.org/html/rfc3986#section-3.3\r\n // If a URI contains an authority component, then the path component\r\n // must either be empty or begin with a slash (\"/\") character. If a URI\r\n // does not contain an authority component, then the path cannot begin\r\n // with two slash characters (\"//\").\r\n if (ret.path) {\r\n if (ret.authority) {\r\n if (!_singleSlashStart.test(ret.path)) {\r\n 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');\r\n }\r\n }\r\n else {\r\n if (_doubleSlashStart.test(ret.path)) {\r\n throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\r\n }\r\n }\r\n }\r\n}\r\n// for a while we allowed uris *without* schemes and this is the migration\r\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\r\n// back to the file-scheme. that should cause the least carnage and still be a\r\n// clear warning\r\nfunction _schemeFix(scheme, _strict) {\r\n if (!scheme && !_strict) {\r\n return 'file';\r\n }\r\n return scheme;\r\n}\r\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\r\nfunction _referenceResolution(scheme, path) {\r\n // the slash-character is our 'default base' as we don't\r\n // support constructing URIs relative to other URIs. This\r\n // also means that we alter and potentially break paths.\r\n // see https://tools.ietf.org/html/rfc3986#section-5.1.4\r\n switch (scheme) {\r\n case 'https':\r\n case 'http':\r\n case 'file':\r\n if (!path) {\r\n path = _slash;\r\n }\r\n else if (path[0] !== _slash) {\r\n path = _slash + path;\r\n }\r\n break;\r\n }\r\n return path;\r\n}\r\nconst _empty = '';\r\nconst _slash = '/';\r\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\r\n/**\r\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\r\n * This class is a simple parser which creates the basic component parts\r\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\r\n * and encoding.\r\n *\r\n * ```txt\r\n * foo://example.com:8042/over/there?name=ferret#nose\r\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\r\n * | | | | |\r\n * scheme authority path query fragment\r\n * | _____________________|__\r\n * / \\ / \\\r\n * urn:example:animal:ferret:nose\r\n * ```\r\n */\r\nclass URI {\r\n /**\r\n * @internal\r\n */\r\n constructor(schemeOrData, authority, path, query, fragment, _strict = false) {\r\n if (typeof schemeOrData === 'object') {\r\n this.scheme = schemeOrData.scheme || _empty;\r\n this.authority = schemeOrData.authority || _empty;\r\n this.path = schemeOrData.path || _empty;\r\n this.query = schemeOrData.query || _empty;\r\n this.fragment = schemeOrData.fragment || _empty;\r\n // no validation because it's this URI\r\n // that creates uri components.\r\n // _validateUri(this);\r\n }\r\n else {\r\n this.scheme = _schemeFix(schemeOrData, _strict);\r\n this.authority = authority || _empty;\r\n this.path = _referenceResolution(this.scheme, path || _empty);\r\n this.query = query || _empty;\r\n this.fragment = fragment || _empty;\r\n _validateUri(this, _strict);\r\n }\r\n }\r\n static isUri(thing) {\r\n if (thing instanceof URI) {\r\n return true;\r\n }\r\n if (!thing) {\r\n return false;\r\n }\r\n return typeof thing.authority === 'string'\r\n && typeof thing.fragment === 'string'\r\n && typeof thing.path === 'string'\r\n && typeof thing.query === 'string'\r\n && typeof thing.scheme === 'string'\r\n && typeof thing.fsPath === 'string'\r\n && typeof thing.with === 'function'\r\n && typeof thing.toString === 'function';\r\n }\r\n // ---- filesystem path -----------------------\r\n /**\r\n * Returns a string representing the corresponding file system path of this URI.\r\n * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\r\n * platform specific path separator.\r\n *\r\n * * Will *not* validate the path for invalid characters and semantics.\r\n * * Will *not* look at the scheme of this URI.\r\n * * The result shall *not* be used for display purposes but for accessing a file on disk.\r\n *\r\n *\r\n * The *difference* to `URI#path` is the use of the platform specific separator and the handling\r\n * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\r\n *\r\n * ```ts\r\n const u = URI.parse('file://server/c$/folder/file.txt')\r\n u.authority === 'server'\r\n u.path === '/shares/c$/file.txt'\r\n u.fsPath === '\\\\server\\c$\\folder\\file.txt'\r\n ```\r\n *\r\n * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\r\n * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\r\n * with URIs that represent files on disk (`file` scheme).\r\n */\r\n get fsPath() {\r\n // if (this.scheme !== 'file') {\r\n // \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\r\n // }\r\n return uriToFsPath(this, false);\r\n }\r\n // ---- modify to new -------------------------\r\n with(change) {\r\n if (!change) {\r\n return this;\r\n }\r\n let { scheme, authority, path, query, fragment } = change;\r\n if (scheme === undefined) {\r\n scheme = this.scheme;\r\n }\r\n else if (scheme === null) {\r\n scheme = _empty;\r\n }\r\n if (authority === undefined) {\r\n authority = this.authority;\r\n }\r\n else if (authority === null) {\r\n authority = _empty;\r\n }\r\n if (path === undefined) {\r\n path = this.path;\r\n }\r\n else if (path === null) {\r\n path = _empty;\r\n }\r\n if (query === undefined) {\r\n query = this.query;\r\n }\r\n else if (query === null) {\r\n query = _empty;\r\n }\r\n if (fragment === undefined) {\r\n fragment = this.fragment;\r\n }\r\n else if (fragment === null) {\r\n fragment = _empty;\r\n }\r\n if (scheme === this.scheme\r\n && authority === this.authority\r\n && path === this.path\r\n && query === this.query\r\n && fragment === this.fragment) {\r\n return this;\r\n }\r\n return new Uri(scheme, authority, path, query, fragment);\r\n }\r\n // ---- parse & validate ------------------------\r\n /**\r\n * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,\r\n * `file:///usr/home`, or `scheme:with/path`.\r\n *\r\n * @param value A string which represents an URI (see `URI#toString`).\r\n */\r\n static parse(value, _strict = false) {\r\n const match = _regexp.exec(value);\r\n if (!match) {\r\n return new Uri(_empty, _empty, _empty, _empty, _empty);\r\n }\r\n return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);\r\n }\r\n /**\r\n * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\r\n * `/usr/home`, or `\\\\server\\share\\some\\path`.\r\n *\r\n * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\r\n * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\r\n * `URI.parse('file://' + path)` because the path might contain characters that are\r\n * interpreted (# and ?). See the following sample:\r\n * ```ts\r\n const good = URI.file('/coding/c#/project1');\r\n good.scheme === 'file';\r\n good.path === '/coding/c#/project1';\r\n good.fragment === '';\r\n const bad = URI.parse('file://' + '/coding/c#/project1');\r\n bad.scheme === 'file';\r\n bad.path === '/coding/c'; // path is now broken\r\n bad.fragment === '/project1';\r\n ```\r\n *\r\n * @param path A file system path (see `URI#fsPath`)\r\n */\r\n static file(path) {\r\n let authority = _empty;\r\n // normalize to fwd-slashes on windows,\r\n // on other systems bwd-slashes are valid\r\n // filename character, eg /f\\oo/ba\\r.txt\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows) {\r\n path = path.replace(/\\\\/g, _slash);\r\n }\r\n // check for authority as used in UNC shares\r\n // or use the path as given\r\n if (path[0] === _slash && path[1] === _slash) {\r\n const idx = path.indexOf(_slash, 2);\r\n if (idx === -1) {\r\n authority = path.substring(2);\r\n path = _slash;\r\n }\r\n else {\r\n authority = path.substring(2, idx);\r\n path = path.substring(idx) || _slash;\r\n }\r\n }\r\n return new Uri('file', authority, path, _empty, _empty);\r\n }\r\n static from(components) {\r\n return new Uri(components.scheme, components.authority, components.path, components.query, components.fragment);\r\n }\r\n /**\r\n * Join a URI path with path fragments and normalizes the resulting path.\r\n *\r\n * @param uri The input URI.\r\n * @param pathFragment The path fragment to add to the URI path.\r\n * @returns The resulting URI.\r\n */\r\n static joinPath(uri, ...pathFragment) {\r\n if (!uri.path) {\r\n throw new Error(`[UriError]: cannot call joinPath on URI without path`);\r\n }\r\n let newPath;\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows && uri.scheme === 'file') {\r\n newPath = URI.file(_path_js__WEBPACK_IMPORTED_MODULE_1__.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;\r\n }\r\n else {\r\n newPath = _path_js__WEBPACK_IMPORTED_MODULE_1__.posix.join(uri.path, ...pathFragment);\r\n }\r\n return uri.with({ path: newPath });\r\n }\r\n // ---- printing/externalize ---------------------------\r\n /**\r\n * Creates a string representation for this URI. It's guaranteed that calling\r\n * `URI.parse` with the result of this function creates an URI which is equal\r\n * to this URI.\r\n *\r\n * * The result shall *not* be used for display purposes but for externalization or transport.\r\n * * The result will be encoded using the percentage encoding and encoding happens mostly\r\n * ignore the scheme-specific encoding rules.\r\n *\r\n * @param skipEncoding Do not encode the result, default is `false`\r\n */\r\n toString(skipEncoding = false) {\r\n return _asFormatted(this, skipEncoding);\r\n }\r\n toJSON() {\r\n return this;\r\n }\r\n static revive(data) {\r\n if (!data) {\r\n return data;\r\n }\r\n else if (data instanceof URI) {\r\n return data;\r\n }\r\n else {\r\n const result = new Uri(data);\r\n result._formatted = data.external;\r\n result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;\r\n return result;\r\n }\r\n }\r\n}\r\nconst _pathSepMarker = _platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows ? 1 : undefined;\r\n// This class exists so that URI is compatibile with vscode.Uri (API).\r\nclass Uri extends URI {\r\n constructor() {\r\n super(...arguments);\r\n this._formatted = null;\r\n this._fsPath = null;\r\n }\r\n get fsPath() {\r\n if (!this._fsPath) {\r\n this._fsPath = uriToFsPath(this, false);\r\n }\r\n return this._fsPath;\r\n }\r\n toString(skipEncoding = false) {\r\n if (!skipEncoding) {\r\n if (!this._formatted) {\r\n this._formatted = _asFormatted(this, false);\r\n }\r\n return this._formatted;\r\n }\r\n else {\r\n // we don't cache that\r\n return _asFormatted(this, true);\r\n }\r\n }\r\n toJSON() {\r\n const res = {\r\n $mid: 1\r\n };\r\n // cached state\r\n if (this._fsPath) {\r\n res.fsPath = this._fsPath;\r\n res._sep = _pathSepMarker;\r\n }\r\n if (this._formatted) {\r\n res.external = this._formatted;\r\n }\r\n // uri components\r\n if (this.path) {\r\n res.path = this.path;\r\n }\r\n if (this.scheme) {\r\n res.scheme = this.scheme;\r\n }\r\n if (this.authority) {\r\n res.authority = this.authority;\r\n }\r\n if (this.query) {\r\n res.query = this.query;\r\n }\r\n if (this.fragment) {\r\n res.fragment = this.fragment;\r\n }\r\n return res;\r\n }\r\n}\r\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\r\nconst encodeTable = {\r\n [58 /* Colon */]: '%3A',\r\n [47 /* Slash */]: '%2F',\r\n [63 /* QuestionMark */]: '%3F',\r\n [35 /* Hash */]: '%23',\r\n [91 /* OpenSquareBracket */]: '%5B',\r\n [93 /* CloseSquareBracket */]: '%5D',\r\n [64 /* AtSign */]: '%40',\r\n [33 /* ExclamationMark */]: '%21',\r\n [36 /* DollarSign */]: '%24',\r\n [38 /* Ampersand */]: '%26',\r\n [39 /* SingleQuote */]: '%27',\r\n [40 /* OpenParen */]: '%28',\r\n [41 /* CloseParen */]: '%29',\r\n [42 /* Asterisk */]: '%2A',\r\n [43 /* Plus */]: '%2B',\r\n [44 /* Comma */]: '%2C',\r\n [59 /* Semicolon */]: '%3B',\r\n [61 /* Equals */]: '%3D',\r\n [32 /* Space */]: '%20',\r\n};\r\nfunction encodeURIComponentFast(uriComponent, allowSlash) {\r\n let res = undefined;\r\n let nativeEncodePos = -1;\r\n for (let pos = 0; pos < uriComponent.length; pos++) {\r\n const code = uriComponent.charCodeAt(pos);\r\n // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\r\n if ((code >= 97 /* a */ && code <= 122 /* z */)\r\n || (code >= 65 /* A */ && code <= 90 /* Z */)\r\n || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)\r\n || code === 45 /* Dash */\r\n || code === 46 /* Period */\r\n || code === 95 /* Underline */\r\n || code === 126 /* Tilde */\r\n || (allowSlash && code === 47 /* Slash */)) {\r\n // check if we are delaying native encode\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\r\n nativeEncodePos = -1;\r\n }\r\n // check if we write into a new string (by default we try to return the param)\r\n if (res !== undefined) {\r\n res += uriComponent.charAt(pos);\r\n }\r\n }\r\n else {\r\n // encoding needed, we need to allocate a new string\r\n if (res === undefined) {\r\n res = uriComponent.substr(0, pos);\r\n }\r\n // check with default table first\r\n const escaped = encodeTable[code];\r\n if (escaped !== undefined) {\r\n // check if we are delaying native encode\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\r\n nativeEncodePos = -1;\r\n }\r\n // append escaped variant to result\r\n res += escaped;\r\n }\r\n else if (nativeEncodePos === -1) {\r\n // use native encode only when needed\r\n nativeEncodePos = pos;\r\n }\r\n }\r\n }\r\n if (nativeEncodePos !== -1) {\r\n res += encodeURIComponent(uriComponent.substring(nativeEncodePos));\r\n }\r\n return res !== undefined ? res : uriComponent;\r\n}\r\nfunction encodeURIComponentMinimal(path) {\r\n let res = undefined;\r\n for (let pos = 0; pos < path.length; pos++) {\r\n const code = path.charCodeAt(pos);\r\n if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {\r\n if (res === undefined) {\r\n res = path.substr(0, pos);\r\n }\r\n res += encodeTable[code];\r\n }\r\n else {\r\n if (res !== undefined) {\r\n res += path[pos];\r\n }\r\n }\r\n }\r\n return res !== undefined ? res : path;\r\n}\r\n/**\r\n * Compute `fsPath` for the given uri\r\n */\r\nfunction uriToFsPath(uri, keepDriveLetterCasing) {\r\n let value;\r\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\r\n // unc path: file://shares/c$/far/boo\r\n value = `//${uri.authority}${uri.path}`;\r\n }\r\n else if (uri.path.charCodeAt(0) === 47 /* Slash */\r\n && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)\r\n && uri.path.charCodeAt(2) === 58 /* Colon */) {\r\n if (!keepDriveLetterCasing) {\r\n // windows drive letter: file:///c:/far/boo\r\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\r\n }\r\n else {\r\n value = uri.path.substr(1);\r\n }\r\n }\r\n else {\r\n // other path\r\n value = uri.path;\r\n }\r\n if (_platform_js__WEBPACK_IMPORTED_MODULE_0__.isWindows) {\r\n value = value.replace(/\\//g, '\\\\');\r\n }\r\n return value;\r\n}\r\n/**\r\n * Create the external version of a uri\r\n */\r\nfunction _asFormatted(uri, skipEncoding) {\r\n const encoder = !skipEncoding\r\n ? encodeURIComponentFast\r\n : encodeURIComponentMinimal;\r\n let res = '';\r\n let { scheme, authority, path, query, fragment } = uri;\r\n if (scheme) {\r\n res += scheme;\r\n res += ':';\r\n }\r\n if (authority || scheme === 'file') {\r\n res += _slash;\r\n res += _slash;\r\n }\r\n if (authority) {\r\n let idx = authority.indexOf('@');\r\n if (idx !== -1) {\r\n // <user>@<auth>\r\n const userinfo = authority.substr(0, idx);\r\n authority = authority.substr(idx + 1);\r\n idx = userinfo.indexOf(':');\r\n if (idx === -1) {\r\n res += encoder(userinfo, false);\r\n }\r\n else {\r\n // <user>:<pass>@<auth>\r\n res += encoder(userinfo.substr(0, idx), false);\r\n res += ':';\r\n res += encoder(userinfo.substr(idx + 1), false);\r\n }\r\n res += '@';\r\n }\r\n authority = authority.toLowerCase();\r\n idx = authority.indexOf(':');\r\n if (idx === -1) {\r\n res += encoder(authority, false);\r\n }\r\n else {\r\n // <auth>:<port>\r\n res += encoder(authority.substr(0, idx), false);\r\n res += authority.substr(idx);\r\n }\r\n }\r\n if (path) {\r\n // lower-case windows drive letters in /C:/fff or C:/fff\r\n if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {\r\n const code = path.charCodeAt(1);\r\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\r\n path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\r\n }\r\n }\r\n else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {\r\n const code = path.charCodeAt(0);\r\n if (code >= 65 /* A */ && code <= 90 /* Z */) {\r\n path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\r\n }\r\n }\r\n // encode the rest of the path\r\n res += encoder(path, true);\r\n }\r\n if (query) {\r\n res += '?';\r\n res += encoder(query, false);\r\n }\r\n if (fragment) {\r\n res += '#';\r\n res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;\r\n }\r\n return res;\r\n}\r\n// --- decode\r\nfunction decodeURIComponentGraceful(str) {\r\n try {\r\n return decodeURIComponent(str);\r\n }\r\n catch (_a) {\r\n if (str.length > 3) {\r\n return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\r\n }\r\n else {\r\n return str;\r\n }\r\n }\r\n}\r\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\r\nfunction percentDecode(str) {\r\n if (!str.match(_rEncodedAsHex)) {\r\n return str;\r\n }\r\n return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/uri.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/uuid.js":
|
||
/*!***************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/uuid.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"generateUuid\": () => (/* binding */ generateUuid)\n/* harmony export */ });\n// prep-work\r\nconst _data = new Uint8Array(16);\r\nconst _hex = [];\r\nfor (let i = 0; i < 256; i++) {\r\n _hex.push(i.toString(16).padStart(2, '0'));\r\n}\r\n// todo@jrieken\r\n// 1. node nodejs use`crypto#randomBytes`, see: https://nodejs.org/docs/latest/api/crypto.html#crypto_crypto_randombytes_size_callback\r\nlet _fillRandomValues;\r\nif (typeof crypto === 'object' && typeof crypto.getRandomValues === 'function') {\r\n // browser\r\n _fillRandomValues = crypto.getRandomValues.bind(crypto);\r\n}\r\nelse {\r\n _fillRandomValues = function (bucket) {\r\n for (let i = 0; i < bucket.length; i++) {\r\n bucket[i] = Math.floor(Math.random() * 256);\r\n }\r\n return bucket;\r\n };\r\n}\r\nfunction generateUuid() {\r\n // get data\r\n _fillRandomValues(_data);\r\n // set version bits\r\n _data[6] = (_data[6] & 0x0f) | 0x40;\r\n _data[8] = (_data[8] & 0x3f) | 0x80;\r\n // print as string\r\n let i = 0;\r\n let result = '';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/uuid.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"logOnceWebWorkerWarning\": () => (/* binding */ logOnceWebWorkerWarning),\n/* harmony export */ \"SimpleWorkerClient\": () => (/* binding */ SimpleWorkerClient),\n/* harmony export */ \"SimpleWorkerServer\": () => (/* binding */ SimpleWorkerServer),\n/* harmony export */ \"create\": () => (/* binding */ create)\n/* harmony export */ });\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nconst INITIALIZE = '$initialize';\r\nlet webWorkerWarningLogged = false;\r\nfunction logOnceWebWorkerWarning(err) {\r\n if (!_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWeb) {\r\n // running tests\r\n return;\r\n }\r\n if (!webWorkerWarningLogged) {\r\n webWorkerWarningLogged = true;\r\n console.warn('Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq');\r\n }\r\n console.warn(err.message);\r\n}\r\nclass SimpleWorkerProtocol {\r\n constructor(handler) {\r\n this._workerId = -1;\r\n this._handler = handler;\r\n this._lastSentReq = 0;\r\n this._pendingReplies = Object.create(null);\r\n }\r\n setWorkerId(workerId) {\r\n this._workerId = workerId;\r\n }\r\n sendMessage(method, args) {\r\n let req = String(++this._lastSentReq);\r\n return new Promise((resolve, reject) => {\r\n this._pendingReplies[req] = {\r\n resolve: resolve,\r\n reject: reject\r\n };\r\n this._send({\r\n vsWorker: this._workerId,\r\n req: req,\r\n method: method,\r\n args: args\r\n });\r\n });\r\n }\r\n handleMessage(message) {\r\n if (!message || !message.vsWorker) {\r\n return;\r\n }\r\n if (this._workerId !== -1 && message.vsWorker !== this._workerId) {\r\n return;\r\n }\r\n this._handleMessage(message);\r\n }\r\n _handleMessage(msg) {\r\n if (msg.seq) {\r\n let replyMessage = msg;\r\n if (!this._pendingReplies[replyMessage.seq]) {\r\n console.warn('Got reply to unknown seq');\r\n return;\r\n }\r\n let reply = this._pendingReplies[replyMessage.seq];\r\n delete this._pendingReplies[replyMessage.seq];\r\n if (replyMessage.err) {\r\n let err = replyMessage.err;\r\n if (replyMessage.err.$isError) {\r\n err = new Error();\r\n err.name = replyMessage.err.name;\r\n err.message = replyMessage.err.message;\r\n err.stack = replyMessage.err.stack;\r\n }\r\n reply.reject(err);\r\n return;\r\n }\r\n reply.resolve(replyMessage.res);\r\n return;\r\n }\r\n let requestMessage = msg;\r\n let req = requestMessage.req;\r\n let result = this._handler.handleMessage(requestMessage.method, requestMessage.args);\r\n result.then((r) => {\r\n this._send({\r\n vsWorker: this._workerId,\r\n seq: req,\r\n res: r,\r\n err: undefined\r\n });\r\n }, (e) => {\r\n if (e.detail instanceof Error) {\r\n // Loading errors have a detail property that points to the actual error\r\n e.detail = (0,_errors_js__WEBPACK_IMPORTED_MODULE_0__.transformErrorForSerialization)(e.detail);\r\n }\r\n this._send({\r\n vsWorker: this._workerId,\r\n seq: req,\r\n res: undefined,\r\n err: (0,_errors_js__WEBPACK_IMPORTED_MODULE_0__.transformErrorForSerialization)(e)\r\n });\r\n });\r\n }\r\n _send(msg) {\r\n let transfer = [];\r\n if (msg.req) {\r\n const m = msg;\r\n for (let i = 0; i < m.args.length; i++) {\r\n if (m.args[i] instanceof ArrayBuffer) {\r\n transfer.push(m.args[i]);\r\n }\r\n }\r\n }\r\n else {\r\n const m = msg;\r\n if (m.res instanceof ArrayBuffer) {\r\n transfer.push(m.res);\r\n }\r\n }\r\n this._handler.sendMessage(msg, transfer);\r\n }\r\n}\r\n/**\r\n * Main thread side\r\n */\r\nclass SimpleWorkerClient extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(workerFactory, moduleId, host) {\r\n super();\r\n let lazyProxyReject = null;\r\n this._worker = this._register(workerFactory.create('vs/base/common/worker/simpleWorker', (msg) => {\r\n this._protocol.handleMessage(msg);\r\n }, (err) => {\r\n // in Firefox, web workers fail lazily :(\r\n // we will reject the proxy\r\n if (lazyProxyReject) {\r\n lazyProxyReject(err);\r\n }\r\n }));\r\n this._protocol = new SimpleWorkerProtocol({\r\n sendMessage: (msg, transfer) => {\r\n this._worker.postMessage(msg, transfer);\r\n },\r\n handleMessage: (method, args) => {\r\n if (typeof host[method] !== 'function') {\r\n return Promise.reject(new Error('Missing method ' + method + ' on main thread host.'));\r\n }\r\n try {\r\n return Promise.resolve(host[method].apply(host, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n });\r\n this._protocol.setWorkerId(this._worker.getId());\r\n // Gather loader configuration\r\n let loaderConfiguration = null;\r\n if (typeof self.require !== 'undefined' && typeof self.require.getConfig === 'function') {\r\n // Get the configuration from the Monaco AMD Loader\r\n loaderConfiguration = self.require.getConfig();\r\n }\r\n else if (typeof self.requirejs !== 'undefined') {\r\n // Get the configuration from requirejs\r\n loaderConfiguration = self.requirejs.s.contexts._.config;\r\n }\r\n const hostMethods = _types_js__WEBPACK_IMPORTED_MODULE_3__.getAllMethodNames(host);\r\n // Send initialize message\r\n this._onModuleLoaded = this._protocol.sendMessage(INITIALIZE, [\r\n this._worker.getId(),\r\n JSON.parse(JSON.stringify(loaderConfiguration)),\r\n moduleId,\r\n hostMethods,\r\n ]);\r\n // Create proxy to loaded code\r\n const proxyMethodRequest = (method, args) => {\r\n return this._request(method, args);\r\n };\r\n this._lazyProxy = new Promise((resolve, reject) => {\r\n lazyProxyReject = reject;\r\n this._onModuleLoaded.then((availableMethods) => {\r\n resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__.createProxyObject(availableMethods, proxyMethodRequest));\r\n }, (e) => {\r\n reject(e);\r\n this._onError('Worker failed to load ' + moduleId, e);\r\n });\r\n });\r\n }\r\n getProxyObject() {\r\n return this._lazyProxy;\r\n }\r\n _request(method, args) {\r\n return new Promise((resolve, reject) => {\r\n this._onModuleLoaded.then(() => {\r\n this._protocol.sendMessage(method, args).then(resolve, reject);\r\n }, reject);\r\n });\r\n }\r\n _onError(message, error) {\r\n console.error(message);\r\n console.info(error);\r\n }\r\n}\r\n/**\r\n * Worker side\r\n */\r\nclass SimpleWorkerServer {\r\n constructor(postMessage, requestHandlerFactory) {\r\n this._requestHandlerFactory = requestHandlerFactory;\r\n this._requestHandler = null;\r\n this._protocol = new SimpleWorkerProtocol({\r\n sendMessage: (msg, transfer) => {\r\n postMessage(msg, transfer);\r\n },\r\n handleMessage: (method, args) => this._handleMessage(method, args)\r\n });\r\n }\r\n onmessage(msg) {\r\n this._protocol.handleMessage(msg);\r\n }\r\n _handleMessage(method, args) {\r\n if (method === INITIALIZE) {\r\n return this.initialize(args[0], args[1], args[2], args[3]);\r\n }\r\n if (!this._requestHandler || typeof this._requestHandler[method] !== 'function') {\r\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\r\n }\r\n try {\r\n return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n initialize(workerId, loaderConfig, moduleId, hostMethods) {\r\n this._protocol.setWorkerId(workerId);\r\n const proxyMethodRequest = (method, args) => {\r\n return this._protocol.sendMessage(method, args);\r\n };\r\n const hostProxy = _types_js__WEBPACK_IMPORTED_MODULE_3__.createProxyObject(hostMethods, proxyMethodRequest);\r\n if (this._requestHandlerFactory) {\r\n // static request handler\r\n this._requestHandler = this._requestHandlerFactory(hostProxy);\r\n return Promise.resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__.getAllMethodNames(this._requestHandler));\r\n }\r\n if (loaderConfig) {\r\n // Remove 'baseUrl', handling it is beyond scope for now\r\n if (typeof loaderConfig.baseUrl !== 'undefined') {\r\n delete loaderConfig['baseUrl'];\r\n }\r\n if (typeof loaderConfig.paths !== 'undefined') {\r\n if (typeof loaderConfig.paths.vs !== 'undefined') {\r\n delete loaderConfig.paths['vs'];\r\n }\r\n }\r\n if (typeof loaderConfig.trustedTypesPolicy !== undefined) {\r\n // don't use, it has been destroyed during serialize\r\n delete loaderConfig['trustedTypesPolicy'];\r\n }\r\n // Since this is in a web worker, enable catching errors\r\n loaderConfig.catchError = true;\r\n self.require.config(loaderConfig);\r\n }\r\n return new Promise((resolve, reject) => {\r\n // Use the global require to be sure to get the global config\r\n self.require([moduleId], (module) => {\r\n this._requestHandler = module.create(hostProxy);\r\n if (!this._requestHandler) {\r\n reject(new Error(`No RequestHandler!`));\r\n return;\r\n }\r\n resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__.getAllMethodNames(this._requestHandler));\r\n }, reject);\r\n });\r\n }\r\n}\r\n/**\r\n * Called on the worker side\r\n */\r\nfunction create(postMessage) {\r\n return new SimpleWorkerServer(postMessage, null);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickInputController\": () => (/* binding */ QuickInputController)\n/* harmony export */ });\n/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css\");\n/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js\");\n/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _quickInputList_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./quickInputList.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js\");\n/* harmony import */ var _quickInputBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./quickInputBox.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js\");\n/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/ui/countBadge/countBadge.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js\");\n/* harmony import */ var _browser_ui_progressbar_progressbar_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../browser/ui/progressbar/progressbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../browser/ui/button/button.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_severity_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../browser/ui/actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./quickInputUtils.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js\");\n/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _browser_ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../browser/ui/iconLabel/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$;\r\nconst backButtonIcon = (0,_common_codicons_js__WEBPACK_IMPORTED_MODULE_19__.registerCodicon)('quick-input-back', _common_codicons_js__WEBPACK_IMPORTED_MODULE_19__.Codicon.arrowLeft);\r\nconst backButton = {\r\n iconClass: backButtonIcon.classNames,\r\n tooltip: (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('quickInput.back', \"Back\"),\r\n handle: -1 // TODO\r\n};\r\nclass QuickInput extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__.Disposable {\r\n constructor(ui) {\r\n super();\r\n this.ui = ui;\r\n this.visible = false;\r\n this._enabled = true;\r\n this._busy = false;\r\n this._ignoreFocusOut = false;\r\n this._buttons = [];\r\n this.buttonsUpdated = false;\r\n this.onDidTriggerButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidHideEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDisposeEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.visibleDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__.DisposableStore());\r\n this.onDidHide = this.onDidHideEmitter.event;\r\n }\r\n get title() {\r\n return this._title;\r\n }\r\n set title(title) {\r\n this._title = title;\r\n this.update();\r\n }\r\n get description() {\r\n return this._description;\r\n }\r\n set description(description) {\r\n this._description = description;\r\n this.update();\r\n }\r\n get step() {\r\n return this._steps;\r\n }\r\n set step(step) {\r\n this._steps = step;\r\n this.update();\r\n }\r\n get totalSteps() {\r\n return this._totalSteps;\r\n }\r\n set totalSteps(totalSteps) {\r\n this._totalSteps = totalSteps;\r\n this.update();\r\n }\r\n get enabled() {\r\n return this._enabled;\r\n }\r\n set enabled(enabled) {\r\n this._enabled = enabled;\r\n this.update();\r\n }\r\n get contextKey() {\r\n return this._contextKey;\r\n }\r\n set contextKey(contextKey) {\r\n this._contextKey = contextKey;\r\n this.update();\r\n }\r\n get busy() {\r\n return this._busy;\r\n }\r\n set busy(busy) {\r\n this._busy = busy;\r\n this.update();\r\n }\r\n get ignoreFocusOut() {\r\n return this._ignoreFocusOut;\r\n }\r\n set ignoreFocusOut(ignoreFocusOut) {\r\n this._ignoreFocusOut = ignoreFocusOut;\r\n this.update();\r\n }\r\n get buttons() {\r\n return this._buttons;\r\n }\r\n set buttons(buttons) {\r\n this._buttons = buttons;\r\n this.buttonsUpdated = true;\r\n this.update();\r\n }\r\n show() {\r\n if (this.visible) {\r\n return;\r\n }\r\n this.visibleDisposables.add(this.ui.onDidTriggerButton(button => {\r\n if (this.buttons.indexOf(button) !== -1) {\r\n this.onDidTriggerButtonEmitter.fire(button);\r\n }\r\n }));\r\n this.ui.show(this);\r\n this.visible = true;\r\n this.update();\r\n }\r\n hide() {\r\n if (!this.visible) {\r\n return;\r\n }\r\n this.ui.hide();\r\n }\r\n didHide() {\r\n this.visible = false;\r\n this.visibleDisposables.clear();\r\n this.onDidHideEmitter.fire();\r\n }\r\n update() {\r\n if (!this.visible) {\r\n return;\r\n }\r\n const title = this.getTitle();\r\n if (title && this.ui.title.textContent !== title) {\r\n this.ui.title.textContent = title;\r\n }\r\n else if (!title && this.ui.title.innerHTML !== ' ') {\r\n this.ui.title.innerText = '\\u00a0;';\r\n }\r\n const description = this.getDescription();\r\n if (this.ui.description1.textContent !== description) {\r\n this.ui.description1.textContent = description;\r\n }\r\n if (this.ui.description2.textContent !== description) {\r\n this.ui.description2.textContent = description;\r\n }\r\n if (this.busy && !this.busyDelay) {\r\n this.busyDelay = new _common_async_js__WEBPACK_IMPORTED_MODULE_17__.TimeoutTimer();\r\n this.busyDelay.setIfNotSet(() => {\r\n if (this.visible) {\r\n this.ui.progressBar.infinite();\r\n }\r\n }, 800);\r\n }\r\n if (!this.busy && this.busyDelay) {\r\n this.ui.progressBar.stop();\r\n this.busyDelay.cancel();\r\n this.busyDelay = undefined;\r\n }\r\n if (this.buttonsUpdated) {\r\n this.buttonsUpdated = false;\r\n this.ui.leftActionBar.clear();\r\n const leftButtons = this.buttons.filter(button => button === backButton);\r\n this.ui.leftActionBar.push(leftButtons.map((button, index) => {\r\n const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_15__.Action(`id-${index}`, '', button.iconClass || (0,_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__.getIconClass)(button.iconPath), true, () => __awaiter(this, void 0, void 0, function* () {\r\n this.onDidTriggerButtonEmitter.fire(button);\r\n }));\r\n action.tooltip = button.tooltip || '';\r\n return action;\r\n }), { icon: true, label: false });\r\n this.ui.rightActionBar.clear();\r\n const rightButtons = this.buttons.filter(button => button !== backButton);\r\n this.ui.rightActionBar.push(rightButtons.map((button, index) => {\r\n const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_15__.Action(`id-${index}`, '', button.iconClass || (0,_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__.getIconClass)(button.iconPath), true, () => __awaiter(this, void 0, void 0, function* () {\r\n this.onDidTriggerButtonEmitter.fire(button);\r\n }));\r\n action.tooltip = button.tooltip || '';\r\n return action;\r\n }), { icon: true, label: false });\r\n }\r\n this.ui.ignoreFocusOut = this.ignoreFocusOut;\r\n this.ui.setEnabled(this.enabled);\r\n this.ui.setContextKey(this.contextKey);\r\n }\r\n getTitle() {\r\n if (this.title && this.step) {\r\n return `${this.title} (${this.getSteps()})`;\r\n }\r\n if (this.title) {\r\n return this.title;\r\n }\r\n if (this.step) {\r\n return this.getSteps();\r\n }\r\n return '';\r\n }\r\n getDescription() {\r\n return this.description || '';\r\n }\r\n getSteps() {\r\n if (this.step && this.totalSteps) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('quickInput.steps', \"{0}/{1}\", this.step, this.totalSteps);\r\n }\r\n if (this.step) {\r\n return String(this.step);\r\n }\r\n return '';\r\n }\r\n showMessageDecoration(severity) {\r\n this.ui.inputBox.showDecoration(severity);\r\n if (severity === _common_severity_js__WEBPACK_IMPORTED_MODULE_13__.default.Error) {\r\n const styles = this.ui.inputBox.stylesForType(severity);\r\n this.ui.message.style.color = styles.foreground ? `${styles.foreground}` : '';\r\n this.ui.message.style.backgroundColor = styles.background ? `${styles.background}` : '';\r\n this.ui.message.style.border = styles.border ? `1px solid ${styles.border}` : '';\r\n this.ui.message.style.paddingBottom = '4px';\r\n }\r\n else {\r\n this.ui.message.style.color = '';\r\n this.ui.message.style.backgroundColor = '';\r\n this.ui.message.style.border = '';\r\n this.ui.message.style.paddingBottom = '';\r\n }\r\n }\r\n dispose() {\r\n this.hide();\r\n this.onDisposeEmitter.fire();\r\n super.dispose();\r\n }\r\n}\r\nclass QuickPick extends QuickInput {\r\n constructor() {\r\n super(...arguments);\r\n this._value = '';\r\n this.onDidChangeValueEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidAcceptEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidCustomEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this._items = [];\r\n this.itemsUpdated = false;\r\n this._canSelectMany = false;\r\n this._canAcceptInBackground = false;\r\n this._matchOnDescription = false;\r\n this._matchOnDetail = false;\r\n this._matchOnLabel = true;\r\n this._sortByLabel = true;\r\n this._autoFocusOnList = true;\r\n this._itemActivation = this.ui.isScreenReaderOptimized() ? _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.NONE /* https://github.com/microsoft/vscode/issues/57501 */ : _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.FIRST;\r\n this._activeItems = [];\r\n this.activeItemsUpdated = false;\r\n this.activeItemsToConfirm = [];\r\n this.onDidChangeActiveEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this._selectedItems = [];\r\n this.selectedItemsUpdated = false;\r\n this.selectedItemsToConfirm = [];\r\n this.onDidChangeSelectionEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidTriggerItemButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.valueSelectionUpdated = true;\r\n this._ok = 'default';\r\n this._customButton = false;\r\n this.filterValue = (value) => value;\r\n this.onDidChangeValue = this.onDidChangeValueEmitter.event;\r\n this.onDidAccept = this.onDidAcceptEmitter.event;\r\n this.onDidChangeActive = this.onDidChangeActiveEmitter.event;\r\n this.onDidChangeSelection = this.onDidChangeSelectionEmitter.event;\r\n this.onDidTriggerItemButton = this.onDidTriggerItemButtonEmitter.event;\r\n }\r\n get quickNavigate() {\r\n return this._quickNavigate;\r\n }\r\n set quickNavigate(quickNavigate) {\r\n this._quickNavigate = quickNavigate;\r\n this.update();\r\n }\r\n get value() {\r\n return this._value;\r\n }\r\n set value(value) {\r\n this._value = value || '';\r\n this.update();\r\n }\r\n set ariaLabel(ariaLabel) {\r\n this._ariaLabel = ariaLabel;\r\n this.update();\r\n }\r\n get ariaLabel() {\r\n return this._ariaLabel;\r\n }\r\n get placeholder() {\r\n return this._placeholder;\r\n }\r\n set placeholder(placeholder) {\r\n this._placeholder = placeholder;\r\n this.update();\r\n }\r\n get items() {\r\n return this._items;\r\n }\r\n set items(items) {\r\n this._items = items;\r\n this.itemsUpdated = true;\r\n this.update();\r\n }\r\n get canSelectMany() {\r\n return this._canSelectMany;\r\n }\r\n set canSelectMany(canSelectMany) {\r\n this._canSelectMany = canSelectMany;\r\n this.update();\r\n }\r\n get canAcceptInBackground() {\r\n return this._canAcceptInBackground;\r\n }\r\n set canAcceptInBackground(canAcceptInBackground) {\r\n this._canAcceptInBackground = canAcceptInBackground;\r\n }\r\n get matchOnDescription() {\r\n return this._matchOnDescription;\r\n }\r\n set matchOnDescription(matchOnDescription) {\r\n this._matchOnDescription = matchOnDescription;\r\n this.update();\r\n }\r\n get matchOnDetail() {\r\n return this._matchOnDetail;\r\n }\r\n set matchOnDetail(matchOnDetail) {\r\n this._matchOnDetail = matchOnDetail;\r\n this.update();\r\n }\r\n get matchOnLabel() {\r\n return this._matchOnLabel;\r\n }\r\n set matchOnLabel(matchOnLabel) {\r\n this._matchOnLabel = matchOnLabel;\r\n this.update();\r\n }\r\n get sortByLabel() {\r\n return this._sortByLabel;\r\n }\r\n set sortByLabel(sortByLabel) {\r\n this._sortByLabel = sortByLabel;\r\n this.update();\r\n }\r\n get autoFocusOnList() {\r\n return this._autoFocusOnList;\r\n }\r\n set autoFocusOnList(autoFocusOnList) {\r\n this._autoFocusOnList = autoFocusOnList;\r\n this.update();\r\n }\r\n get itemActivation() {\r\n return this._itemActivation;\r\n }\r\n set itemActivation(itemActivation) {\r\n this._itemActivation = itemActivation;\r\n }\r\n get activeItems() {\r\n return this._activeItems;\r\n }\r\n set activeItems(activeItems) {\r\n this._activeItems = activeItems;\r\n this.activeItemsUpdated = true;\r\n this.update();\r\n }\r\n get selectedItems() {\r\n return this._selectedItems;\r\n }\r\n set selectedItems(selectedItems) {\r\n this._selectedItems = selectedItems;\r\n this.selectedItemsUpdated = true;\r\n this.update();\r\n }\r\n get keyMods() {\r\n if (this._quickNavigate) {\r\n // Disable keyMods when quick navigate is enabled\r\n // because in this model the interaction is purely\r\n // keyboard driven and Ctrl/Alt are typically\r\n // pressed and hold during this interaction.\r\n return _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.NO_KEY_MODS;\r\n }\r\n return this.ui.keyMods;\r\n }\r\n set valueSelection(valueSelection) {\r\n this._valueSelection = valueSelection;\r\n this.valueSelectionUpdated = true;\r\n this.update();\r\n }\r\n get validationMessage() {\r\n return this._validationMessage;\r\n }\r\n set validationMessage(validationMessage) {\r\n this._validationMessage = validationMessage;\r\n this.update();\r\n }\r\n get customButton() {\r\n return this._customButton;\r\n }\r\n set customButton(showCustomButton) {\r\n this._customButton = showCustomButton;\r\n this.update();\r\n }\r\n get customLabel() {\r\n return this._customButtonLabel;\r\n }\r\n set customLabel(label) {\r\n this._customButtonLabel = label;\r\n this.update();\r\n }\r\n get customHover() {\r\n return this._customButtonHover;\r\n }\r\n set customHover(hover) {\r\n this._customButtonHover = hover;\r\n this.update();\r\n }\r\n get ok() {\r\n return this._ok;\r\n }\r\n set ok(showOkButton) {\r\n this._ok = showOkButton;\r\n this.update();\r\n }\r\n get hideInput() {\r\n return !!this._hideInput;\r\n }\r\n set hideInput(hideInput) {\r\n this._hideInput = hideInput;\r\n this.update();\r\n }\r\n trySelectFirst() {\r\n if (this.autoFocusOnList) {\r\n if (!this.canSelectMany) {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.First);\r\n }\r\n }\r\n }\r\n show() {\r\n if (!this.visible) {\r\n this.visibleDisposables.add(this.ui.inputBox.onDidChange(value => {\r\n if (value === this.value) {\r\n return;\r\n }\r\n this._value = value;\r\n const didFilter = this.ui.list.filter(this.filterValue(this.ui.inputBox.value));\r\n if (didFilter) {\r\n this.trySelectFirst();\r\n }\r\n this.onDidChangeValueEmitter.fire(value);\r\n }));\r\n this.visibleDisposables.add(this.ui.inputBox.onMouseDown(event => {\r\n if (!this.autoFocusOnList) {\r\n this.ui.list.clearFocus();\r\n }\r\n }));\r\n this.visibleDisposables.add((this._hideInput ? this.ui.list : this.ui.inputBox).onKeyDown((event) => {\r\n switch (event.keyCode) {\r\n case 18 /* DownArrow */:\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Next);\r\n if (this.canSelectMany) {\r\n this.ui.list.domFocus();\r\n }\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n break;\r\n case 16 /* UpArrow */:\r\n if (this.ui.list.getFocusedElements().length) {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Previous);\r\n }\r\n else {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Last);\r\n }\r\n if (this.canSelectMany) {\r\n this.ui.list.domFocus();\r\n }\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n break;\r\n case 12 /* PageDown */:\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.NextPage);\r\n if (this.canSelectMany) {\r\n this.ui.list.domFocus();\r\n }\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n break;\r\n case 11 /* PageUp */:\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.PreviousPage);\r\n if (this.canSelectMany) {\r\n this.ui.list.domFocus();\r\n }\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n break;\r\n case 17 /* RightArrow */:\r\n if (!this._canAcceptInBackground) {\r\n return; // needs to be enabled\r\n }\r\n if (!this.ui.inputBox.isSelectionAtEnd()) {\r\n return; // ensure input box selection at end\r\n }\r\n if (this.activeItems[0]) {\r\n this._selectedItems = [this.activeItems[0]];\r\n this.onDidChangeSelectionEmitter.fire(this.selectedItems);\r\n this.onDidAcceptEmitter.fire({ inBackground: true });\r\n }\r\n break;\r\n case 14 /* Home */:\r\n if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.First);\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n }\r\n break;\r\n case 13 /* End */:\r\n if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Last);\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(event, true);\r\n }\r\n break;\r\n }\r\n }));\r\n this.visibleDisposables.add(this.ui.onDidAccept(() => {\r\n if (!this.canSelectMany && this.activeItems[0]) {\r\n this._selectedItems = [this.activeItems[0]];\r\n this.onDidChangeSelectionEmitter.fire(this.selectedItems);\r\n }\r\n this.onDidAcceptEmitter.fire({ inBackground: false });\r\n }));\r\n this.visibleDisposables.add(this.ui.onDidCustom(() => {\r\n this.onDidCustomEmitter.fire();\r\n }));\r\n this.visibleDisposables.add(this.ui.list.onDidChangeFocus(focusedItems => {\r\n if (this.activeItemsUpdated) {\r\n return; // Expect another event.\r\n }\r\n if (this.activeItemsToConfirm !== this._activeItems && (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__.equals)(focusedItems, this._activeItems, (a, b) => a === b)) {\r\n return;\r\n }\r\n this._activeItems = focusedItems;\r\n this.onDidChangeActiveEmitter.fire(focusedItems);\r\n }));\r\n this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({ items: selectedItems, event }) => {\r\n if (this.canSelectMany) {\r\n if (selectedItems.length) {\r\n this.ui.list.setSelectedElements([]);\r\n }\r\n return;\r\n }\r\n if (this.selectedItemsToConfirm !== this._selectedItems && (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__.equals)(selectedItems, this._selectedItems, (a, b) => a === b)) {\r\n return;\r\n }\r\n this._selectedItems = selectedItems;\r\n this.onDidChangeSelectionEmitter.fire(selectedItems);\r\n if (selectedItems.length) {\r\n this.onDidAcceptEmitter.fire({ inBackground: event instanceof MouseEvent && event.button === 1 /* mouse middle click */ });\r\n }\r\n }));\r\n this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(checkedItems => {\r\n if (!this.canSelectMany) {\r\n return;\r\n }\r\n if (this.selectedItemsToConfirm !== this._selectedItems && (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__.equals)(checkedItems, this._selectedItems, (a, b) => a === b)) {\r\n return;\r\n }\r\n this._selectedItems = checkedItems;\r\n this.onDidChangeSelectionEmitter.fire(checkedItems);\r\n }));\r\n this.visibleDisposables.add(this.ui.list.onButtonTriggered(event => this.onDidTriggerItemButtonEmitter.fire(event)));\r\n this.visibleDisposables.add(this.registerQuickNavigation());\r\n this.valueSelectionUpdated = true;\r\n }\r\n super.show(); // TODO: Why have show() bubble up while update() trickles down? (Could move setComboboxAccessibility() here.)\r\n }\r\n registerQuickNavigation() {\r\n return _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(this.ui.container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.KEY_UP, e => {\r\n if (this.canSelectMany || !this._quickNavigate) {\r\n return;\r\n }\r\n const keyboardEvent = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__.StandardKeyboardEvent(e);\r\n const keyCode = keyboardEvent.keyCode;\r\n // Select element when keys are pressed that signal it\r\n const quickNavKeys = this._quickNavigate.keybindings;\r\n const wasTriggerKeyPressed = quickNavKeys.some(k => {\r\n const [firstPart, chordPart] = k.getParts();\r\n if (chordPart) {\r\n return false;\r\n }\r\n if (firstPart.shiftKey && keyCode === 4 /* Shift */) {\r\n if (keyboardEvent.ctrlKey || keyboardEvent.altKey || keyboardEvent.metaKey) {\r\n return false; // this is an optimistic check for the shift key being used to navigate back in quick input\r\n }\r\n return true;\r\n }\r\n if (firstPart.altKey && keyCode === 6 /* Alt */) {\r\n return true;\r\n }\r\n if (firstPart.ctrlKey && keyCode === 5 /* Ctrl */) {\r\n return true;\r\n }\r\n if (firstPart.metaKey && keyCode === 57 /* Meta */) {\r\n return true;\r\n }\r\n return false;\r\n });\r\n if (wasTriggerKeyPressed) {\r\n if (this.activeItems[0]) {\r\n this._selectedItems = [this.activeItems[0]];\r\n this.onDidChangeSelectionEmitter.fire(this.selectedItems);\r\n this.onDidAcceptEmitter.fire({ inBackground: false });\r\n }\r\n // Unset quick navigate after press. It is only valid once\r\n // and should not result in any behaviour change afterwards\r\n // if the picker remains open because there was no active item\r\n this._quickNavigate = undefined;\r\n }\r\n });\r\n }\r\n update() {\r\n if (!this.visible) {\r\n return;\r\n }\r\n let hideInput = false;\r\n let inputShownJustForScreenReader = false;\r\n if (!!this._hideInput && this._items.length > 0) {\r\n if (this.ui.isScreenReaderOptimized()) {\r\n // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360\r\n inputShownJustForScreenReader = true;\r\n }\r\n else {\r\n hideInput = true;\r\n }\r\n }\r\n this.ui.container.classList.toggle('hidden-input', hideInput && !this.description);\r\n const visibilities = {\r\n title: !!this.title || !!this.step || !!this.buttons.length,\r\n description: !!this.description,\r\n checkAll: this.canSelectMany && !this._hideCheckAll,\r\n checkBox: this.canSelectMany,\r\n inputBox: !hideInput,\r\n progressBar: !hideInput,\r\n visibleCount: true,\r\n count: this.canSelectMany,\r\n ok: this.ok === 'default' ? this.canSelectMany : this.ok,\r\n list: true,\r\n message: !!this.validationMessage,\r\n customButton: this.customButton\r\n };\r\n this.ui.setVisibilities(visibilities);\r\n super.update();\r\n if (this.ui.inputBox.value !== this.value) {\r\n this.ui.inputBox.value = this.value;\r\n }\r\n if (this.valueSelectionUpdated) {\r\n this.valueSelectionUpdated = false;\r\n this.ui.inputBox.select(this._valueSelection && { start: this._valueSelection[0], end: this._valueSelection[1] });\r\n }\r\n if (this.ui.inputBox.placeholder !== (this.placeholder || '')) {\r\n this.ui.inputBox.placeholder = (this.placeholder || '');\r\n }\r\n if (inputShownJustForScreenReader) {\r\n this.ui.inputBox.ariaLabel = '';\r\n }\r\n else {\r\n const ariaLabel = this.ariaLabel || this.placeholder || QuickPick.DEFAULT_ARIA_LABEL;\r\n if (this.ui.inputBox.ariaLabel !== ariaLabel) {\r\n this.ui.inputBox.ariaLabel = ariaLabel;\r\n }\r\n }\r\n this.ui.list.matchOnDescription = this.matchOnDescription;\r\n this.ui.list.matchOnDetail = this.matchOnDetail;\r\n this.ui.list.matchOnLabel = this.matchOnLabel;\r\n this.ui.list.sortByLabel = this.sortByLabel;\r\n if (this.itemsUpdated) {\r\n this.itemsUpdated = false;\r\n this.ui.list.setElements(this.items);\r\n this.ui.list.filter(this.filterValue(this.ui.inputBox.value));\r\n this.ui.checkAll.checked = this.ui.list.getAllVisibleChecked();\r\n this.ui.visibleCount.setCount(this.ui.list.getVisibleCount());\r\n this.ui.count.setCount(this.ui.list.getCheckedCount());\r\n switch (this._itemActivation) {\r\n case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.NONE:\r\n this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.FIRST; // only valid once, then unset\r\n break;\r\n case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.SECOND:\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Second);\r\n this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.FIRST; // only valid once, then unset\r\n break;\r\n case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.LAST:\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.Last);\r\n this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation.FIRST; // only valid once, then unset\r\n break;\r\n default:\r\n this.trySelectFirst();\r\n break;\r\n }\r\n }\r\n if (this.ui.container.classList.contains('show-checkboxes') !== !!this.canSelectMany) {\r\n if (this.canSelectMany) {\r\n this.ui.list.clearFocus();\r\n }\r\n else {\r\n this.trySelectFirst();\r\n }\r\n }\r\n if (this.activeItemsUpdated) {\r\n this.activeItemsUpdated = false;\r\n this.activeItemsToConfirm = this._activeItems;\r\n this.ui.list.setFocusedElements(this.activeItems);\r\n if (this.activeItemsToConfirm === this._activeItems) {\r\n this.activeItemsToConfirm = null;\r\n }\r\n }\r\n if (this.selectedItemsUpdated) {\r\n this.selectedItemsUpdated = false;\r\n this.selectedItemsToConfirm = this._selectedItems;\r\n if (this.canSelectMany) {\r\n this.ui.list.setCheckedElements(this.selectedItems);\r\n }\r\n else {\r\n this.ui.list.setSelectedElements(this.selectedItems);\r\n }\r\n if (this.selectedItemsToConfirm === this._selectedItems) {\r\n this.selectedItemsToConfirm = null;\r\n }\r\n }\r\n const validationMessage = this.validationMessage || '';\r\n if (this._lastValidationMessage !== validationMessage) {\r\n this._lastValidationMessage = validationMessage;\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.reset(this.ui.message, ...(0,_browser_ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_21__.renderLabelWithIcons)((0,_common_strings_js__WEBPACK_IMPORTED_MODULE_20__.escape)(validationMessage)));\r\n this.showMessageDecoration(this.validationMessage ? _common_severity_js__WEBPACK_IMPORTED_MODULE_13__.default.Error : _common_severity_js__WEBPACK_IMPORTED_MODULE_13__.default.Ignore);\r\n }\r\n this.ui.customButton.label = this.customLabel || '';\r\n this.ui.customButton.element.title = this.customHover || '';\r\n this.ui.setComboboxAccessibility(true);\r\n if (!visibilities.inputBox) {\r\n // we need to move focus into the tree to detect keybindings\r\n // properly when the input box is not visible (quick nav)\r\n this.ui.list.domFocus();\r\n // Focus the first element in the list if multiselect is enabled\r\n if (this.canSelectMany) {\r\n this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputListFocus.First);\r\n }\r\n }\r\n }\r\n}\r\nQuickPick.DEFAULT_ARIA_LABEL = (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('quickInputBox.ariaLabel', \"Type to narrow down results.\");\r\nclass QuickInputController extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__.Disposable {\r\n constructor(options) {\r\n super();\r\n this.options = options;\r\n this.comboboxAccessibility = false;\r\n this.enabled = true;\r\n this.onDidAcceptEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidCustomEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onDidTriggerButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.keyMods = { ctrlCmd: false, alt: false };\r\n this.controller = null;\r\n this.onShowEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onShow = this.onShowEmitter.event;\r\n this.onHideEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__.Emitter());\r\n this.onHide = this.onHideEmitter.event;\r\n this.idPrefix = options.idPrefix;\r\n this.parentElement = options.container;\r\n this.styles = options.styles;\r\n this.registerKeyModsListeners();\r\n }\r\n registerKeyModsListeners() {\r\n const listener = (e) => {\r\n this.keyMods.ctrlCmd = e.ctrlKey || e.metaKey;\r\n this.keyMods.alt = e.altKey;\r\n };\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.KEY_DOWN, listener, true));\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.KEY_UP, listener, true));\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.MOUSE_DOWN, listener, true));\r\n }\r\n getUI() {\r\n if (this.ui) {\r\n return this.ui;\r\n }\r\n const container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.parentElement, $('.quick-input-widget.show-file-icons'));\r\n container.tabIndex = -1;\r\n container.style.display = 'none';\r\n const styleSheet = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.createStyleSheet(container);\r\n const titleBar = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.quick-input-titlebar'));\r\n const leftActionBar = this._register(new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__.ActionBar(titleBar));\r\n leftActionBar.domNode.classList.add('quick-input-left-action-bar');\r\n const title = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(titleBar, $('.quick-input-title'));\r\n const rightActionBar = this._register(new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__.ActionBar(titleBar));\r\n rightActionBar.domNode.classList.add('quick-input-right-action-bar');\r\n const description1 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.quick-input-description'));\r\n const headerContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.quick-input-header'));\r\n const checkAll = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(headerContainer, $('input.quick-input-check-all'));\r\n checkAll.type = 'checkbox';\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addStandardDisposableListener(checkAll, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.CHANGE, e => {\r\n const checked = checkAll.checked;\r\n list.setAllVisibleChecked(checked);\r\n }));\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(checkAll, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.CLICK, e => {\r\n if (e.x || e.y) { // Avoid 'click' triggered by 'space'...\r\n inputBox.setFocus();\r\n }\r\n }));\r\n const description2 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(headerContainer, $('.quick-input-description'));\r\n const extraContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(headerContainer, $('.quick-input-and-message'));\r\n const filterContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(extraContainer, $('.quick-input-filter'));\r\n const inputBox = this._register(new _quickInputBox_js__WEBPACK_IMPORTED_MODULE_5__.QuickInputBox(filterContainer));\r\n inputBox.setAttribute('aria-describedby', `${this.idPrefix}message`);\r\n const visibleCountContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(filterContainer, $('.quick-input-visible-count'));\r\n visibleCountContainer.setAttribute('aria-live', 'polite');\r\n visibleCountContainer.setAttribute('aria-atomic', 'true');\r\n const visibleCount = new _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__.CountBadge(visibleCountContainer, { countFormat: (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)({ key: 'quickInput.visibleCount', comment: ['This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers.'] }, \"{0} Results\") });\r\n const countContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(filterContainer, $('.quick-input-count'));\r\n countContainer.setAttribute('aria-live', 'polite');\r\n const count = new _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__.CountBadge(countContainer, { countFormat: (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)({ key: 'quickInput.countSelected', comment: ['This tells the user how many items are selected in a list of items to select from. The items can be anything.'] }, \"{0} Selected\") });\r\n const okContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(headerContainer, $('.quick-input-action'));\r\n const ok = new _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__.Button(okContainer);\r\n ok.label = (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('ok', \"OK\");\r\n this._register(ok.onDidClick(e => {\r\n this.onDidAcceptEmitter.fire();\r\n }));\r\n const customButtonContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(headerContainer, $('.quick-input-action'));\r\n const customButton = new _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__.Button(customButtonContainer);\r\n customButton.label = (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('custom', \"Custom\");\r\n this._register(customButton.onDidClick(e => {\r\n this.onDidCustomEmitter.fire();\r\n }));\r\n const message = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(extraContainer, $(`#${this.idPrefix}message.quick-input-message`));\r\n const progressBar = new _browser_ui_progressbar_progressbar_js__WEBPACK_IMPORTED_MODULE_9__.ProgressBar(container);\r\n progressBar.getContainer().classList.add('quick-input-progress');\r\n const list = this._register(new _quickInputList_js__WEBPACK_IMPORTED_MODULE_4__.QuickInputList(container, this.idPrefix + 'list', this.options));\r\n this._register(list.onChangedAllVisibleChecked(checked => {\r\n checkAll.checked = checked;\r\n }));\r\n this._register(list.onChangedVisibleCount(c => {\r\n visibleCount.setCount(c);\r\n }));\r\n this._register(list.onChangedCheckedCount(c => {\r\n count.setCount(c);\r\n }));\r\n this._register(list.onLeave(() => {\r\n // Defer to avoid the input field reacting to the triggering key.\r\n setTimeout(() => {\r\n inputBox.setFocus();\r\n if (this.controller instanceof QuickPick && this.controller.canSelectMany) {\r\n list.clearFocus();\r\n }\r\n }, 0);\r\n }));\r\n this._register(list.onDidChangeFocus(() => {\r\n if (this.comboboxAccessibility) {\r\n this.getUI().inputBox.setAttribute('aria-activedescendant', this.getUI().list.getActiveDescendant() || '');\r\n }\r\n }));\r\n const focusTracker = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.trackFocus(container);\r\n this._register(focusTracker);\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.FOCUS, e => {\r\n this.previousFocusElement = e.relatedTarget instanceof HTMLElement ? e.relatedTarget : undefined;\r\n }, true));\r\n this._register(focusTracker.onDidBlur(() => {\r\n if (!this.getUI().ignoreFocusOut && !this.options.ignoreFocusOut()) {\r\n this.hide();\r\n }\r\n this.previousFocusElement = undefined;\r\n }));\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.FOCUS, (e) => {\r\n inputBox.setFocus();\r\n }));\r\n this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.KEY_DOWN, (e) => {\r\n const event = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__.StandardKeyboardEvent(e);\r\n switch (event.keyCode) {\r\n case 3 /* Enter */:\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(e, true);\r\n this.onDidAcceptEmitter.fire();\r\n break;\r\n case 9 /* Escape */:\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(e, true);\r\n this.hide();\r\n break;\r\n case 2 /* Tab */:\r\n if (!event.altKey && !event.ctrlKey && !event.metaKey) {\r\n const selectors = ['.action-label.codicon'];\r\n if (container.classList.contains('show-checkboxes')) {\r\n selectors.push('input');\r\n }\r\n else {\r\n selectors.push('input[type=text]');\r\n }\r\n if (this.getUI().list.isDisplayed()) {\r\n selectors.push('.monaco-list');\r\n }\r\n const stops = container.querySelectorAll(selectors.join(', '));\r\n if (event.shiftKey && event.target === stops[0]) {\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(e, true);\r\n stops[stops.length - 1].focus();\r\n }\r\n else if (!event.shiftKey && event.target === stops[stops.length - 1]) {\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventHelper.stop(e, true);\r\n stops[0].focus();\r\n }\r\n }\r\n break;\r\n }\r\n }));\r\n this.ui = {\r\n container,\r\n styleSheet,\r\n leftActionBar,\r\n titleBar,\r\n title,\r\n description1,\r\n description2,\r\n rightActionBar,\r\n checkAll,\r\n filterContainer,\r\n inputBox,\r\n visibleCountContainer,\r\n visibleCount,\r\n countContainer,\r\n count,\r\n okContainer,\r\n ok,\r\n message,\r\n customButtonContainer,\r\n customButton,\r\n progressBar,\r\n list,\r\n onDidAccept: this.onDidAcceptEmitter.event,\r\n onDidCustom: this.onDidCustomEmitter.event,\r\n onDidTriggerButton: this.onDidTriggerButtonEmitter.event,\r\n ignoreFocusOut: false,\r\n keyMods: this.keyMods,\r\n isScreenReaderOptimized: () => this.options.isScreenReaderOptimized(),\r\n show: controller => this.show(controller),\r\n hide: () => this.hide(),\r\n setVisibilities: visibilities => this.setVisibilities(visibilities),\r\n setComboboxAccessibility: enabled => this.setComboboxAccessibility(enabled),\r\n setEnabled: enabled => this.setEnabled(enabled),\r\n setContextKey: contextKey => this.options.setContextKey(contextKey),\r\n };\r\n this.updateStyles();\r\n return this.ui;\r\n }\r\n pick(picks, options = {}, token = _common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__.CancellationToken.None) {\r\n return new Promise((doResolve, reject) => {\r\n let resolve = (result) => {\r\n resolve = doResolve;\r\n if (options.onKeyMods) {\r\n options.onKeyMods(input.keyMods);\r\n }\r\n doResolve(result);\r\n };\r\n if (token.isCancellationRequested) {\r\n resolve(undefined);\r\n return;\r\n }\r\n const input = this.createQuickPick();\r\n let activeItem;\r\n const disposables = [\r\n input,\r\n input.onDidAccept(() => {\r\n if (input.canSelectMany) {\r\n resolve(input.selectedItems.slice());\r\n input.hide();\r\n }\r\n else {\r\n const result = input.activeItems[0];\r\n if (result) {\r\n resolve(result);\r\n input.hide();\r\n }\r\n }\r\n }),\r\n input.onDidChangeActive(items => {\r\n const focused = items[0];\r\n if (focused && options.onDidFocus) {\r\n options.onDidFocus(focused);\r\n }\r\n }),\r\n input.onDidChangeSelection(items => {\r\n if (!input.canSelectMany) {\r\n const result = items[0];\r\n if (result) {\r\n resolve(result);\r\n input.hide();\r\n }\r\n }\r\n }),\r\n input.onDidTriggerItemButton(event => options.onDidTriggerItemButton && options.onDidTriggerItemButton(Object.assign(Object.assign({}, event), { removeItem: () => {\r\n const index = input.items.indexOf(event.item);\r\n if (index !== -1) {\r\n const items = input.items.slice();\r\n items.splice(index, 1);\r\n input.items = items;\r\n }\r\n } }))),\r\n input.onDidChangeValue(value => {\r\n if (activeItem && !value && (input.activeItems.length !== 1 || input.activeItems[0] !== activeItem)) {\r\n input.activeItems = [activeItem];\r\n }\r\n }),\r\n token.onCancellationRequested(() => {\r\n input.hide();\r\n }),\r\n input.onDidHide(() => {\r\n (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__.dispose)(disposables);\r\n resolve(undefined);\r\n }),\r\n ];\r\n input.canSelectMany = !!options.canPickMany;\r\n input.placeholder = options.placeHolder;\r\n input.ignoreFocusOut = !!options.ignoreFocusLost;\r\n input.matchOnDescription = !!options.matchOnDescription;\r\n input.matchOnDetail = !!options.matchOnDetail;\r\n input.matchOnLabel = (options.matchOnLabel === undefined) || options.matchOnLabel; // default to true\r\n input.autoFocusOnList = (options.autoFocusOnList === undefined) || options.autoFocusOnList; // default to true\r\n input.quickNavigate = options.quickNavigate;\r\n input.contextKey = options.contextKey;\r\n input.busy = true;\r\n Promise.all([picks, options.activeItem])\r\n .then(([items, _activeItem]) => {\r\n activeItem = _activeItem;\r\n input.busy = false;\r\n input.items = items;\r\n if (input.canSelectMany) {\r\n input.selectedItems = items.filter(item => item.type !== 'separator' && item.picked);\r\n }\r\n if (activeItem) {\r\n input.activeItems = [activeItem];\r\n }\r\n });\r\n input.show();\r\n Promise.resolve(picks).then(undefined, err => {\r\n reject(err);\r\n input.hide();\r\n });\r\n });\r\n }\r\n createQuickPick() {\r\n const ui = this.getUI();\r\n return new QuickPick(ui);\r\n }\r\n show(controller) {\r\n const ui = this.getUI();\r\n this.onShowEmitter.fire();\r\n const oldController = this.controller;\r\n this.controller = controller;\r\n if (oldController) {\r\n oldController.didHide();\r\n }\r\n this.setEnabled(true);\r\n ui.leftActionBar.clear();\r\n ui.title.textContent = '';\r\n ui.description1.textContent = '';\r\n ui.description2.textContent = '';\r\n ui.rightActionBar.clear();\r\n ui.checkAll.checked = false;\r\n // ui.inputBox.value = ''; Avoid triggering an event.\r\n ui.inputBox.placeholder = '';\r\n ui.inputBox.password = false;\r\n ui.inputBox.showDecoration(_common_severity_js__WEBPACK_IMPORTED_MODULE_13__.default.Ignore);\r\n ui.visibleCount.setCount(0);\r\n ui.count.setCount(0);\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.reset(ui.message);\r\n ui.progressBar.stop();\r\n ui.list.setElements([]);\r\n ui.list.matchOnDescription = false;\r\n ui.list.matchOnDetail = false;\r\n ui.list.matchOnLabel = true;\r\n ui.list.sortByLabel = true;\r\n ui.ignoreFocusOut = false;\r\n this.setComboboxAccessibility(false);\r\n ui.inputBox.ariaLabel = '';\r\n const backKeybindingLabel = this.options.backKeybindingLabel();\r\n backButton.tooltip = backKeybindingLabel ? (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('quickInput.backWithKeybinding', \"Back ({0})\", backKeybindingLabel) : (0,_nls_js__WEBPACK_IMPORTED_MODULE_7__.localize)('quickInput.back', \"Back\");\r\n ui.container.style.display = '';\r\n this.updateLayout();\r\n ui.inputBox.setFocus();\r\n }\r\n setVisibilities(visibilities) {\r\n const ui = this.getUI();\r\n ui.title.style.display = visibilities.title ? '' : 'none';\r\n ui.description1.style.display = visibilities.description && (visibilities.inputBox || visibilities.checkAll) ? '' : 'none';\r\n ui.description2.style.display = visibilities.description && !(visibilities.inputBox || visibilities.checkAll) ? '' : 'none';\r\n ui.checkAll.style.display = visibilities.checkAll ? '' : 'none';\r\n ui.filterContainer.style.display = visibilities.inputBox ? '' : 'none';\r\n ui.visibleCountContainer.style.display = visibilities.visibleCount ? '' : 'none';\r\n ui.countContainer.style.display = visibilities.count ? '' : 'none';\r\n ui.okContainer.style.display = visibilities.ok ? '' : 'none';\r\n ui.customButtonContainer.style.display = visibilities.customButton ? '' : 'none';\r\n ui.message.style.display = visibilities.message ? '' : 'none';\r\n ui.progressBar.getContainer().style.display = visibilities.progressBar ? '' : 'none';\r\n ui.list.display(!!visibilities.list);\r\n ui.container.classList[visibilities.checkBox ? 'add' : 'remove']('show-checkboxes');\r\n this.updateLayout(); // TODO\r\n }\r\n setComboboxAccessibility(enabled) {\r\n if (enabled !== this.comboboxAccessibility) {\r\n const ui = this.getUI();\r\n this.comboboxAccessibility = enabled;\r\n if (this.comboboxAccessibility) {\r\n ui.inputBox.setAttribute('role', 'combobox');\r\n ui.inputBox.setAttribute('aria-haspopup', 'true');\r\n ui.inputBox.setAttribute('aria-autocomplete', 'list');\r\n ui.inputBox.setAttribute('aria-activedescendant', ui.list.getActiveDescendant() || '');\r\n }\r\n else {\r\n ui.inputBox.removeAttribute('role');\r\n ui.inputBox.removeAttribute('aria-haspopup');\r\n ui.inputBox.removeAttribute('aria-autocomplete');\r\n ui.inputBox.removeAttribute('aria-activedescendant');\r\n }\r\n }\r\n }\r\n setEnabled(enabled) {\r\n if (enabled !== this.enabled) {\r\n this.enabled = enabled;\r\n for (const item of this.getUI().leftActionBar.viewItems) {\r\n item.getAction().enabled = enabled;\r\n }\r\n for (const item of this.getUI().rightActionBar.viewItems) {\r\n item.getAction().enabled = enabled;\r\n }\r\n this.getUI().checkAll.disabled = !enabled;\r\n // this.getUI().inputBox.enabled = enabled; Avoid loosing focus.\r\n this.getUI().ok.enabled = enabled;\r\n this.getUI().list.enabled = enabled;\r\n }\r\n }\r\n hide() {\r\n var _a;\r\n const controller = this.controller;\r\n if (controller) {\r\n const focusChanged = !((_a = this.ui) === null || _a === void 0 ? void 0 : _a.container.contains(document.activeElement));\r\n this.controller = null;\r\n this.onHideEmitter.fire();\r\n this.getUI().container.style.display = 'none';\r\n if (!focusChanged) {\r\n if (this.previousFocusElement && this.previousFocusElement.offsetParent) {\r\n this.previousFocusElement.focus();\r\n this.previousFocusElement = undefined;\r\n }\r\n else {\r\n this.options.returnFocus();\r\n }\r\n }\r\n controller.didHide();\r\n }\r\n }\r\n layout(dimension, titleBarOffset) {\r\n this.dimension = dimension;\r\n this.titleBarOffset = titleBarOffset;\r\n this.updateLayout();\r\n }\r\n updateLayout() {\r\n if (this.ui) {\r\n this.ui.container.style.top = `${this.titleBarOffset}px`;\r\n const style = this.ui.container.style;\r\n const width = Math.min(this.dimension.width * 0.62 /* golden cut */, QuickInputController.MAX_WIDTH);\r\n style.width = width + 'px';\r\n style.marginLeft = '-' + (width / 2) + 'px';\r\n this.ui.inputBox.layout();\r\n this.ui.list.layout(this.dimension && this.dimension.height * 0.4);\r\n }\r\n }\r\n applyStyles(styles) {\r\n this.styles = styles;\r\n this.updateStyles();\r\n }\r\n updateStyles() {\r\n if (this.ui) {\r\n const { quickInputTitleBackground, quickInputBackground, quickInputForeground, contrastBorder, widgetShadow, } = this.styles.widget;\r\n this.ui.titleBar.style.backgroundColor = quickInputTitleBackground ? quickInputTitleBackground.toString() : '';\r\n this.ui.container.style.backgroundColor = quickInputBackground ? quickInputBackground.toString() : '';\r\n this.ui.container.style.color = quickInputForeground ? quickInputForeground.toString() : '';\r\n this.ui.container.style.border = contrastBorder ? `1px solid ${contrastBorder}` : '';\r\n this.ui.container.style.boxShadow = widgetShadow ? `0 0 8px 2px ${widgetShadow}` : '';\r\n this.ui.inputBox.style(this.styles.inputBox);\r\n this.ui.count.style(this.styles.countBadge);\r\n this.ui.ok.style(this.styles.button);\r\n this.ui.customButton.style(this.styles.button);\r\n this.ui.progressBar.style(this.styles.progressBar);\r\n this.ui.list.style(this.styles.list);\r\n const content = [];\r\n if (this.styles.list.pickerGroupBorder) {\r\n content.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`);\r\n }\r\n if (this.styles.list.pickerGroupForeground) {\r\n content.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`);\r\n }\r\n const newStyles = content.join('\\n');\r\n if (newStyles !== this.ui.styleSheet.textContent) {\r\n this.ui.styleSheet.textContent = newStyles;\r\n }\r\n }\r\n }\r\n}\r\nQuickInputController.MAX_WIDTH = 600; // Max total width of quick input widget\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickInputBox\": () => (/* binding */ QuickInputBox)\n/* harmony export */ });\n/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css\");\n/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _browser_ui_inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../browser/ui/inputbox/inputBox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _common_severity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../browser/mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$;\r\nclass QuickInputBox extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(parent) {\r\n super();\r\n this.parent = parent;\r\n this.onKeyDown = (handler) => {\r\n return _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this.inputBox.inputElement, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.KEY_DOWN, (e) => {\r\n handler(new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__.StandardKeyboardEvent(e));\r\n });\r\n };\r\n this.onMouseDown = (handler) => {\r\n return _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this.inputBox.inputElement, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.MOUSE_DOWN, (e) => {\r\n handler(new _browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_6__.StandardMouseEvent(e));\r\n });\r\n };\r\n this.onDidChange = (handler) => {\r\n return this.inputBox.onDidChange(handler);\r\n };\r\n this.container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.parent, $('.quick-input-box'));\r\n this.inputBox = this._register(new _browser_ui_inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_2__.InputBox(this.container, undefined));\r\n }\r\n get value() {\r\n return this.inputBox.value;\r\n }\r\n set value(value) {\r\n this.inputBox.value = value;\r\n }\r\n select(range = null) {\r\n this.inputBox.select(range);\r\n }\r\n isSelectionAtEnd() {\r\n return this.inputBox.isSelectionAtEnd();\r\n }\r\n get placeholder() {\r\n return this.inputBox.inputElement.getAttribute('placeholder') || '';\r\n }\r\n set placeholder(placeholder) {\r\n this.inputBox.setPlaceHolder(placeholder);\r\n }\r\n get ariaLabel() {\r\n return this.inputBox.getAriaLabel();\r\n }\r\n set ariaLabel(ariaLabel) {\r\n this.inputBox.setAriaLabel(ariaLabel);\r\n }\r\n get password() {\r\n return this.inputBox.inputElement.type === 'password';\r\n }\r\n set password(password) {\r\n this.inputBox.inputElement.type = password ? 'password' : 'text';\r\n }\r\n setAttribute(name, value) {\r\n this.inputBox.inputElement.setAttribute(name, value);\r\n }\r\n removeAttribute(name) {\r\n this.inputBox.inputElement.removeAttribute(name);\r\n }\r\n showDecoration(decoration) {\r\n if (decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Ignore) {\r\n this.inputBox.hideMessage();\r\n }\r\n else {\r\n this.inputBox.showMessage({ type: decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Info ? 1 /* INFO */ : decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Warning ? 2 /* WARNING */ : 3 /* ERROR */, content: '' });\r\n }\r\n }\r\n stylesForType(decoration) {\r\n return this.inputBox.stylesForType(decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Info ? 1 /* INFO */ : decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Warning ? 2 /* WARNING */ : 3 /* ERROR */);\r\n }\r\n setFocus() {\r\n this.inputBox.focus();\r\n }\r\n layout() {\r\n this.inputBox.layout();\r\n }\r\n style(styles) {\r\n this.inputBox.style(styles);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickInputListFocus\": () => (/* binding */ QuickInputListFocus),\n/* harmony export */ \"QuickInputList\": () => (/* binding */ QuickInputList)\n/* harmony export */ });\n/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css\");\n/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js\");\n/* harmony import */ var _common_comparers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/comparers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/comparers.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/ui/iconLabel/iconLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js\");\n/* harmony import */ var _browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/ui/highlightedlabel/highlightedLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js\");\n/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/decorators.js */ \"./node_modules/monaco-editor/esm/vs/base/common/decorators.js\");\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../browser/ui/actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _quickInputUtils_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./quickInputUtils.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _browser_ui_keybindingLabel_keybindingLabel_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../browser/ui/keybindingLabel/keybindingLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$;\r\nclass ListElement {\r\n constructor(init) {\r\n this.hidden = false;\r\n this._onChecked = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onChecked = this._onChecked.event;\r\n Object.assign(this, init);\r\n }\r\n get checked() {\r\n return !!this._checked;\r\n }\r\n set checked(value) {\r\n if (value !== this._checked) {\r\n this._checked = value;\r\n this._onChecked.fire(value);\r\n }\r\n }\r\n dispose() {\r\n this._onChecked.dispose();\r\n }\r\n}\r\nclass ListElementRenderer {\r\n get templateId() {\r\n return ListElementRenderer.ID;\r\n }\r\n renderTemplate(container) {\r\n const data = Object.create(null);\r\n data.toDisposeElement = [];\r\n data.toDisposeTemplate = [];\r\n data.entry = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(container, $('.quick-input-list-entry'));\r\n // Checkbox\r\n const label = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(data.entry, $('label.quick-input-list-label'));\r\n data.toDisposeTemplate.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(label, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.CLICK, e => {\r\n if (!data.checkbox.offsetParent) { // If checkbox not visible:\r\n e.preventDefault(); // Prevent toggle of checkbox when it is immediately shown afterwards. #91740\r\n }\r\n }));\r\n data.checkbox = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(label, $('input.quick-input-list-checkbox'));\r\n data.checkbox.type = 'checkbox';\r\n data.toDisposeTemplate.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(data.checkbox, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.CHANGE, e => {\r\n data.element.checked = data.checkbox.checked;\r\n }));\r\n // Rows\r\n const rows = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(label, $('.quick-input-list-rows'));\r\n const row1 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(rows, $('.quick-input-list-row'));\r\n const row2 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(rows, $('.quick-input-list-row'));\r\n // Label\r\n data.label = new _browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_7__.IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportIcons: true });\r\n // Keybinding\r\n const keybindingContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(row1, $('.quick-input-list-entry-keybinding'));\r\n data.keybinding = new _browser_ui_keybindingLabel_keybindingLabel_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingLabel(keybindingContainer, _common_platform_js__WEBPACK_IMPORTED_MODULE_11__.OS);\r\n // Detail\r\n const detailContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(row2, $('.quick-input-list-label-meta'));\r\n data.detail = new _browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_8__.HighlightedLabel(detailContainer, true);\r\n // Separator\r\n data.separator = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(data.entry, $('.quick-input-list-separator'));\r\n // Actions\r\n data.actionBar = new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_12__.ActionBar(data.entry);\r\n data.actionBar.domNode.classList.add('quick-input-list-entry-action-bar');\r\n data.toDisposeTemplate.push(data.actionBar);\r\n return data;\r\n }\r\n renderElement(element, index, data) {\r\n data.toDisposeElement = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(data.toDisposeElement);\r\n data.element = element;\r\n data.checkbox.checked = element.checked;\r\n data.toDisposeElement.push(element.onChecked(checked => data.checkbox.checked = checked));\r\n const { labelHighlights, descriptionHighlights, detailHighlights } = element;\r\n // Label\r\n const options = Object.create(null);\r\n options.matches = labelHighlights || [];\r\n options.descriptionTitle = element.saneDescription;\r\n options.descriptionMatches = descriptionHighlights || [];\r\n options.extraClasses = element.item.iconClasses;\r\n options.italic = element.item.italic;\r\n options.strikethrough = element.item.strikethrough;\r\n data.label.setLabel(element.saneLabel, element.saneDescription, options);\r\n // Keybinding\r\n data.keybinding.set(element.item.keybinding);\r\n // Meta\r\n data.detail.set(element.saneDetail, detailHighlights);\r\n // Separator\r\n if (element.separator && element.separator.label) {\r\n data.separator.textContent = element.separator.label;\r\n data.separator.style.display = '';\r\n }\r\n else {\r\n data.separator.style.display = 'none';\r\n }\r\n data.entry.classList.toggle('quick-input-list-separator-border', !!element.separator);\r\n // Actions\r\n data.actionBar.clear();\r\n const buttons = element.item.buttons;\r\n if (buttons && buttons.length) {\r\n data.actionBar.push(buttons.map((button, index) => {\r\n let cssClasses = button.iconClass || (button.iconPath ? (0,_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_14__.getIconClass)(button.iconPath) : undefined);\r\n if (button.alwaysVisible) {\r\n cssClasses = cssClasses ? `${cssClasses} always-visible` : 'always-visible';\r\n }\r\n const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_13__.Action(`id-${index}`, '', cssClasses, true, () => __awaiter(this, void 0, void 0, function* () {\r\n element.fireButtonTriggered({\r\n button,\r\n item: element.item\r\n });\r\n }));\r\n action.tooltip = button.tooltip || '';\r\n return action;\r\n }), { icon: true, label: false });\r\n data.entry.classList.add('has-actions');\r\n }\r\n else {\r\n data.entry.classList.remove('has-actions');\r\n }\r\n }\r\n disposeElement(element, index, data) {\r\n data.toDisposeElement = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(data.toDisposeElement);\r\n }\r\n disposeTemplate(data) {\r\n data.toDisposeElement = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(data.toDisposeElement);\r\n data.toDisposeTemplate = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(data.toDisposeTemplate);\r\n }\r\n}\r\nListElementRenderer.ID = 'listelement';\r\nclass ListElementDelegate {\r\n getHeight(element) {\r\n return element.saneDetail ? 44 : 22;\r\n }\r\n getTemplateId(element) {\r\n return ListElementRenderer.ID;\r\n }\r\n}\r\nvar QuickInputListFocus;\r\n(function (QuickInputListFocus) {\r\n QuickInputListFocus[QuickInputListFocus[\"First\"] = 1] = \"First\";\r\n QuickInputListFocus[QuickInputListFocus[\"Second\"] = 2] = \"Second\";\r\n QuickInputListFocus[QuickInputListFocus[\"Last\"] = 3] = \"Last\";\r\n QuickInputListFocus[QuickInputListFocus[\"Next\"] = 4] = \"Next\";\r\n QuickInputListFocus[QuickInputListFocus[\"Previous\"] = 5] = \"Previous\";\r\n QuickInputListFocus[QuickInputListFocus[\"NextPage\"] = 6] = \"NextPage\";\r\n QuickInputListFocus[QuickInputListFocus[\"PreviousPage\"] = 7] = \"PreviousPage\";\r\n})(QuickInputListFocus || (QuickInputListFocus = {}));\r\nclass QuickInputList {\r\n constructor(parent, id, options) {\r\n this.parent = parent;\r\n this.inputElements = [];\r\n this.elements = [];\r\n this.elementsToIndexes = new Map();\r\n this.matchOnDescription = false;\r\n this.matchOnDetail = false;\r\n this.matchOnLabel = true;\r\n this.matchOnMeta = true;\r\n this.sortByLabel = true;\r\n this._onChangedAllVisibleChecked = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onChangedAllVisibleChecked = this._onChangedAllVisibleChecked.event;\r\n this._onChangedCheckedCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onChangedCheckedCount = this._onChangedCheckedCount.event;\r\n this._onChangedVisibleCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onChangedVisibleCount = this._onChangedVisibleCount.event;\r\n this._onChangedCheckedElements = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onChangedCheckedElements = this._onChangedCheckedElements.event;\r\n this._onButtonTriggered = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onButtonTriggered = this._onButtonTriggered.event;\r\n this._onKeyDown = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onLeave = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onLeave = this._onLeave.event;\r\n this._fireCheckedEvents = true;\r\n this.elementDisposables = [];\r\n this.disposables = [];\r\n this.id = id;\r\n this.container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this.parent, $('.quick-input-list'));\r\n const delegate = new ListElementDelegate();\r\n const accessibilityProvider = new QuickInputAccessibilityProvider();\r\n this.list = options.createList('QuickInput', this.container, delegate, [new ListElementRenderer()], {\r\n identityProvider: { getId: element => element.saneLabel },\r\n setRowLineHeight: false,\r\n multipleSelectionSupport: false,\r\n horizontalScrolling: false,\r\n accessibilityProvider\r\n });\r\n this.list.getHTMLElement().id = id;\r\n this.disposables.push(this.list);\r\n this.disposables.push(this.list.onKeyDown(e => {\r\n const event = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__.StandardKeyboardEvent(e);\r\n switch (event.keyCode) {\r\n case 10 /* Space */:\r\n this.toggleCheckbox();\r\n break;\r\n case 31 /* KEY_A */:\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_11__.isMacintosh ? e.metaKey : e.ctrlKey) {\r\n this.list.setFocus((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_10__.range)(this.list.length));\r\n }\r\n break;\r\n case 16 /* UpArrow */:\r\n const focus1 = this.list.getFocus();\r\n if (focus1.length === 1 && focus1[0] === 0) {\r\n this._onLeave.fire();\r\n }\r\n break;\r\n case 18 /* DownArrow */:\r\n const focus2 = this.list.getFocus();\r\n if (focus2.length === 1 && focus2[0] === this.list.length - 1) {\r\n this._onLeave.fire();\r\n }\r\n break;\r\n }\r\n this._onKeyDown.fire(event);\r\n }));\r\n this.disposables.push(this.list.onMouseDown(e => {\r\n if (e.browserEvent.button !== 2) {\r\n // Works around / fixes #64350.\r\n e.browserEvent.preventDefault();\r\n }\r\n }));\r\n this.disposables.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this.container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.CLICK, e => {\r\n if (e.x || e.y) { // Avoid 'click' triggered by 'space' on checkbox.\r\n this._onLeave.fire();\r\n }\r\n }));\r\n this.disposables.push(this.list.onMouseMiddleClick(e => {\r\n this._onLeave.fire();\r\n }));\r\n this.disposables.push(this.list.onContextMenu(e => {\r\n if (typeof e.index === 'number') {\r\n e.browserEvent.preventDefault();\r\n // we want to treat a context menu event as\r\n // a gesture to open the item at the index\r\n // since we do not have any context menu\r\n // this enables for example macOS to Ctrl-\r\n // click on an item to open it.\r\n this.list.setSelection([e.index]);\r\n }\r\n }));\r\n this.disposables.push(this._onChangedAllVisibleChecked, this._onChangedCheckedCount, this._onChangedVisibleCount, this._onChangedCheckedElements, this._onButtonTriggered, this._onLeave, this._onKeyDown);\r\n }\r\n get onDidChangeFocus() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Event.map(this.list.onDidChangeFocus, e => e.elements.map(e => e.item));\r\n }\r\n get onDidChangeSelection() {\r\n return _common_event_js__WEBPACK_IMPORTED_MODULE_5__.Event.map(this.list.onDidChangeSelection, e => ({ items: e.elements.map(e => e.item), event: e.browserEvent }));\r\n }\r\n getAllVisibleChecked() {\r\n return this.allVisibleChecked(this.elements, false);\r\n }\r\n allVisibleChecked(elements, whenNoneVisible = true) {\r\n for (let i = 0, n = elements.length; i < n; i++) {\r\n const element = elements[i];\r\n if (!element.hidden) {\r\n if (!element.checked) {\r\n return false;\r\n }\r\n else {\r\n whenNoneVisible = true;\r\n }\r\n }\r\n }\r\n return whenNoneVisible;\r\n }\r\n getCheckedCount() {\r\n let count = 0;\r\n const elements = this.elements;\r\n for (let i = 0, n = elements.length; i < n; i++) {\r\n if (elements[i].checked) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n getVisibleCount() {\r\n let count = 0;\r\n const elements = this.elements;\r\n for (let i = 0, n = elements.length; i < n; i++) {\r\n if (!elements[i].hidden) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }\r\n setAllVisibleChecked(checked) {\r\n try {\r\n this._fireCheckedEvents = false;\r\n this.elements.forEach(element => {\r\n if (!element.hidden) {\r\n element.checked = checked;\r\n }\r\n });\r\n }\r\n finally {\r\n this._fireCheckedEvents = true;\r\n this.fireCheckedEvents();\r\n }\r\n }\r\n setElements(inputElements) {\r\n this.elementDisposables = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(this.elementDisposables);\r\n const fireButtonTriggered = (event) => this.fireButtonTriggered(event);\r\n this.inputElements = inputElements;\r\n this.elements = inputElements.reduce((result, item, index) => {\r\n var _a, _b, _c;\r\n if (item.type !== 'separator') {\r\n const previous = index && inputElements[index - 1];\r\n const saneLabel = item.label && item.label.replace(/\\r?\\n/g, ' ');\r\n const saneMeta = item.meta && item.meta.replace(/\\r?\\n/g, ' ');\r\n const saneDescription = item.description && item.description.replace(/\\r?\\n/g, ' ');\r\n const saneDetail = item.detail && item.detail.replace(/\\r?\\n/g, ' ');\r\n const saneAriaLabel = item.ariaLabel || [saneLabel, saneDescription, saneDetail]\r\n .map(s => s && (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.parseLabelWithIcons)(s).text)\r\n .filter(s => !!s)\r\n .join(', ');\r\n result.push(new ListElement({\r\n index,\r\n item,\r\n saneLabel,\r\n saneMeta,\r\n saneAriaLabel,\r\n saneDescription,\r\n saneDetail,\r\n labelHighlights: (_a = item.highlights) === null || _a === void 0 ? void 0 : _a.label,\r\n descriptionHighlights: (_b = item.highlights) === null || _b === void 0 ? void 0 : _b.description,\r\n detailHighlights: (_c = item.highlights) === null || _c === void 0 ? void 0 : _c.detail,\r\n checked: false,\r\n separator: previous && previous.type === 'separator' ? previous : undefined,\r\n fireButtonTriggered\r\n }));\r\n }\r\n return result;\r\n }, []);\r\n this.elementDisposables.push(...this.elements);\r\n this.elementDisposables.push(...this.elements.map(element => element.onChecked(() => this.fireCheckedEvents())));\r\n this.elementsToIndexes = this.elements.reduce((map, element, index) => {\r\n map.set(element.item, index);\r\n return map;\r\n }, new Map());\r\n this.list.splice(0, this.list.length); // Clear focus and selection first, sending the events when the list is empty.\r\n this.list.splice(0, this.list.length, this.elements);\r\n this._onChangedVisibleCount.fire(this.elements.length);\r\n }\r\n getFocusedElements() {\r\n return this.list.getFocusedElements()\r\n .map(e => e.item);\r\n }\r\n setFocusedElements(items) {\r\n this.list.setFocus(items\r\n .filter(item => this.elementsToIndexes.has(item))\r\n .map(item => this.elementsToIndexes.get(item)));\r\n if (items.length > 0) {\r\n const focused = this.list.getFocus()[0];\r\n if (typeof focused === 'number') {\r\n this.list.reveal(focused);\r\n }\r\n }\r\n }\r\n getActiveDescendant() {\r\n return this.list.getHTMLElement().getAttribute('aria-activedescendant');\r\n }\r\n setSelectedElements(items) {\r\n this.list.setSelection(items\r\n .filter(item => this.elementsToIndexes.has(item))\r\n .map(item => this.elementsToIndexes.get(item)));\r\n }\r\n getCheckedElements() {\r\n return this.elements.filter(e => e.checked)\r\n .map(e => e.item);\r\n }\r\n setCheckedElements(items) {\r\n try {\r\n this._fireCheckedEvents = false;\r\n const checked = new Set();\r\n for (const item of items) {\r\n checked.add(item);\r\n }\r\n for (const element of this.elements) {\r\n element.checked = checked.has(element.item);\r\n }\r\n }\r\n finally {\r\n this._fireCheckedEvents = true;\r\n this.fireCheckedEvents();\r\n }\r\n }\r\n set enabled(value) {\r\n this.list.getHTMLElement().style.pointerEvents = value ? '' : 'none';\r\n }\r\n focus(what) {\r\n if (!this.list.length) {\r\n return;\r\n }\r\n if (what === QuickInputListFocus.Next && this.list.getFocus()[0] === this.list.length - 1) {\r\n what = QuickInputListFocus.First;\r\n }\r\n if (what === QuickInputListFocus.Previous && this.list.getFocus()[0] === 0) {\r\n what = QuickInputListFocus.Last;\r\n }\r\n if (what === QuickInputListFocus.Second && this.list.length < 2) {\r\n what = QuickInputListFocus.First;\r\n }\r\n switch (what) {\r\n case QuickInputListFocus.First:\r\n this.list.focusFirst();\r\n break;\r\n case QuickInputListFocus.Second:\r\n this.list.focusNth(1);\r\n break;\r\n case QuickInputListFocus.Last:\r\n this.list.focusLast();\r\n break;\r\n case QuickInputListFocus.Next:\r\n this.list.focusNext();\r\n break;\r\n case QuickInputListFocus.Previous:\r\n this.list.focusPrevious();\r\n break;\r\n case QuickInputListFocus.NextPage:\r\n this.list.focusNextPage();\r\n break;\r\n case QuickInputListFocus.PreviousPage:\r\n this.list.focusPreviousPage();\r\n break;\r\n }\r\n const focused = this.list.getFocus()[0];\r\n if (typeof focused === 'number') {\r\n this.list.reveal(focused);\r\n }\r\n }\r\n clearFocus() {\r\n this.list.setFocus([]);\r\n }\r\n domFocus() {\r\n this.list.domFocus();\r\n }\r\n layout(maxHeight) {\r\n this.list.getHTMLElement().style.maxHeight = maxHeight ? `calc(${Math.floor(maxHeight / 44) * 44}px)` : '';\r\n this.list.layout();\r\n }\r\n filter(query) {\r\n if (!(this.sortByLabel || this.matchOnLabel || this.matchOnDescription || this.matchOnDetail)) {\r\n this.list.layout();\r\n return false;\r\n }\r\n query = query.trim();\r\n // Reset filtering\r\n if (!query || !(this.matchOnLabel || this.matchOnDescription || this.matchOnDetail)) {\r\n this.elements.forEach(element => {\r\n element.labelHighlights = undefined;\r\n element.descriptionHighlights = undefined;\r\n element.detailHighlights = undefined;\r\n element.hidden = false;\r\n const previous = element.index && this.inputElements[element.index - 1];\r\n element.separator = previous && previous.type === 'separator' ? previous : undefined;\r\n });\r\n }\r\n // Filter by value (since we support icons in labels, use $(..) aware fuzzy matching)\r\n else {\r\n this.elements.forEach(element => {\r\n const labelHighlights = this.matchOnLabel ? (0,_common_types_js__WEBPACK_IMPORTED_MODULE_15__.withNullAsUndefined)((0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.matchesFuzzyIconAware)(query, (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.parseLabelWithIcons)(element.saneLabel))) : undefined;\r\n const descriptionHighlights = this.matchOnDescription ? (0,_common_types_js__WEBPACK_IMPORTED_MODULE_15__.withNullAsUndefined)((0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.matchesFuzzyIconAware)(query, (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.parseLabelWithIcons)(element.saneDescription || ''))) : undefined;\r\n const detailHighlights = this.matchOnDetail ? (0,_common_types_js__WEBPACK_IMPORTED_MODULE_15__.withNullAsUndefined)((0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.matchesFuzzyIconAware)(query, (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.parseLabelWithIcons)(element.saneDetail || ''))) : undefined;\r\n const metaHighlights = this.matchOnMeta ? (0,_common_types_js__WEBPACK_IMPORTED_MODULE_15__.withNullAsUndefined)((0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.matchesFuzzyIconAware)(query, (0,_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_3__.parseLabelWithIcons)(element.saneMeta || ''))) : undefined;\r\n if (labelHighlights || descriptionHighlights || detailHighlights || metaHighlights) {\r\n element.labelHighlights = labelHighlights;\r\n element.descriptionHighlights = descriptionHighlights;\r\n element.detailHighlights = detailHighlights;\r\n element.hidden = false;\r\n }\r\n else {\r\n element.labelHighlights = undefined;\r\n element.descriptionHighlights = undefined;\r\n element.detailHighlights = undefined;\r\n element.hidden = !element.item.alwaysShow;\r\n }\r\n element.separator = undefined;\r\n });\r\n }\r\n const shownElements = this.elements.filter(element => !element.hidden);\r\n // Sort by value\r\n if (this.sortByLabel && query) {\r\n const normalizedSearchValue = query.toLowerCase();\r\n shownElements.sort((a, b) => {\r\n return compareEntries(a, b, normalizedSearchValue);\r\n });\r\n }\r\n this.elementsToIndexes = shownElements.reduce((map, element, index) => {\r\n map.set(element.item, index);\r\n return map;\r\n }, new Map());\r\n this.list.splice(0, this.list.length, shownElements);\r\n this.list.setFocus([]);\r\n this.list.layout();\r\n this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked());\r\n this._onChangedVisibleCount.fire(shownElements.length);\r\n return true;\r\n }\r\n toggleCheckbox() {\r\n try {\r\n this._fireCheckedEvents = false;\r\n const elements = this.list.getFocusedElements();\r\n const allChecked = this.allVisibleChecked(elements);\r\n for (const element of elements) {\r\n element.checked = !allChecked;\r\n }\r\n }\r\n finally {\r\n this._fireCheckedEvents = true;\r\n this.fireCheckedEvents();\r\n }\r\n }\r\n display(display) {\r\n this.container.style.display = display ? '' : 'none';\r\n }\r\n isDisplayed() {\r\n return this.container.style.display !== 'none';\r\n }\r\n dispose() {\r\n this.elementDisposables = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(this.elementDisposables);\r\n this.disposables = (0,_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.dispose)(this.disposables);\r\n }\r\n fireCheckedEvents() {\r\n if (this._fireCheckedEvents) {\r\n this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked());\r\n this._onChangedCheckedCount.fire(this.getCheckedCount());\r\n this._onChangedCheckedElements.fire(this.getCheckedElements());\r\n }\r\n }\r\n fireButtonTriggered(event) {\r\n this._onButtonTriggered.fire(event);\r\n }\r\n style(styles) {\r\n this.list.style(styles);\r\n }\r\n}\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], QuickInputList.prototype, \"onDidChangeFocus\", null);\r\n__decorate([\r\n _common_decorators_js__WEBPACK_IMPORTED_MODULE_9__.memoize\r\n], QuickInputList.prototype, \"onDidChangeSelection\", null);\r\nfunction compareEntries(elementA, elementB, lookFor) {\r\n const labelHighlightsA = elementA.labelHighlights || [];\r\n const labelHighlightsB = elementB.labelHighlights || [];\r\n if (labelHighlightsA.length && !labelHighlightsB.length) {\r\n return -1;\r\n }\r\n if (!labelHighlightsA.length && labelHighlightsB.length) {\r\n return 1;\r\n }\r\n if (labelHighlightsA.length === 0 && labelHighlightsB.length === 0) {\r\n return 0;\r\n }\r\n return (0,_common_comparers_js__WEBPACK_IMPORTED_MODULE_4__.compareAnything)(elementA.saneLabel, elementB.saneLabel, lookFor);\r\n}\r\nclass QuickInputAccessibilityProvider {\r\n getWidgetAriaLabel() {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_17__.localize)('quickInput', \"Quick Input\");\r\n }\r\n getAriaLabel(element) {\r\n return element.saneAriaLabel;\r\n }\r\n getWidgetRole() {\r\n return 'listbox';\r\n }\r\n getRole() {\r\n return 'option';\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getIconClass\": () => (/* binding */ getIconClass)\n/* harmony export */ });\n/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css\");\n/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/idGenerator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst iconPathToClass = {};\r\nconst iconClassGenerator = new _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_2__.IdGenerator('quick-input-button-icon-');\r\nfunction getIconClass(iconPath) {\r\n if (!iconPath) {\r\n return undefined;\r\n }\r\n let iconClass;\r\n const key = iconPath.dark.toString();\r\n if (iconPathToClass[key]) {\r\n iconClass = iconPathToClass[key];\r\n }\r\n else {\r\n iconClass = iconClassGenerator.nextId();\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.createCSSRule(`.${iconClass}`, `background-image: ${_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl(iconPath.light || iconPath.dark)}`);\r\n _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: ${_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl(iconPath.dark)}`);\r\n iconPathToClass[key] = iconClass;\r\n }\r\n return iconClass;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"NO_KEY_MODS\": () => (/* binding */ NO_KEY_MODS),\n/* harmony export */ \"ItemActivation\": () => (/* binding */ ItemActivation)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst NO_KEY_MODS = { ctrlCmd: false, alt: false };\r\nvar ItemActivation;\r\n(function (ItemActivation) {\r\n ItemActivation[ItemActivation[\"NONE\"] = 0] = \"NONE\";\r\n ItemActivation[ItemActivation[\"FIRST\"] = 1] = \"FIRST\";\r\n ItemActivation[ItemActivation[\"SECOND\"] = 2] = \"SECOND\";\r\n ItemActivation[ItemActivation[\"LAST\"] = 3] = \"LAST\";\r\n})(ItemActivation || (ItemActivation = {}));\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Storage\": () => (/* binding */ Storage),\n/* harmony export */ \"InMemoryStorageDatabase\": () => (/* binding */ InMemoryStorageDatabase)\n/* harmony export */ });\n/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\nvar StorageState;\r\n(function (StorageState) {\r\n StorageState[StorageState[\"None\"] = 0] = \"None\";\r\n StorageState[StorageState[\"Initialized\"] = 1] = \"Initialized\";\r\n StorageState[StorageState[\"Closed\"] = 2] = \"Closed\";\r\n})(StorageState || (StorageState = {}));\r\nclass Storage extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor(database, options = Object.create(null)) {\r\n super();\r\n this.database = database;\r\n this.options = options;\r\n this._onDidChangeStorage = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeStorage = this._onDidChangeStorage.event;\r\n this.state = StorageState.None;\r\n this.cache = new Map();\r\n this.flushDelayer = new _common_async_js__WEBPACK_IMPORTED_MODULE_2__.ThrottledDelayer(Storage.DEFAULT_FLUSH_DELAY);\r\n this.pendingDeletes = new Set();\r\n this.pendingInserts = new Map();\r\n this.whenFlushedCallbacks = [];\r\n this.registerListeners();\r\n }\r\n registerListeners() {\r\n this._register(this.database.onDidChangeItemsExternal(e => this.onDidChangeItemsExternal(e)));\r\n }\r\n onDidChangeItemsExternal(e) {\r\n var _a, _b;\r\n // items that change external require us to update our\r\n // caches with the values. we just accept the value and\r\n // emit an event if there is a change.\r\n (_a = e.changed) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => this.accept(key, value));\r\n (_b = e.deleted) === null || _b === void 0 ? void 0 : _b.forEach(key => this.accept(key, undefined));\r\n }\r\n accept(key, value) {\r\n if (this.state === StorageState.Closed) {\r\n return; // Return early if we are already closed\r\n }\r\n let changed = false;\r\n // Item got removed, check for deletion\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n changed = this.cache.delete(key);\r\n }\r\n // Item got updated, check for change\r\n else {\r\n const currentValue = this.cache.get(key);\r\n if (currentValue !== value) {\r\n this.cache.set(key, value);\r\n changed = true;\r\n }\r\n }\r\n // Signal to outside listeners\r\n if (changed) {\r\n this._onDidChangeStorage.fire(key);\r\n }\r\n }\r\n get(key, fallbackValue) {\r\n const value = this.cache.get(key);\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n return fallbackValue;\r\n }\r\n return value;\r\n }\r\n getBoolean(key, fallbackValue) {\r\n const value = this.get(key);\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n return fallbackValue;\r\n }\r\n return value === 'true';\r\n }\r\n getNumber(key, fallbackValue) {\r\n const value = this.get(key);\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n return fallbackValue;\r\n }\r\n return parseInt(value, 10);\r\n }\r\n set(key, value) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.state === StorageState.Closed) {\r\n return; // Return early if we are already closed\r\n }\r\n // We remove the key for undefined/null values\r\n if ((0,_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n return this.delete(key);\r\n }\r\n // Otherwise, convert to String and store\r\n const valueStr = String(value);\r\n // Return early if value already set\r\n const currentValue = this.cache.get(key);\r\n if (currentValue === valueStr) {\r\n return;\r\n }\r\n // Update in cache and pending\r\n this.cache.set(key, valueStr);\r\n this.pendingInserts.set(key, valueStr);\r\n this.pendingDeletes.delete(key);\r\n // Event\r\n this._onDidChangeStorage.fire(key);\r\n // Accumulate work by scheduling after timeout\r\n return this.flushDelayer.trigger(() => this.flushPending());\r\n });\r\n }\r\n delete(key) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.state === StorageState.Closed) {\r\n return; // Return early if we are already closed\r\n }\r\n // Remove from cache and add to pending\r\n const wasDeleted = this.cache.delete(key);\r\n if (!wasDeleted) {\r\n return; // Return early if value already deleted\r\n }\r\n if (!this.pendingDeletes.has(key)) {\r\n this.pendingDeletes.add(key);\r\n }\r\n this.pendingInserts.delete(key);\r\n // Event\r\n this._onDidChangeStorage.fire(key);\r\n // Accumulate work by scheduling after timeout\r\n return this.flushDelayer.trigger(() => this.flushPending());\r\n });\r\n }\r\n get hasPending() {\r\n return this.pendingInserts.size > 0 || this.pendingDeletes.size > 0;\r\n }\r\n flushPending() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.hasPending) {\r\n return; // return early if nothing to do\r\n }\r\n // Get pending data\r\n const updateRequest = { insert: this.pendingInserts, delete: this.pendingDeletes };\r\n // Reset pending data for next run\r\n this.pendingDeletes = new Set();\r\n this.pendingInserts = new Map();\r\n // Update in storage and release any\r\n // waiters we have once done\r\n return this.database.updateItems(updateRequest).finally(() => {\r\n var _a;\r\n if (!this.hasPending) {\r\n while (this.whenFlushedCallbacks.length) {\r\n (_a = this.whenFlushedCallbacks.pop()) === null || _a === void 0 ? void 0 : _a();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n dispose() {\r\n this.flushDelayer.cancel(); // workaround https://github.com/microsoft/vscode/issues/116777\r\n this.flushDelayer.dispose();\r\n super.dispose();\r\n }\r\n}\r\nStorage.DEFAULT_FLUSH_DELAY = 100;\r\nclass InMemoryStorageDatabase {\r\n constructor() {\r\n this.onDidChangeItemsExternal = _common_event_js__WEBPACK_IMPORTED_MODULE_1__.Event.None;\r\n this.items = new Map();\r\n }\r\n updateItems(request) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (request.insert) {\r\n request.insert.forEach((value, key) => this.items.set(key, value));\r\n }\r\n if (request.delete) {\r\n request.delete.forEach(key => this.items.delete(key));\r\n }\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DefaultWorkerFactory\": () => (/* binding */ DefaultWorkerFactory)\n/* harmony export */ });\n/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/worker/simpleWorker.js */ \"./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });\r\nfunction getWorker(workerId, label) {\r\n // Option for hosts to overwrite the worker script (used in the standalone editor)\r\n if (_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.MonacoEnvironment) {\r\n if (typeof _common_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.MonacoEnvironment.getWorker === 'function') {\r\n return _common_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.MonacoEnvironment.getWorker(workerId, label);\r\n }\r\n if (typeof _common_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.MonacoEnvironment.getWorkerUrl === 'function') {\r\n const wokerUrl = _common_platform_js__WEBPACK_IMPORTED_MODULE_0__.globals.MonacoEnvironment.getWorkerUrl(workerId, label);\r\n return new Worker(ttPolicy ? ttPolicy.createScriptURL(wokerUrl) : wokerUrl, { name: label });\r\n }\r\n }\r\n // ESM-comment-begin\r\n // \tif (typeof require === 'function') {\r\n // \t\t// check if the JS lives on a different origin\r\n // \t\tconst workerMain = require.toUrl('./' + workerId); // explicitly using require.toUrl(), see https://github.com/microsoft/vscode/issues/107440#issuecomment-698982321\r\n // \t\tconst workerUrl = getWorkerBootstrapUrl(workerMain, label);\r\n // \t\treturn new Worker(ttPolicy ? ttPolicy.createScriptURL(workerUrl) as unknown as string : workerUrl, { name: label });\r\n // \t}\r\n // ESM-comment-end\r\n throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`);\r\n}\r\n// ESM-comment-begin\r\n// export function getWorkerBootstrapUrl(scriptPath: string, label: string, forceDataUri: boolean = false): string {\r\n// \tif (forceDataUri || /^((http:)|(https:)|(file:))/.test(scriptPath)) {\r\n// \t\tconst currentUrl = String(window.location);\r\n// \t\tconst currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);\r\n// \t\tif (forceDataUri || scriptPath.substring(0, currentOrigin.length) !== currentOrigin) {\r\n// \t\t\t// this is the cross-origin case\r\n// \t\t\t// i.e. the webpage is running at a different origin than where the scripts are loaded from\r\n// \t\t\tconst myPath = 'vs/base/worker/defaultWorkerFactory.js';\r\n// \t\t\tconst workerBaseUrl = require.toUrl(myPath).slice(0, -myPath.length); // explicitly using require.toUrl(), see https://github.com/microsoft/vscode/issues/107440#issuecomment-698982321\r\n// \t\t\tconst js = `/*${label}*/self.MonacoEnvironment={baseUrl: '${workerBaseUrl}'};importScripts('${scriptPath}');/*${label}*/`;\r\n// \t\t\tif (forceDataUri) {\r\n// \t\t\t\tconst url = `data:text/javascript;charset=utf-8,${encodeURIComponent(js)}`;\r\n// \t\t\t\treturn url;\r\n// \t\t\t}\r\n// \t\t\tconst blob = new Blob([js], { type: 'application/javascript' });\r\n// \t\t\treturn URL.createObjectURL(blob);\r\n// \t\t}\r\n// \t}\r\n// \treturn scriptPath + '#' + label;\r\n// }\r\n// ESM-comment-end\r\nfunction isPromiseLike(obj) {\r\n if (typeof obj.then === 'function') {\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * A worker that uses HTML5 web workers so that is has\r\n * its own global scope and its own thread.\r\n */\r\nclass WebWorker {\r\n constructor(moduleId, id, label, onMessageCallback, onErrorCallback) {\r\n this.id = id;\r\n const workerOrPromise = getWorker('workerMain.js', label);\r\n if (isPromiseLike(workerOrPromise)) {\r\n this.worker = workerOrPromise;\r\n }\r\n else {\r\n this.worker = Promise.resolve(workerOrPromise);\r\n }\r\n this.postMessage(moduleId, []);\r\n this.worker.then((w) => {\r\n w.onmessage = function (ev) {\r\n onMessageCallback(ev.data);\r\n };\r\n w.onmessageerror = onErrorCallback;\r\n if (typeof w.addEventListener === 'function') {\r\n w.addEventListener('error', onErrorCallback);\r\n }\r\n });\r\n }\r\n getId() {\r\n return this.id;\r\n }\r\n postMessage(message, transfer) {\r\n if (this.worker) {\r\n this.worker.then(w => w.postMessage(message, transfer));\r\n }\r\n }\r\n dispose() {\r\n if (this.worker) {\r\n this.worker.then(w => w.terminate());\r\n }\r\n this.worker = null;\r\n }\r\n}\r\nclass DefaultWorkerFactory {\r\n constructor(label) {\r\n this._label = label;\r\n this._webWorkerFailedBeforeError = false;\r\n }\r\n create(moduleId, onMessageCallback, onErrorCallback) {\r\n let workerId = (++DefaultWorkerFactory.LAST_WORKER_ID);\r\n if (this._webWorkerFailedBeforeError) {\r\n throw this._webWorkerFailedBeforeError;\r\n }\r\n return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, (err) => {\r\n (0,_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_1__.logOnceWebWorkerWarning)(err);\r\n this._webWorkerFailedBeforeError = err;\r\n onErrorCallback(err);\r\n });\r\n }\r\n}\r\nDefaultWorkerFactory.LAST_WORKER_ID = 0;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"loadLanguage\": () => (/* binding */ loadLanguage),\n/* harmony export */ \"registerLanguage\": () => (/* binding */ registerLanguage)\n/* harmony export */ });\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar languageDefinitions = {};\r\nvar lazyLanguageLoaders = {};\r\nvar LazyLanguageLoader = /** @class */ (function () {\r\n function LazyLanguageLoader(languageId) {\r\n var _this = this;\r\n this._languageId = languageId;\r\n this._loadingTriggered = false;\r\n this._lazyLoadPromise = new Promise(function (resolve, reject) {\r\n _this._lazyLoadPromiseResolve = resolve;\r\n _this._lazyLoadPromiseReject = reject;\r\n });\r\n }\r\n LazyLanguageLoader.getOrCreate = function (languageId) {\r\n if (!lazyLanguageLoaders[languageId]) {\r\n lazyLanguageLoaders[languageId] = new LazyLanguageLoader(languageId);\r\n }\r\n return lazyLanguageLoaders[languageId];\r\n };\r\n LazyLanguageLoader.prototype.whenLoaded = function () {\r\n return this._lazyLoadPromise;\r\n };\r\n LazyLanguageLoader.prototype.load = function () {\r\n var _this = this;\r\n if (!this._loadingTriggered) {\r\n this._loadingTriggered = true;\r\n languageDefinitions[this._languageId].loader().then(function (mod) { return _this._lazyLoadPromiseResolve(mod); }, function (err) { return _this._lazyLoadPromiseReject(err); });\r\n }\r\n return this._lazyLoadPromise;\r\n };\r\n return LazyLanguageLoader;\r\n}());\r\nfunction loadLanguage(languageId) {\r\n return LazyLanguageLoader.getOrCreate(languageId).load();\r\n}\r\nfunction registerLanguage(def) {\r\n var languageId = def.id;\r\n languageDefinitions[languageId] = def;\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.register(def);\r\n var lazyLanguageLoader = LazyLanguageLoader.getOrCreate(languageId);\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.setMonarchTokensProvider(languageId, lazyLanguageLoader.whenLoaded().then(function (mod) { return mod.language; }));\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.onLanguage(languageId, function () {\r\n lazyLanguageLoader.load().then(function (mod) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.setLanguageConfiguration(languageId, mod.conf);\r\n });\r\n });\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'abap',\r\n extensions: ['.abap'],\r\n aliases: ['abap', 'ABAP'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_abap_abap_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./abap.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'apex',\r\n extensions: ['.cls'],\r\n aliases: ['Apex', 'apex'],\r\n mimetypes: ['text/x-apex-source', 'text/x-apex'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_apex_apex_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./apex.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'azcli',\r\n extensions: ['.azcli'],\r\n aliases: ['Azure CLI', 'azcli'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_azcli_azcli_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./azcli.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'bat',\r\n extensions: ['.bat', '.cmd'],\r\n aliases: ['Batch', 'bat'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_bat_bat_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./bat.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'cameligo',\r\n extensions: ['.mligo'],\r\n aliases: ['Cameligo'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_cameligo_cameligo_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./cameligo.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'clojure',\r\n extensions: ['.clj', '.cljs', '.cljc', '.edn'],\r\n aliases: ['clojure', 'Clojure'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_clojure_clojure_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./clojure.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'coffeescript',\r\n extensions: ['.coffee'],\r\n aliases: ['CoffeeScript', 'coffeescript', 'coffee'],\r\n mimetypes: ['text/x-coffeescript', 'text/coffeescript'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_coffee_coffee_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./coffee.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'c',\r\n extensions: ['.c', '.h'],\r\n aliases: ['C', 'c'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_cpp_cpp_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./cpp.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js\")); }\r\n});\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'cpp',\r\n extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],\r\n aliases: ['C++', 'Cpp', 'cpp'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_cpp_cpp_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./cpp.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'csharp',\r\n extensions: ['.cs', '.csx', '.cake'],\r\n aliases: ['C#', 'csharp'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_csharp_csharp_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./csharp.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'csp',\r\n extensions: [],\r\n aliases: ['CSP', 'csp'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_csp_csp_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./csp.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'css',\r\n extensions: ['.css'],\r\n aliases: ['CSS', 'css'],\r\n mimetypes: ['text/css'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_css_css_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./css.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/css/css.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'dart',\r\n extensions: ['.dart'],\r\n aliases: ['Dart', 'dart'],\r\n mimetypes: ['text/x-dart-source', 'text/x-dart'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_dart_dart_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./dart.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'dockerfile',\r\n extensions: ['.dockerfile'],\r\n filenames: ['Dockerfile'],\r\n aliases: ['Dockerfile'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_dockerfile_dockerfile_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./dockerfile.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'ecl',\r\n extensions: ['.ecl'],\r\n aliases: ['ECL', 'Ecl', 'ecl'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_ecl_ecl_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ecl.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'fsharp',\r\n extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],\r\n aliases: ['F#', 'FSharp', 'fsharp'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_fsharp_fsharp_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./fsharp.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'go',\r\n extensions: ['.go'],\r\n aliases: ['Go'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_go_go_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./go.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/go/go.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'graphql',\r\n extensions: ['.graphql', '.gql'],\r\n aliases: ['GraphQL', 'graphql', 'gql'],\r\n mimetypes: ['application/graphql'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_graphql_graphql_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./graphql.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'handlebars',\r\n extensions: ['.handlebars', '.hbs'],\r\n aliases: ['Handlebars', 'handlebars'],\r\n mimetypes: ['text/x-handlebars-template'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_handlebars_handlebars_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./handlebars.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'hcl',\r\n extensions: ['.tf', '.tfvars', '.hcl'],\r\n aliases: ['Terraform', 'tf', 'HCL', 'hcl'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_hcl_hcl_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./hcl.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'html',\r\n extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],\r\n aliases: ['HTML', 'htm', 'html', 'xhtml'],\r\n mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_html_html_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./html.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/html/html.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'ini',\r\n extensions: ['.ini', '.properties', '.gitconfig'],\r\n filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],\r\n aliases: ['Ini', 'ini'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_ini_ini_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ini.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'java',\r\n extensions: ['.java', '.jav'],\r\n aliases: ['Java', 'java'],\r\n mimetypes: ['text/x-java-source', 'text/x-java'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_java_java_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./java.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/java/java.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'javascript',\r\n extensions: ['.js', '.es6', '.jsx', '.mjs'],\r\n firstLine: '^#!.*\\\\bnode',\r\n filenames: ['jakefile'],\r\n aliases: ['JavaScript', 'javascript', 'js'],\r\n mimetypes: ['text/javascript'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_javascript_javascript_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./javascript.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'julia',\r\n extensions: ['.jl'],\r\n aliases: ['julia', 'Julia'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_julia_julia_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./julia.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'kotlin',\r\n extensions: ['.kt'],\r\n aliases: ['Kotlin', 'kotlin'],\r\n mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_kotlin_kotlin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./kotlin.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'less',\r\n extensions: ['.less'],\r\n aliases: ['Less', 'less'],\r\n mimetypes: ['text/x-less', 'text/less'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_less_less_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./less.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/less/less.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'lexon',\r\n extensions: ['.lex'],\r\n aliases: ['Lexon'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_lexon_lexon_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./lexon.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'lua',\r\n extensions: ['.lua'],\r\n aliases: ['Lua', 'lua'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_lua_lua_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./lua.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'm3',\r\n extensions: ['.m3', '.i3', '.mg', '.ig'],\r\n aliases: ['Modula-3', 'Modula3', 'modula3', 'm3'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_m3_m3_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./m3.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'markdown',\r\n extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],\r\n aliases: ['Markdown', 'markdown'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_markdown_markdown_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./markdown.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'mips',\r\n extensions: ['.s'],\r\n aliases: ['MIPS', 'MIPS-V'],\r\n mimetypes: ['text/x-mips', 'text/mips', 'text/plaintext'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_mips_mips_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./mips.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/* harmony import */ var _abap_abap_contribution_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abap/abap.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js\");\n/* harmony import */ var _apex_apex_contribution_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apex/apex.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js\");\n/* harmony import */ var _azcli_azcli_contribution_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./azcli/azcli.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js\");\n/* harmony import */ var _bat_bat_contribution_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bat/bat.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js\");\n/* harmony import */ var _cameligo_cameligo_contribution_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cameligo/cameligo.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js\");\n/* harmony import */ var _clojure_clojure_contribution_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clojure/clojure.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js\");\n/* harmony import */ var _coffee_coffee_contribution_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coffee/coffee.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js\");\n/* harmony import */ var _cpp_cpp_contribution_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cpp/cpp.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js\");\n/* harmony import */ var _csharp_csharp_contribution_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./csharp/csharp.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js\");\n/* harmony import */ var _csp_csp_contribution_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./csp/csp.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js\");\n/* harmony import */ var _css_css_contribution_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./css/css.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js\");\n/* harmony import */ var _dart_dart_contribution_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dart/dart.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js\");\n/* harmony import */ var _dockerfile_dockerfile_contribution_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dockerfile/dockerfile.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js\");\n/* harmony import */ var _ecl_ecl_contribution_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ecl/ecl.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.contribution.js\");\n/* harmony import */ var _fsharp_fsharp_contribution_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./fsharp/fsharp.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js\");\n/* harmony import */ var _go_go_contribution_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./go/go.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js\");\n/* harmony import */ var _graphql_graphql_contribution_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./graphql/graphql.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js\");\n/* harmony import */ var _handlebars_handlebars_contribution_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./handlebars/handlebars.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js\");\n/* harmony import */ var _hcl_hcl_contribution_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./hcl/hcl.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js\");\n/* harmony import */ var _html_html_contribution_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./html/html.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js\");\n/* harmony import */ var _ini_ini_contribution_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ini/ini.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js\");\n/* harmony import */ var _java_java_contribution_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./java/java.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js\");\n/* harmony import */ var _javascript_javascript_contribution_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./javascript/javascript.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js\");\n/* harmony import */ var _julia_julia_contribution_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./julia/julia.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js\");\n/* harmony import */ var _kotlin_kotlin_contribution_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./kotlin/kotlin.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js\");\n/* harmony import */ var _less_less_contribution_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./less/less.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js\");\n/* harmony import */ var _lexon_lexon_contribution_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./lexon/lexon.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js\");\n/* harmony import */ var _lua_lua_contribution_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./lua/lua.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js\");\n/* harmony import */ var _m3_m3_contribution_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./m3/m3.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.contribution.js\");\n/* harmony import */ var _markdown_markdown_contribution_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./markdown/markdown.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js\");\n/* harmony import */ var _mips_mips_contribution_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./mips/mips.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js\");\n/* harmony import */ var _msdax_msdax_contribution_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./msdax/msdax.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js\");\n/* harmony import */ var _mysql_mysql_contribution_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./mysql/mysql.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js\");\n/* harmony import */ var _objective_c_objective_c_contribution_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./objective-c/objective-c.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js\");\n/* harmony import */ var _pascal_pascal_contribution_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./pascal/pascal.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js\");\n/* harmony import */ var _pascaligo_pascaligo_contribution_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./pascaligo/pascaligo.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js\");\n/* harmony import */ var _perl_perl_contribution_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./perl/perl.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js\");\n/* harmony import */ var _pgsql_pgsql_contribution_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./pgsql/pgsql.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js\");\n/* harmony import */ var _php_php_contribution_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./php/php.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js\");\n/* harmony import */ var _postiats_postiats_contribution_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./postiats/postiats.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js\");\n/* harmony import */ var _powerquery_powerquery_contribution_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./powerquery/powerquery.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js\");\n/* harmony import */ var _powershell_powershell_contribution_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./powershell/powershell.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js\");\n/* harmony import */ var _pug_pug_contribution_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./pug/pug.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js\");\n/* harmony import */ var _python_python_contribution_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./python/python.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js\");\n/* harmony import */ var _r_r_contribution_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./r/r.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js\");\n/* harmony import */ var _razor_razor_contribution_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./razor/razor.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js\");\n/* harmony import */ var _redis_redis_contribution_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./redis/redis.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js\");\n/* harmony import */ var _redshift_redshift_contribution_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./redshift/redshift.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js\");\n/* harmony import */ var _restructuredtext_restructuredtext_contribution_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./restructuredtext/restructuredtext.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js\");\n/* harmony import */ var _ruby_ruby_contribution_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./ruby/ruby.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js\");\n/* harmony import */ var _rust_rust_contribution_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./rust/rust.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js\");\n/* harmony import */ var _sb_sb_contribution_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./sb/sb.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js\");\n/* harmony import */ var _scala_scala_contribution_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./scala/scala.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js\");\n/* harmony import */ var _scheme_scheme_contribution_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./scheme/scheme.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js\");\n/* harmony import */ var _scss_scss_contribution_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./scss/scss.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js\");\n/* harmony import */ var _shell_shell_contribution_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./shell/shell.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js\");\n/* harmony import */ var _solidity_solidity_contribution_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./solidity/solidity.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js\");\n/* harmony import */ var _sophia_sophia_contribution_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./sophia/sophia.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js\");\n/* harmony import */ var _sql_sql_contribution_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./sql/sql.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js\");\n/* harmony import */ var _st_st_contribution_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./st/st.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js\");\n/* harmony import */ var _swift_swift_contribution_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./swift/swift.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js\");\n/* harmony import */ var _systemverilog_systemverilog_contribution_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./systemverilog/systemverilog.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js\");\n/* harmony import */ var _tcl_tcl_contribution_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./tcl/tcl.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js\");\n/* harmony import */ var _twig_twig_contribution_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./twig/twig.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js\");\n/* harmony import */ var _typescript_typescript_contribution_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./typescript/typescript.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js\");\n/* harmony import */ var _vb_vb_contribution_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./vb/vb.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js\");\n/* harmony import */ var _xml_xml_contribution_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./xml/xml.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js\");\n/* harmony import */ var _yaml_yaml_contribution_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./yaml/yaml.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js\");\n\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'msdax',\r\n extensions: ['.dax', '.msdax'],\r\n aliases: ['DAX', 'MSDAX'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_msdax_msdax_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./msdax.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'mysql',\r\n extensions: [],\r\n aliases: ['MySQL', 'mysql'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_mysql_mysql_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./mysql.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'objective-c',\r\n extensions: ['.m'],\r\n aliases: ['Objective-C'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_objective-c_objective-c_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./objective-c.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'pascal',\r\n extensions: ['.pas', '.p', '.pp'],\r\n aliases: ['Pascal', 'pas'],\r\n mimetypes: ['text/x-pascal-source', 'text/x-pascal'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_pascal_pascal_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./pascal.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'pascaligo',\r\n extensions: ['.ligo'],\r\n aliases: ['Pascaligo', 'ligo'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_pascaligo_pascaligo_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./pascaligo.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'perl',\r\n extensions: ['.pl'],\r\n aliases: ['Perl', 'pl'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_perl_perl_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./perl.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'pgsql',\r\n extensions: [],\r\n aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_pgsql_pgsql_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./pgsql.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'php',\r\n extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],\r\n aliases: ['PHP', 'php'],\r\n mimetypes: ['application/x-php'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_php_php_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./php.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/php/php.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'postiats',\r\n extensions: ['.dats', '.sats', '.hats'],\r\n aliases: ['ATS', 'ATS/Postiats'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_postiats_postiats_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./postiats.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'powerquery',\r\n extensions: ['.pq', '.pqm'],\r\n aliases: ['PQ', 'M', 'Power Query', 'Power Query M'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_powerquery_powerquery_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./powerquery.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'powershell',\r\n extensions: ['.ps1', '.psm1', '.psd1'],\r\n aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_powershell_powershell_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./powershell.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'pug',\r\n extensions: ['.jade', '.pug'],\r\n aliases: ['Pug', 'Jade', 'jade'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_pug_pug_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./pug.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'python',\r\n extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],\r\n aliases: ['Python', 'py'],\r\n firstLine: '^#!/.*\\\\bpython[0-9.-]*\\\\b',\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_python_python_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./python.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/python/python.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'r',\r\n extensions: ['.r', '.rhistory', '.rmd', '.rprofile', '.rt'],\r\n aliases: ['R', 'r'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_r_r_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./r.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/r/r.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'razor',\r\n extensions: ['.cshtml'],\r\n aliases: ['Razor', 'razor'],\r\n mimetypes: ['text/x-cshtml'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_razor_razor_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./razor.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'redis',\r\n extensions: ['.redis'],\r\n aliases: ['redis'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_redis_redis_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./redis.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'redshift',\r\n extensions: [],\r\n aliases: ['Redshift', 'redshift'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_redshift_redshift_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./redshift.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js":
|
||
/*!*************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js ***!
|
||
\*************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'restructuredtext',\r\n extensions: ['.rst'],\r\n aliases: ['reStructuredText', 'restructuredtext'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_restructuredtext_restructuredtext_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./restructuredtext.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'ruby',\r\n extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],\r\n filenames: ['rakefile', 'Gemfile'],\r\n aliases: ['Ruby', 'rb'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_ruby_ruby_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ruby.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'rust',\r\n extensions: ['.rs', '.rlib'],\r\n aliases: ['Rust', 'rust'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_rust_rust_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./rust.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'sb',\r\n extensions: ['.sb'],\r\n aliases: ['Small Basic', 'sb'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_sb_sb_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./sb.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'scala',\r\n extensions: ['.scala', '.sc', '.sbt'],\r\n aliases: ['Scala', 'scala', 'SBT', 'Sbt', 'sbt', 'Dotty', 'dotty'],\r\n mimetypes: ['text/x-scala-source', 'text/x-scala', 'text/x-sbt', 'text/x-dotty'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_scala_scala_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./scala.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'scheme',\r\n extensions: ['.scm', '.ss', '.sch', '.rkt'],\r\n aliases: ['scheme', 'Scheme'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_scheme_scheme_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./scheme.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'scss',\r\n extensions: ['.scss'],\r\n aliases: ['Sass', 'sass', 'scss'],\r\n mimetypes: ['text/x-scss', 'text/scss'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_scss_scss_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./scss.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'shell',\r\n extensions: ['.sh', '.bash'],\r\n aliases: ['Shell', 'sh'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_shell_shell_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./shell.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'sol',\r\n extensions: ['.sol'],\r\n aliases: ['sol', 'solidity', 'Solidity'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_solidity_solidity_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./solidity.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'aes',\r\n extensions: ['.aes'],\r\n aliases: ['aes', 'sophia', 'Sophia'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_sophia_sophia_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./sophia.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'sql',\r\n extensions: ['.sql'],\r\n aliases: ['SQL'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_sql_sql_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./sql.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'st',\r\n extensions: ['.st', '.iecst', '.iecplc', '.lc3lib'],\r\n aliases: ['StructuredText', 'scl', 'stl'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_st_st_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./st.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/st/st.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'swift',\r\n aliases: ['Swift', 'swift'],\r\n extensions: ['.swift'],\r\n mimetypes: ['text/swift'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_swift_swift_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./swift.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js":
|
||
/*!*******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js ***!
|
||
\*******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'systemverilog',\r\n extensions: ['.sv', '.svh'],\r\n aliases: ['SV', 'sv', 'SystemVerilog', 'systemverilog'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_systemverilog_systemverilog_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./systemverilog.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js\")); }\r\n});\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'verilog',\r\n extensions: ['.v', '.vh'],\r\n aliases: ['V', 'v', 'Verilog', 'verilog'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_systemverilog_systemverilog_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./systemverilog.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'tcl',\r\n extensions: ['.tcl'],\r\n aliases: ['tcl', 'Tcl', 'tcltk', 'TclTk', 'tcl/tk', 'Tcl/Tk'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_tcl_tcl_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./tcl.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'twig',\r\n extensions: ['.twig'],\r\n aliases: ['Twig', 'twig'],\r\n mimetypes: ['text/x-twig'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_twig_twig_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./twig.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'typescript',\r\n extensions: ['.ts', '.tsx'],\r\n aliases: ['TypeScript', 'ts', 'typescript'],\r\n mimetypes: ['text/typescript'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_typescript_typescript_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./typescript.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'vb',\r\n extensions: ['.vb'],\r\n aliases: ['Visual Basic', 'vb'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_basic-languages_vb_vb_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./vb.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'xml',\r\n extensions: [\r\n '.xml',\r\n '.dtd',\r\n '.ascx',\r\n '.csproj',\r\n '.config',\r\n '.wxi',\r\n '.wxl',\r\n '.wxs',\r\n '.xaml',\r\n '.svg',\r\n '.svgz',\r\n '.opf',\r\n '.xsl'\r\n ],\r\n firstLine: '(\\\\<\\\\?xml.*)|(\\\\<svg)|(\\\\<\\\\!doctype\\\\s+svg)',\r\n aliases: ['XML', 'xml'],\r\n mimetypes: ['text/xml', 'application/xml', 'application/xaml+xml', 'application/xml-dtd'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_xml_xml_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./xml.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n(0,_contribution_js__WEBPACK_IMPORTED_MODULE_0__.registerLanguage)({\r\n id: 'yaml',\r\n extensions: ['.yaml', '.yml'],\r\n aliases: ['YAML', 'yaml', 'YML', 'yml'],\r\n mimetypes: ['application/x-yaml', 'text/x-yaml'],\r\n loader: function () { return __webpack_require__.e(/*! import() */ \"node_modules_monaco-editor_esm_vs_basic-languages_yaml_yaml_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./yaml.js */ \"./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.js\")); }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CharWidthRequest\": () => (/* binding */ CharWidthRequest),\n/* harmony export */ \"readCharWidths\": () => (/* binding */ readCharWidths)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass CharWidthRequest {\r\n constructor(chr, type) {\r\n this.chr = chr;\r\n this.type = type;\r\n this.width = 0;\r\n }\r\n fulfill(width) {\r\n this.width = width;\r\n }\r\n}\r\nclass DomCharWidthReader {\r\n constructor(bareFontInfo, requests) {\r\n this._bareFontInfo = bareFontInfo;\r\n this._requests = requests;\r\n this._container = null;\r\n this._testElements = null;\r\n }\r\n read() {\r\n // Create a test container with all these test elements\r\n this._createDomElements();\r\n // Add the container to the DOM\r\n document.body.appendChild(this._container);\r\n // Read character widths\r\n this._readFromDomElements();\r\n // Remove the container from the DOM\r\n document.body.removeChild(this._container);\r\n this._container = null;\r\n this._testElements = null;\r\n }\r\n _createDomElements() {\r\n const container = document.createElement('div');\r\n container.style.position = 'absolute';\r\n container.style.top = '-50000px';\r\n container.style.width = '50000px';\r\n const regularDomNode = document.createElement('div');\r\n regularDomNode.style.fontFamily = this._bareFontInfo.getMassagedFontFamily();\r\n regularDomNode.style.fontWeight = this._bareFontInfo.fontWeight;\r\n regularDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\r\n regularDomNode.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings;\r\n regularDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\r\n regularDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\r\n container.appendChild(regularDomNode);\r\n const boldDomNode = document.createElement('div');\r\n boldDomNode.style.fontFamily = this._bareFontInfo.getMassagedFontFamily();\r\n boldDomNode.style.fontWeight = 'bold';\r\n boldDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\r\n boldDomNode.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings;\r\n boldDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\r\n boldDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\r\n container.appendChild(boldDomNode);\r\n const italicDomNode = document.createElement('div');\r\n italicDomNode.style.fontFamily = this._bareFontInfo.getMassagedFontFamily();\r\n italicDomNode.style.fontWeight = this._bareFontInfo.fontWeight;\r\n italicDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px';\r\n italicDomNode.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings;\r\n italicDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px';\r\n italicDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px';\r\n italicDomNode.style.fontStyle = 'italic';\r\n container.appendChild(italicDomNode);\r\n const testElements = [];\r\n for (const request of this._requests) {\r\n let parent;\r\n if (request.type === 0 /* Regular */) {\r\n parent = regularDomNode;\r\n }\r\n if (request.type === 2 /* Bold */) {\r\n parent = boldDomNode;\r\n }\r\n if (request.type === 1 /* Italic */) {\r\n parent = italicDomNode;\r\n }\r\n parent.appendChild(document.createElement('br'));\r\n const testElement = document.createElement('span');\r\n DomCharWidthReader._render(testElement, request);\r\n parent.appendChild(testElement);\r\n testElements.push(testElement);\r\n }\r\n this._container = container;\r\n this._testElements = testElements;\r\n }\r\n static _render(testElement, request) {\r\n if (request.chr === ' ') {\r\n let htmlString = '\\u00a0';\r\n // Repeat character 256 (2^8) times\r\n for (let i = 0; i < 8; i++) {\r\n htmlString += htmlString;\r\n }\r\n testElement.innerText = htmlString;\r\n }\r\n else {\r\n let testString = request.chr;\r\n // Repeat character 256 (2^8) times\r\n for (let i = 0; i < 8; i++) {\r\n testString += testString;\r\n }\r\n testElement.textContent = testString;\r\n }\r\n }\r\n _readFromDomElements() {\r\n for (let i = 0, len = this._requests.length; i < len; i++) {\r\n const request = this._requests[i];\r\n const testElement = this._testElements[i];\r\n request.fulfill(testElement.offsetWidth / 256);\r\n }\r\n }\r\n}\r\nfunction readCharWidths(bareFontInfo, requests) {\r\n const reader = new DomCharWidthReader(bareFontInfo, requests);\r\n reader.read();\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"clearAllFontInfos\": () => (/* binding */ clearAllFontInfos),\n/* harmony export */ \"Configuration\": () => (/* binding */ Configuration)\n/* harmony export */ });\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _charWidthReader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./charWidthReader.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js\");\n/* harmony import */ var _elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./elementSizeObserver.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js\");\n/* harmony import */ var _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/config/commonEditorConfig.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/config/fontInfo.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CSSBasedConfigurationCache {\r\n constructor() {\r\n this._keys = Object.create(null);\r\n this._values = Object.create(null);\r\n }\r\n has(item) {\r\n const itemId = item.getId();\r\n return !!this._values[itemId];\r\n }\r\n get(item) {\r\n const itemId = item.getId();\r\n return this._values[itemId];\r\n }\r\n put(item, value) {\r\n const itemId = item.getId();\r\n this._keys[itemId] = item;\r\n this._values[itemId] = value;\r\n }\r\n remove(item) {\r\n const itemId = item.getId();\r\n delete this._keys[itemId];\r\n delete this._values[itemId];\r\n }\r\n getValues() {\r\n return Object.keys(this._keys).map(id => this._values[id]);\r\n }\r\n}\r\nfunction clearAllFontInfos() {\r\n CSSBasedConfiguration.INSTANCE.clearCache();\r\n}\r\nclass CSSBasedConfiguration extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor() {\r\n super();\r\n this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._cache = new CSSBasedConfigurationCache();\r\n this._evictUntrustedReadingsTimeout = -1;\r\n }\r\n dispose() {\r\n if (this._evictUntrustedReadingsTimeout !== -1) {\r\n clearTimeout(this._evictUntrustedReadingsTimeout);\r\n this._evictUntrustedReadingsTimeout = -1;\r\n }\r\n super.dispose();\r\n }\r\n clearCache() {\r\n this._cache = new CSSBasedConfigurationCache();\r\n this._onDidChange.fire();\r\n }\r\n _writeToCache(item, value) {\r\n this._cache.put(item, value);\r\n if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\r\n // Try reading again after some time\r\n this._evictUntrustedReadingsTimeout = setTimeout(() => {\r\n this._evictUntrustedReadingsTimeout = -1;\r\n this._evictUntrustedReadings();\r\n }, 5000);\r\n }\r\n }\r\n _evictUntrustedReadings() {\r\n const values = this._cache.getValues();\r\n let somethingRemoved = false;\r\n for (const item of values) {\r\n if (!item.isTrusted) {\r\n somethingRemoved = true;\r\n this._cache.remove(item);\r\n }\r\n }\r\n if (somethingRemoved) {\r\n this._onDidChange.fire();\r\n }\r\n }\r\n readConfiguration(bareFontInfo) {\r\n if (!this._cache.has(bareFontInfo)) {\r\n let readConfig = CSSBasedConfiguration._actualReadConfiguration(bareFontInfo);\r\n if (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\r\n // Hey, it's Bug 14341 ... we couldn't read\r\n readConfig = new _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_8__.FontInfo({\r\n zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getZoomLevel(),\r\n pixelRatio: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getPixelRatio(),\r\n fontFamily: readConfig.fontFamily,\r\n fontWeight: readConfig.fontWeight,\r\n fontSize: readConfig.fontSize,\r\n fontFeatureSettings: readConfig.fontFeatureSettings,\r\n lineHeight: readConfig.lineHeight,\r\n letterSpacing: readConfig.letterSpacing,\r\n isMonospace: readConfig.isMonospace,\r\n typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\r\n typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\r\n canUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\r\n spaceWidth: Math.max(readConfig.spaceWidth, 5),\r\n middotWidth: Math.max(readConfig.middotWidth, 5),\r\n wsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\r\n maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\r\n }, false);\r\n }\r\n this._writeToCache(bareFontInfo, readConfig);\r\n }\r\n return this._cache.get(bareFontInfo);\r\n }\r\n static createRequest(chr, type, all, monospace) {\r\n const result = new _charWidthReader_js__WEBPACK_IMPORTED_MODULE_4__.CharWidthRequest(chr, type);\r\n all.push(result);\r\n if (monospace) {\r\n monospace.push(result);\r\n }\r\n return result;\r\n }\r\n static _actualReadConfiguration(bareFontInfo) {\r\n const all = [];\r\n const monospace = [];\r\n const typicalHalfwidthCharacter = this.createRequest('n', 0 /* Regular */, all, monospace);\r\n const typicalFullwidthCharacter = this.createRequest('\\uff4d', 0 /* Regular */, all, null);\r\n const space = this.createRequest(' ', 0 /* Regular */, all, monospace);\r\n const digit0 = this.createRequest('0', 0 /* Regular */, all, monospace);\r\n const digit1 = this.createRequest('1', 0 /* Regular */, all, monospace);\r\n const digit2 = this.createRequest('2', 0 /* Regular */, all, monospace);\r\n const digit3 = this.createRequest('3', 0 /* Regular */, all, monospace);\r\n const digit4 = this.createRequest('4', 0 /* Regular */, all, monospace);\r\n const digit5 = this.createRequest('5', 0 /* Regular */, all, monospace);\r\n const digit6 = this.createRequest('6', 0 /* Regular */, all, monospace);\r\n const digit7 = this.createRequest('7', 0 /* Regular */, all, monospace);\r\n const digit8 = this.createRequest('8', 0 /* Regular */, all, monospace);\r\n const digit9 = this.createRequest('9', 0 /* Regular */, all, monospace);\r\n // monospace test: used for whitespace rendering\r\n const rightwardsArrow = this.createRequest('→', 0 /* Regular */, all, monospace);\r\n const halfwidthRightwardsArrow = this.createRequest('→', 0 /* Regular */, all, null);\r\n // U+00B7 - MIDDLE DOT\r\n const middot = this.createRequest('·', 0 /* Regular */, all, monospace);\r\n // U+2E31 - WORD SEPARATOR MIDDLE DOT\r\n const wsmiddotWidth = this.createRequest(String.fromCharCode(0x2E31), 0 /* Regular */, all, null);\r\n // monospace test: some characters\r\n this.createRequest('|', 0 /* Regular */, all, monospace);\r\n this.createRequest('/', 0 /* Regular */, all, monospace);\r\n this.createRequest('-', 0 /* Regular */, all, monospace);\r\n this.createRequest('_', 0 /* Regular */, all, monospace);\r\n this.createRequest('i', 0 /* Regular */, all, monospace);\r\n this.createRequest('l', 0 /* Regular */, all, monospace);\r\n this.createRequest('m', 0 /* Regular */, all, monospace);\r\n // monospace italic test\r\n this.createRequest('|', 1 /* Italic */, all, monospace);\r\n this.createRequest('_', 1 /* Italic */, all, monospace);\r\n this.createRequest('i', 1 /* Italic */, all, monospace);\r\n this.createRequest('l', 1 /* Italic */, all, monospace);\r\n this.createRequest('m', 1 /* Italic */, all, monospace);\r\n this.createRequest('n', 1 /* Italic */, all, monospace);\r\n // monospace bold test\r\n this.createRequest('|', 2 /* Bold */, all, monospace);\r\n this.createRequest('_', 2 /* Bold */, all, monospace);\r\n this.createRequest('i', 2 /* Bold */, all, monospace);\r\n this.createRequest('l', 2 /* Bold */, all, monospace);\r\n this.createRequest('m', 2 /* Bold */, all, monospace);\r\n this.createRequest('n', 2 /* Bold */, all, monospace);\r\n (0,_charWidthReader_js__WEBPACK_IMPORTED_MODULE_4__.readCharWidths)(bareFontInfo, all);\r\n const maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\r\n let isMonospace = (bareFontInfo.fontFeatureSettings === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_7__.EditorFontLigatures.OFF);\r\n const referenceWidth = monospace[0].width;\r\n for (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\r\n const diff = referenceWidth - monospace[i].width;\r\n if (diff < -0.001 || diff > 0.001) {\r\n isMonospace = false;\r\n break;\r\n }\r\n }\r\n let canUseHalfwidthRightwardsArrow = true;\r\n if (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\r\n // using a halfwidth rightwards arrow would break monospace...\r\n canUseHalfwidthRightwardsArrow = false;\r\n }\r\n if (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\r\n // using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\r\n canUseHalfwidthRightwardsArrow = false;\r\n }\r\n // let's trust the zoom level only 2s after it was changed.\r\n const canTrustBrowserZoomLevel = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getTimeSinceLastZoomLevelChanged() > 2000);\r\n return new _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_8__.FontInfo({\r\n zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getZoomLevel(),\r\n pixelRatio: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getPixelRatio(),\r\n fontFamily: bareFontInfo.fontFamily,\r\n fontWeight: bareFontInfo.fontWeight,\r\n fontSize: bareFontInfo.fontSize,\r\n fontFeatureSettings: bareFontInfo.fontFeatureSettings,\r\n lineHeight: bareFontInfo.lineHeight,\r\n letterSpacing: bareFontInfo.letterSpacing,\r\n isMonospace: isMonospace,\r\n typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\r\n typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\r\n canUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\r\n spaceWidth: space.width,\r\n middotWidth: middot.width,\r\n wsmiddotWidth: wsmiddotWidth.width,\r\n maxDigitWidth: maxDigitWidth\r\n }, canTrustBrowserZoomLevel);\r\n }\r\n}\r\nCSSBasedConfiguration.INSTANCE = new CSSBasedConfiguration();\r\nclass Configuration extends _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_6__.CommonEditorConfiguration {\r\n constructor(isSimpleWidget, options, referenceDomElement = null, accessibilityService) {\r\n super(isSimpleWidget, options);\r\n this.accessibilityService = accessibilityService;\r\n this._elementSizeObserver = this._register(new _elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_5__.ElementSizeObserver(referenceDomElement, options.dimension, () => this._recomputeOptions()));\r\n this._register(CSSBasedConfiguration.INSTANCE.onDidChange(() => this._recomputeOptions()));\r\n if (this._validatedOptions.get(9 /* automaticLayout */)) {\r\n this._elementSizeObserver.startObserving();\r\n }\r\n this._register(_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.onDidChangeZoomLevel(_ => this._recomputeOptions()));\r\n this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\r\n this._recomputeOptions();\r\n }\r\n static applyFontInfoSlow(domNode, fontInfo) {\r\n domNode.style.fontFamily = fontInfo.getMassagedFontFamily();\r\n domNode.style.fontWeight = fontInfo.fontWeight;\r\n domNode.style.fontSize = fontInfo.fontSize + 'px';\r\n domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings;\r\n domNode.style.lineHeight = fontInfo.lineHeight + 'px';\r\n domNode.style.letterSpacing = fontInfo.letterSpacing + 'px';\r\n }\r\n static applyFontInfo(domNode, fontInfo) {\r\n domNode.setFontFamily(fontInfo.getMassagedFontFamily());\r\n domNode.setFontWeight(fontInfo.fontWeight);\r\n domNode.setFontSize(fontInfo.fontSize);\r\n domNode.setFontFeatureSettings(fontInfo.fontFeatureSettings);\r\n domNode.setLineHeight(fontInfo.lineHeight);\r\n domNode.setLetterSpacing(fontInfo.letterSpacing);\r\n }\r\n observeReferenceElement(dimension) {\r\n this._elementSizeObserver.observe(dimension);\r\n }\r\n updatePixelRatio() {\r\n this._recomputeOptions();\r\n }\r\n static _getExtraEditorClassName() {\r\n let extra = '';\r\n if (!_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari && !_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebkitWebView) {\r\n // Use user-select: none in all browsers except Safari and native macOS WebView\r\n extra += 'no-user-select ';\r\n }\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari) {\r\n // See https://github.com/microsoft/vscode/issues/108822\r\n extra += 'no-minimap-shadow ';\r\n }\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__.isMacintosh) {\r\n extra += 'mac ';\r\n }\r\n return extra;\r\n }\r\n _getEnvConfiguration() {\r\n return {\r\n extraEditorClassName: Configuration._getExtraEditorClassName(),\r\n outerWidth: this._elementSizeObserver.getWidth(),\r\n outerHeight: this._elementSizeObserver.getHeight(),\r\n emptySelectionClipboard: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox,\r\n pixelRatio: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getPixelRatio(),\r\n zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.getZoomLevel(),\r\n accessibilitySupport: (this.accessibilityService.isScreenReaderOptimized()\r\n ? 2 /* Enabled */\r\n : this.accessibilityService.getAccessibilitySupport())\r\n };\r\n }\r\n readConfiguration(bareFontInfo) {\r\n return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ElementSizeObserver\": () => (/* binding */ ElementSizeObserver)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ElementSizeObserver extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor(referenceDomElement, dimension, changeCallback) {\r\n super();\r\n this.referenceDomElement = referenceDomElement;\r\n this.changeCallback = changeCallback;\r\n this.width = -1;\r\n this.height = -1;\r\n this.resizeObserver = null;\r\n this.measureReferenceDomElementToken = -1;\r\n this.measureReferenceDomElement(false, dimension);\r\n }\r\n dispose() {\r\n this.stopObserving();\r\n super.dispose();\r\n }\r\n getWidth() {\r\n return this.width;\r\n }\r\n getHeight() {\r\n return this.height;\r\n }\r\n startObserving() {\r\n if (typeof ResizeObserver !== 'undefined') {\r\n if (!this.resizeObserver && this.referenceDomElement) {\r\n this.resizeObserver = new ResizeObserver((entries) => {\r\n if (entries && entries[0] && entries[0].contentRect) {\r\n this.observe({ width: entries[0].contentRect.width, height: entries[0].contentRect.height });\r\n }\r\n else {\r\n this.observe();\r\n }\r\n });\r\n this.resizeObserver.observe(this.referenceDomElement);\r\n }\r\n }\r\n else {\r\n if (this.measureReferenceDomElementToken === -1) {\r\n // setInterval type defaults to NodeJS.Timeout instead of number, so specify it as a number\r\n this.measureReferenceDomElementToken = setInterval(() => this.observe(), 100);\r\n }\r\n }\r\n }\r\n stopObserving() {\r\n if (this.resizeObserver) {\r\n this.resizeObserver.disconnect();\r\n this.resizeObserver = null;\r\n }\r\n if (this.measureReferenceDomElementToken !== -1) {\r\n clearInterval(this.measureReferenceDomElementToken);\r\n this.measureReferenceDomElementToken = -1;\r\n }\r\n }\r\n observe(dimension) {\r\n this.measureReferenceDomElement(true, dimension);\r\n }\r\n measureReferenceDomElement(callChangeCallback, dimension) {\r\n let observedWidth = 0;\r\n let observedHeight = 0;\r\n if (dimension) {\r\n observedWidth = dimension.width;\r\n observedHeight = dimension.height;\r\n }\r\n else if (this.referenceDomElement) {\r\n observedWidth = this.referenceDomElement.clientWidth;\r\n observedHeight = this.referenceDomElement.clientHeight;\r\n }\r\n observedWidth = Math.max(5, observedWidth);\r\n observedHeight = Math.max(5, observedHeight);\r\n if (this.width !== observedWidth || this.height !== observedHeight) {\r\n this.width = observedWidth;\r\n this.height = observedHeight;\r\n if (callChangeCallback) {\r\n this.changeCallback();\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CoreEditorCommand\": () => (/* binding */ CoreEditorCommand),\n/* harmony export */ \"EditorScroll_\": () => (/* binding */ EditorScroll_),\n/* harmony export */ \"RevealLine_\": () => (/* binding */ RevealLine_),\n/* harmony export */ \"CoreNavigationCommands\": () => (/* binding */ CoreNavigationCommands),\n/* harmony export */ \"CoreEditingCommands\": () => (/* binding */ CoreEditingCommands)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorColumnSelection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js\");\n/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/controller/cursorDeleteOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js\");\n/* harmony import */ var _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/controller/cursorMoveCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js\");\n/* harmony import */ var _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/controller/cursorTypeOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CORE_WEIGHT = 0 /* EditorCore */;\r\nclass CoreEditorCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorCommand {\r\n runEditorCommand(accessor, editor, args) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n // the editor has no view => has no cursors\r\n return;\r\n }\r\n this.runCoreEditorCommand(viewModel, args || {});\r\n }\r\n}\r\nvar EditorScroll_;\r\n(function (EditorScroll_) {\r\n const isEditorScrollArgs = function (arg) {\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject(arg)) {\r\n return false;\r\n }\r\n const scrollArg = arg;\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isString(scrollArg.to)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(scrollArg.by) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isString(scrollArg.by)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(scrollArg.value) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isNumber(scrollArg.value)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(scrollArg.revealCursor) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isBoolean(scrollArg.revealCursor)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n EditorScroll_.description = {\r\n description: 'Scroll editor in the given direction',\r\n args: [\r\n {\r\n name: 'Editor scroll argument object',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t`,\r\n constraint: isEditorScrollArgs,\r\n schema: {\r\n 'type': 'object',\r\n 'required': ['to'],\r\n 'properties': {\r\n 'to': {\r\n 'type': 'string',\r\n 'enum': ['up', 'down']\r\n },\r\n 'by': {\r\n 'type': 'string',\r\n 'enum': ['line', 'wrappedLine', 'page', 'halfPage']\r\n },\r\n 'value': {\r\n 'type': 'number',\r\n 'default': 1\r\n },\r\n 'revealCursor': {\r\n 'type': 'boolean',\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n /**\r\n * Directions in the view for editor scroll command.\r\n */\r\n EditorScroll_.RawDirection = {\r\n Up: 'up',\r\n Down: 'down',\r\n };\r\n /**\r\n * Units for editor scroll 'by' argument\r\n */\r\n EditorScroll_.RawUnit = {\r\n Line: 'line',\r\n WrappedLine: 'wrappedLine',\r\n Page: 'page',\r\n HalfPage: 'halfPage'\r\n };\r\n function parse(args) {\r\n let direction;\r\n switch (args.to) {\r\n case EditorScroll_.RawDirection.Up:\r\n direction = 1 /* Up */;\r\n break;\r\n case EditorScroll_.RawDirection.Down:\r\n direction = 2 /* Down */;\r\n break;\r\n default:\r\n // Illegal arguments\r\n return null;\r\n }\r\n let unit;\r\n switch (args.by) {\r\n case EditorScroll_.RawUnit.Line:\r\n unit = 1 /* Line */;\r\n break;\r\n case EditorScroll_.RawUnit.WrappedLine:\r\n unit = 2 /* WrappedLine */;\r\n break;\r\n case EditorScroll_.RawUnit.Page:\r\n unit = 3 /* Page */;\r\n break;\r\n case EditorScroll_.RawUnit.HalfPage:\r\n unit = 4 /* HalfPage */;\r\n break;\r\n default:\r\n unit = 2 /* WrappedLine */;\r\n }\r\n const value = Math.floor(args.value || 1);\r\n const revealCursor = !!args.revealCursor;\r\n return {\r\n direction: direction,\r\n unit: unit,\r\n value: value,\r\n revealCursor: revealCursor,\r\n select: (!!args.select)\r\n };\r\n }\r\n EditorScroll_.parse = parse;\r\n})(EditorScroll_ || (EditorScroll_ = {}));\r\nvar RevealLine_;\r\n(function (RevealLine_) {\r\n const isRevealLineArgs = function (arg) {\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject(arg)) {\r\n return false;\r\n }\r\n const reveaLineArg = arg;\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isNumber(reveaLineArg.lineNumber) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isString(reveaLineArg.lineNumber)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(reveaLineArg.at) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isString(reveaLineArg.at)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n RevealLine_.description = {\r\n description: 'Reveal the given line at the given logical position',\r\n args: [\r\n {\r\n name: 'Reveal line argument object',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t`,\r\n constraint: isRevealLineArgs,\r\n schema: {\r\n 'type': 'object',\r\n 'required': ['lineNumber'],\r\n 'properties': {\r\n 'lineNumber': {\r\n 'type': ['number', 'string'],\r\n },\r\n 'at': {\r\n 'type': 'string',\r\n 'enum': ['top', 'center', 'bottom']\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n /**\r\n * Values for reveal line 'at' argument\r\n */\r\n RevealLine_.RawAtArgument = {\r\n Top: 'top',\r\n Center: 'center',\r\n Bottom: 'bottom'\r\n };\r\n})(RevealLine_ || (RevealLine_ = {}));\r\nclass EditorOrNativeTextInputCommand {\r\n constructor(target) {\r\n // 1. handle case when focus is in editor.\r\n target.addImplementation(10000, (accessor, args) => {\r\n // Only if editor text focus (i.e. not if editor has widget focus).\r\n const focusedEditor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_4__.ICodeEditorService).getFocusedCodeEditor();\r\n if (focusedEditor && focusedEditor.hasTextFocus()) {\r\n return this._runEditorCommand(accessor, focusedEditor, args);\r\n }\r\n return false;\r\n });\r\n // 2. handle case when focus is in some other `input` / `textarea`.\r\n target.addImplementation(1000, (accessor, args) => {\r\n // Only if focused on an element that allows for entering text\r\n const activeElement = document.activeElement;\r\n if (activeElement && ['input', 'textarea'].indexOf(activeElement.tagName.toLowerCase()) >= 0) {\r\n this.runDOMCommand();\r\n return true;\r\n }\r\n return false;\r\n });\r\n // 3. (default) handle case when focus is somewhere else.\r\n target.addImplementation(0, (accessor, args) => {\r\n // Redirecting to active editor\r\n const activeEditor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_4__.ICodeEditorService).getActiveCodeEditor();\r\n if (activeEditor) {\r\n activeEditor.focus();\r\n return this._runEditorCommand(accessor, activeEditor, args);\r\n }\r\n return false;\r\n });\r\n }\r\n _runEditorCommand(accessor, editor, args) {\r\n const result = this.runEditorCommand(accessor, editor, args);\r\n if (result) {\r\n return result;\r\n }\r\n return true;\r\n }\r\n}\r\nvar CoreNavigationCommands;\r\n(function (CoreNavigationCommands) {\r\n class BaseMoveToCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveTo(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position, args.viewPosition)\r\n ]);\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.MoveTo = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new BaseMoveToCommand({\r\n id: '_moveTo',\r\n inSelectionMode: false,\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.MoveToSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new BaseMoveToCommand({\r\n id: '_moveToSelect',\r\n inSelectionMode: true,\r\n precondition: undefined\r\n }));\r\n class ColumnSelectCommand extends CoreEditorCommand {\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n const result = this._getColumnSelectResult(viewModel, viewModel.getPrimaryCursorState(), viewModel.getCursorColumnSelectData(), args);\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, result.viewStates.map((viewState) => _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__.CursorState.fromViewState(viewState)));\r\n viewModel.setCursorColumnSelectData({\r\n isReal: true,\r\n fromViewLineNumber: result.fromLineNumber,\r\n fromViewVisualColumn: result.fromVisualColumn,\r\n toViewLineNumber: result.toLineNumber,\r\n toViewVisualColumn: result.toVisualColumn\r\n });\r\n if (result.reversed) {\r\n viewModel.revealTopMostCursor(args.source);\r\n }\r\n else {\r\n viewModel.revealBottomMostCursor(args.source);\r\n }\r\n }\r\n }\r\n CoreNavigationCommands.ColumnSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends ColumnSelectCommand {\r\n constructor() {\r\n super({\r\n id: 'columnSelect',\r\n precondition: undefined\r\n });\r\n }\r\n _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) {\r\n // validate `args`\r\n const validatedPosition = viewModel.model.validatePosition(args.position);\r\n const validatedViewPosition = viewModel.coordinatesConverter.validateViewPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_10__.Position(args.viewPosition.lineNumber, args.viewPosition.column), validatedPosition);\r\n let fromViewLineNumber = args.doColumnSelect ? prevColumnSelectData.fromViewLineNumber : validatedViewPosition.lineNumber;\r\n let fromViewVisualColumn = args.doColumnSelect ? prevColumnSelectData.fromViewVisualColumn : args.mouseColumn - 1;\r\n return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__.ColumnSelection.columnSelect(viewModel.cursorConfig, viewModel, fromViewLineNumber, fromViewVisualColumn, validatedViewPosition.lineNumber, args.mouseColumn - 1);\r\n }\r\n });\r\n CoreNavigationCommands.CursorColumnSelectLeft = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends ColumnSelectCommand {\r\n constructor() {\r\n super({\r\n id: 'cursorColumnSelectLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */,\r\n linux: { primary: 0 }\r\n }\r\n });\r\n }\r\n _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) {\r\n return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__.ColumnSelection.columnSelectLeft(viewModel.cursorConfig, viewModel, prevColumnSelectData);\r\n }\r\n });\r\n CoreNavigationCommands.CursorColumnSelectRight = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends ColumnSelectCommand {\r\n constructor() {\r\n super({\r\n id: 'cursorColumnSelectRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */,\r\n linux: { primary: 0 }\r\n }\r\n });\r\n }\r\n _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) {\r\n return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__.ColumnSelection.columnSelectRight(viewModel.cursorConfig, viewModel, prevColumnSelectData);\r\n }\r\n });\r\n class ColumnSelectUpCommand extends ColumnSelectCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._isPaged = opts.isPaged;\r\n }\r\n _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) {\r\n return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__.ColumnSelection.columnSelectUp(viewModel.cursorConfig, viewModel, prevColumnSelectData, this._isPaged);\r\n }\r\n }\r\n CoreNavigationCommands.CursorColumnSelectUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new ColumnSelectUpCommand({\r\n isPaged: false,\r\n id: 'cursorColumnSelectUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */,\r\n linux: { primary: 0 }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorColumnSelectPageUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new ColumnSelectUpCommand({\r\n isPaged: true,\r\n id: 'cursorColumnSelectPageUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 11 /* PageUp */,\r\n linux: { primary: 0 }\r\n }\r\n }));\r\n class ColumnSelectDownCommand extends ColumnSelectCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._isPaged = opts.isPaged;\r\n }\r\n _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) {\r\n return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_5__.ColumnSelection.columnSelectDown(viewModel.cursorConfig, viewModel, prevColumnSelectData, this._isPaged);\r\n }\r\n }\r\n CoreNavigationCommands.CursorColumnSelectDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new ColumnSelectDownCommand({\r\n isPaged: false,\r\n id: 'cursorColumnSelectDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */,\r\n linux: { primary: 0 }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorColumnSelectPageDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new ColumnSelectDownCommand({\r\n isPaged: true,\r\n id: 'cursorColumnSelectPageDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 12 /* PageDown */,\r\n linux: { primary: 0 }\r\n }\r\n }));\r\n class CursorMoveImpl extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'cursorMove',\r\n precondition: undefined,\r\n description: _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMove.description\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const parsed = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMove.parse(args);\r\n if (!parsed) {\r\n // illegal arguments\r\n return;\r\n }\r\n this._runCursorMove(viewModel, args.source, parsed);\r\n }\r\n _runCursorMove(viewModel, source, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(source, 3 /* Explicit */, CursorMoveImpl._move(viewModel, viewModel.getCursorStates(), args));\r\n viewModel.revealPrimaryCursor(source, true);\r\n }\r\n static _move(viewModel, cursors, args) {\r\n const inSelectionMode = args.select;\r\n const value = args.value;\r\n switch (args.direction) {\r\n case 0 /* Left */:\r\n case 1 /* Right */:\r\n case 2 /* Up */:\r\n case 3 /* Down */:\r\n case 4 /* PrevBlankLine */:\r\n case 5 /* NextBlankLine */:\r\n case 6 /* WrappedLineStart */:\r\n case 7 /* WrappedLineFirstNonWhitespaceCharacter */:\r\n case 8 /* WrappedLineColumnCenter */:\r\n case 9 /* WrappedLineEnd */:\r\n case 10 /* WrappedLineLastNonWhitespaceCharacter */:\r\n return _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.simpleMove(viewModel, cursors, args.direction, inSelectionMode, value, args.unit);\r\n case 11 /* ViewPortTop */:\r\n case 13 /* ViewPortBottom */:\r\n case 12 /* ViewPortCenter */:\r\n case 14 /* ViewPortIfOutside */:\r\n return _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.viewportMove(viewModel, cursors, args.direction, inSelectionMode, value);\r\n default:\r\n return null;\r\n }\r\n }\r\n }\r\n CoreNavigationCommands.CursorMoveImpl = CursorMoveImpl;\r\n CoreNavigationCommands.CursorMove = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveImpl());\r\n class CursorMoveBasedCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._staticArgs = opts.args;\r\n }\r\n runCoreEditorCommand(viewModel, dynamicArgs) {\r\n let args = this._staticArgs;\r\n if (this._staticArgs.value === -1 /* PAGE_SIZE_MARKER */) {\r\n // -1 is a marker for page size\r\n args = {\r\n direction: this._staticArgs.direction,\r\n unit: this._staticArgs.unit,\r\n select: this._staticArgs.select,\r\n value: viewModel.cursorConfig.pageSize\r\n };\r\n }\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(dynamicArgs.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.simpleMove(viewModel, viewModel.getCursorStates(), args.direction, args.select, args.value, args.unit));\r\n viewModel.revealPrimaryCursor(dynamicArgs.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.CursorLeft = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 0 /* Left */,\r\n unit: 0 /* None */,\r\n select: false,\r\n value: 1\r\n },\r\n id: 'cursorLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 15 /* LeftArrow */,\r\n mac: { primary: 15 /* LeftArrow */, secondary: [256 /* WinCtrl */ | 32 /* KEY_B */] }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorLeftSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 0 /* Left */,\r\n unit: 0 /* None */,\r\n select: true,\r\n value: 1\r\n },\r\n id: 'cursorLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 15 /* LeftArrow */\r\n }\r\n }));\r\n CoreNavigationCommands.CursorRight = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 1 /* Right */,\r\n unit: 0 /* None */,\r\n select: false,\r\n value: 1\r\n },\r\n id: 'cursorRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 17 /* RightArrow */,\r\n mac: { primary: 17 /* RightArrow */, secondary: [256 /* WinCtrl */ | 36 /* KEY_F */] }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorRightSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 1 /* Right */,\r\n unit: 0 /* None */,\r\n select: true,\r\n value: 1\r\n },\r\n id: 'cursorRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 17 /* RightArrow */\r\n }\r\n }));\r\n CoreNavigationCommands.CursorUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 2 /* Up */,\r\n unit: 2 /* WrappedLine */,\r\n select: false,\r\n value: 1\r\n },\r\n id: 'cursorUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 16 /* UpArrow */,\r\n mac: { primary: 16 /* UpArrow */, secondary: [256 /* WinCtrl */ | 46 /* KEY_P */] }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorUpSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 2 /* Up */,\r\n unit: 2 /* WrappedLine */,\r\n select: true,\r\n value: 1\r\n },\r\n id: 'cursorUpSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 16 /* UpArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */],\r\n mac: { primary: 1024 /* Shift */ | 16 /* UpArrow */ },\r\n linux: { primary: 1024 /* Shift */ | 16 /* UpArrow */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorPageUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 2 /* Up */,\r\n unit: 2 /* WrappedLine */,\r\n select: false,\r\n value: -1 /* PAGE_SIZE_MARKER */\r\n },\r\n id: 'cursorPageUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 11 /* PageUp */\r\n }\r\n }));\r\n CoreNavigationCommands.CursorPageUpSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 2 /* Up */,\r\n unit: 2 /* WrappedLine */,\r\n select: true,\r\n value: -1 /* PAGE_SIZE_MARKER */\r\n },\r\n id: 'cursorPageUpSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 11 /* PageUp */\r\n }\r\n }));\r\n CoreNavigationCommands.CursorDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 3 /* Down */,\r\n unit: 2 /* WrappedLine */,\r\n select: false,\r\n value: 1\r\n },\r\n id: 'cursorDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 18 /* DownArrow */,\r\n mac: { primary: 18 /* DownArrow */, secondary: [256 /* WinCtrl */ | 44 /* KEY_N */] }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorDownSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 3 /* Down */,\r\n unit: 2 /* WrappedLine */,\r\n select: true,\r\n value: 1\r\n },\r\n id: 'cursorDownSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 18 /* DownArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */],\r\n mac: { primary: 1024 /* Shift */ | 18 /* DownArrow */ },\r\n linux: { primary: 1024 /* Shift */ | 18 /* DownArrow */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorPageDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 3 /* Down */,\r\n unit: 2 /* WrappedLine */,\r\n select: false,\r\n value: -1 /* PAGE_SIZE_MARKER */\r\n },\r\n id: 'cursorPageDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 12 /* PageDown */\r\n }\r\n }));\r\n CoreNavigationCommands.CursorPageDownSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new CursorMoveBasedCommand({\r\n args: {\r\n direction: 3 /* Down */,\r\n unit: 2 /* WrappedLine */,\r\n select: true,\r\n value: -1 /* PAGE_SIZE_MARKER */\r\n },\r\n id: 'cursorPageDownSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 12 /* PageDown */\r\n }\r\n }));\r\n CoreNavigationCommands.CreateCursor = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'createCursor',\r\n precondition: undefined\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n let newState;\r\n if (args.wholeLine) {\r\n newState = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.line(viewModel, viewModel.getPrimaryCursorState(), false, args.position, args.viewPosition);\r\n }\r\n else {\r\n newState = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveTo(viewModel, viewModel.getPrimaryCursorState(), false, args.position, args.viewPosition);\r\n }\r\n const states = viewModel.getCursorStates();\r\n // Check if we should remove a cursor (sort of like a toggle)\r\n if (states.length > 1) {\r\n const newModelPosition = (newState.modelState ? newState.modelState.position : null);\r\n const newViewPosition = (newState.viewState ? newState.viewState.position : null);\r\n for (let i = 0, len = states.length; i < len; i++) {\r\n const state = states[i];\r\n if (newModelPosition && !state.modelState.selection.containsPosition(newModelPosition)) {\r\n continue;\r\n }\r\n if (newViewPosition && !state.viewState.selection.containsPosition(newViewPosition)) {\r\n continue;\r\n }\r\n // => Remove the cursor\r\n states.splice(i, 1);\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, states);\r\n return;\r\n }\r\n }\r\n // => Add the new cursor\r\n states.push(newState);\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, states);\r\n }\r\n });\r\n CoreNavigationCommands.LastCursorMoveToSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: '_lastCursorMoveToSelect',\r\n precondition: undefined\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex();\r\n const states = viewModel.getCursorStates();\r\n const newStates = states.slice(0);\r\n newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveTo(viewModel, states[lastAddedCursorIndex], true, args.position, args.viewPosition);\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates);\r\n }\r\n });\r\n class HomeCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveToBeginningOfLine(viewModel, viewModel.getCursorStates(), this._inSelectionMode));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.CursorHome = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new HomeCommand({\r\n inSelectionMode: false,\r\n id: 'cursorHome',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 14 /* Home */,\r\n mac: { primary: 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 15 /* LeftArrow */] }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorHomeSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new HomeCommand({\r\n inSelectionMode: true,\r\n id: 'cursorHomeSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 14 /* Home */,\r\n mac: { primary: 1024 /* Shift */ | 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */] }\r\n }\r\n }));\r\n class LineStartCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, this._exec(viewModel.getCursorStates()));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n _exec(cursors) {\r\n const result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const lineNumber = cursor.modelState.position.lineNumber;\r\n result[i] = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__.CursorState.fromModelState(cursor.modelState.move(this._inSelectionMode, lineNumber, 1, 0));\r\n }\r\n return result;\r\n }\r\n }\r\n CoreNavigationCommands.CursorLineStart = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineStartCommand({\r\n inSelectionMode: false,\r\n id: 'cursorLineStart',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 31 /* KEY_A */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorLineStartSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineStartCommand({\r\n inSelectionMode: true,\r\n id: 'cursorLineStartSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 31 /* KEY_A */ }\r\n }\r\n }));\r\n class EndCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveToEndOfLine(viewModel, viewModel.getCursorStates(), this._inSelectionMode, args.sticky || false));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.CursorEnd = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new EndCommand({\r\n inSelectionMode: false,\r\n id: 'cursorEnd',\r\n precondition: undefined,\r\n kbOpts: {\r\n args: { sticky: false },\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 13 /* End */,\r\n mac: { primary: 13 /* End */, secondary: [2048 /* CtrlCmd */ | 17 /* RightArrow */] }\r\n },\r\n description: {\r\n description: `Go to End`,\r\n args: [{\r\n name: 'args',\r\n schema: {\r\n type: 'object',\r\n properties: {\r\n 'sticky': {\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('stickydesc', \"Stick to the end even when going to longer lines\"),\r\n type: 'boolean',\r\n default: false\r\n }\r\n }\r\n }\r\n }]\r\n }\r\n }));\r\n CoreNavigationCommands.CursorEndSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new EndCommand({\r\n inSelectionMode: true,\r\n id: 'cursorEndSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n args: { sticky: false },\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 13 /* End */,\r\n mac: { primary: 1024 /* Shift */ | 13 /* End */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */] }\r\n },\r\n description: {\r\n description: `Select to End`,\r\n args: [{\r\n name: 'args',\r\n schema: {\r\n type: 'object',\r\n properties: {\r\n 'sticky': {\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('stickydesc', \"Stick to the end even when going to longer lines\"),\r\n type: 'boolean',\r\n default: false\r\n }\r\n }\r\n }\r\n }]\r\n }\r\n }));\r\n class LineEndCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, this._exec(viewModel, viewModel.getCursorStates()));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n _exec(viewModel, cursors) {\r\n const result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const lineNumber = cursor.modelState.position.lineNumber;\r\n const maxColumn = viewModel.model.getLineMaxColumn(lineNumber);\r\n result[i] = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__.CursorState.fromModelState(cursor.modelState.move(this._inSelectionMode, lineNumber, maxColumn, 0));\r\n }\r\n return result;\r\n }\r\n }\r\n CoreNavigationCommands.CursorLineEnd = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineEndCommand({\r\n inSelectionMode: false,\r\n id: 'cursorLineEnd',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 35 /* KEY_E */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorLineEndSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineEndCommand({\r\n inSelectionMode: true,\r\n id: 'cursorLineEndSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 35 /* KEY_E */ }\r\n }\r\n }));\r\n class TopCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveToBeginningOfBuffer(viewModel, viewModel.getCursorStates(), this._inSelectionMode));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.CursorTop = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new TopCommand({\r\n inSelectionMode: false,\r\n id: 'cursorTop',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 14 /* Home */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorTopSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new TopCommand({\r\n inSelectionMode: true,\r\n id: 'cursorTopSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 14 /* Home */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */ }\r\n }\r\n }));\r\n class BottomCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.moveToEndOfBuffer(viewModel, viewModel.getCursorStates(), this._inSelectionMode));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.CursorBottom = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new BottomCommand({\r\n inSelectionMode: false,\r\n id: 'cursorBottom',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 13 /* End */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */ }\r\n }\r\n }));\r\n CoreNavigationCommands.CursorBottomSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new BottomCommand({\r\n inSelectionMode: true,\r\n id: 'cursorBottomSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 13 /* End */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */ }\r\n }\r\n }));\r\n class EditorScrollImpl extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'editorScroll',\r\n precondition: undefined,\r\n description: EditorScroll_.description\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const parsed = EditorScroll_.parse(args);\r\n if (!parsed) {\r\n // illegal arguments\r\n return;\r\n }\r\n this._runEditorScroll(viewModel, args.source, parsed);\r\n }\r\n _runEditorScroll(viewModel, source, args) {\r\n const desiredScrollTop = this._computeDesiredScrollTop(viewModel, args);\r\n if (args.revealCursor) {\r\n // must ensure cursor is in new visible range\r\n const desiredVisibleViewRange = viewModel.getCompletelyVisibleViewRangeAtScrollTop(desiredScrollTop);\r\n viewModel.setCursorStates(source, 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.findPositionInViewportIfOutside(viewModel, viewModel.getPrimaryCursorState(), desiredVisibleViewRange, args.select)\r\n ]);\r\n }\r\n viewModel.setScrollTop(desiredScrollTop, 0 /* Smooth */);\r\n }\r\n _computeDesiredScrollTop(viewModel, args) {\r\n if (args.unit === 1 /* Line */) {\r\n // scrolling by model lines\r\n const visibleViewRange = viewModel.getCompletelyVisibleViewRange();\r\n const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\r\n let desiredTopModelLineNumber;\r\n if (args.direction === 1 /* Up */) {\r\n // must go x model lines up\r\n desiredTopModelLineNumber = Math.max(1, visibleModelRange.startLineNumber - args.value);\r\n }\r\n else {\r\n // must go x model lines down\r\n desiredTopModelLineNumber = Math.min(viewModel.model.getLineCount(), visibleModelRange.startLineNumber + args.value);\r\n }\r\n const viewPosition = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_10__.Position(desiredTopModelLineNumber, 1));\r\n return viewModel.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n }\r\n let noOfLines;\r\n if (args.unit === 3 /* Page */) {\r\n noOfLines = viewModel.cursorConfig.pageSize * args.value;\r\n }\r\n else if (args.unit === 4 /* HalfPage */) {\r\n noOfLines = Math.round(viewModel.cursorConfig.pageSize / 2) * args.value;\r\n }\r\n else {\r\n noOfLines = args.value;\r\n }\r\n const deltaLines = (args.direction === 1 /* Up */ ? -1 : 1) * noOfLines;\r\n return viewModel.getScrollTop() + deltaLines * viewModel.cursorConfig.lineHeight;\r\n }\r\n }\r\n CoreNavigationCommands.EditorScrollImpl = EditorScrollImpl;\r\n CoreNavigationCommands.EditorScroll = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new EditorScrollImpl());\r\n CoreNavigationCommands.ScrollLineUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'scrollLineUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */,\r\n mac: { primary: 256 /* WinCtrl */ | 11 /* PageUp */ }\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, {\r\n direction: 1 /* Up */,\r\n unit: 2 /* WrappedLine */,\r\n value: 1,\r\n revealCursor: false,\r\n select: false\r\n });\r\n }\r\n });\r\n CoreNavigationCommands.ScrollPageUp = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'scrollPageUp',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 11 /* PageUp */,\r\n win: { primary: 512 /* Alt */ | 11 /* PageUp */ },\r\n linux: { primary: 512 /* Alt */ | 11 /* PageUp */ }\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, {\r\n direction: 1 /* Up */,\r\n unit: 3 /* Page */,\r\n value: 1,\r\n revealCursor: false,\r\n select: false\r\n });\r\n }\r\n });\r\n CoreNavigationCommands.ScrollLineDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'scrollLineDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */,\r\n mac: { primary: 256 /* WinCtrl */ | 12 /* PageDown */ }\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, {\r\n direction: 2 /* Down */,\r\n unit: 2 /* WrappedLine */,\r\n value: 1,\r\n revealCursor: false,\r\n select: false\r\n });\r\n }\r\n });\r\n CoreNavigationCommands.ScrollPageDown = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'scrollPageDown',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 12 /* PageDown */,\r\n win: { primary: 512 /* Alt */ | 12 /* PageDown */ },\r\n linux: { primary: 512 /* Alt */ | 12 /* PageDown */ }\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, {\r\n direction: 2 /* Down */,\r\n unit: 3 /* Page */,\r\n value: 1,\r\n revealCursor: false,\r\n select: false\r\n });\r\n }\r\n });\r\n class WordCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.word(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position)\r\n ]);\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n }\r\n CoreNavigationCommands.WordSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new WordCommand({\r\n inSelectionMode: false,\r\n id: '_wordSelect',\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.WordSelectDrag = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new WordCommand({\r\n inSelectionMode: true,\r\n id: '_wordSelectDrag',\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.LastCursorWordSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'lastCursorWordSelect',\r\n precondition: undefined\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex();\r\n const states = viewModel.getCursorStates();\r\n const newStates = states.slice(0);\r\n const lastAddedState = states[lastAddedCursorIndex];\r\n newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.word(viewModel, lastAddedState, lastAddedState.modelState.hasSelection(), args.position);\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates);\r\n }\r\n });\r\n class LineCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.line(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position, args.viewPosition)\r\n ]);\r\n viewModel.revealPrimaryCursor(args.source, false);\r\n }\r\n }\r\n CoreNavigationCommands.LineSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineCommand({\r\n inSelectionMode: false,\r\n id: '_lineSelect',\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.LineSelectDrag = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LineCommand({\r\n inSelectionMode: true,\r\n id: '_lineSelectDrag',\r\n precondition: undefined\r\n }));\r\n class LastCursorLineCommand extends CoreEditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex();\r\n const states = viewModel.getCursorStates();\r\n const newStates = states.slice(0);\r\n newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.line(viewModel, states[lastAddedCursorIndex], this._inSelectionMode, args.position, args.viewPosition);\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates);\r\n }\r\n }\r\n CoreNavigationCommands.LastCursorLineSelect = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LastCursorLineCommand({\r\n inSelectionMode: false,\r\n id: 'lastCursorLineSelect',\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.LastCursorLineSelectDrag = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new LastCursorLineCommand({\r\n inSelectionMode: true,\r\n id: 'lastCursorLineSelectDrag',\r\n precondition: undefined\r\n }));\r\n CoreNavigationCommands.ExpandLineSelection = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'expandLineSelection',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 42 /* KEY_L */\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.expandLineSelection(viewModel, viewModel.getCursorStates()));\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n });\r\n CoreNavigationCommands.CancelSelection = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'cancelSelection',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.hasNonEmptySelection,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.cancelSelection(viewModel, viewModel.getPrimaryCursorState())\r\n ]);\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n });\r\n CoreNavigationCommands.RemoveSecondaryCursors = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'removeSecondaryCursors',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.hasMultipleSelections,\r\n kbOpts: {\r\n weight: CORE_WEIGHT + 1,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n viewModel.getPrimaryCursorState()\r\n ]);\r\n viewModel.revealPrimaryCursor(args.source, true);\r\n }\r\n });\r\n CoreNavigationCommands.RevealLine = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'revealLine',\r\n precondition: undefined,\r\n description: RevealLine_.description\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n const revealLineArg = args;\r\n const lineNumberArg = revealLineArg.lineNumber || 0;\r\n let lineNumber = typeof lineNumberArg === 'number' ? (lineNumberArg + 1) : (parseInt(lineNumberArg) + 1);\r\n if (lineNumber < 1) {\r\n lineNumber = 1;\r\n }\r\n const lineCount = viewModel.model.getLineCount();\r\n if (lineNumber > lineCount) {\r\n lineNumber = lineCount;\r\n }\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_11__.Range(lineNumber, 1, lineNumber, viewModel.model.getLineMaxColumn(lineNumber));\r\n let revealAt = 0 /* Simple */;\r\n if (revealLineArg.at) {\r\n switch (revealLineArg.at) {\r\n case RevealLine_.RawAtArgument.Top:\r\n revealAt = 3 /* Top */;\r\n break;\r\n case RevealLine_.RawAtArgument.Center:\r\n revealAt = 1 /* Center */;\r\n break;\r\n case RevealLine_.RawAtArgument.Bottom:\r\n revealAt = 4 /* Bottom */;\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n const viewRange = viewModel.coordinatesConverter.convertModelRangeToViewRange(range);\r\n viewModel.revealRange(args.source, false, viewRange, revealAt, 0 /* Smooth */);\r\n }\r\n });\r\n CoreNavigationCommands.SelectAll = new class extends EditorOrNativeTextInputCommand {\r\n constructor() {\r\n super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.SelectAllCommand);\r\n }\r\n runDOMCommand() {\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__.isFirefox) {\r\n document.activeElement.focus();\r\n document.activeElement.select();\r\n }\r\n document.execCommand('selectAll');\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n // the editor has no view => has no cursors\r\n return;\r\n }\r\n this.runCoreEditorCommand(viewModel, args);\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates('keyboard', 3 /* Explicit */, [\r\n _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_8__.CursorMoveCommands.selectAll(viewModel, viewModel.getPrimaryCursorState())\r\n ]);\r\n }\r\n }();\r\n CoreNavigationCommands.SetSelection = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditorCommand {\r\n constructor() {\r\n super({\r\n id: 'setSelection',\r\n precondition: undefined\r\n });\r\n }\r\n runCoreEditorCommand(viewModel, args) {\r\n viewModel.model.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, [\r\n _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__.CursorState.fromModelSelection(args.selection)\r\n ]);\r\n }\r\n });\r\n})(CoreNavigationCommands || (CoreNavigationCommands = {}));\r\nconst columnSelectionCondition = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.columnSelection);\r\nfunction registerColumnSelection(id, keybinding) {\r\n _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_14__.KeybindingsRegistry.registerKeybindingRule({\r\n id: id,\r\n primary: keybinding,\r\n when: columnSelectionCondition,\r\n weight: CORE_WEIGHT + 1\r\n });\r\n}\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectLeft.id, 1024 /* Shift */ | 15 /* LeftArrow */);\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectRight.id, 1024 /* Shift */ | 17 /* RightArrow */);\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectUp.id, 1024 /* Shift */ | 16 /* UpArrow */);\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectPageUp.id, 1024 /* Shift */ | 11 /* PageUp */);\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectDown.id, 1024 /* Shift */ | 18 /* DownArrow */);\r\nregisterColumnSelection(CoreNavigationCommands.CursorColumnSelectPageDown.id, 1024 /* Shift */ | 12 /* PageDown */);\r\nfunction registerCommand(command) {\r\n command.register();\r\n return command;\r\n}\r\nvar CoreEditingCommands;\r\n(function (CoreEditingCommands) {\r\n class CoreEditingCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorCommand {\r\n runEditorCommand(accessor, editor, args) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n // the editor has no view => has no cursors\r\n return;\r\n }\r\n this.runCoreEditingCommand(editor, viewModel, args || {});\r\n }\r\n }\r\n CoreEditingCommands.CoreEditingCommand = CoreEditingCommand;\r\n CoreEditingCommands.LineBreakInsert = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditingCommand {\r\n constructor() {\r\n super({\r\n id: 'lineBreakInsert',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.writable,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 45 /* KEY_O */ }\r\n }\r\n });\r\n }\r\n runCoreEditingCommand(editor, viewModel, args) {\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_9__.TypeOperations.lineBreakInsert(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection)));\r\n }\r\n });\r\n CoreEditingCommands.Outdent = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditingCommand {\r\n constructor() {\r\n super({\r\n id: 'outdent',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.writable,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.tabDoesNotMoveFocus),\r\n primary: 1024 /* Shift */ | 2 /* Tab */\r\n }\r\n });\r\n }\r\n runCoreEditingCommand(editor, viewModel, args) {\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_9__.TypeOperations.outdent(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection)));\r\n editor.pushUndoStop();\r\n }\r\n });\r\n CoreEditingCommands.Tab = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditingCommand {\r\n constructor() {\r\n super({\r\n id: 'tab',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.writable,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.tabDoesNotMoveFocus),\r\n primary: 2 /* Tab */\r\n }\r\n });\r\n }\r\n runCoreEditingCommand(editor, viewModel, args) {\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_9__.TypeOperations.tab(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection)));\r\n editor.pushUndoStop();\r\n }\r\n });\r\n CoreEditingCommands.DeleteLeft = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditingCommand {\r\n constructor() {\r\n super({\r\n id: 'deleteLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 1 /* Backspace */,\r\n secondary: [1024 /* Shift */ | 1 /* Backspace */],\r\n mac: { primary: 1 /* Backspace */, secondary: [1024 /* Shift */ | 1 /* Backspace */, 256 /* WinCtrl */ | 38 /* KEY_H */, 256 /* WinCtrl */ | 1 /* Backspace */] }\r\n }\r\n });\r\n }\r\n runCoreEditingCommand(editor, viewModel, args) {\r\n const [shouldPushStackElementBefore, commands] = _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_7__.DeleteOperations.deleteLeft(viewModel.getPrevEditOperationType(), viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection));\r\n if (shouldPushStackElementBefore) {\r\n editor.pushUndoStop();\r\n }\r\n editor.executeCommands(this.id, commands);\r\n viewModel.setPrevEditOperationType(2 /* DeletingLeft */);\r\n }\r\n });\r\n CoreEditingCommands.DeleteRight = (0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorCommand)(new class extends CoreEditingCommand {\r\n constructor() {\r\n super({\r\n id: 'deleteRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: CORE_WEIGHT,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.textInputFocus,\r\n primary: 20 /* Delete */,\r\n mac: { primary: 20 /* Delete */, secondary: [256 /* WinCtrl */ | 34 /* KEY_D */, 256 /* WinCtrl */ | 20 /* Delete */] }\r\n }\r\n });\r\n }\r\n runCoreEditingCommand(editor, viewModel, args) {\r\n const [shouldPushStackElementBefore, commands] = _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_7__.DeleteOperations.deleteRight(viewModel.getPrevEditOperationType(), viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection));\r\n if (shouldPushStackElementBefore) {\r\n editor.pushUndoStop();\r\n }\r\n editor.executeCommands(this.id, commands);\r\n viewModel.setPrevEditOperationType(3 /* DeletingRight */);\r\n }\r\n });\r\n CoreEditingCommands.Undo = new class extends EditorOrNativeTextInputCommand {\r\n constructor() {\r\n super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.UndoCommand);\r\n }\r\n runDOMCommand() {\r\n document.execCommand('undo');\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel() || editor.getOption(75 /* readOnly */) === true) {\r\n return;\r\n }\r\n return editor.getModel().undo();\r\n }\r\n }();\r\n CoreEditingCommands.Redo = new class extends EditorOrNativeTextInputCommand {\r\n constructor() {\r\n super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.RedoCommand);\r\n }\r\n runDOMCommand() {\r\n document.execCommand('redo');\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel() || editor.getOption(75 /* readOnly */) === true) {\r\n return;\r\n }\r\n return editor.getModel().redo();\r\n }\r\n }();\r\n})(CoreEditingCommands || (CoreEditingCommands = {}));\r\n/**\r\n * A command that will invoke a command on the focused editor.\r\n */\r\nclass EditorHandlerCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.Command {\r\n constructor(id, handlerId, description) {\r\n super({\r\n id: id,\r\n precondition: undefined,\r\n description: description\r\n });\r\n this._handlerId = handlerId;\r\n }\r\n runCommand(accessor, args) {\r\n const editor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_4__.ICodeEditorService).getFocusedCodeEditor();\r\n if (!editor) {\r\n return;\r\n }\r\n editor.trigger('keyboard', this._handlerId, args);\r\n }\r\n}\r\nfunction registerOverwritableCommand(handlerId, description) {\r\n registerCommand(new EditorHandlerCommand('default:' + handlerId, handlerId));\r\n registerCommand(new EditorHandlerCommand(handlerId, handlerId, description));\r\n}\r\nregisterOverwritableCommand(\"type\" /* Type */, {\r\n description: `Type`,\r\n args: [{\r\n name: 'args',\r\n schema: {\r\n 'type': 'object',\r\n 'required': ['text'],\r\n 'properties': {\r\n 'text': {\r\n 'type': 'string'\r\n }\r\n },\r\n }\r\n }]\r\n});\r\nregisterOverwritableCommand(\"replacePreviousChar\" /* ReplacePreviousChar */);\r\nregisterOverwritableCommand(\"compositionType\" /* CompositionType */);\r\nregisterOverwritableCommand(\"compositionStart\" /* CompositionStart */);\r\nregisterOverwritableCommand(\"compositionEnd\" /* CompositionEnd */);\r\nregisterOverwritableCommand(\"paste\" /* Paste */);\r\nregisterOverwritableCommand(\"cut\" /* Cut */);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createMouseMoveEventMerger\": () => (/* binding */ createMouseMoveEventMerger),\n/* harmony export */ \"MouseHandler\": () => (/* binding */ MouseHandler)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mouseTarget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js\");\n/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editorDom.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js\");\n/* harmony import */ var _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/config/editorZoom.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Merges mouse events when mouse move events are throttled\r\n */\r\nfunction createMouseMoveEventMerger(mouseTargetFactory) {\r\n return function (lastEvent, currentEvent) {\r\n let targetIsWidget = false;\r\n if (mouseTargetFactory) {\r\n targetIsWidget = mouseTargetFactory.mouseTargetIsWidget(currentEvent);\r\n }\r\n if (!targetIsWidget) {\r\n currentEvent.preventDefault();\r\n }\r\n return currentEvent;\r\n };\r\n}\r\nclass MouseHandler extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_10__.ViewEventHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super();\r\n this._context = context;\r\n this.viewController = viewController;\r\n this.viewHelper = viewHelper;\r\n this.mouseTargetFactory = new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTargetFactory(this._context, viewHelper);\r\n this._mouseDownOperation = this._register(new MouseDownOperation(this._context, this.viewController, this.viewHelper, (e, testEventTarget) => this._createMouseTarget(e, testEventTarget), (e) => this._getMouseColumn(e)));\r\n this.lastMouseLeaveTime = -1;\r\n this._height = this._context.configuration.options.get(124 /* layoutInfo */).height;\r\n const mouseEvents = new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__.EditorMouseEventFactory(this.viewHelper.viewDomNode);\r\n this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode, (e) => this._onContextMenu(e, true)));\r\n this._register(mouseEvents.onMouseMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), createMouseMoveEventMerger(this.mouseTargetFactory), MouseHandler.MOUSE_MOVE_MINIMUM_TIME));\r\n this._register(mouseEvents.onMouseUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\r\n this._register(mouseEvents.onMouseLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\r\n this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e)));\r\n const onMouseWheel = (browserEvent) => {\r\n this.viewController.emitMouseWheel(browserEvent);\r\n if (!this._context.configuration.options.get(62 /* mouseWheelZoom */)) {\r\n return;\r\n }\r\n const e = new _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_1__.StandardWheelEvent(browserEvent);\r\n const doMouseWheelZoom = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isMacintosh\r\n // on macOS we support cmd + two fingers scroll (`metaKey` set)\r\n // and also the two fingers pinch gesture (`ctrKey` set)\r\n ? ((browserEvent.metaKey || browserEvent.ctrlKey) && !browserEvent.shiftKey && !browserEvent.altKey)\r\n : (browserEvent.ctrlKey && !browserEvent.metaKey && !browserEvent.shiftKey && !browserEvent.altKey));\r\n if (doMouseWheelZoom) {\r\n const zoomLevel = _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__.EditorZoom.getZoomLevel();\r\n const delta = e.deltaY > 0 ? 1 : -1;\r\n _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__.EditorZoom.setZoomLevel(zoomLevel + delta);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n };\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.viewDomNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.MOUSE_WHEEL, onMouseWheel, { capture: true, passive: false }));\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n // layout change\r\n const height = this._context.configuration.options.get(124 /* layoutInfo */).height;\r\n if (this._height !== height) {\r\n this._height = height;\r\n this._mouseDownOperation.onHeightChanged();\r\n }\r\n }\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n this._mouseDownOperation.onCursorStateChanged(e);\r\n return false;\r\n }\r\n onFocusChanged(e) {\r\n return false;\r\n }\r\n onScrollChanged(e) {\r\n this._mouseDownOperation.onScrollChanged();\r\n return false;\r\n }\r\n // --- end event handlers\r\n getTargetAtClientPoint(clientX, clientY) {\r\n const clientPos = new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__.ClientCoordinates(clientX, clientY);\r\n const pos = clientPos.toPageCoordinates();\r\n const editorPos = (0,_editorDom_js__WEBPACK_IMPORTED_MODULE_6__.createEditorPagePosition)(this.viewHelper.viewDomNode);\r\n if (pos.y < editorPos.y || pos.y > editorPos.y + editorPos.height || pos.x < editorPos.x || pos.x > editorPos.x + editorPos.width) {\r\n return null;\r\n }\r\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), editorPos, pos, null);\r\n }\r\n _createMouseTarget(e, testEventTarget) {\r\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, testEventTarget ? e.target : null);\r\n }\r\n _getMouseColumn(e) {\r\n return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos);\r\n }\r\n _onContextMenu(e, testEventTarget) {\r\n this.viewController.emitContextMenu({\r\n event: e,\r\n target: this._createMouseTarget(e, testEventTarget)\r\n });\r\n }\r\n _onMouseMove(e) {\r\n if (this._mouseDownOperation.isActive()) {\r\n // In selection/drag operation\r\n return;\r\n }\r\n const actualMouseMoveTime = e.timestamp;\r\n if (actualMouseMoveTime < this.lastMouseLeaveTime) {\r\n // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it.\r\n return;\r\n }\r\n this.viewController.emitMouseMove({\r\n event: e,\r\n target: this._createMouseTarget(e, true)\r\n });\r\n }\r\n _onMouseLeave(e) {\r\n this.lastMouseLeaveTime = (new Date()).getTime();\r\n this.viewController.emitMouseLeave({\r\n event: e,\r\n target: null\r\n });\r\n }\r\n _onMouseUp(e) {\r\n this.viewController.emitMouseUp({\r\n event: e,\r\n target: this._createMouseTarget(e, true)\r\n });\r\n }\r\n _onMouseDown(e) {\r\n const t = this._createMouseTarget(e, true);\r\n const targetIsContent = (t.type === 6 /* CONTENT_TEXT */ || t.type === 7 /* CONTENT_EMPTY */);\r\n const targetIsGutter = (t.type === 2 /* GUTTER_GLYPH_MARGIN */ || t.type === 3 /* GUTTER_LINE_NUMBERS */ || t.type === 4 /* GUTTER_LINE_DECORATIONS */);\r\n const targetIsLineNumbers = (t.type === 3 /* GUTTER_LINE_NUMBERS */);\r\n const selectOnLineNumbers = this._context.configuration.options.get(93 /* selectOnLineNumbers */);\r\n const targetIsViewZone = (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */);\r\n const targetIsWidget = (t.type === 9 /* CONTENT_WIDGET */);\r\n let shouldHandle = e.leftButton || e.middleButton;\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isMacintosh && e.leftButton && e.ctrlKey) {\r\n shouldHandle = false;\r\n }\r\n const focus = () => {\r\n e.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n };\r\n if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) {\r\n focus();\r\n this._mouseDownOperation.start(t.type, e);\r\n }\r\n else if (targetIsGutter) {\r\n // Do not steal focus\r\n e.preventDefault();\r\n }\r\n else if (targetIsViewZone) {\r\n const viewZoneData = t.detail;\r\n if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) {\r\n focus();\r\n this._mouseDownOperation.start(t.type, e);\r\n e.preventDefault();\r\n }\r\n }\r\n else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) {\r\n focus();\r\n e.preventDefault();\r\n }\r\n this.viewController.emitMouseDown({\r\n event: e,\r\n target: t\r\n });\r\n }\r\n}\r\nMouseHandler.MOUSE_MOVE_MINIMUM_TIME = 100; // ms\r\nclass MouseDownOperation extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(context, viewController, viewHelper, createMouseTarget, getMouseColumn) {\r\n super();\r\n this._context = context;\r\n this._viewController = viewController;\r\n this._viewHelper = viewHelper;\r\n this._createMouseTarget = createMouseTarget;\r\n this._getMouseColumn = getMouseColumn;\r\n this._mouseMoveMonitor = this._register(new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__.GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode));\r\n this._onScrollTimeout = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.TimeoutTimer());\r\n this._mouseState = new MouseDownState();\r\n this._currentSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(1, 1, 1, 1);\r\n this._isActive = false;\r\n this._lastMouseEvent = null;\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n isActive() {\r\n return this._isActive;\r\n }\r\n _onMouseDownThenMove(e) {\r\n this._lastMouseEvent = e;\r\n this._mouseState.setModifiers(e);\r\n const position = this._findMousePosition(e, true);\r\n if (!position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n if (this._mouseState.isDragAndDrop) {\r\n this._viewController.emitMouseDrag({\r\n event: e,\r\n target: position\r\n });\r\n }\r\n else {\r\n this._dispatchMouse(position, true);\r\n }\r\n }\r\n start(targetType, e) {\r\n this._lastMouseEvent = e;\r\n this._mouseState.setStartedOnLineNumbers(targetType === 3 /* GUTTER_LINE_NUMBERS */);\r\n this._mouseState.setStartButtons(e);\r\n this._mouseState.setModifiers(e);\r\n const position = this._findMousePosition(e, true);\r\n if (!position || !position.position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n this._mouseState.trySetCount(e.detail, position.position);\r\n // Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it.\r\n e.detail = this._mouseState.count;\r\n const options = this._context.configuration.options;\r\n if (!options.get(75 /* readOnly */)\r\n && options.get(27 /* dragAndDrop */)\r\n && !options.get(15 /* columnSelection */)\r\n && !this._mouseState.altKey // we don't support multiple mouse\r\n && e.detail < 2 // only single click on a selection can work\r\n && !this._isActive // the mouse is not down yet\r\n && !this._currentSelection.isEmpty() // we don't drag single cursor\r\n && (position.type === 6 /* CONTENT_TEXT */) // single click on text\r\n && position.position && this._currentSelection.containsPosition(position.position) // single click on a selection\r\n ) {\r\n this._mouseState.isDragAndDrop = true;\r\n this._isActive = true;\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), (browserEvent) => {\r\n const position = this._findMousePosition(this._lastMouseEvent, true);\r\n if (browserEvent && browserEvent instanceof KeyboardEvent) {\r\n // cancel\r\n this._viewController.emitMouseDropCanceled();\r\n }\r\n else {\r\n this._viewController.emitMouseDrop({\r\n event: this._lastMouseEvent,\r\n target: (position ? this._createMouseTarget(this._lastMouseEvent, true) : null) // Ignoring because position is unknown, e.g., Content View Zone\r\n });\r\n }\r\n this._stop();\r\n });\r\n return;\r\n }\r\n this._mouseState.isDragAndDrop = false;\r\n this._dispatchMouse(position, e.shiftKey);\r\n if (!this._isActive) {\r\n this._isActive = true;\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), () => this._stop());\r\n }\r\n }\r\n _stop() {\r\n this._isActive = false;\r\n this._onScrollTimeout.cancel();\r\n }\r\n onHeightChanged() {\r\n this._mouseMoveMonitor.stopMonitoring();\r\n }\r\n onScrollChanged() {\r\n if (!this._isActive) {\r\n return;\r\n }\r\n this._onScrollTimeout.setIfNotSet(() => {\r\n if (!this._lastMouseEvent) {\r\n return;\r\n }\r\n const position = this._findMousePosition(this._lastMouseEvent, false);\r\n if (!position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n if (this._mouseState.isDragAndDrop) {\r\n // Ignoring because users are dragging the text\r\n return;\r\n }\r\n this._dispatchMouse(position, true);\r\n }, 10);\r\n }\r\n onCursorStateChanged(e) {\r\n this._currentSelection = e.selections[0];\r\n }\r\n _getPositionOutsideEditor(e) {\r\n const editorContent = e.editorPos;\r\n const model = this._context.model;\r\n const viewLayout = this._context.viewLayout;\r\n const mouseColumn = this._getMouseColumn(e);\r\n if (e.posy < editorContent.y) {\r\n const verticalOffset = Math.max(viewLayout.getCurrentScrollTop() - (editorContent.y - e.posy), 0);\r\n const viewZoneData = _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.HitTestContext.getZoneAtCoord(this._context, verticalOffset);\r\n if (viewZoneData) {\r\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\r\n if (newPosition) {\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition);\r\n }\r\n }\r\n const aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(aboveLineNumber, 1));\r\n }\r\n if (e.posy > editorContent.y + editorContent.height) {\r\n const verticalOffset = viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y);\r\n const viewZoneData = _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.HitTestContext.getZoneAtCoord(this._context, verticalOffset);\r\n if (viewZoneData) {\r\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\r\n if (newPosition) {\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition);\r\n }\r\n }\r\n const belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber)));\r\n }\r\n const possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y));\r\n if (e.posx < editorContent.x) {\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(possibleLineNumber, 1));\r\n }\r\n if (e.posx > editorContent.x + editorContent.width) {\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber)));\r\n }\r\n return null;\r\n }\r\n _findMousePosition(e, testEventTarget) {\r\n const positionOutsideEditor = this._getPositionOutsideEditor(e);\r\n if (positionOutsideEditor) {\r\n return positionOutsideEditor;\r\n }\r\n const t = this._createMouseTarget(e, testEventTarget);\r\n const hintedPosition = t.position;\r\n if (!hintedPosition) {\r\n return null;\r\n }\r\n if (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const newPosition = this._helpPositionJumpOverViewZone(t.detail);\r\n if (newPosition) {\r\n return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__.MouseTarget(t.element, t.type, t.mouseColumn, newPosition, null, t.detail);\r\n }\r\n }\r\n return t;\r\n }\r\n _helpPositionJumpOverViewZone(viewZoneData) {\r\n // Force position on view zones to go above or below depending on where selection started from\r\n const selectionStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn);\r\n const positionBefore = viewZoneData.positionBefore;\r\n const positionAfter = viewZoneData.positionAfter;\r\n if (positionBefore && positionAfter) {\r\n if (positionBefore.isBefore(selectionStart)) {\r\n return positionBefore;\r\n }\r\n else {\r\n return positionAfter;\r\n }\r\n }\r\n return null;\r\n }\r\n _dispatchMouse(position, inSelectionMode) {\r\n if (!position.position) {\r\n return;\r\n }\r\n this._viewController.dispatchMouse({\r\n position: position.position,\r\n mouseColumn: position.mouseColumn,\r\n startedOnLineNumbers: this._mouseState.startedOnLineNumbers,\r\n inSelectionMode: inSelectionMode,\r\n mouseDownCount: this._mouseState.count,\r\n altKey: this._mouseState.altKey,\r\n ctrlKey: this._mouseState.ctrlKey,\r\n metaKey: this._mouseState.metaKey,\r\n shiftKey: this._mouseState.shiftKey,\r\n leftButton: this._mouseState.leftButton,\r\n middleButton: this._mouseState.middleButton,\r\n });\r\n }\r\n}\r\nclass MouseDownState {\r\n constructor() {\r\n this._altKey = false;\r\n this._ctrlKey = false;\r\n this._metaKey = false;\r\n this._shiftKey = false;\r\n this._leftButton = false;\r\n this._middleButton = false;\r\n this._startedOnLineNumbers = false;\r\n this._lastMouseDownPosition = null;\r\n this._lastMouseDownPositionEqualCount = 0;\r\n this._lastMouseDownCount = 0;\r\n this._lastSetMouseDownCountTime = 0;\r\n this.isDragAndDrop = false;\r\n }\r\n get altKey() { return this._altKey; }\r\n get ctrlKey() { return this._ctrlKey; }\r\n get metaKey() { return this._metaKey; }\r\n get shiftKey() { return this._shiftKey; }\r\n get leftButton() { return this._leftButton; }\r\n get middleButton() { return this._middleButton; }\r\n get startedOnLineNumbers() { return this._startedOnLineNumbers; }\r\n get count() {\r\n return this._lastMouseDownCount;\r\n }\r\n setModifiers(source) {\r\n this._altKey = source.altKey;\r\n this._ctrlKey = source.ctrlKey;\r\n this._metaKey = source.metaKey;\r\n this._shiftKey = source.shiftKey;\r\n }\r\n setStartButtons(source) {\r\n this._leftButton = source.leftButton;\r\n this._middleButton = source.middleButton;\r\n }\r\n setStartedOnLineNumbers(startedOnLineNumbers) {\r\n this._startedOnLineNumbers = startedOnLineNumbers;\r\n }\r\n trySetCount(setMouseDownCount, newMouseDownPosition) {\r\n // a. Invalidate multiple clicking if too much time has passed (will be hit by IE because the detail field of mouse events contains garbage in IE10)\r\n const currentTime = (new Date()).getTime();\r\n if (currentTime - this._lastSetMouseDownCountTime > MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME) {\r\n setMouseDownCount = 1;\r\n }\r\n this._lastSetMouseDownCountTime = currentTime;\r\n // b. Ensure that we don't jump from single click to triple click in one go (will be hit by IE because the detail field of mouse events contains garbage in IE10)\r\n if (setMouseDownCount > this._lastMouseDownCount + 1) {\r\n setMouseDownCount = this._lastMouseDownCount + 1;\r\n }\r\n // c. Invalidate multiple clicking if the logical position is different\r\n if (this._lastMouseDownPosition && this._lastMouseDownPosition.equals(newMouseDownPosition)) {\r\n this._lastMouseDownPositionEqualCount++;\r\n }\r\n else {\r\n this._lastMouseDownPositionEqualCount = 1;\r\n }\r\n this._lastMouseDownPosition = newMouseDownPosition;\r\n // Finally set the lastMouseDownCount\r\n this._lastMouseDownCount = Math.min(setMouseDownCount, this._lastMouseDownPositionEqualCount);\r\n }\r\n}\r\nMouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; // ms\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PointerHandlerLastRenderData\": () => (/* binding */ PointerHandlerLastRenderData),\n/* harmony export */ \"MouseTarget\": () => (/* binding */ MouseTarget),\n/* harmony export */ \"HitTestContext\": () => (/* binding */ HitTestContext),\n/* harmony export */ \"MouseTargetFactory\": () => (/* binding */ MouseTargetFactory),\n/* harmony export */ \"shadowCaretRangeFromPoint\": () => (/* binding */ shadowCaretRangeFromPoint)\n/* harmony export */ });\n/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../editorDom.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../viewParts/lines/viewLine.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_controller_cursorAtomicMoveOperations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/controller/cursorAtomicMoveOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorAtomicMoveOperations.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass PointerHandlerLastRenderData {\r\n constructor(lastViewCursorsRenderData, lastTextareaPosition) {\r\n this.lastViewCursorsRenderData = lastViewCursorsRenderData;\r\n this.lastTextareaPosition = lastTextareaPosition;\r\n }\r\n}\r\nclass MouseTarget {\r\n constructor(element, type, mouseColumn = 0, position = null, range = null, detail = null) {\r\n this.element = element;\r\n this.type = type;\r\n this.mouseColumn = mouseColumn;\r\n this.position = position;\r\n if (!range && position) {\r\n range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n }\r\n this.range = range;\r\n this.detail = detail;\r\n }\r\n static _typeToString(type) {\r\n if (type === 1 /* TEXTAREA */) {\r\n return 'TEXTAREA';\r\n }\r\n if (type === 2 /* GUTTER_GLYPH_MARGIN */) {\r\n return 'GUTTER_GLYPH_MARGIN';\r\n }\r\n if (type === 3 /* GUTTER_LINE_NUMBERS */) {\r\n return 'GUTTER_LINE_NUMBERS';\r\n }\r\n if (type === 4 /* GUTTER_LINE_DECORATIONS */) {\r\n return 'GUTTER_LINE_DECORATIONS';\r\n }\r\n if (type === 5 /* GUTTER_VIEW_ZONE */) {\r\n return 'GUTTER_VIEW_ZONE';\r\n }\r\n if (type === 6 /* CONTENT_TEXT */) {\r\n return 'CONTENT_TEXT';\r\n }\r\n if (type === 7 /* CONTENT_EMPTY */) {\r\n return 'CONTENT_EMPTY';\r\n }\r\n if (type === 8 /* CONTENT_VIEW_ZONE */) {\r\n return 'CONTENT_VIEW_ZONE';\r\n }\r\n if (type === 9 /* CONTENT_WIDGET */) {\r\n return 'CONTENT_WIDGET';\r\n }\r\n if (type === 10 /* OVERVIEW_RULER */) {\r\n return 'OVERVIEW_RULER';\r\n }\r\n if (type === 11 /* SCROLLBAR */) {\r\n return 'SCROLLBAR';\r\n }\r\n if (type === 12 /* OVERLAY_WIDGET */) {\r\n return 'OVERLAY_WIDGET';\r\n }\r\n return 'UNKNOWN';\r\n }\r\n static toString(target) {\r\n return this._typeToString(target.type) + ': ' + target.position + ' - ' + target.range + ' - ' + target.detail;\r\n }\r\n toString() {\r\n return MouseTarget.toString(this);\r\n }\r\n}\r\nclass ElementPath {\r\n static isTextArea(path) {\r\n return (path.length === 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 6 /* TextArea */);\r\n }\r\n static isChildOfViewLines(path) {\r\n return (path.length >= 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 7 /* ViewLines */);\r\n }\r\n static isStrictChildOfViewLines(path) {\r\n return (path.length > 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 7 /* ViewLines */);\r\n }\r\n static isChildOfScrollableElement(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 5 /* ScrollableElement */);\r\n }\r\n static isChildOfMinimap(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 8 /* Minimap */);\r\n }\r\n static isChildOfContentWidgets(path) {\r\n return (path.length >= 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 1 /* ContentWidgets */);\r\n }\r\n static isChildOfOverflowingContentWidgets(path) {\r\n return (path.length >= 1\r\n && path[0] === 2 /* OverflowingContentWidgets */);\r\n }\r\n static isChildOfOverlayWidgets(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 4 /* OverlayWidgets */);\r\n }\r\n}\r\nclass HitTestContext {\r\n constructor(context, viewHelper, lastRenderData) {\r\n this.model = context.model;\r\n const options = context.configuration.options;\r\n this.layoutInfo = options.get(124 /* layoutInfo */);\r\n this.viewDomNode = viewHelper.viewDomNode;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.stickyTabStops = options.get(99 /* stickyTabStops */);\r\n this.typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this.lastRenderData = lastRenderData;\r\n this._context = context;\r\n this._viewHelper = viewHelper;\r\n }\r\n getZoneAtCoord(mouseVerticalOffset) {\r\n return HitTestContext.getZoneAtCoord(this._context, mouseVerticalOffset);\r\n }\r\n static getZoneAtCoord(context, mouseVerticalOffset) {\r\n // The target is either a view zone or the empty space after the last view-line\r\n const viewZoneWhitespace = context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset);\r\n if (viewZoneWhitespace) {\r\n const viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2;\r\n const lineCount = context.model.getLineCount();\r\n let positionBefore = null;\r\n let position;\r\n let positionAfter = null;\r\n if (viewZoneWhitespace.afterLineNumber !== lineCount) {\r\n // There are more lines after this view zone\r\n positionAfter = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(viewZoneWhitespace.afterLineNumber + 1, 1);\r\n }\r\n if (viewZoneWhitespace.afterLineNumber > 0) {\r\n // There are more lines above this view zone\r\n positionBefore = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(viewZoneWhitespace.afterLineNumber, context.model.getLineMaxColumn(viewZoneWhitespace.afterLineNumber));\r\n }\r\n if (positionAfter === null) {\r\n position = positionBefore;\r\n }\r\n else if (positionBefore === null) {\r\n position = positionAfter;\r\n }\r\n else if (mouseVerticalOffset < viewZoneMiddle) {\r\n position = positionBefore;\r\n }\r\n else {\r\n position = positionAfter;\r\n }\r\n return {\r\n viewZoneId: viewZoneWhitespace.id,\r\n afterLineNumber: viewZoneWhitespace.afterLineNumber,\r\n positionBefore: positionBefore,\r\n positionAfter: positionAfter,\r\n position: position\r\n };\r\n }\r\n return null;\r\n }\r\n getFullLineRangeAtCoord(mouseVerticalOffset) {\r\n if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) {\r\n // Below the last line\r\n const lineNumber = this._context.model.getLineCount();\r\n const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber);\r\n return {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(lineNumber, maxLineColumn, lineNumber, maxLineColumn),\r\n isAfterLines: true\r\n };\r\n }\r\n const lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\r\n const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber);\r\n return {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(lineNumber, 1, lineNumber, maxLineColumn),\r\n isAfterLines: false\r\n };\r\n }\r\n getLineNumberAtVerticalOffset(mouseVerticalOffset) {\r\n return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\r\n }\r\n isAfterLines(mouseVerticalOffset) {\r\n return this._context.viewLayout.isAfterLines(mouseVerticalOffset);\r\n }\r\n isInTopPadding(mouseVerticalOffset) {\r\n return this._context.viewLayout.isInTopPadding(mouseVerticalOffset);\r\n }\r\n isInBottomPadding(mouseVerticalOffset) {\r\n return this._context.viewLayout.isInBottomPadding(mouseVerticalOffset);\r\n }\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber);\r\n }\r\n findAttribute(element, attr) {\r\n return HitTestContext._findAttribute(element, attr, this._viewHelper.viewDomNode);\r\n }\r\n static _findAttribute(element, attr, stopAt) {\r\n while (element && element !== document.body) {\r\n if (element.hasAttribute && element.hasAttribute(attr)) {\r\n return element.getAttribute(attr);\r\n }\r\n if (element === stopAt) {\r\n return null;\r\n }\r\n element = element.parentNode;\r\n }\r\n return null;\r\n }\r\n getLineWidth(lineNumber) {\r\n return this._viewHelper.getLineWidth(lineNumber);\r\n }\r\n visibleRangeForPosition(lineNumber, column) {\r\n return this._viewHelper.visibleRangeForPosition(lineNumber, column);\r\n }\r\n getPositionFromDOMInfo(spanNode, offset) {\r\n return this._viewHelper.getPositionFromDOMInfo(spanNode, offset);\r\n }\r\n getCurrentScrollTop() {\r\n return this._context.viewLayout.getCurrentScrollTop();\r\n }\r\n getCurrentScrollLeft() {\r\n return this._context.viewLayout.getCurrentScrollLeft();\r\n }\r\n}\r\nclass BareHitTestRequest {\r\n constructor(ctx, editorPos, pos) {\r\n this.editorPos = editorPos;\r\n this.pos = pos;\r\n this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + pos.y - editorPos.y);\r\n this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + pos.x - editorPos.x - ctx.layoutInfo.contentLeft;\r\n this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft && pos.x - editorPos.x >= ctx.layoutInfo.glyphMarginLeft);\r\n this.isInContentArea = !this.isInMarginArea;\r\n this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth));\r\n }\r\n}\r\nclass HitTestRequest extends BareHitTestRequest {\r\n constructor(ctx, editorPos, pos, target) {\r\n super(ctx, editorPos, pos);\r\n this._ctx = ctx;\r\n if (target) {\r\n this.target = target;\r\n this.targetPath = _view_viewPart_js__WEBPACK_IMPORTED_MODULE_1__.PartFingerprints.collect(target, ctx.viewDomNode);\r\n }\r\n else {\r\n this.target = null;\r\n this.targetPath = new Uint8Array(0);\r\n }\r\n }\r\n toString() {\r\n return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\\n\\ttarget: ${this.target ? this.target.outerHTML : null}`;\r\n }\r\n fulfill(type, position = null, range = null, detail = null) {\r\n let mouseColumn = this.mouseColumn;\r\n if (position && position.column < this._ctx.model.getLineMaxColumn(position.lineNumber)) {\r\n // Most likely, the line contains foreign decorations...\r\n mouseColumn = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(position.lineNumber), position.column, this._ctx.model.getTextModelOptions().tabSize) + 1;\r\n }\r\n return new MouseTarget(this.target, type, mouseColumn, position, range, detail);\r\n }\r\n withTarget(target) {\r\n return new HitTestRequest(this._ctx, this.editorPos, this.pos, target);\r\n }\r\n}\r\nconst EMPTY_CONTENT_AFTER_LINES = { isAfterLines: true };\r\nfunction createEmptyContentDataInLines(horizontalDistanceToText) {\r\n return {\r\n isAfterLines: false,\r\n horizontalDistanceToText: horizontalDistanceToText\r\n };\r\n}\r\nclass MouseTargetFactory {\r\n constructor(context, viewHelper) {\r\n this._context = context;\r\n this._viewHelper = viewHelper;\r\n }\r\n mouseTargetIsWidget(e) {\r\n const t = e.target;\r\n const path = _view_viewPart_js__WEBPACK_IMPORTED_MODULE_1__.PartFingerprints.collect(t, this._viewHelper.viewDomNode);\r\n // Is it a content widget?\r\n if (ElementPath.isChildOfContentWidgets(path) || ElementPath.isChildOfOverflowingContentWidgets(path)) {\r\n return true;\r\n }\r\n // Is it an overlay widget?\r\n if (ElementPath.isChildOfOverlayWidgets(path)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n createMouseTarget(lastRenderData, editorPos, pos, target) {\r\n const ctx = new HitTestContext(this._context, this._viewHelper, lastRenderData);\r\n const request = new HitTestRequest(ctx, editorPos, pos, target);\r\n try {\r\n const r = MouseTargetFactory._createMouseTarget(ctx, request, false);\r\n // console.log(r.toString());\r\n return r;\r\n }\r\n catch (err) {\r\n // console.log(err);\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n static _createMouseTarget(ctx, request, domHitTestExecuted) {\r\n // console.log(`${domHitTestExecuted ? '=>' : ''}CAME IN REQUEST: ${request}`);\r\n // First ensure the request has a target\r\n if (request.target === null) {\r\n if (domHitTestExecuted) {\r\n // Still no target... and we have already executed hit test...\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\r\n if (hitTestResult.position) {\r\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\r\n }\r\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\r\n }\r\n // we know for a fact that request.target is not null\r\n const resolvedRequest = request;\r\n let result = null;\r\n result = result || MouseTargetFactory._hitTestContentWidget(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestOverlayWidget(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestMinimap(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestScrollbarSlider(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewZone(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestMargin(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewCursor(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestTextArea(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewLines(ctx, resolvedRequest, domHitTestExecuted);\r\n result = result || MouseTargetFactory._hitTestScrollbar(ctx, resolvedRequest);\r\n return (result || request.fulfill(0 /* UNKNOWN */));\r\n }\r\n static _hitTestContentWidget(ctx, request) {\r\n // Is it a content widget?\r\n if (ElementPath.isChildOfContentWidgets(request.targetPath) || ElementPath.isChildOfOverflowingContentWidgets(request.targetPath)) {\r\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\r\n if (widgetId) {\r\n return request.fulfill(9 /* CONTENT_WIDGET */, null, null, widgetId);\r\n }\r\n else {\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestOverlayWidget(ctx, request) {\r\n // Is it an overlay widget?\r\n if (ElementPath.isChildOfOverlayWidgets(request.targetPath)) {\r\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\r\n if (widgetId) {\r\n return request.fulfill(12 /* OVERLAY_WIDGET */, null, null, widgetId);\r\n }\r\n else {\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestViewCursor(ctx, request) {\r\n if (request.target) {\r\n // Check if we've hit a painted cursor\r\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\r\n for (const d of lastViewCursorsRenderData) {\r\n if (request.target === d.domNode) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, d.position);\r\n }\r\n }\r\n }\r\n if (request.isInContentArea) {\r\n // Edge has a bug when hit-testing the exact position of a cursor,\r\n // instead of returning the correct dom node, it returns the\r\n // first or last rendered view line dom node, therefore help it out\r\n // and first check if we are on top of a cursor\r\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\r\n const mouseContentHorizontalOffset = request.mouseContentHorizontalOffset;\r\n const mouseVerticalOffset = request.mouseVerticalOffset;\r\n for (const d of lastViewCursorsRenderData) {\r\n if (mouseContentHorizontalOffset < d.contentLeft) {\r\n // mouse position is to the left of the cursor\r\n continue;\r\n }\r\n if (mouseContentHorizontalOffset > d.contentLeft + d.width) {\r\n // mouse position is to the right of the cursor\r\n continue;\r\n }\r\n const cursorVerticalOffset = ctx.getVerticalOffsetForLineNumber(d.position.lineNumber);\r\n if (cursorVerticalOffset <= mouseVerticalOffset\r\n && mouseVerticalOffset <= cursorVerticalOffset + d.height) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, d.position);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestViewZone(ctx, request) {\r\n const viewZoneData = ctx.getZoneAtCoord(request.mouseVerticalOffset);\r\n if (viewZoneData) {\r\n const mouseTargetType = (request.isInContentArea ? 8 /* CONTENT_VIEW_ZONE */ : 5 /* GUTTER_VIEW_ZONE */);\r\n return request.fulfill(mouseTargetType, viewZoneData.position, null, viewZoneData);\r\n }\r\n return null;\r\n }\r\n static _hitTestTextArea(ctx, request) {\r\n // Is it the textarea?\r\n if (ElementPath.isTextArea(request.targetPath)) {\r\n if (ctx.lastRenderData.lastTextareaPosition) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, ctx.lastRenderData.lastTextareaPosition);\r\n }\r\n return request.fulfill(1 /* TEXTAREA */, ctx.lastRenderData.lastTextareaPosition);\r\n }\r\n return null;\r\n }\r\n static _hitTestMargin(ctx, request) {\r\n if (request.isInMarginArea) {\r\n const res = ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset);\r\n const pos = res.range.getStartPosition();\r\n let offset = Math.abs(request.pos.x - request.editorPos.x);\r\n const detail = {\r\n isAfterLines: res.isAfterLines,\r\n glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft,\r\n glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth,\r\n lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth,\r\n offsetX: offset\r\n };\r\n offset -= ctx.layoutInfo.glyphMarginLeft;\r\n if (offset <= ctx.layoutInfo.glyphMarginWidth) {\r\n // On the glyph margin\r\n return request.fulfill(2 /* GUTTER_GLYPH_MARGIN */, pos, res.range, detail);\r\n }\r\n offset -= ctx.layoutInfo.glyphMarginWidth;\r\n if (offset <= ctx.layoutInfo.lineNumbersWidth) {\r\n // On the line numbers\r\n return request.fulfill(3 /* GUTTER_LINE_NUMBERS */, pos, res.range, detail);\r\n }\r\n offset -= ctx.layoutInfo.lineNumbersWidth;\r\n // On the line decorations\r\n return request.fulfill(4 /* GUTTER_LINE_DECORATIONS */, pos, res.range, detail);\r\n }\r\n return null;\r\n }\r\n static _hitTestViewLines(ctx, request, domHitTestExecuted) {\r\n if (!ElementPath.isChildOfViewLines(request.targetPath)) {\r\n return null;\r\n }\r\n if (ctx.isInTopPadding(request.mouseVerticalOffset)) {\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(1, 1), undefined, EMPTY_CONTENT_AFTER_LINES);\r\n }\r\n // Check if it is below any lines and any view zones\r\n if (ctx.isAfterLines(request.mouseVerticalOffset) || ctx.isInBottomPadding(request.mouseVerticalOffset)) {\r\n // This most likely indicates it happened after the last view-line\r\n const lineCount = ctx.model.getLineCount();\r\n const maxLineColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineCount, maxLineColumn), undefined, EMPTY_CONTENT_AFTER_LINES);\r\n }\r\n if (domHitTestExecuted) {\r\n // Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines)\r\n // See https://github.com/microsoft/vscode/issues/46942\r\n if (ElementPath.isStrictChildOfViewLines(request.targetPath)) {\r\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n if (ctx.model.getLineLength(lineNumber) === 0) {\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, 1), undefined, detail);\r\n }\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n if (request.mouseContentHorizontalOffset >= lineWidth) {\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, ctx.model.getLineMaxColumn(lineNumber));\r\n return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail);\r\n }\r\n }\r\n // We have already executed hit test...\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\r\n if (hitTestResult.position) {\r\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\r\n }\r\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\r\n }\r\n static _hitTestMinimap(ctx, request) {\r\n if (ElementPath.isChildOfMinimap(request.targetPath)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(possibleLineNumber, maxColumn));\r\n }\r\n return null;\r\n }\r\n static _hitTestScrollbarSlider(ctx, request) {\r\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\r\n if (request.target && request.target.nodeType === 1) {\r\n const className = request.target.className;\r\n if (className && /\\b(slider|scrollbar)\\b/.test(className)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(possibleLineNumber, maxColumn));\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestScrollbar(ctx, request) {\r\n // Is it the overview ruler?\r\n // Is it a child of the scrollable element?\r\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(possibleLineNumber, maxColumn));\r\n }\r\n return null;\r\n }\r\n getMouseColumn(editorPos, pos) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft;\r\n return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth);\r\n }\r\n static _getMouseColumn(mouseContentHorizontalOffset, typicalHalfwidthCharacterWidth) {\r\n if (mouseContentHorizontalOffset < 0) {\r\n return 1;\r\n }\r\n const chars = Math.round(mouseContentHorizontalOffset / typicalHalfwidthCharacterWidth);\r\n return (chars + 1);\r\n }\r\n static createMouseTargetFromHitTestPosition(ctx, request, lineNumber, column) {\r\n const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, column);\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n if (request.mouseContentHorizontalOffset > lineWidth) {\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail);\r\n }\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column);\r\n if (!visibleRange) {\r\n return request.fulfill(0 /* UNKNOWN */, pos);\r\n }\r\n const columnHorizontalOffset = visibleRange.left;\r\n if (request.mouseContentHorizontalOffset === columnHorizontalOffset) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos);\r\n }\r\n const points = [];\r\n points.push({ offset: visibleRange.left, column: column });\r\n if (column > 1) {\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column - 1);\r\n if (visibleRange) {\r\n points.push({ offset: visibleRange.left, column: column - 1 });\r\n }\r\n }\r\n const lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber);\r\n if (column < lineMaxColumn) {\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column + 1);\r\n if (visibleRange) {\r\n points.push({ offset: visibleRange.left, column: column + 1 });\r\n }\r\n }\r\n points.sort((a, b) => a.offset - b.offset);\r\n for (let i = 1; i < points.length; i++) {\r\n const prev = points[i - 1];\r\n const curr = points[i];\r\n if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) {\r\n const rng = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(lineNumber, prev.column, lineNumber, curr.column);\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos, rng);\r\n }\r\n }\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos);\r\n }\r\n /**\r\n * Most probably WebKit browsers and Edge\r\n */\r\n static _doHitTestWithCaretRangeFromPoint(ctx, request) {\r\n // In Chrome, especially on Linux it is possible to click between lines,\r\n // so try to adjust the `hity` below so that it lands in the center of a line\r\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const lineVerticalOffset = ctx.getVerticalOffsetForLineNumber(lineNumber);\r\n const lineCenteredVerticalOffset = lineVerticalOffset + Math.floor(ctx.lineHeight / 2);\r\n let adjustedPageY = request.pos.y + (lineCenteredVerticalOffset - request.mouseVerticalOffset);\r\n if (adjustedPageY <= request.editorPos.y) {\r\n adjustedPageY = request.editorPos.y + 1;\r\n }\r\n if (adjustedPageY >= request.editorPos.y + ctx.layoutInfo.height) {\r\n adjustedPageY = request.editorPos.y + ctx.layoutInfo.height - 1;\r\n }\r\n const adjustedPage = new _editorDom_js__WEBPACK_IMPORTED_MODULE_0__.PageCoordinates(request.pos.x, adjustedPageY);\r\n const r = this._actualDoHitTestWithCaretRangeFromPoint(ctx, adjustedPage.toClientCoordinates());\r\n if (r.position) {\r\n return r;\r\n }\r\n // Also try to hit test without the adjustment (for the edge cases that we are near the top or bottom)\r\n return this._actualDoHitTestWithCaretRangeFromPoint(ctx, request.pos.toClientCoordinates());\r\n }\r\n static _actualDoHitTestWithCaretRangeFromPoint(ctx, coords) {\r\n const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_6__.getShadowRoot(ctx.viewDomNode);\r\n let range;\r\n if (shadowRoot) {\r\n if (typeof shadowRoot.caretRangeFromPoint === 'undefined') {\r\n range = shadowCaretRangeFromPoint(shadowRoot, coords.clientX, coords.clientY);\r\n }\r\n else {\r\n range = shadowRoot.caretRangeFromPoint(coords.clientX, coords.clientY);\r\n }\r\n }\r\n else {\r\n range = document.caretRangeFromPoint(coords.clientX, coords.clientY);\r\n }\r\n if (!range || !range.startContainer) {\r\n return {\r\n position: null,\r\n hitTarget: null\r\n };\r\n }\r\n // Chrome always hits a TEXT_NODE, while Edge sometimes hits a token span\r\n const startContainer = range.startContainer;\r\n let hitTarget = null;\r\n if (startContainer.nodeType === startContainer.TEXT_NODE) {\r\n // startContainer is expected to be the token text\r\n const parent1 = startContainer.parentNode; // expected to be the token span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\r\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\r\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\r\n if (parent3ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__.ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(parent1, range.startOffset);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n hitTarget = startContainer.parentNode;\r\n }\r\n }\r\n else if (startContainer.nodeType === startContainer.ELEMENT_NODE) {\r\n // startContainer is expected to be the token span\r\n const parent1 = startContainer.parentNode; // expected to be the view line container span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line div\r\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\r\n if (parent2ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__.ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(startContainer, startContainer.textContent.length);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n hitTarget = startContainer;\r\n }\r\n }\r\n return {\r\n position: null,\r\n hitTarget: hitTarget\r\n };\r\n }\r\n /**\r\n * Most probably Gecko\r\n */\r\n static _doHitTestWithCaretPositionFromPoint(ctx, coords) {\r\n const hitResult = document.caretPositionFromPoint(coords.clientX, coords.clientY);\r\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) {\r\n // offsetNode is expected to be the token text\r\n const parent1 = hitResult.offsetNode.parentNode; // expected to be the token span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\r\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\r\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\r\n if (parent3ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__.ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(hitResult.offsetNode.parentNode, hitResult.offset);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n return {\r\n position: null,\r\n hitTarget: hitResult.offsetNode.parentNode\r\n };\r\n }\r\n }\r\n // For inline decorations, Gecko sometimes returns the `<span>` of the line and the offset is the `<span>` with the inline decoration\r\n // Some other times, it returns the `<span>` with the inline decoration\r\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.ELEMENT_NODE) {\r\n const parent1 = hitResult.offsetNode.parentNode;\r\n const parent1ClassName = parent1 && parent1.nodeType === parent1.ELEMENT_NODE ? parent1.className : null;\r\n const parent2 = parent1 ? parent1.parentNode : null;\r\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\r\n if (parent1ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__.ViewLine.CLASS_NAME) {\r\n // it returned the `<span>` of the line and the offset is the `<span>` with the inline decoration\r\n const tokenSpan = hitResult.offsetNode.childNodes[Math.min(hitResult.offset, hitResult.offsetNode.childNodes.length - 1)];\r\n if (tokenSpan) {\r\n const p = ctx.getPositionFromDOMInfo(tokenSpan, 0);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n }\r\n else if (parent2ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_2__.ViewLine.CLASS_NAME) {\r\n // it returned the `<span>` with the inline decoration\r\n const p = ctx.getPositionFromDOMInfo(hitResult.offsetNode, 0);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n }\r\n return {\r\n position: null,\r\n hitTarget: hitResult.offsetNode\r\n };\r\n }\r\n static _snapToSoftTabBoundary(position, viewModel) {\r\n const lineContent = viewModel.getLineContent(position.lineNumber);\r\n const { tabSize } = viewModel.getTextModelOptions();\r\n const newPosition = _common_controller_cursorAtomicMoveOperations_js__WEBPACK_IMPORTED_MODULE_7__.AtomicTabMoveOperations.atomicPosition(lineContent, position.column - 1, tabSize, 2 /* Nearest */);\r\n if (newPosition !== -1) {\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(position.lineNumber, newPosition + 1);\r\n }\r\n return position;\r\n }\r\n static _doHitTest(ctx, request) {\r\n let result;\r\n if (typeof document.caretRangeFromPoint === 'function') {\r\n result = this._doHitTestWithCaretRangeFromPoint(ctx, request);\r\n }\r\n else if (document.caretPositionFromPoint) {\r\n result = this._doHitTestWithCaretPositionFromPoint(ctx, request.pos.toClientCoordinates());\r\n }\r\n else {\r\n result = {\r\n position: null,\r\n hitTarget: null\r\n };\r\n }\r\n // Snap to the nearest soft tab boundary if atomic soft tabs are enabled.\r\n if (result.position && ctx.stickyTabStops) {\r\n result.position = this._snapToSoftTabBoundary(result.position, ctx.model);\r\n }\r\n return result;\r\n }\r\n}\r\nfunction shadowCaretRangeFromPoint(shadowRoot, x, y) {\r\n const range = document.createRange();\r\n // Get the element under the point\r\n let el = shadowRoot.elementFromPoint(x, y);\r\n if (el !== null) {\r\n // Get the last child of the element until its firstChild is a text node\r\n // This assumes that the pointer is on the right of the line, out of the tokens\r\n // and that we want to get the offset of the last token of the line\r\n while (el && el.firstChild && el.firstChild.nodeType !== el.firstChild.TEXT_NODE && el.lastChild && el.lastChild.firstChild) {\r\n el = el.lastChild;\r\n }\r\n // Grab its rect\r\n const rect = el.getBoundingClientRect();\r\n // And its font\r\n const font = window.getComputedStyle(el, null).getPropertyValue('font');\r\n // And also its txt content\r\n const text = el.innerText;\r\n // Position the pixel cursor at the left of the element\r\n let pixelCursor = rect.left;\r\n let offset = 0;\r\n let step;\r\n // If the point is on the right of the box put the cursor after the last character\r\n if (x > rect.left + rect.width) {\r\n offset = text.length;\r\n }\r\n else {\r\n const charWidthReader = CharWidthReader.getInstance();\r\n // Goes through all the characters of the innerText, and checks if the x of the point\r\n // belongs to the character.\r\n for (let i = 0; i < text.length + 1; i++) {\r\n // The step is half the width of the character\r\n step = charWidthReader.getCharWidth(text.charAt(i), font) / 2;\r\n // Move to the center of the character\r\n pixelCursor += step;\r\n // If the x of the point is smaller that the position of the cursor, the point is over that character\r\n if (x < pixelCursor) {\r\n offset = i;\r\n break;\r\n }\r\n // Move between the current character and the next\r\n pixelCursor += step;\r\n }\r\n }\r\n // Creates a range with the text node of the element and set the offset found\r\n range.setStart(el.firstChild, offset);\r\n range.setEnd(el.firstChild, offset);\r\n }\r\n return range;\r\n}\r\nclass CharWidthReader {\r\n constructor() {\r\n this._cache = {};\r\n this._canvas = document.createElement('canvas');\r\n }\r\n static getInstance() {\r\n if (!CharWidthReader._INSTANCE) {\r\n CharWidthReader._INSTANCE = new CharWidthReader();\r\n }\r\n return CharWidthReader._INSTANCE;\r\n }\r\n getCharWidth(char, font) {\r\n const cacheKey = char + font;\r\n if (this._cache[cacheKey]) {\r\n return this._cache[cacheKey];\r\n }\r\n const context = this._canvas.getContext('2d');\r\n context.font = font;\r\n const metrics = context.measureText(char);\r\n const width = metrics.width;\r\n this._cache[cacheKey] = width;\r\n return width;\r\n }\r\n}\r\nCharWidthReader._INSTANCE = null;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PointerEventHandler\": () => (/* binding */ PointerEventHandler),\n/* harmony export */ \"PointerHandler\": () => (/* binding */ PointerHandler)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouseHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js\");\n/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editorDom.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js\");\n/* harmony import */ var _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/canIUse.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js\");\n/* harmony import */ var _textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textAreaInput.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Currently only tested on iOS 13/ iPadOS.\r\n */\r\nclass PointerEventHandler extends _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__.MouseHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super(context, viewController, viewHelper);\r\n this._register(_base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.Gesture.addTarget(this.viewHelper.linesContentDomNode));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Tap, (e) => this.onTap(e)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Change, (e) => this.onChange(e)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Contextmenu, (e) => this._onContextMenu(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__.EditorMouseEvent(e, this.viewHelper.viewDomNode), false)));\r\n this._lastPointerType = 'mouse';\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e) => {\r\n const pointerType = e.pointerType;\r\n if (pointerType === 'mouse') {\r\n this._lastPointerType = 'mouse';\r\n return;\r\n }\r\n else if (pointerType === 'touch') {\r\n this._lastPointerType = 'touch';\r\n }\r\n else {\r\n this._lastPointerType = 'pen';\r\n }\r\n }));\r\n // PonterEvents\r\n const pointerEvents = new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__.EditorPointerEventFactory(this.viewHelper.viewDomNode);\r\n this._register(pointerEvents.onPointerMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), (0,_mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__.createMouseMoveEventMerger)(this.mouseTargetFactory), _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__.MouseHandler.MOUSE_MOVE_MINIMUM_TIME));\r\n this._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\r\n this._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\r\n this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e)));\r\n }\r\n onTap(event) {\r\n if (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget)) {\r\n return;\r\n }\r\n event.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n const target = this._createMouseTarget(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__.EditorMouseEvent(event, this.viewHelper.viewDomNode), false);\r\n if (target.position) {\r\n // this.viewController.moveTo(target.position);\r\n this.viewController.dispatchMouse({\r\n position: target.position,\r\n mouseColumn: target.position.column,\r\n startedOnLineNumbers: false,\r\n mouseDownCount: event.tapCount,\r\n inSelectionMode: false,\r\n altKey: false,\r\n ctrlKey: false,\r\n metaKey: false,\r\n shiftKey: false,\r\n leftButton: false,\r\n middleButton: false,\r\n });\r\n }\r\n }\r\n onChange(e) {\r\n if (this._lastPointerType === 'touch') {\r\n this._context.model.deltaScrollNow(-e.translationX, -e.translationY);\r\n }\r\n }\r\n _onMouseDown(e) {\r\n if (e.browserEvent.pointerType === 'touch') {\r\n return;\r\n }\r\n super._onMouseDown(e);\r\n }\r\n}\r\nclass TouchHandler extends _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__.MouseHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super(context, viewController, viewHelper);\r\n this._register(_base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.Gesture.addTarget(this.viewHelper.linesContentDomNode));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Tap, (e) => this.onTap(e)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Change, (e) => this.onChange(e)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__.EventType.Contextmenu, (e) => this._onContextMenu(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__.EditorMouseEvent(e, this.viewHelper.viewDomNode), false)));\r\n }\r\n onTap(event) {\r\n event.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n const target = this._createMouseTarget(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__.EditorMouseEvent(event, this.viewHelper.viewDomNode), false);\r\n if (target.position) {\r\n // Send the tap event also to the <textarea> (for input purposes)\r\n const event = document.createEvent('CustomEvent');\r\n event.initEvent(_textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaSyntethicEvents.Tap, false, true);\r\n this.viewHelper.dispatchTextAreaEvent(event);\r\n this.viewController.moveTo(target.position);\r\n }\r\n }\r\n onChange(e) {\r\n this._context.model.deltaScrollNow(-e.translationX, -e.translationY);\r\n }\r\n}\r\nclass PointerHandler extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(context, viewController, viewHelper) {\r\n super();\r\n if ((_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isIOS && _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_6__.BrowserFeatures.pointerEvents)) {\r\n this.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\r\n }\r\n else if (window.TouchEvent) {\r\n this.handler = this._register(new TouchHandler(context, viewController, viewHelper));\r\n }\r\n else {\r\n this.handler = this._register(new _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__.MouseHandler(context, viewController, viewHelper));\r\n }\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n return this.handler.getTargetAtClientPoint(clientX, clientY);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TextAreaHandler\": () => (/* binding */ TextAreaHandler)\n/* harmony export */ });\n/* harmony import */ var _textAreaHandler_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./textAreaHandler.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textAreaInput.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js\");\n/* harmony import */ var _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./textAreaState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewParts/lineNumbers/lineNumbers.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js\");\n/* harmony import */ var _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../viewParts/margin/margin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/controller/wordCharacterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/mouseCursor/mouseCursor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass VisibleTextAreaData {\r\n constructor(top, left, width) {\r\n this.top = top;\r\n this.left = left;\r\n this.width = width;\r\n }\r\n setWidth(width) {\r\n return new VisibleTextAreaData(this.top, this.left, width);\r\n }\r\n}\r\nconst canUseZeroSizeTextarea = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__.isFirefox);\r\nclass TextAreaHandler extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__.ViewPart {\r\n constructor(context, viewController, viewHelper) {\r\n super(context);\r\n // --- end view API\r\n this._primaryCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__.Position(1, 1);\r\n this._primaryCursorVisibleRange = null;\r\n this._viewController = viewController;\r\n this._viewHelper = viewHelper;\r\n this._scrollLeft = 0;\r\n this._scrollTop = 0;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._setAccessibilityOptions(options);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentHeight = layoutInfo.height;\r\n this._fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._emptySelectionClipboard = options.get(28 /* emptySelectionClipboard */);\r\n this._copyWithSyntaxHighlighting = options.get(18 /* copyWithSyntaxHighlighting */);\r\n this._visibleTextArea = null;\r\n this._selections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__.Selection(1, 1, 1, 1)];\r\n this._modelSelections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__.Selection(1, 1, 1, 1)];\r\n this._lastRenderPosition = null;\r\n // Text Area (The focus will always be in the textarea when the cursor is blinking)\r\n this.textArea = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('textarea'));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__.PartFingerprints.write(this.textArea, 6 /* TextArea */);\r\n this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this.textArea.setAttribute('wrap', 'off');\r\n this.textArea.setAttribute('autocorrect', 'off');\r\n this.textArea.setAttribute('autocapitalize', 'off');\r\n this.textArea.setAttribute('autocomplete', 'off');\r\n this.textArea.setAttribute('spellcheck', 'false');\r\n this.textArea.setAttribute('aria-label', this._getAriaLabel(options));\r\n this.textArea.setAttribute('tabindex', String(options.get(107 /* tabIndex */)));\r\n this.textArea.setAttribute('role', 'textbox');\r\n this.textArea.setAttribute('aria-roledescription', _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editor', \"editor\"));\r\n this.textArea.setAttribute('aria-multiline', 'true');\r\n this.textArea.setAttribute('aria-haspopup', 'false');\r\n this.textArea.setAttribute('aria-autocomplete', 'both');\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isWeb && options.get(75 /* readOnly */)) {\r\n this.textArea.setAttribute('readonly', 'true');\r\n }\r\n this.textAreaCover = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this.textAreaCover.setPosition('absolute');\r\n const simpleModel = {\r\n getLineCount: () => {\r\n return this._context.model.getLineCount();\r\n },\r\n getLineMaxColumn: (lineNumber) => {\r\n return this._context.model.getLineMaxColumn(lineNumber);\r\n },\r\n getValueInRange: (range, eol) => {\r\n return this._context.model.getValueInRange(range, eol);\r\n }\r\n };\r\n const textAreaInputHost = {\r\n getDataToCopy: (generateHTML) => {\r\n const rawTextToCopy = this._context.model.getPlainTextToCopy(this._modelSelections, this._emptySelectionClipboard, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isWindows);\r\n const newLineCharacter = this._context.model.getEOL();\r\n const isFromEmptySelection = (this._emptySelectionClipboard && this._modelSelections.length === 1 && this._modelSelections[0].isEmpty());\r\n const multicursorText = (Array.isArray(rawTextToCopy) ? rawTextToCopy : null);\r\n const text = (Array.isArray(rawTextToCopy) ? rawTextToCopy.join(newLineCharacter) : rawTextToCopy);\r\n let html = undefined;\r\n let mode = null;\r\n if (generateHTML) {\r\n if (_textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__.CopyOptions.forceCopyWithSyntaxHighlighting || (this._copyWithSyntaxHighlighting && text.length < 65536)) {\r\n const richText = this._context.model.getRichTextToCopy(this._modelSelections, this._emptySelectionClipboard);\r\n if (richText) {\r\n html = richText.html;\r\n mode = richText.mode;\r\n }\r\n }\r\n }\r\n return {\r\n isFromEmptySelection,\r\n multicursorText,\r\n text,\r\n html,\r\n mode\r\n };\r\n },\r\n getScreenReaderContent: (currentState) => {\r\n if (this._accessibilitySupport === 1 /* Disabled */) {\r\n // We know for a fact that a screen reader is not attached\r\n // On OSX, we write the character before the cursor to allow for \"long-press\" composition\r\n // Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isMacintosh) {\r\n const selection = this._selections[0];\r\n if (selection.isEmpty()) {\r\n const position = selection.getStartPosition();\r\n let textBefore = this._getWordBeforePosition(position);\r\n if (textBefore.length === 0) {\r\n textBefore = this._getCharacterBeforePosition(position);\r\n }\r\n if (textBefore.length > 0) {\r\n return new _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__.TextAreaState(textBefore, textBefore.length, textBefore.length, position, position);\r\n }\r\n }\r\n }\r\n return _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__.TextAreaState.EMPTY;\r\n }\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__.isAndroid) {\r\n // when tapping in the editor on a word, Android enters composition mode.\r\n // in the `compositionstart` event we cannot clear the textarea, because\r\n // it then forgets to ever send a `compositionend`.\r\n // we therefore only write the current word in the textarea\r\n const selection = this._selections[0];\r\n if (selection.isEmpty()) {\r\n const position = selection.getStartPosition();\r\n const [wordAtPosition, positionOffsetInWord] = this._getAndroidWordAtPosition(position);\r\n if (wordAtPosition.length > 0) {\r\n return new _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__.TextAreaState(wordAtPosition, positionOffsetInWord, positionOffsetInWord, position, position);\r\n }\r\n }\r\n return _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__.TextAreaState.EMPTY;\r\n }\r\n return _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__.PagedScreenReaderStrategy.fromEditorSelection(currentState, simpleModel, this._selections[0], this._accessibilityPageSize, this._accessibilitySupport === 0 /* Unknown */);\r\n },\r\n deduceModelPosition: (viewAnchorPosition, deltaOffset, lineFeedCnt) => {\r\n return this._context.model.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt);\r\n }\r\n };\r\n this._textAreaInput = this._register(new _textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaInput(textAreaInputHost, this.textArea));\r\n this._register(this._textAreaInput.onKeyDown((e) => {\r\n this._viewController.emitKeyDown(e);\r\n }));\r\n this._register(this._textAreaInput.onKeyUp((e) => {\r\n this._viewController.emitKeyUp(e);\r\n }));\r\n this._register(this._textAreaInput.onPaste((e) => {\r\n let pasteOnNewLine = false;\r\n let multicursorText = null;\r\n let mode = null;\r\n if (e.metadata) {\r\n pasteOnNewLine = (this._emptySelectionClipboard && !!e.metadata.isFromEmptySelection);\r\n multicursorText = (typeof e.metadata.multicursorText !== 'undefined' ? e.metadata.multicursorText : null);\r\n mode = e.metadata.mode;\r\n }\r\n this._viewController.paste(e.text, pasteOnNewLine, multicursorText, mode);\r\n }));\r\n this._register(this._textAreaInput.onCut(() => {\r\n this._viewController.cut();\r\n }));\r\n this._register(this._textAreaInput.onType((e) => {\r\n if (e.replacePrevCharCnt || e.replaceNextCharCnt || e.positionDelta) {\r\n // must be handled through the new command\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_8__._debugComposition) {\r\n console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`);\r\n }\r\n this._viewController.compositionType(e.text, e.replacePrevCharCnt, e.replaceNextCharCnt, e.positionDelta);\r\n }\r\n else {\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_8__._debugComposition) {\r\n console.log(` => type: <<${e.text}>>`);\r\n }\r\n this._viewController.type(e.text);\r\n }\r\n }));\r\n this._register(this._textAreaInput.onSelectionChangeRequest((modelSelection) => {\r\n this._viewController.setSelection(modelSelection);\r\n }));\r\n this._register(this._textAreaInput.onCompositionStart((e) => {\r\n const lineNumber = this._selections[0].startLineNumber;\r\n const column = this._selections[0].startColumn + e.revealDeltaColumns;\r\n this._context.model.revealRange('keyboard', true, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__.Range(lineNumber, column, lineNumber, column), 0 /* Simple */, 1 /* Immediate */);\r\n // Find range pixel position\r\n const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column);\r\n if (visibleRange) {\r\n this._visibleTextArea = new VisibleTextAreaData(this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, canUseZeroSizeTextarea ? 0 : 1);\r\n this._render();\r\n }\r\n // Show the textarea\r\n this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`);\r\n this._viewController.compositionStart();\r\n this._context.model.onCompositionStart();\r\n }));\r\n this._register(this._textAreaInput.onCompositionUpdate((e) => {\r\n if (!this._visibleTextArea) {\r\n return;\r\n }\r\n // adjust width by its size\r\n this._visibleTextArea = this._visibleTextArea.setWidth(measureText(e.data, this._fontInfo));\r\n this._render();\r\n }));\r\n this._register(this._textAreaInput.onCompositionEnd(() => {\r\n this._visibleTextArea = null;\r\n this._render();\r\n this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this._viewController.compositionEnd();\r\n this._context.model.onCompositionEnd();\r\n }));\r\n this._register(this._textAreaInput.onFocus(() => {\r\n this._context.model.setHasFocus(true);\r\n }));\r\n this._register(this._textAreaInput.onBlur(() => {\r\n this._context.model.setHasFocus(false);\r\n }));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _getAndroidWordAtPosition(position) {\r\n const ANDROID_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\",.<>/?';\r\n const lineContent = this._context.model.getLineContent(position.lineNumber);\r\n const wordSeparators = (0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_13__.getMapForWordSeparators)(ANDROID_WORD_SEPARATORS);\r\n let goingLeft = true;\r\n let startColumn = position.column;\r\n let goingRight = true;\r\n let endColumn = position.column;\r\n let distance = 0;\r\n while (distance < 50 && (goingLeft || goingRight)) {\r\n if (goingLeft && startColumn <= 1) {\r\n goingLeft = false;\r\n }\r\n if (goingLeft) {\r\n const charCode = lineContent.charCodeAt(startColumn - 2);\r\n const charClass = wordSeparators.get(charCode);\r\n if (charClass !== 0 /* Regular */) {\r\n goingLeft = false;\r\n }\r\n else {\r\n startColumn--;\r\n }\r\n }\r\n if (goingRight && endColumn > lineContent.length) {\r\n goingRight = false;\r\n }\r\n if (goingRight) {\r\n const charCode = lineContent.charCodeAt(endColumn - 1);\r\n const charClass = wordSeparators.get(charCode);\r\n if (charClass !== 0 /* Regular */) {\r\n goingRight = false;\r\n }\r\n else {\r\n endColumn++;\r\n }\r\n }\r\n distance++;\r\n }\r\n return [lineContent.substring(startColumn - 1, endColumn - 1), position.column - startColumn];\r\n }\r\n _getWordBeforePosition(position) {\r\n const lineContent = this._context.model.getLineContent(position.lineNumber);\r\n const wordSeparators = (0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_13__.getMapForWordSeparators)(this._context.configuration.options.get(110 /* wordSeparators */));\r\n let column = position.column;\r\n let distance = 0;\r\n while (column > 1) {\r\n const charCode = lineContent.charCodeAt(column - 2);\r\n const charClass = wordSeparators.get(charCode);\r\n if (charClass !== 0 /* Regular */ || distance > 50) {\r\n return lineContent.substring(column - 1, position.column - 1);\r\n }\r\n distance++;\r\n column--;\r\n }\r\n return lineContent.substring(0, position.column - 1);\r\n }\r\n _getCharacterBeforePosition(position) {\r\n if (position.column > 1) {\r\n const lineContent = this._context.model.getLineContent(position.lineNumber);\r\n const charBefore = lineContent.charAt(position.column - 2);\r\n if (!_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.isHighSurrogate(charBefore.charCodeAt(0))) {\r\n return charBefore;\r\n }\r\n }\r\n return '';\r\n }\r\n _getAriaLabel(options) {\r\n const accessibilitySupport = options.get(2 /* accessibilitySupport */);\r\n if (accessibilitySupport === 1 /* Disabled */) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('accessibilityOffAriaLabel', \"The editor is not accessible at this time. Press {0} for options.\", _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isLinux ? 'Shift+Alt+F1' : 'Alt+F1');\r\n }\r\n return options.get(4 /* ariaLabel */);\r\n }\r\n _setAccessibilityOptions(options) {\r\n this._accessibilitySupport = options.get(2 /* accessibilitySupport */);\r\n const accessibilityPageSize = options.get(3 /* accessibilityPageSize */);\r\n if (this._accessibilitySupport === 2 /* Enabled */ && accessibilityPageSize === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__.EditorOptions.accessibilityPageSize.defaultValue) {\r\n // If a screen reader is attached and the default value is not set we shuold automatically increase the page size to 100 for a better experience\r\n // If we put more than 100 lines the nvda can not handle this https://github.com/microsoft/vscode/issues/89717\r\n this._accessibilityPageSize = 100;\r\n }\r\n else {\r\n this._accessibilityPageSize = accessibilityPageSize;\r\n }\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._setAccessibilityOptions(options);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentHeight = layoutInfo.height;\r\n this._fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._emptySelectionClipboard = options.get(28 /* emptySelectionClipboard */);\r\n this._copyWithSyntaxHighlighting = options.get(18 /* copyWithSyntaxHighlighting */);\r\n this.textArea.setAttribute('aria-label', this._getAriaLabel(options));\r\n this.textArea.setAttribute('tabindex', String(options.get(107 /* tabIndex */)));\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isWeb && e.hasChanged(75 /* readOnly */)) {\r\n if (options.get(75 /* readOnly */)) {\r\n this.textArea.setAttribute('readonly', 'true');\r\n }\r\n else {\r\n this.textArea.removeAttribute('readonly');\r\n }\r\n }\r\n if (e.hasChanged(2 /* accessibilitySupport */)) {\r\n this._textAreaInput.writeScreenReaderContent('strategy changed');\r\n }\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections.slice(0);\r\n this._modelSelections = e.modelSelections.slice(0);\r\n this._textAreaInput.writeScreenReaderContent('selection changed');\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n this._scrollLeft = e.scrollLeft;\r\n this._scrollTop = e.scrollTop;\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n // --- begin view API\r\n isFocused() {\r\n return this._textAreaInput.isFocused();\r\n }\r\n focusTextArea() {\r\n this._textAreaInput.focusTextArea();\r\n }\r\n getLastRenderData() {\r\n return this._lastRenderPosition;\r\n }\r\n setAriaOptions(options) {\r\n if (options.activeDescendant) {\r\n this.textArea.setAttribute('aria-haspopup', 'true');\r\n this.textArea.setAttribute('aria-autocomplete', 'list');\r\n this.textArea.setAttribute('aria-activedescendant', options.activeDescendant);\r\n }\r\n else {\r\n this.textArea.setAttribute('aria-haspopup', 'false');\r\n this.textArea.setAttribute('aria-autocomplete', 'both');\r\n this.textArea.removeAttribute('aria-activedescendant');\r\n }\r\n if (options.role) {\r\n this.textArea.setAttribute('role', options.role);\r\n }\r\n }\r\n prepareRender(ctx) {\r\n this._primaryCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__.Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn);\r\n this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(this._primaryCursorPosition);\r\n }\r\n render(ctx) {\r\n this._textAreaInput.writeScreenReaderContent('render');\r\n this._render();\r\n }\r\n _render() {\r\n if (this._visibleTextArea) {\r\n // The text area is visible for composition reasons\r\n this._renderInsideEditor(null, this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight);\r\n return;\r\n }\r\n if (!this._primaryCursorVisibleRange) {\r\n // The primary cursor is outside the viewport => place textarea to the top left\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n const left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;\r\n if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) {\r\n // cursor is outside the viewport\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n const top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;\r\n if (top < 0 || top > this._contentHeight) {\r\n // cursor is outside the viewport\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.isMacintosh) {\r\n // For the popup emoji input, we will make the text area as high as the line height\r\n // We will also make the fontSize and lineHeight the correct dimensions to help with the placement of these pickers\r\n this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, this._lineHeight);\r\n return;\r\n }\r\n this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1);\r\n }\r\n _renderInsideEditor(renderedPosition, top, left, width, height) {\r\n this._lastRenderPosition = renderedPosition;\r\n const ta = this.textArea;\r\n const tac = this.textAreaCover;\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__.Configuration.applyFontInfo(ta, this._fontInfo);\r\n ta.setTop(top);\r\n ta.setLeft(left);\r\n ta.setWidth(width);\r\n ta.setHeight(height);\r\n tac.setTop(0);\r\n tac.setLeft(0);\r\n tac.setWidth(0);\r\n tac.setHeight(0);\r\n }\r\n _renderAtTopLeft() {\r\n this._lastRenderPosition = null;\r\n const ta = this.textArea;\r\n const tac = this.textAreaCover;\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__.Configuration.applyFontInfo(ta, this._fontInfo);\r\n ta.setTop(0);\r\n ta.setLeft(0);\r\n tac.setTop(0);\r\n tac.setLeft(0);\r\n if (canUseZeroSizeTextarea) {\r\n ta.setWidth(0);\r\n ta.setHeight(0);\r\n tac.setWidth(0);\r\n tac.setHeight(0);\r\n return;\r\n }\r\n // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea)\r\n // specifically, when doing Korean IME, setting the textarea to 0x0 breaks IME badly.\r\n ta.setWidth(1);\r\n ta.setHeight(1);\r\n tac.setWidth(1);\r\n tac.setHeight(1);\r\n const options = this._context.configuration.options;\r\n if (options.get(44 /* glyphMargin */)) {\r\n tac.setClassName('monaco-editor-background textAreaCover ' + _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_11__.Margin.OUTER_CLASS_NAME);\r\n }\r\n else {\r\n if (options.get(54 /* lineNumbers */).renderType !== 0 /* Off */) {\r\n tac.setClassName('monaco-editor-background textAreaCover ' + _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_10__.LineNumbersOverlay.CLASS_NAME);\r\n }\r\n else {\r\n tac.setClassName('monaco-editor-background textAreaCover');\r\n }\r\n }\r\n }\r\n}\r\nfunction measureText(text, fontInfo) {\r\n // adjust width by its size\r\n const canvasElem = document.createElement('canvas');\r\n const context = canvasElem.getContext('2d');\r\n context.font = createFontString(fontInfo);\r\n const metrics = context.measureText(text);\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__.isFirefox) {\r\n return metrics.width + 2; // +2 for Japanese...\r\n }\r\n else {\r\n return metrics.width;\r\n }\r\n}\r\nfunction createFontString(bareFontInfo) {\r\n return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily);\r\n}\r\nfunction doCreateFontString(fontStyle, fontWeight, fontSize, lineHeight, fontFamily) {\r\n // The full font syntax is:\r\n // style | variant | weight | stretch | size/line-height | fontFamily\r\n // (https://developer.mozilla.org/en-US/docs/Web/CSS/font)\r\n // But it appears Edge and IE11 cannot properly parse `stretch`.\r\n return `${fontStyle} normal ${fontWeight} ${fontSize}px / ${lineHeight}px ${fontFamily}`;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TextAreaSyntethicEvents\": () => (/* binding */ TextAreaSyntethicEvents),\n/* harmony export */ \"CopyOptions\": () => (/* binding */ CopyOptions),\n/* harmony export */ \"InMemoryClipboardMetadataManager\": () => (/* binding */ InMemoryClipboardMetadataManager),\n/* harmony export */ \"TextAreaInput\": () => (/* binding */ TextAreaInput)\n/* harmony export */ });\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textAreaState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar TextAreaSyntethicEvents;\r\n(function (TextAreaSyntethicEvents) {\r\n TextAreaSyntethicEvents.Tap = '-monaco-textarea-synthetic-tap';\r\n})(TextAreaSyntethicEvents || (TextAreaSyntethicEvents = {}));\r\nconst CopyOptions = {\r\n forceCopyWithSyntaxHighlighting: false\r\n};\r\n/**\r\n * Every time we write to the clipboard, we record a bit of extra metadata here.\r\n * Every time we read from the cipboard, if the text matches our last written text,\r\n * we can fetch the previous metadata.\r\n */\r\nclass InMemoryClipboardMetadataManager {\r\n constructor() {\r\n this._lastState = null;\r\n }\r\n set(lastCopiedValue, data) {\r\n this._lastState = { lastCopiedValue, data };\r\n }\r\n get(pastedText) {\r\n if (this._lastState && this._lastState.lastCopiedValue === pastedText) {\r\n // match!\r\n return this._lastState.data;\r\n }\r\n this._lastState = null;\r\n return null;\r\n }\r\n}\r\nInMemoryClipboardMetadataManager.INSTANCE = new InMemoryClipboardMetadataManager();\r\n/**\r\n * Writes screen reader content to the textarea and is able to analyze its input events to generate:\r\n * - onCut\r\n * - onPaste\r\n * - onType\r\n *\r\n * Composition events are generated for presentation purposes (composition input is reflected in onType).\r\n */\r\nclass TextAreaInput extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(host, textArea) {\r\n super();\r\n this.textArea = textArea;\r\n this._onFocus = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onFocus = this._onFocus.event;\r\n this._onBlur = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onBlur = this._onBlur.event;\r\n this._onKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onKeyUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onKeyUp = this._onKeyUp.event;\r\n this._onCut = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onCut = this._onCut.event;\r\n this._onPaste = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onPaste = this._onPaste.event;\r\n this._onType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onType = this._onType.event;\r\n this._onCompositionStart = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onCompositionStart = this._onCompositionStart.event;\r\n this._onCompositionUpdate = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onCompositionUpdate = this._onCompositionUpdate.event;\r\n this._onCompositionEnd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onCompositionEnd = this._onCompositionEnd.event;\r\n this._onSelectionChangeRequest = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onSelectionChangeRequest = this._onSelectionChangeRequest.event;\r\n this._host = host;\r\n this._textArea = this._register(new TextAreaWrapper(textArea));\r\n this._asyncTriggerCut = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.RunOnceScheduler(() => this._onCut.fire(), 0));\r\n this._asyncFocusGainWriteScreenReaderContent = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.RunOnceScheduler(() => this.writeScreenReaderContent('asyncFocusGain'), 0));\r\n this._textAreaState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.EMPTY;\r\n this._selectionChangeListener = null;\r\n this.writeScreenReaderContent('ctor');\r\n this._hasFocus = false;\r\n this._isDoingComposition = false;\r\n this._nextCommand = 0 /* Type */;\r\n let lastKeyDown = null;\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(textArea.domNode, 'keydown', (e) => {\r\n if (e.keyCode === 109 /* KEY_IN_COMPOSITION */\r\n || (this._isDoingComposition && e.keyCode === 1 /* Backspace */)) {\r\n // Stop propagation for keyDown events if the IME is processing key input\r\n e.stopPropagation();\r\n }\r\n if (e.equals(9 /* Escape */)) {\r\n // Prevent default always for `Esc`, otherwise it will generate a keypress\r\n // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx\r\n e.preventDefault();\r\n }\r\n lastKeyDown = e;\r\n this._onKeyDown.fire(e);\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(textArea.domNode, 'keyup', (e) => {\r\n this._onKeyUp.fire(e);\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'compositionstart', (e) => {\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_7__._debugComposition) {\r\n console.log(`[compositionstart]`, e);\r\n }\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n this._isDoingComposition = true;\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh\r\n && this._textAreaState.selectionStart === this._textAreaState.selectionEnd\r\n && this._textAreaState.selectionStart > 0\r\n && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === e.data) {\r\n const isArrowKey = (lastKeyDown && lastKeyDown.equals(109 /* KEY_IN_COMPOSITION */)\r\n && (lastKeyDown.code === 'ArrowRight' || lastKeyDown.code === 'ArrowLeft'));\r\n if (isArrowKey || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox) {\r\n // Handling long press case on Chromium/Safari macOS + arrow key => pretend the character was selected\r\n // or long press case on Firefox on macOS\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_7__._debugComposition) {\r\n console.log(`[compositionstart] Handling long press case on macOS + arrow key or Firefox`, e);\r\n }\r\n this._textAreaState = new _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState(this._textAreaState.value, this._textAreaState.selectionStart - 1, this._textAreaState.selectionEnd, this._textAreaState.selectionStartPosition ? new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(this._textAreaState.selectionStartPosition.lineNumber, this._textAreaState.selectionStartPosition.column - 1) : null, this._textAreaState.selectionEndPosition);\r\n this._onCompositionStart.fire({ revealDeltaColumns: -1 });\r\n return;\r\n }\r\n }\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isAndroid) {\r\n // when tapping on the editor, Android enters composition mode to edit the current word\r\n // so we cannot clear the textarea on Android and we must pretend the current word was selected\r\n this._onCompositionStart.fire({ revealDeltaColumns: -this._textAreaState.selectionStart });\r\n return;\r\n }\r\n this._setAndWriteTextAreaState('compositionstart', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.EMPTY);\r\n this._onCompositionStart.fire({ revealDeltaColumns: 0 });\r\n }));\r\n /**\r\n * Deduce the typed input from a text area's value and the last observed state.\r\n */\r\n const deduceInputFromTextAreaValue = (couldBeEmojiInput) => {\r\n const oldState = this._textAreaState;\r\n const newState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.readFromTextArea(this._textArea);\r\n return [newState, _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.deduceInput(oldState, newState, couldBeEmojiInput)];\r\n };\r\n const deduceAndroidCompositionInput = () => {\r\n const oldState = this._textAreaState;\r\n const newState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.readFromTextArea(this._textArea);\r\n return [newState, _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.deduceAndroidCompositionInput(oldState, newState)];\r\n };\r\n /**\r\n * Deduce the composition input from a string.\r\n */\r\n const deduceComposition = (text) => {\r\n const oldState = this._textAreaState;\r\n const newState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.selectedText(text);\r\n const typeInput = {\r\n text: newState.value,\r\n replacePrevCharCnt: oldState.selectionEnd - oldState.selectionStart,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n return [newState, typeInput];\r\n };\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'compositionupdate', (e) => {\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_7__._debugComposition) {\r\n console.log(`[compositionupdate]`, e);\r\n }\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isAndroid) {\r\n // On Android, the data sent with the composition update event is unusable.\r\n // For example, if the cursor is in the middle of a word like Mic|osoft\r\n // and Microsoft is chosen from the keyboard's suggestions, the e.data will contain \"Microsoft\".\r\n // This is not really usable because it doesn't tell us where the edit began and where it ended.\r\n const [newState, typeInput] = deduceAndroidCompositionInput();\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n this._onCompositionUpdate.fire(e);\r\n return;\r\n }\r\n const [newState, typeInput] = deduceComposition(e.data || '');\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n this._onCompositionUpdate.fire(e);\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'compositionend', (e) => {\r\n if (_textAreaState_js__WEBPACK_IMPORTED_MODULE_7__._debugComposition) {\r\n console.log(`[compositionend]`, e);\r\n }\r\n // https://github.com/microsoft/monaco-editor/issues/1663\r\n // On iOS 13.2, Chinese system IME randomly trigger an additional compositionend event with empty data\r\n if (!this._isDoingComposition) {\r\n return;\r\n }\r\n this._isDoingComposition = false;\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isAndroid) {\r\n // On Android, the data sent with the composition update event is unusable.\r\n // For example, if the cursor is in the middle of a word like Mic|osoft\r\n // and Microsoft is chosen from the keyboard's suggestions, the e.data will contain \"Microsoft\".\r\n // This is not really usable because it doesn't tell us where the edit began and where it ended.\r\n const [newState, typeInput] = deduceAndroidCompositionInput();\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n this._onCompositionEnd.fire();\r\n return;\r\n }\r\n const [newState, typeInput] = deduceComposition(e.data || '');\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n // isChrome: the textarea is not updated correctly when composition ends\r\n // isFirefox: the textarea is not updated correctly after inserting emojis\r\n // => we cannot assume the text at the end consists only of the composited text\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isChrome || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox) {\r\n this._textAreaState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.readFromTextArea(this._textArea);\r\n }\r\n this._onCompositionEnd.fire();\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'input', () => {\r\n // Pretend here we touched the text area, as the `input` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received input event');\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isMacintosh);\r\n if (typeInput.replacePrevCharCnt === 0 && typeInput.text.length === 1 && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__.isHighSurrogate(typeInput.text.charCodeAt(0))) {\r\n // Ignore invalid input but keep it around for next time\r\n return;\r\n }\r\n this._textAreaState = newState;\r\n if (this._nextCommand === 0 /* Type */) {\r\n if (typeInput.text !== '' || typeInput.replacePrevCharCnt !== 0) {\r\n this._onType.fire(typeInput);\r\n }\r\n }\r\n else {\r\n if (typeInput.text !== '' || typeInput.replacePrevCharCnt !== 0) {\r\n this._firePaste(typeInput.text, null);\r\n }\r\n this._nextCommand = 0 /* Type */;\r\n }\r\n }));\r\n // --- Clipboard operations\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'cut', (e) => {\r\n // Pretend here we touched the text area, as the `cut` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received cut event');\r\n this._ensureClipboardGetsEditorSelection(e);\r\n this._asyncTriggerCut.schedule();\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'copy', (e) => {\r\n this._ensureClipboardGetsEditorSelection(e);\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'paste', (e) => {\r\n // Pretend here we touched the text area, as the `paste` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received paste event');\r\n if (ClipboardEventUtils.canUseTextData(e)) {\r\n const [pastePlainText, metadata] = ClipboardEventUtils.getTextData(e);\r\n if (pastePlainText !== '') {\r\n this._firePaste(pastePlainText, metadata);\r\n }\r\n }\r\n else {\r\n if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) {\r\n // Clean up the textarea, to get a clean paste\r\n this._setAndWriteTextAreaState('paste', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.EMPTY);\r\n }\r\n this._nextCommand = 1 /* Paste */;\r\n }\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'focus', () => {\r\n const hadFocus = this._hasFocus;\r\n this._setHasFocus(true);\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari && !hadFocus && this._hasFocus) {\r\n // When \"tabbing into\" the textarea, immediately after dispatching the 'focus' event,\r\n // Safari will always move the selection at offset 0 in the textarea\r\n this._asyncFocusGainWriteScreenReaderContent.schedule();\r\n }\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, 'blur', () => {\r\n if (this._isDoingComposition) {\r\n // See https://github.com/microsoft/vscode/issues/112621\r\n // where compositionend is not triggered when the editor\r\n // is taken off-dom during a composition\r\n // Clear the flag to be able to write to the textarea\r\n this._isDoingComposition = false;\r\n // Clear the textarea to avoid an unwanted cursor type\r\n this.writeScreenReaderContent('blurWithoutCompositionEnd');\r\n // Fire artificial composition end\r\n this._onCompositionEnd.fire();\r\n }\r\n this._setHasFocus(false);\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(textArea.domNode, TextAreaSyntethicEvents.Tap, () => {\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isAndroid && this._isDoingComposition) {\r\n // on Android, tapping does not cancel the current composition, so the\r\n // textarea is stuck showing the old composition\r\n // Clear the flag to be able to write to the textarea\r\n this._isDoingComposition = false;\r\n // Clear the textarea to avoid an unwanted cursor type\r\n this.writeScreenReaderContent('tapWithoutCompositionEnd');\r\n // Fire artificial composition end\r\n this._onCompositionEnd.fire();\r\n }\r\n }));\r\n }\r\n _installSelectionChangeListener() {\r\n // See https://github.com/microsoft/vscode/issues/27216 and https://github.com/microsoft/vscode/issues/98256\r\n // When using a Braille display, it is possible for users to reposition the\r\n // system caret. This is reflected in Chrome as a `selectionchange` event.\r\n //\r\n // The `selectionchange` event appears to be emitted under numerous other circumstances,\r\n // so it is quite a challenge to distinguish a `selectionchange` coming in from a user\r\n // using a Braille display from all the other cases.\r\n //\r\n // The problems with the `selectionchange` event are:\r\n // * the event is emitted when the textarea is focused programmatically -- textarea.focus()\r\n // * the event is emitted when the selection is changed in the textarea programmatically -- textarea.setSelectionRange(...)\r\n // * the event is emitted when the value of the textarea is changed programmatically -- textarea.value = '...'\r\n // * the event is emitted when tabbing into the textarea\r\n // * the event is emitted asynchronously (sometimes with a delay as high as a few tens of ms)\r\n // * the event sometimes comes in bursts for a single logical textarea operation\r\n // `selectionchange` events often come multiple times for a single logical change\r\n // so throttle multiple `selectionchange` events that burst in a short period of time.\r\n let previousSelectionChangeEventTime = 0;\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(document, 'selectionchange', (e) => {\r\n if (!this._hasFocus) {\r\n return;\r\n }\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n if (!_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isChrome) {\r\n // Support only for Chrome until testing happens on other browsers\r\n return;\r\n }\r\n const now = Date.now();\r\n const delta1 = now - previousSelectionChangeEventTime;\r\n previousSelectionChangeEventTime = now;\r\n if (delta1 < 5) {\r\n // received another `selectionchange` event within 5ms of the previous `selectionchange` event\r\n // => ignore it\r\n return;\r\n }\r\n const delta2 = now - this._textArea.getIgnoreSelectionChangeTime();\r\n this._textArea.resetSelectionChangeTime();\r\n if (delta2 < 100) {\r\n // received a `selectionchange` event within 100ms since we touched the textarea\r\n // => ignore it, since we caused it\r\n return;\r\n }\r\n if (!this._textAreaState.selectionStartPosition || !this._textAreaState.selectionEndPosition) {\r\n // Cannot correlate a position in the textarea with a position in the editor...\r\n return;\r\n }\r\n const newValue = this._textArea.getValue();\r\n if (this._textAreaState.value !== newValue) {\r\n // Cannot correlate a position in the textarea with a position in the editor...\r\n return;\r\n }\r\n const newSelectionStart = this._textArea.getSelectionStart();\r\n const newSelectionEnd = this._textArea.getSelectionEnd();\r\n if (this._textAreaState.selectionStart === newSelectionStart && this._textAreaState.selectionEnd === newSelectionEnd) {\r\n // Nothing to do...\r\n return;\r\n }\r\n const _newSelectionStartPosition = this._textAreaState.deduceEditorPosition(newSelectionStart);\r\n const newSelectionStartPosition = this._host.deduceModelPosition(_newSelectionStartPosition[0], _newSelectionStartPosition[1], _newSelectionStartPosition[2]);\r\n const _newSelectionEndPosition = this._textAreaState.deduceEditorPosition(newSelectionEnd);\r\n const newSelectionEndPosition = this._host.deduceModelPosition(_newSelectionEndPosition[0], _newSelectionEndPosition[1], _newSelectionEndPosition[2]);\r\n const newSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(newSelectionStartPosition.lineNumber, newSelectionStartPosition.column, newSelectionEndPosition.lineNumber, newSelectionEndPosition.column);\r\n this._onSelectionChangeRequest.fire(newSelection);\r\n });\r\n }\r\n dispose() {\r\n super.dispose();\r\n if (this._selectionChangeListener) {\r\n this._selectionChangeListener.dispose();\r\n this._selectionChangeListener = null;\r\n }\r\n }\r\n focusTextArea() {\r\n // Setting this._hasFocus and writing the screen reader content\r\n // will result in a focus() and setSelectionRange() in the textarea\r\n this._setHasFocus(true);\r\n // If the editor is off DOM, focus cannot be really set, so let's double check that we have managed to set the focus\r\n this.refreshFocusState();\r\n }\r\n isFocused() {\r\n return this._hasFocus;\r\n }\r\n refreshFocusState() {\r\n const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getShadowRoot(this.textArea.domNode);\r\n if (shadowRoot) {\r\n this._setHasFocus(shadowRoot.activeElement === this.textArea.domNode);\r\n }\r\n else if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.isInDOM(this.textArea.domNode)) {\r\n this._setHasFocus(document.activeElement === this.textArea.domNode);\r\n }\r\n else {\r\n this._setHasFocus(false);\r\n }\r\n }\r\n _setHasFocus(newHasFocus) {\r\n if (this._hasFocus === newHasFocus) {\r\n // no change\r\n return;\r\n }\r\n this._hasFocus = newHasFocus;\r\n if (this._selectionChangeListener) {\r\n this._selectionChangeListener.dispose();\r\n this._selectionChangeListener = null;\r\n }\r\n if (this._hasFocus) {\r\n this._selectionChangeListener = this._installSelectionChangeListener();\r\n }\r\n if (this._hasFocus) {\r\n this.writeScreenReaderContent('focusgain');\r\n }\r\n if (this._hasFocus) {\r\n this._onFocus.fire();\r\n }\r\n else {\r\n this._onBlur.fire();\r\n }\r\n }\r\n _setAndWriteTextAreaState(reason, textAreaState) {\r\n if (!this._hasFocus) {\r\n textAreaState = textAreaState.collapseSelection();\r\n }\r\n textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus);\r\n this._textAreaState = textAreaState;\r\n }\r\n writeScreenReaderContent(reason) {\r\n if (this._isDoingComposition) {\r\n // Do not write to the text area when doing composition\r\n return;\r\n }\r\n this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState));\r\n }\r\n _ensureClipboardGetsEditorSelection(e) {\r\n const dataToCopy = this._host.getDataToCopy(ClipboardEventUtils.canUseTextData(e));\r\n const storedMetadata = {\r\n version: 1,\r\n isFromEmptySelection: dataToCopy.isFromEmptySelection,\r\n multicursorText: dataToCopy.multicursorText,\r\n mode: dataToCopy.mode\r\n };\r\n InMemoryClipboardMetadataManager.INSTANCE.set(\r\n // When writing \"LINE\\r\\n\" to the clipboard and then pasting,\r\n // Firefox pastes \"LINE\\n\", so let's work around this quirk\r\n (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox ? dataToCopy.text.replace(/\\r\\n/g, '\\n') : dataToCopy.text), storedMetadata);\r\n if (!ClipboardEventUtils.canUseTextData(e)) {\r\n // Looks like an old browser. The strategy is to place the text\r\n // we'd like to be copied to the clipboard in the textarea and select it.\r\n this._setAndWriteTextAreaState('copy or cut', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__.TextAreaState.selectedText(dataToCopy.text));\r\n return;\r\n }\r\n ClipboardEventUtils.setTextData(e, dataToCopy.text, dataToCopy.html, storedMetadata);\r\n }\r\n _firePaste(text, metadata) {\r\n if (!metadata) {\r\n // try the in-memory store\r\n metadata = InMemoryClipboardMetadataManager.INSTANCE.get(text);\r\n }\r\n this._onPaste.fire({\r\n text: text,\r\n metadata: metadata\r\n });\r\n }\r\n}\r\nclass ClipboardEventUtils {\r\n static canUseTextData(e) {\r\n if (e.clipboardData) {\r\n return true;\r\n }\r\n if (window.clipboardData) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n static getTextData(e) {\r\n if (e.clipboardData) {\r\n e.preventDefault();\r\n const text = e.clipboardData.getData('text/plain');\r\n let metadata = null;\r\n const rawmetadata = e.clipboardData.getData('vscode-editor-data');\r\n if (typeof rawmetadata === 'string') {\r\n try {\r\n metadata = JSON.parse(rawmetadata);\r\n if (metadata.version !== 1) {\r\n metadata = null;\r\n }\r\n }\r\n catch (err) {\r\n // no problem!\r\n }\r\n }\r\n return [text, metadata];\r\n }\r\n if (window.clipboardData) {\r\n e.preventDefault();\r\n const text = window.clipboardData.getData('Text');\r\n return [text, null];\r\n }\r\n throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!');\r\n }\r\n static setTextData(e, text, html, metadata) {\r\n if (e.clipboardData) {\r\n e.clipboardData.setData('text/plain', text);\r\n if (typeof html === 'string') {\r\n e.clipboardData.setData('text/html', html);\r\n }\r\n e.clipboardData.setData('vscode-editor-data', JSON.stringify(metadata));\r\n e.preventDefault();\r\n return;\r\n }\r\n if (window.clipboardData) {\r\n window.clipboardData.setData('Text', text);\r\n e.preventDefault();\r\n return;\r\n }\r\n throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!');\r\n }\r\n}\r\nclass TextAreaWrapper extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(_textArea) {\r\n super();\r\n this._actual = _textArea;\r\n this._ignoreSelectionChangeTime = 0;\r\n }\r\n setIgnoreSelectionChangeTime(reason) {\r\n this._ignoreSelectionChangeTime = Date.now();\r\n }\r\n getIgnoreSelectionChangeTime() {\r\n return this._ignoreSelectionChangeTime;\r\n }\r\n resetSelectionChangeTime() {\r\n this._ignoreSelectionChangeTime = 0;\r\n }\r\n getValue() {\r\n // console.log('current value: ' + this._textArea.value);\r\n return this._actual.domNode.value;\r\n }\r\n setValue(reason, value) {\r\n const textArea = this._actual.domNode;\r\n if (textArea.value === value) {\r\n // No change\r\n return;\r\n }\r\n // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value);\r\n this.setIgnoreSelectionChangeTime('setValue');\r\n textArea.value = value;\r\n }\r\n getSelectionStart() {\r\n return this._actual.domNode.selectionDirection === 'backward' ? this._actual.domNode.selectionEnd : this._actual.domNode.selectionStart;\r\n }\r\n getSelectionEnd() {\r\n return this._actual.domNode.selectionDirection === 'backward' ? this._actual.domNode.selectionStart : this._actual.domNode.selectionEnd;\r\n }\r\n setSelectionRange(reason, selectionStart, selectionEnd) {\r\n const textArea = this._actual.domNode;\r\n let activeElement = null;\r\n const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getShadowRoot(textArea);\r\n if (shadowRoot) {\r\n activeElement = shadowRoot.activeElement;\r\n }\r\n else {\r\n activeElement = document.activeElement;\r\n }\r\n const currentIsFocused = (activeElement === textArea);\r\n const currentSelectionStart = textArea.selectionStart;\r\n const currentSelectionEnd = textArea.selectionEnd;\r\n if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) {\r\n // No change\r\n // Firefox iframe bug https://github.com/microsoft/monaco-editor/issues/643#issuecomment-367871377\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox && window.parent !== window) {\r\n textArea.focus();\r\n }\r\n return;\r\n }\r\n // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd);\r\n if (currentIsFocused) {\r\n // No need to focus, only need to change the selection range\r\n this.setIgnoreSelectionChangeTime('setSelectionRange');\r\n textArea.setSelectionRange(selectionStart, selectionEnd);\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox && window.parent !== window) {\r\n textArea.focus();\r\n }\r\n return;\r\n }\r\n // If the focus is outside the textarea, browsers will try really hard to reveal the textarea.\r\n // Here, we try to undo the browser's desperate reveal.\r\n try {\r\n const scrollState = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.saveParentsScrollTop(textArea);\r\n this.setIgnoreSelectionChangeTime('setSelectionRange');\r\n textArea.focus();\r\n textArea.setSelectionRange(selectionStart, selectionEnd);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.restoreParentsScrollTop(textArea, scrollState);\r\n }\r\n catch (e) {\r\n // Sometimes IE throws when setting selection (e.g. textarea is off-DOM)\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"_debugComposition\": () => (/* binding */ _debugComposition),\n/* harmony export */ \"TextAreaState\": () => (/* binding */ TextAreaState),\n/* harmony export */ \"PagedScreenReaderStrategy\": () => (/* binding */ PagedScreenReaderStrategy)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst _debugComposition = false;\r\nclass TextAreaState {\r\n constructor(value, selectionStart, selectionEnd, selectionStartPosition, selectionEndPosition) {\r\n this.value = value;\r\n this.selectionStart = selectionStart;\r\n this.selectionEnd = selectionEnd;\r\n this.selectionStartPosition = selectionStartPosition;\r\n this.selectionEndPosition = selectionEndPosition;\r\n }\r\n toString() {\r\n return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ']';\r\n }\r\n static readFromTextArea(textArea) {\r\n return new TextAreaState(textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), null, null);\r\n }\r\n collapseSelection() {\r\n return new TextAreaState(this.value, this.value.length, this.value.length, null, null);\r\n }\r\n writeToTextArea(reason, textArea, select) {\r\n if (_debugComposition) {\r\n console.log('writeToTextArea ' + reason + ': ' + this.toString());\r\n }\r\n textArea.setValue(reason, this.value);\r\n if (select) {\r\n textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd);\r\n }\r\n }\r\n deduceEditorPosition(offset) {\r\n if (offset <= this.selectionStart) {\r\n const str = this.value.substring(offset, this.selectionStart);\r\n return this._finishDeduceEditorPosition(this.selectionStartPosition, str, -1);\r\n }\r\n if (offset >= this.selectionEnd) {\r\n const str = this.value.substring(this.selectionEnd, offset);\r\n return this._finishDeduceEditorPosition(this.selectionEndPosition, str, 1);\r\n }\r\n const str1 = this.value.substring(this.selectionStart, offset);\r\n if (str1.indexOf(String.fromCharCode(8230)) === -1) {\r\n return this._finishDeduceEditorPosition(this.selectionStartPosition, str1, 1);\r\n }\r\n const str2 = this.value.substring(offset, this.selectionEnd);\r\n return this._finishDeduceEditorPosition(this.selectionEndPosition, str2, -1);\r\n }\r\n _finishDeduceEditorPosition(anchor, deltaText, signum) {\r\n let lineFeedCnt = 0;\r\n let lastLineFeedIndex = -1;\r\n while ((lastLineFeedIndex = deltaText.indexOf('\\n', lastLineFeedIndex + 1)) !== -1) {\r\n lineFeedCnt++;\r\n }\r\n return [anchor, signum * deltaText.length, lineFeedCnt];\r\n }\r\n static selectedText(text) {\r\n return new TextAreaState(text, 0, text.length, null, null);\r\n }\r\n static deduceInput(previousState, currentState, couldBeEmojiInput) {\r\n if (!previousState) {\r\n // This is the EMPTY state\r\n return {\r\n text: '',\r\n replacePrevCharCnt: 0,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n if (_debugComposition) {\r\n console.log('------------------------deduceInput');\r\n console.log('PREVIOUS STATE: ' + previousState.toString());\r\n console.log('CURRENT STATE: ' + currentState.toString());\r\n }\r\n let previousValue = previousState.value;\r\n let previousSelectionStart = previousState.selectionStart;\r\n let previousSelectionEnd = previousState.selectionEnd;\r\n let currentValue = currentState.value;\r\n let currentSelectionStart = currentState.selectionStart;\r\n let currentSelectionEnd = currentState.selectionEnd;\r\n // Strip the previous suffix from the value (without interfering with the current selection)\r\n const previousSuffix = previousValue.substring(previousSelectionEnd);\r\n const currentSuffix = currentValue.substring(currentSelectionEnd);\r\n const suffixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.commonSuffixLength(previousSuffix, currentSuffix);\r\n currentValue = currentValue.substring(0, currentValue.length - suffixLength);\r\n previousValue = previousValue.substring(0, previousValue.length - suffixLength);\r\n const previousPrefix = previousValue.substring(0, previousSelectionStart);\r\n const currentPrefix = currentValue.substring(0, currentSelectionStart);\r\n const prefixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.commonPrefixLength(previousPrefix, currentPrefix);\r\n currentValue = currentValue.substring(prefixLength);\r\n previousValue = previousValue.substring(prefixLength);\r\n currentSelectionStart -= prefixLength;\r\n previousSelectionStart -= prefixLength;\r\n currentSelectionEnd -= prefixLength;\r\n previousSelectionEnd -= prefixLength;\r\n if (_debugComposition) {\r\n console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd);\r\n console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd);\r\n }\r\n if (couldBeEmojiInput && currentSelectionStart === currentSelectionEnd && previousValue.length > 0) {\r\n // on OSX, emojis from the emoji picker are inserted at random locations\r\n // the only hints we can use is that the selection is immediately after the inserted emoji\r\n // and that none of the old text has been deleted\r\n let potentialEmojiInput = null;\r\n if (currentSelectionStart === currentValue.length) {\r\n // emoji potentially inserted \"somewhere\" after the previous selection => it should appear at the end of `currentValue`\r\n if (currentValue.startsWith(previousValue)) {\r\n // only if all of the old text is accounted for\r\n potentialEmojiInput = currentValue.substring(previousValue.length);\r\n }\r\n }\r\n else {\r\n // emoji potentially inserted \"somewhere\" before the previous selection => it should appear at the start of `currentValue`\r\n if (currentValue.endsWith(previousValue)) {\r\n // only if all of the old text is accounted for\r\n potentialEmojiInput = currentValue.substring(0, currentValue.length - previousValue.length);\r\n }\r\n }\r\n if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) {\r\n // now we check that this is indeed an emoji\r\n // emojis can grow quite long, so a length check is of no help\r\n // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴 England\r\n // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint\r\n // http://emojipedia.org/variation-selector-16/\r\n // > An invisible codepoint which specifies that the preceding character\r\n // > should be displayed with emoji presentation. Only required if the\r\n // > preceding character defaults to text presentation.\r\n if (/\\uFE0F/.test(potentialEmojiInput) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsEmoji(potentialEmojiInput)) {\r\n return {\r\n text: potentialEmojiInput,\r\n replacePrevCharCnt: 0,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n }\r\n }\r\n if (currentSelectionStart === currentSelectionEnd) {\r\n // composition accept case (noticed in FF + Japanese)\r\n // [blahblah] => blahblah|\r\n if (previousValue === currentValue\r\n && previousSelectionStart === 0\r\n && previousSelectionEnd === previousValue.length\r\n && currentSelectionStart === currentValue.length\r\n && currentValue.indexOf('\\n') === -1) {\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsFullWidthCharacter(currentValue)) {\r\n return {\r\n text: '',\r\n replacePrevCharCnt: 0,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n }\r\n // no current selection\r\n const replacePreviousCharacters = (previousPrefix.length - prefixLength);\r\n if (_debugComposition) {\r\n console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars');\r\n }\r\n return {\r\n text: currentValue,\r\n replacePrevCharCnt: replacePreviousCharacters,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n // there is a current selection => composition case\r\n const replacePreviousCharacters = previousSelectionEnd - previousSelectionStart;\r\n return {\r\n text: currentValue,\r\n replacePrevCharCnt: replacePreviousCharacters,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n static deduceAndroidCompositionInput(previousState, currentState) {\r\n if (!previousState) {\r\n // This is the EMPTY state\r\n return {\r\n text: '',\r\n replacePrevCharCnt: 0,\r\n replaceNextCharCnt: 0,\r\n positionDelta: 0\r\n };\r\n }\r\n if (_debugComposition) {\r\n console.log('------------------------deduceAndroidCompositionInput');\r\n console.log('PREVIOUS STATE: ' + previousState.toString());\r\n console.log('CURRENT STATE: ' + currentState.toString());\r\n }\r\n if (previousState.value === currentState.value) {\r\n return {\r\n text: '',\r\n replacePrevCharCnt: 0,\r\n replaceNextCharCnt: 0,\r\n positionDelta: currentState.selectionEnd - previousState.selectionEnd\r\n };\r\n }\r\n const prefixLength = Math.min(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.commonPrefixLength(previousState.value, currentState.value), previousState.selectionEnd);\r\n const suffixLength = Math.min(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.commonSuffixLength(previousState.value, currentState.value), previousState.value.length - previousState.selectionEnd);\r\n const previousValue = previousState.value.substring(prefixLength, previousState.value.length - suffixLength);\r\n const currentValue = currentState.value.substring(prefixLength, currentState.value.length - suffixLength);\r\n const previousSelectionStart = previousState.selectionStart - prefixLength;\r\n const previousSelectionEnd = previousState.selectionEnd - prefixLength;\r\n const currentSelectionStart = currentState.selectionStart - prefixLength;\r\n const currentSelectionEnd = currentState.selectionEnd - prefixLength;\r\n if (_debugComposition) {\r\n console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd);\r\n console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd);\r\n }\r\n return {\r\n text: currentValue,\r\n replacePrevCharCnt: previousSelectionEnd,\r\n replaceNextCharCnt: previousValue.length - previousSelectionEnd,\r\n positionDelta: currentSelectionEnd - currentValue.length\r\n };\r\n }\r\n}\r\nTextAreaState.EMPTY = new TextAreaState('', 0, 0, null, null);\r\nclass PagedScreenReaderStrategy {\r\n static _getPageOfLine(lineNumber, linesPerPage) {\r\n return Math.floor((lineNumber - 1) / linesPerPage);\r\n }\r\n static _getRangeForPage(page, linesPerPage) {\r\n const offset = page * linesPerPage;\r\n const startLineNumber = offset + 1;\r\n const endLineNumber = offset + linesPerPage;\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, 1, endLineNumber + 1, 1);\r\n }\r\n static fromEditorSelection(previousState, model, selection, linesPerPage, trimLongText) {\r\n const selectionStartPage = PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber, linesPerPage);\r\n const selectionStartPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionStartPage, linesPerPage);\r\n const selectionEndPage = PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber, linesPerPage);\r\n const selectionEndPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionEndPage, linesPerPage);\r\n const pretextRange = selectionStartPageRange.intersectRanges(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(1, 1, selection.startLineNumber, selection.startColumn));\r\n let pretext = model.getValueInRange(pretextRange, 1 /* LF */);\r\n const lastLine = model.getLineCount();\r\n const lastLineMaxColumn = model.getLineMaxColumn(lastLine);\r\n const posttextRange = selectionEndPageRange.intersectRanges(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn));\r\n let posttext = model.getValueInRange(posttextRange, 1 /* LF */);\r\n let text;\r\n if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) {\r\n // take full selection\r\n text = model.getValueInRange(selection, 1 /* LF */);\r\n }\r\n else {\r\n const selectionRange1 = selectionStartPageRange.intersectRanges(selection);\r\n const selectionRange2 = selectionEndPageRange.intersectRanges(selection);\r\n text = (model.getValueInRange(selectionRange1, 1 /* LF */)\r\n + String.fromCharCode(8230)\r\n + model.getValueInRange(selectionRange2, 1 /* LF */));\r\n }\r\n // Chromium handles very poorly text even of a few thousand chars\r\n // Cut text to avoid stalling the entire UI\r\n if (trimLongText) {\r\n const LIMIT_CHARS = 500;\r\n if (pretext.length > LIMIT_CHARS) {\r\n pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length);\r\n }\r\n if (posttext.length > LIMIT_CHARS) {\r\n posttext = posttext.substring(0, LIMIT_CHARS);\r\n }\r\n if (text.length > 2 * LIMIT_CHARS) {\r\n text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length);\r\n }\r\n }\r\n return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(selection.startLineNumber, selection.startColumn), new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(selection.endLineNumber, selection.endColumn));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorState\": () => (/* binding */ EditorState),\n/* harmony export */ \"EditorStateCancellationTokenSource\": () => (/* binding */ EditorStateCancellationTokenSource),\n/* harmony export */ \"TextModelCancellationTokenSource\": () => (/* binding */ TextModelCancellationTokenSource),\n/* harmony export */ \"StableEditorScrollState\": () => (/* binding */ StableEditorScrollState)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _keybindingCancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keybindingCancellation.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass EditorState {\r\n constructor(editor, flags) {\r\n this.flags = flags;\r\n if ((this.flags & 1 /* Value */) !== 0) {\r\n const model = editor.getModel();\r\n this.modelVersionId = model ? _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.format('{0}#{1}', model.uri.toString(), model.getVersionId()) : null;\r\n }\r\n else {\r\n this.modelVersionId = null;\r\n }\r\n if ((this.flags & 4 /* Position */) !== 0) {\r\n this.position = editor.getPosition();\r\n }\r\n else {\r\n this.position = null;\r\n }\r\n if ((this.flags & 2 /* Selection */) !== 0) {\r\n this.selection = editor.getSelection();\r\n }\r\n else {\r\n this.selection = null;\r\n }\r\n if ((this.flags & 8 /* Scroll */) !== 0) {\r\n this.scrollLeft = editor.getScrollLeft();\r\n this.scrollTop = editor.getScrollTop();\r\n }\r\n else {\r\n this.scrollLeft = -1;\r\n this.scrollTop = -1;\r\n }\r\n }\r\n _equals(other) {\r\n if (!(other instanceof EditorState)) {\r\n return false;\r\n }\r\n const state = other;\r\n if (this.modelVersionId !== state.modelVersionId) {\r\n return false;\r\n }\r\n if (this.scrollLeft !== state.scrollLeft || this.scrollTop !== state.scrollTop) {\r\n return false;\r\n }\r\n if (!this.position && state.position || this.position && !state.position || this.position && state.position && !this.position.equals(state.position)) {\r\n return false;\r\n }\r\n if (!this.selection && state.selection || this.selection && !state.selection || this.selection && state.selection && !this.selection.equalsRange(state.selection)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n validate(editor) {\r\n return this._equals(new EditorState(editor, this.flags));\r\n }\r\n}\r\n/**\r\n * A cancellation token source that cancels when the editor changes as expressed\r\n * by the provided flags\r\n * @param range If provided, changes in position and selection within this range will not trigger cancellation\r\n */\r\nclass EditorStateCancellationTokenSource extends _keybindingCancellation_js__WEBPACK_IMPORTED_MODULE_4__.EditorKeybindingCancellationTokenSource {\r\n constructor(editor, flags, range, parent) {\r\n super(editor, parent);\r\n this.editor = editor;\r\n this._listener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n if (flags & 4 /* Position */) {\r\n this._listener.add(editor.onDidChangeCursorPosition(e => {\r\n if (!range || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.containsPosition(range, e.position)) {\r\n this.cancel();\r\n }\r\n }));\r\n }\r\n if (flags & 2 /* Selection */) {\r\n this._listener.add(editor.onDidChangeCursorSelection(e => {\r\n if (!range || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.containsRange(range, e.selection)) {\r\n this.cancel();\r\n }\r\n }));\r\n }\r\n if (flags & 8 /* Scroll */) {\r\n this._listener.add(editor.onDidScrollChange(_ => this.cancel()));\r\n }\r\n if (flags & 1 /* Value */) {\r\n this._listener.add(editor.onDidChangeModel(_ => this.cancel()));\r\n this._listener.add(editor.onDidChangeModelContent(_ => this.cancel()));\r\n }\r\n }\r\n dispose() {\r\n this._listener.dispose();\r\n super.dispose();\r\n }\r\n}\r\n/**\r\n * A cancellation token source that cancels when the provided model changes\r\n */\r\nclass TextModelCancellationTokenSource extends _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationTokenSource {\r\n constructor(model, parent) {\r\n super(parent);\r\n this._listener = model.onDidChangeContent(() => this.cancel());\r\n }\r\n dispose() {\r\n this._listener.dispose();\r\n super.dispose();\r\n }\r\n}\r\nclass StableEditorScrollState {\r\n constructor(_visiblePosition, _visiblePositionScrollDelta, _cursorPosition) {\r\n this._visiblePosition = _visiblePosition;\r\n this._visiblePositionScrollDelta = _visiblePositionScrollDelta;\r\n this._cursorPosition = _cursorPosition;\r\n }\r\n static capture(editor) {\r\n let visiblePosition = null;\r\n let visiblePositionScrollDelta = 0;\r\n if (editor.getScrollTop() !== 0) {\r\n const visibleRanges = editor.getVisibleRanges();\r\n if (visibleRanges.length > 0) {\r\n visiblePosition = visibleRanges[0].getStartPosition();\r\n const visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column);\r\n visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop;\r\n }\r\n }\r\n return new StableEditorScrollState(visiblePosition, visiblePositionScrollDelta, editor.getPosition());\r\n }\r\n restore(editor) {\r\n if (this._visiblePosition) {\r\n const visiblePositionScrollTop = editor.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column);\r\n editor.setScrollTop(visiblePositionScrollTop + this._visiblePositionScrollDelta);\r\n }\r\n }\r\n restoreRelativeVerticalPositionOfCursor(editor) {\r\n const currentCursorPosition = editor.getPosition();\r\n if (!this._cursorPosition || !currentCursorPosition) {\r\n return;\r\n }\r\n const offset = editor.getTopForLineNumber(currentCursorPosition.lineNumber) - editor.getTopForLineNumber(this._cursorPosition.lineNumber);\r\n editor.setScrollTop(editor.getScrollTop() + offset);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorKeybindingCancellationTokenSource\": () => (/* binding */ EditorKeybindingCancellationTokenSource)\n/* harmony export */ });\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst IEditorCancellationTokens = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__.createDecorator)('IEditorCancelService');\r\nconst ctxCancellableOperation = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('cancellableOperation', false, (0,_nls_js__WEBPACK_IMPORTED_MODULE_6__.localize)('cancellableOperation', 'Whether the editor runs a cancellable operation, e.g. like \\'Peek References\\''));\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_5__.registerSingleton)(IEditorCancellationTokens, class {\r\n constructor() {\r\n this._tokens = new WeakMap();\r\n }\r\n add(editor, cts) {\r\n let data = this._tokens.get(editor);\r\n if (!data) {\r\n data = editor.invokeWithinContext(accessor => {\r\n const key = ctxCancellableOperation.bindTo(accessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.IContextKeyService));\r\n const tokens = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_3__.LinkedList();\r\n return { key, tokens };\r\n });\r\n this._tokens.set(editor, data);\r\n }\r\n let removeFn;\r\n data.key.set(true);\r\n removeFn = data.tokens.push(cts);\r\n return () => {\r\n // remove w/o cancellation\r\n if (removeFn) {\r\n removeFn();\r\n data.key.set(!data.tokens.isEmpty());\r\n removeFn = undefined;\r\n }\r\n };\r\n }\r\n cancel(editor) {\r\n const data = this._tokens.get(editor);\r\n if (!data) {\r\n return;\r\n }\r\n // remove with cancellation\r\n const cts = data.tokens.pop();\r\n if (cts) {\r\n cts.cancel();\r\n data.key.set(!data.tokens.isEmpty());\r\n }\r\n }\r\n}, true);\r\nclass EditorKeybindingCancellationTokenSource extends _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationTokenSource {\r\n constructor(editor, parent) {\r\n super(parent);\r\n this.editor = editor;\r\n this._unregister = editor.invokeWithinContext(accessor => accessor.get(IEditorCancellationTokens).add(editor, this));\r\n }\r\n dispose() {\r\n this._unregister();\r\n super.dispose();\r\n }\r\n}\r\n(0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new class extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.EditorCommand {\r\n constructor() {\r\n super({\r\n id: 'editor.cancelOperation',\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */,\r\n primary: 9 /* Escape */\r\n },\r\n precondition: ctxCancellableOperation\r\n });\r\n }\r\n runEditorCommand(accessor, editor) {\r\n accessor.get(IEditorCancellationTokens).cancel(editor);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkdownRenderer\": () => (/* binding */ MarkdownRenderer)\n/* harmony export */ });\n/* harmony import */ var _base_browser_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/markdownRenderer.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/textToHtmlTokenizer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Markdown renderer that can render codeblocks with the editor mechanics. This\r\n * renderer should always be preferred.\r\n */\r\nlet MarkdownRenderer = class MarkdownRenderer {\r\n constructor(_options, _modeService, _openerService) {\r\n this._options = _options;\r\n this._modeService = _modeService;\r\n this._openerService = _openerService;\r\n this._onDidRenderAsync = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onDidRenderAsync = this._onDidRenderAsync.event;\r\n }\r\n dispose() {\r\n this._onDidRenderAsync.dispose();\r\n }\r\n render(markdown, options, markedOptions) {\r\n const disposeables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.DisposableStore();\r\n let element;\r\n if (!markdown) {\r\n element = document.createElement('span');\r\n }\r\n else {\r\n element = (0,_base_browser_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_0__.renderMarkdown)(markdown, Object.assign(Object.assign({}, this._getRenderOptions(disposeables)), options), markedOptions);\r\n }\r\n return {\r\n element,\r\n dispose: () => disposeables.dispose()\r\n };\r\n }\r\n _getRenderOptions(disposeables) {\r\n return {\r\n baseUrl: this._options.baseUrl,\r\n codeBlockRenderer: (languageAlias, value) => __awaiter(this, void 0, void 0, function* () {\r\n var _a, _b, _c, _d;\r\n // In markdown,\r\n // it is possible that we stumble upon language aliases (e.g.js instead of javascript)\r\n // it is possible no alias is given in which case we fall back to the current editor lang\r\n let modeId;\r\n if (languageAlias) {\r\n modeId = this._modeService.getModeIdForLanguageName(languageAlias);\r\n }\r\n else if (this._options.editor) {\r\n modeId = (_a = this._options.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getLanguageIdentifier().language;\r\n }\r\n if (!modeId) {\r\n modeId = 'plaintext';\r\n }\r\n this._modeService.triggerMode(modeId);\r\n const tokenization = (_b = yield _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.TokenizationRegistry.getPromise(modeId)) !== null && _b !== void 0 ? _b : undefined;\r\n const element = document.createElement('span');\r\n element.innerHTML = ((_d = (_c = MarkdownRenderer._ttpTokenizer) === null || _c === void 0 ? void 0 : _c.createHTML(value, tokenization)) !== null && _d !== void 0 ? _d : (0,_common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__.tokenizeToString)(value, tokenization));\r\n // use \"good\" font\r\n let fontFamily = this._options.codeBlockFontFamily;\r\n if (this._options.editor) {\r\n fontFamily = this._options.editor.getOption(38 /* fontInfo */).fontFamily;\r\n }\r\n if (fontFamily) {\r\n element.style.fontFamily = fontFamily;\r\n }\r\n return element;\r\n }),\r\n asyncRenderCallback: () => this._onDidRenderAsync.fire(),\r\n actionHandler: {\r\n callback: (content) => this._openerService.open(content, { fromUserGesture: true, allowContributedOpeners: true }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedError),\r\n disposeables\r\n }\r\n };\r\n }\r\n};\r\nMarkdownRenderer._ttpTokenizer = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('tokenizeToString', {\r\n createHTML(value, tokenizer) {\r\n return (0,_common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__.tokenizeToString)(value, tokenizer);\r\n }\r\n});\r\nMarkdownRenderer = __decorate([\r\n __param(1, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_2__.IModeService),\r\n __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_1__.IOpenerService)\r\n], MarkdownRenderer);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isCodeEditor\": () => (/* binding */ isCodeEditor),\n/* harmony export */ \"isDiffEditor\": () => (/* binding */ isDiffEditor),\n/* harmony export */ \"getCodeEditor\": () => (/* binding */ getCodeEditor)\n/* harmony export */ });\n/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/editorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n *@internal\r\n */\r\nfunction isCodeEditor(thing) {\r\n if (thing && typeof thing.getEditorType === 'function') {\r\n return thing.getEditorType() === _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__.EditorType.ICodeEditor;\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\n/**\r\n *@internal\r\n */\r\nfunction isDiffEditor(thing) {\r\n if (thing && typeof thing.getEditorType === 'function') {\r\n return thing.getEditorType() === _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__.EditorType.IDiffEditor;\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\n/**\r\n *@internal\r\n */\r\nfunction getCodeEditor(thing) {\r\n if (isCodeEditor(thing)) {\r\n return thing;\r\n }\r\n if (isDiffEditor(thing)) {\r\n return thing.getModifiedEditor();\r\n }\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PageCoordinates\": () => (/* binding */ PageCoordinates),\n/* harmony export */ \"ClientCoordinates\": () => (/* binding */ ClientCoordinates),\n/* harmony export */ \"EditorPagePosition\": () => (/* binding */ EditorPagePosition),\n/* harmony export */ \"createEditorPagePosition\": () => (/* binding */ createEditorPagePosition),\n/* harmony export */ \"EditorMouseEvent\": () => (/* binding */ EditorMouseEvent),\n/* harmony export */ \"EditorMouseEventFactory\": () => (/* binding */ EditorMouseEventFactory),\n/* harmony export */ \"EditorPointerEventFactory\": () => (/* binding */ EditorPointerEventFactory),\n/* harmony export */ \"GlobalEditorMouseMoveMonitor\": () => (/* binding */ GlobalEditorMouseMoveMonitor)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/browser/globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/browser/mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n/**\r\n * Coordinates relative to the whole document (e.g. mouse event's pageX and pageY)\r\n */\r\nclass PageCoordinates {\r\n constructor(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n toClientCoordinates() {\r\n return new ClientCoordinates(this.x - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollX, this.y - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollY);\r\n }\r\n}\r\n/**\r\n * Coordinates within the application's client area (i.e. origin is document's scroll position).\r\n *\r\n * For example, clicking in the top-left corner of the client area will\r\n * always result in a mouse event with a client.x value of 0, regardless\r\n * of whether the page is scrolled horizontally.\r\n */\r\nclass ClientCoordinates {\r\n constructor(clientX, clientY) {\r\n this.clientX = clientX;\r\n this.clientY = clientY;\r\n }\r\n toPageCoordinates() {\r\n return new PageCoordinates(this.clientX + _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollX, this.clientY + _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollY);\r\n }\r\n}\r\n/**\r\n * The position of the editor in the page.\r\n */\r\nclass EditorPagePosition {\r\n constructor(x, y, width, height) {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n }\r\n}\r\nfunction createEditorPagePosition(editorViewDomNode) {\r\n const editorPos = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.getDomNodePagePosition(editorViewDomNode);\r\n return new EditorPagePosition(editorPos.left, editorPos.top, editorPos.width, editorPos.height);\r\n}\r\nclass EditorMouseEvent extends _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardMouseEvent {\r\n constructor(e, editorViewDomNode) {\r\n super(e);\r\n this.pos = new PageCoordinates(this.posx, this.posy);\r\n this.editorPos = createEditorPagePosition(editorViewDomNode);\r\n }\r\n}\r\nclass EditorMouseEventFactory {\r\n constructor(editorViewDomNode) {\r\n this._editorViewDomNode = editorViewDomNode;\r\n }\r\n _create(e) {\r\n return new EditorMouseEvent(e, this._editorViewDomNode);\r\n }\r\n onContextMenu(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(target, 'contextmenu', (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onMouseUp(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(target, 'mouseup', (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onMouseDown(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(target, 'mousedown', (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onMouseLeave(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableNonBubblingMouseOutListener(target, (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onMouseMoveThrottled(target, callback, merger, minimumTimeMs) {\r\n const myMerger = (lastEvent, currentEvent) => {\r\n return merger(lastEvent, this._create(currentEvent));\r\n };\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableThrottledListener(target, 'mousemove', callback, myMerger, minimumTimeMs);\r\n }\r\n}\r\nclass EditorPointerEventFactory {\r\n constructor(editorViewDomNode) {\r\n this._editorViewDomNode = editorViewDomNode;\r\n }\r\n _create(e) {\r\n return new EditorMouseEvent(e, this._editorViewDomNode);\r\n }\r\n onPointerUp(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(target, 'pointerup', (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onPointerDown(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(target, 'pointerdown', (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onPointerLeave(target, callback) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableNonBubblingPointerOutListener(target, (e) => {\r\n callback(this._create(e));\r\n });\r\n }\r\n onPointerMoveThrottled(target, callback, merger, minimumTimeMs) {\r\n const myMerger = (lastEvent, currentEvent) => {\r\n return merger(lastEvent, this._create(currentEvent));\r\n };\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableThrottledListener(target, 'pointermove', callback, myMerger, minimumTimeMs);\r\n }\r\n}\r\nclass GlobalEditorMouseMoveMonitor extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editorViewDomNode) {\r\n super();\r\n this._editorViewDomNode = editorViewDomNode;\r\n this._globalMouseMoveMonitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__.GlobalMouseMoveMonitor());\r\n this._keydownListener = null;\r\n }\r\n startMonitoring(initialElement, initialButtons, merger, mouseMoveCallback, onStopCallback) {\r\n // Add a <<capture>> keydown event listener that will cancel the monitoring\r\n // if something other than a modifier key is pressed\r\n this._keydownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addStandardDisposableListener(document, 'keydown', (e) => {\r\n const kb = e.toKeybinding();\r\n if (kb.isModifierKey()) {\r\n // Allow modifier keys\r\n return;\r\n }\r\n this._globalMouseMoveMonitor.stopMonitoring(true, e.browserEvent);\r\n }, true);\r\n const myMerger = (lastEvent, currentEvent) => {\r\n return merger(lastEvent, new EditorMouseEvent(currentEvent, this._editorViewDomNode));\r\n };\r\n this._globalMouseMoveMonitor.startMonitoring(initialElement, initialButtons, myMerger, mouseMoveCallback, (e) => {\r\n this._keydownListener.dispose();\r\n onStopCallback(e);\r\n });\r\n }\r\n stopMonitoring() {\r\n this._globalMouseMoveMonitor.stopMonitoring(true);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Command\": () => (/* binding */ Command),\n/* harmony export */ \"MultiCommand\": () => (/* binding */ MultiCommand),\n/* harmony export */ \"ProxyCommand\": () => (/* binding */ ProxyCommand),\n/* harmony export */ \"EditorCommand\": () => (/* binding */ EditorCommand),\n/* harmony export */ \"EditorAction\": () => (/* binding */ EditorAction),\n/* harmony export */ \"MultiEditorAction\": () => (/* binding */ MultiEditorAction),\n/* harmony export */ \"registerModelAndPositionCommand\": () => (/* binding */ registerModelAndPositionCommand),\n/* harmony export */ \"registerModelCommand\": () => (/* binding */ registerModelCommand),\n/* harmony export */ \"registerEditorCommand\": () => (/* binding */ registerEditorCommand),\n/* harmony export */ \"registerEditorAction\": () => (/* binding */ registerEditorAction),\n/* harmony export */ \"registerMultiEditorAction\": () => (/* binding */ registerMultiEditorAction),\n/* harmony export */ \"registerInstantiatedEditorAction\": () => (/* binding */ registerInstantiatedEditorAction),\n/* harmony export */ \"registerEditorContribution\": () => (/* binding */ registerEditorContribution),\n/* harmony export */ \"EditorExtensionsRegistry\": () => (/* binding */ EditorExtensionsRegistry),\n/* harmony export */ \"UndoCommand\": () => (/* binding */ UndoCommand),\n/* harmony export */ \"RedoCommand\": () => (/* binding */ RedoCommand),\n/* harmony export */ \"SelectAllCommand\": () => (/* binding */ SelectAllCommand)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../platform/telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass Command {\r\n constructor(opts) {\r\n this.id = opts.id;\r\n this.precondition = opts.precondition;\r\n this._kbOpts = opts.kbOpts;\r\n this._menuOpts = opts.menuOpts;\r\n this._description = opts.description;\r\n }\r\n register() {\r\n if (Array.isArray(this._menuOpts)) {\r\n this._menuOpts.forEach(this._registerMenuItem, this);\r\n }\r\n else if (this._menuOpts) {\r\n this._registerMenuItem(this._menuOpts);\r\n }\r\n if (this._kbOpts) {\r\n let kbWhen = this._kbOpts.kbExpr;\r\n if (this.precondition) {\r\n if (kbWhen) {\r\n kbWhen = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.ContextKeyExpr.and(kbWhen, this.precondition);\r\n }\r\n else {\r\n kbWhen = this.precondition;\r\n }\r\n }\r\n _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_9__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: this.id,\r\n handler: (accessor, args) => this.runCommand(accessor, args),\r\n weight: this._kbOpts.weight,\r\n args: this._kbOpts.args,\r\n when: kbWhen,\r\n primary: this._kbOpts.primary,\r\n secondary: this._kbOpts.secondary,\r\n win: this._kbOpts.win,\r\n linux: this._kbOpts.linux,\r\n mac: this._kbOpts.mac,\r\n description: this._description\r\n });\r\n }\r\n else {\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__.CommandsRegistry.registerCommand({\r\n id: this.id,\r\n handler: (accessor, args) => this.runCommand(accessor, args),\r\n description: this._description\r\n });\r\n }\r\n }\r\n _registerMenuItem(item) {\r\n _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuRegistry.appendMenuItem(item.menuId, {\r\n group: item.group,\r\n command: {\r\n id: this.id,\r\n title: item.title,\r\n icon: item.icon,\r\n precondition: this.precondition\r\n },\r\n when: item.when,\r\n order: item.order\r\n });\r\n }\r\n}\r\nclass MultiCommand extends Command {\r\n constructor() {\r\n super(...arguments);\r\n this._implementations = [];\r\n }\r\n /**\r\n * A higher priority gets to be looked at first\r\n */\r\n addImplementation(priority, implementation) {\r\n this._implementations.push([priority, implementation]);\r\n this._implementations.sort((a, b) => b[0] - a[0]);\r\n return {\r\n dispose: () => {\r\n for (let i = 0; i < this._implementations.length; i++) {\r\n if (this._implementations[i][1] === implementation) {\r\n this._implementations.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n }\r\n runCommand(accessor, args) {\r\n for (const impl of this._implementations) {\r\n const result = impl[1](accessor, args);\r\n if (result) {\r\n if (typeof result === 'boolean') {\r\n return;\r\n }\r\n return result;\r\n }\r\n }\r\n }\r\n}\r\n//#endregion\r\n/**\r\n * A command that delegates to another command's implementation.\r\n *\r\n * This lets different commands be registered but share the same implementation\r\n */\r\nclass ProxyCommand extends Command {\r\n constructor(command, opts) {\r\n super(opts);\r\n this.command = command;\r\n }\r\n runCommand(accessor, args) {\r\n return this.command.runCommand(accessor, args);\r\n }\r\n}\r\nclass EditorCommand extends Command {\r\n /**\r\n * Create a command class that is bound to a certain editor contribution.\r\n */\r\n static bindToContribution(controllerGetter) {\r\n return class EditorControllerCommandImpl extends EditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._callback = opts.handler;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n const controller = controllerGetter(editor);\r\n if (controller) {\r\n this._callback(controllerGetter(editor), args);\r\n }\r\n }\r\n };\r\n }\r\n runCommand(accessor, args) {\r\n const codeEditorService = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService);\r\n // Find the editor with text focus or active\r\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\r\n if (!editor) {\r\n // well, at least we tried...\r\n return;\r\n }\r\n return editor.invokeWithinContext((editorAccessor) => {\r\n const kbService = editorAccessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService);\r\n if (!kbService.contextMatchesRules((0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.withNullAsUndefined)(this.precondition))) {\r\n // precondition does not hold\r\n return;\r\n }\r\n return this.runEditorCommand(editorAccessor, editor, args);\r\n });\r\n }\r\n}\r\nclass EditorAction extends EditorCommand {\r\n constructor(opts) {\r\n super(EditorAction.convertOptions(opts));\r\n this.label = opts.label;\r\n this.alias = opts.alias;\r\n }\r\n static convertOptions(opts) {\r\n let menuOpts;\r\n if (Array.isArray(opts.menuOpts)) {\r\n menuOpts = opts.menuOpts;\r\n }\r\n else if (opts.menuOpts) {\r\n menuOpts = [opts.menuOpts];\r\n }\r\n else {\r\n menuOpts = [];\r\n }\r\n function withDefaults(item) {\r\n if (!item.menuId) {\r\n item.menuId = _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.EditorContext;\r\n }\r\n if (!item.title) {\r\n item.title = opts.label;\r\n }\r\n item.when = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.ContextKeyExpr.and(opts.precondition, item.when);\r\n return item;\r\n }\r\n if (Array.isArray(opts.contextMenuOpts)) {\r\n menuOpts.push(...opts.contextMenuOpts.map(withDefaults));\r\n }\r\n else if (opts.contextMenuOpts) {\r\n menuOpts.push(withDefaults(opts.contextMenuOpts));\r\n }\r\n opts.menuOpts = menuOpts;\r\n return opts;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n this.reportTelemetry(accessor, editor);\r\n return this.run(accessor, editor, args || {});\r\n }\r\n reportTelemetry(accessor, editor) {\r\n accessor.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__.ITelemetryService).publicLog2('editorActionInvoked', { name: this.label, id: this.id });\r\n }\r\n}\r\nclass MultiEditorAction extends EditorAction {\r\n constructor() {\r\n super(...arguments);\r\n this._implementations = [];\r\n }\r\n /**\r\n * A higher priority gets to be looked at first\r\n */\r\n addImplementation(priority, implementation) {\r\n this._implementations.push([priority, implementation]);\r\n this._implementations.sort((a, b) => b[0] - a[0]);\r\n return {\r\n dispose: () => {\r\n for (let i = 0; i < this._implementations.length; i++) {\r\n if (this._implementations[i][1] === implementation) {\r\n this._implementations.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n }\r\n run(accessor, editor, args) {\r\n for (const impl of this._implementations) {\r\n const result = impl[1](accessor, args);\r\n if (result) {\r\n if (typeof result === 'boolean') {\r\n return;\r\n }\r\n return result;\r\n }\r\n }\r\n }\r\n}\r\n//#endregion\r\n// --- Registration of commands and actions\r\nfunction registerModelAndPositionCommand(id, handler) {\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__.CommandsRegistry.registerCommand(id, function (accessor, ...args) {\r\n const [resource, position] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.isUri(resource));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.isIPosition(position));\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(resource);\r\n if (model) {\r\n const editorPosition = _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.lift(position);\r\n return handler(model, editorPosition, ...args.slice(2));\r\n }\r\n return accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_5__.ITextModelService).createModelReference(resource).then(reference => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n const result = handler(reference.object.textEditorModel, _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.lift(position), args.slice(2));\r\n resolve(result);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n }).finally(() => {\r\n reference.dispose();\r\n });\r\n });\r\n });\r\n}\r\nfunction registerModelCommand(id, handler) {\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__.CommandsRegistry.registerCommand(id, function (accessor, ...args) {\r\n const [resource] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.isUri(resource));\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(resource);\r\n if (model) {\r\n return handler(model, ...args.slice(1));\r\n }\r\n return accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_5__.ITextModelService).createModelReference(resource).then(reference => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n const result = handler(reference.object.textEditorModel, args.slice(1));\r\n resolve(result);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n }).finally(() => {\r\n reference.dispose();\r\n });\r\n });\r\n });\r\n}\r\nfunction registerEditorCommand(editorCommand) {\r\n EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand);\r\n return editorCommand;\r\n}\r\nfunction registerEditorAction(ctor) {\r\n const action = new ctor();\r\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\r\n return action;\r\n}\r\nfunction registerMultiEditorAction(action) {\r\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\r\n return action;\r\n}\r\nfunction registerInstantiatedEditorAction(editorAction) {\r\n EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction);\r\n}\r\nfunction registerEditorContribution(id, ctor) {\r\n EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor);\r\n}\r\nvar EditorExtensionsRegistry;\r\n(function (EditorExtensionsRegistry) {\r\n function getEditorCommand(commandId) {\r\n return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId);\r\n }\r\n EditorExtensionsRegistry.getEditorCommand = getEditorCommand;\r\n function getEditorActions() {\r\n return EditorContributionRegistry.INSTANCE.getEditorActions();\r\n }\r\n EditorExtensionsRegistry.getEditorActions = getEditorActions;\r\n function getEditorContributions() {\r\n return EditorContributionRegistry.INSTANCE.getEditorContributions();\r\n }\r\n EditorExtensionsRegistry.getEditorContributions = getEditorContributions;\r\n function getSomeEditorContributions(ids) {\r\n return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0);\r\n }\r\n EditorExtensionsRegistry.getSomeEditorContributions = getSomeEditorContributions;\r\n function getDiffEditorContributions() {\r\n return EditorContributionRegistry.INSTANCE.getDiffEditorContributions();\r\n }\r\n EditorExtensionsRegistry.getDiffEditorContributions = getDiffEditorContributions;\r\n})(EditorExtensionsRegistry || (EditorExtensionsRegistry = {}));\r\n// Editor extension points\r\nconst Extensions = {\r\n EditorCommonContributions: 'editor.contributions'\r\n};\r\nclass EditorContributionRegistry {\r\n constructor() {\r\n this.editorContributions = [];\r\n this.diffEditorContributions = [];\r\n this.editorActions = [];\r\n this.editorCommands = Object.create(null);\r\n }\r\n registerEditorContribution(id, ctor) {\r\n this.editorContributions.push({ id, ctor: ctor });\r\n }\r\n getEditorContributions() {\r\n return this.editorContributions.slice(0);\r\n }\r\n getDiffEditorContributions() {\r\n return this.diffEditorContributions.slice(0);\r\n }\r\n registerEditorAction(action) {\r\n action.register();\r\n this.editorActions.push(action);\r\n }\r\n getEditorActions() {\r\n return this.editorActions.slice(0);\r\n }\r\n registerEditorCommand(editorCommand) {\r\n editorCommand.register();\r\n this.editorCommands[editorCommand.id] = editorCommand;\r\n }\r\n getEditorCommand(commandId) {\r\n return (this.editorCommands[commandId] || null);\r\n }\r\n}\r\nEditorContributionRegistry.INSTANCE = new EditorContributionRegistry();\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.Registry.add(Extensions.EditorCommonContributions, EditorContributionRegistry.INSTANCE);\r\nfunction registerCommand(command) {\r\n command.register();\r\n return command;\r\n}\r\nconst UndoCommand = registerCommand(new MultiCommand({\r\n id: 'undo',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: 0 /* EditorCore */,\r\n primary: 2048 /* CtrlCmd */ | 56 /* KEY_Z */\r\n },\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.MenubarEditMenu,\r\n group: '1_do',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miUndo', comment: ['&& denotes a mnemonic'] }, \"&&Undo\"),\r\n order: 1\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('undo', \"Undo\"),\r\n order: 1\r\n }]\r\n}));\r\nregisterCommand(new ProxyCommand(UndoCommand, { id: 'default:undo', precondition: undefined }));\r\nconst RedoCommand = registerCommand(new MultiCommand({\r\n id: 'redo',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: 0 /* EditorCore */,\r\n primary: 2048 /* CtrlCmd */ | 55 /* KEY_Y */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */],\r\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */ }\r\n },\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.MenubarEditMenu,\r\n group: '1_do',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miRedo', comment: ['&& denotes a mnemonic'] }, \"&&Redo\"),\r\n order: 2\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('redo', \"Redo\"),\r\n order: 1\r\n }]\r\n}));\r\nregisterCommand(new ProxyCommand(RedoCommand, { id: 'default:redo', precondition: undefined }));\r\nconst SelectAllCommand = registerCommand(new MultiCommand({\r\n id: 'editor.action.selectAll',\r\n precondition: undefined,\r\n kbOpts: {\r\n weight: 0 /* EditorCore */,\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 31 /* KEY_A */\r\n },\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.MenubarSelectionMenu,\r\n group: '1_basic',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, \"&&Select All\"),\r\n order: 1\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('selectAll', \"Select All\"),\r\n order: 1\r\n }]\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractCodeEditorService\": () => (/* binding */ AbstractCodeEditorService)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass AbstractCodeEditorService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super();\r\n this._onCodeEditorAdd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onCodeEditorAdd = this._onCodeEditorAdd.event;\r\n this._onCodeEditorRemove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onCodeEditorRemove = this._onCodeEditorRemove.event;\r\n this._onDiffEditorAdd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this._onDiffEditorRemove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this._onDecorationTypeRegistered = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this._modelProperties = new Map();\r\n this._codeEditors = Object.create(null);\r\n this._diffEditors = Object.create(null);\r\n }\r\n addCodeEditor(editor) {\r\n this._codeEditors[editor.getId()] = editor;\r\n this._onCodeEditorAdd.fire(editor);\r\n }\r\n removeCodeEditor(editor) {\r\n if (delete this._codeEditors[editor.getId()]) {\r\n this._onCodeEditorRemove.fire(editor);\r\n }\r\n }\r\n listCodeEditors() {\r\n return Object.keys(this._codeEditors).map(id => this._codeEditors[id]);\r\n }\r\n addDiffEditor(editor) {\r\n this._diffEditors[editor.getId()] = editor;\r\n this._onDiffEditorAdd.fire(editor);\r\n }\r\n removeDiffEditor(editor) {\r\n if (delete this._diffEditors[editor.getId()]) {\r\n this._onDiffEditorRemove.fire(editor);\r\n }\r\n }\r\n listDiffEditors() {\r\n return Object.keys(this._diffEditors).map(id => this._diffEditors[id]);\r\n }\r\n getFocusedCodeEditor() {\r\n let editorWithWidgetFocus = null;\r\n const editors = this.listCodeEditors();\r\n for (const editor of editors) {\r\n if (editor.hasTextFocus()) {\r\n // bingo!\r\n return editor;\r\n }\r\n if (editor.hasWidgetFocus()) {\r\n editorWithWidgetFocus = editor;\r\n }\r\n }\r\n return editorWithWidgetFocus;\r\n }\r\n setModelProperty(resource, key, value) {\r\n const key1 = resource.toString();\r\n let dest;\r\n if (this._modelProperties.has(key1)) {\r\n dest = this._modelProperties.get(key1);\r\n }\r\n else {\r\n dest = new Map();\r\n this._modelProperties.set(key1, dest);\r\n }\r\n dest.set(key, value);\r\n }\r\n getModelProperty(resource, key) {\r\n const key1 = resource.toString();\r\n if (this._modelProperties.has(key1)) {\r\n const innerMap = this._modelProperties.get(key1);\r\n return innerMap.get(key);\r\n }\r\n return undefined;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IBulkEditService\": () => (/* binding */ IBulkEditService),\n/* harmony export */ \"ResourceEdit\": () => (/* binding */ ResourceEdit),\n/* harmony export */ \"ResourceTextEdit\": () => (/* binding */ ResourceTextEdit),\n/* harmony export */ \"ResourceFileEdit\": () => (/* binding */ ResourceFileEdit)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst IBulkEditService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('IWorkspaceEditService');\r\nfunction isWorkspaceFileEdit(thing) {\r\n return (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject)(thing) && (Boolean(thing.newUri) || Boolean(thing.oldUri));\r\n}\r\nfunction isWorkspaceTextEdit(thing) {\r\n return (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject)(thing) && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.isUri(thing.resource) && (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject)(thing.edit);\r\n}\r\nclass ResourceEdit {\r\n constructor(metadata) {\r\n this.metadata = metadata;\r\n }\r\n static convert(edit) {\r\n return edit.edits.map(edit => {\r\n if (isWorkspaceTextEdit(edit)) {\r\n return new ResourceTextEdit(edit.resource, edit.edit, edit.modelVersionId, edit.metadata);\r\n }\r\n if (isWorkspaceFileEdit(edit)) {\r\n return new ResourceFileEdit(edit.oldUri, edit.newUri, edit.options, edit.metadata);\r\n }\r\n throw new Error('Unsupported edit');\r\n });\r\n }\r\n}\r\nclass ResourceTextEdit extends ResourceEdit {\r\n constructor(resource, textEdit, versionId, metadata) {\r\n super(metadata);\r\n this.resource = resource;\r\n this.textEdit = textEdit;\r\n this.versionId = versionId;\r\n this.metadata = metadata;\r\n }\r\n}\r\nclass ResourceFileEdit extends ResourceEdit {\r\n constructor(oldResource, newResource, options, metadata) {\r\n super(metadata);\r\n this.oldResource = oldResource;\r\n this.newResource = newResource;\r\n this.options = options;\r\n this.metadata = metadata;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ICodeEditorService\": () => (/* binding */ ICodeEditorService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ICodeEditorService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('codeEditorService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RefCountedStyleSheet\": () => (/* binding */ RefCountedStyleSheet),\n/* harmony export */ \"GlobalStyleSheet\": () => (/* binding */ GlobalStyleSheet),\n/* harmony export */ \"CodeEditorServiceImpl\": () => (/* binding */ CodeEditorServiceImpl),\n/* harmony export */ \"DecorationSubTypeOptionsProvider\": () => (/* binding */ DecorationSubTypeOptionsProvider),\n/* harmony export */ \"DecorationTypeOptionsProvider\": () => (/* binding */ DecorationTypeOptionsProvider)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _abstractCodeEditorService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./abstractCodeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js\");\n/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass RefCountedStyleSheet {\r\n constructor(parent, editorId, styleSheet) {\r\n this._parent = parent;\r\n this._editorId = editorId;\r\n this._styleSheet = styleSheet;\r\n this._refCount = 0;\r\n }\r\n ref() {\r\n this._refCount++;\r\n }\r\n unref() {\r\n var _a;\r\n this._refCount--;\r\n if (this._refCount === 0) {\r\n (_a = this._styleSheet.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this._styleSheet);\r\n this._parent._removeEditorStyleSheets(this._editorId);\r\n }\r\n }\r\n insertRule(rule, index) {\r\n const sheet = this._styleSheet.sheet;\r\n sheet.insertRule(rule, index);\r\n }\r\n removeRulesContainingSelector(ruleName) {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.removeCSSRulesContainingSelector(ruleName, this._styleSheet);\r\n }\r\n}\r\nclass GlobalStyleSheet {\r\n constructor(styleSheet) {\r\n this._styleSheet = styleSheet;\r\n }\r\n ref() {\r\n }\r\n unref() {\r\n }\r\n insertRule(rule, index) {\r\n const sheet = this._styleSheet.sheet;\r\n sheet.insertRule(rule, index);\r\n }\r\n removeRulesContainingSelector(ruleName) {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.removeCSSRulesContainingSelector(ruleName, this._styleSheet);\r\n }\r\n}\r\nlet CodeEditorServiceImpl = class CodeEditorServiceImpl extends _abstractCodeEditorService_js__WEBPACK_IMPORTED_MODULE_4__.AbstractCodeEditorService {\r\n constructor(styleSheet, themeService) {\r\n super();\r\n this._decorationOptionProviders = new Map();\r\n this._editorStyleSheets = new Map();\r\n this._globalStyleSheet = styleSheet ? styleSheet : null;\r\n this._themeService = themeService;\r\n }\r\n _getOrCreateGlobalStyleSheet() {\r\n if (!this._globalStyleSheet) {\r\n this._globalStyleSheet = new GlobalStyleSheet(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.createStyleSheet());\r\n }\r\n return this._globalStyleSheet;\r\n }\r\n _getOrCreateStyleSheet(editor) {\r\n if (!editor) {\r\n return this._getOrCreateGlobalStyleSheet();\r\n }\r\n const domNode = editor.getContainerDomNode();\r\n if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.isInShadowDOM(domNode)) {\r\n return this._getOrCreateGlobalStyleSheet();\r\n }\r\n const editorId = editor.getId();\r\n if (!this._editorStyleSheets.has(editorId)) {\r\n const refCountedStyleSheet = new RefCountedStyleSheet(this, editorId, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.createStyleSheet(domNode));\r\n this._editorStyleSheets.set(editorId, refCountedStyleSheet);\r\n }\r\n return this._editorStyleSheets.get(editorId);\r\n }\r\n _removeEditorStyleSheets(editorId) {\r\n this._editorStyleSheets.delete(editorId);\r\n }\r\n registerDecorationType(key, options, parentTypeKey, editor) {\r\n let provider = this._decorationOptionProviders.get(key);\r\n if (!provider) {\r\n const styleSheet = this._getOrCreateStyleSheet(editor);\r\n const providerArgs = {\r\n styleSheet: styleSheet,\r\n key: key,\r\n parentTypeKey: parentTypeKey,\r\n options: options || Object.create(null)\r\n };\r\n if (!parentTypeKey) {\r\n provider = new DecorationTypeOptionsProvider(this._themeService, styleSheet, providerArgs);\r\n }\r\n else {\r\n provider = new DecorationSubTypeOptionsProvider(this._themeService, styleSheet, providerArgs);\r\n }\r\n this._decorationOptionProviders.set(key, provider);\r\n this._onDecorationTypeRegistered.fire(key);\r\n }\r\n provider.refCount++;\r\n }\r\n removeDecorationType(key) {\r\n const provider = this._decorationOptionProviders.get(key);\r\n if (provider) {\r\n provider.refCount--;\r\n if (provider.refCount <= 0) {\r\n this._decorationOptionProviders.delete(key);\r\n provider.dispose();\r\n this.listCodeEditors().forEach((ed) => ed.removeDecorations(key));\r\n }\r\n }\r\n }\r\n resolveDecorationOptions(decorationTypeKey, writable) {\r\n const provider = this._decorationOptionProviders.get(decorationTypeKey);\r\n if (!provider) {\r\n throw new Error('Unknown decoration type key: ' + decorationTypeKey);\r\n }\r\n return provider.getOptions(this, writable);\r\n }\r\n};\r\nCodeEditorServiceImpl = __decorate([\r\n __param(1, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__.IThemeService)\r\n], CodeEditorServiceImpl);\r\n\r\nclass DecorationSubTypeOptionsProvider {\r\n constructor(themeService, styleSheet, providerArgs) {\r\n this._styleSheet = styleSheet;\r\n this._styleSheet.ref();\r\n this._parentTypeKey = providerArgs.parentTypeKey;\r\n this.refCount = 0;\r\n this._beforeContentRules = new DecorationCSSRules(3 /* BeforeContentClassName */, providerArgs, themeService);\r\n this._afterContentRules = new DecorationCSSRules(4 /* AfterContentClassName */, providerArgs, themeService);\r\n }\r\n getOptions(codeEditorService, writable) {\r\n const options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true);\r\n if (this._beforeContentRules) {\r\n options.beforeContentClassName = this._beforeContentRules.className;\r\n }\r\n if (this._afterContentRules) {\r\n options.afterContentClassName = this._afterContentRules.className;\r\n }\r\n return options;\r\n }\r\n dispose() {\r\n if (this._beforeContentRules) {\r\n this._beforeContentRules.dispose();\r\n this._beforeContentRules = null;\r\n }\r\n if (this._afterContentRules) {\r\n this._afterContentRules.dispose();\r\n this._afterContentRules = null;\r\n }\r\n this._styleSheet.unref();\r\n }\r\n}\r\nclass DecorationTypeOptionsProvider {\r\n constructor(themeService, styleSheet, providerArgs) {\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._styleSheet = styleSheet;\r\n this._styleSheet.ref();\r\n this.refCount = 0;\r\n const createCSSRules = (type) => {\r\n const rules = new DecorationCSSRules(type, providerArgs, themeService);\r\n this._disposables.add(rules);\r\n if (rules.hasContent) {\r\n return rules.className;\r\n }\r\n return undefined;\r\n };\r\n const createInlineCSSRules = (type) => {\r\n const rules = new DecorationCSSRules(type, providerArgs, themeService);\r\n this._disposables.add(rules);\r\n if (rules.hasContent) {\r\n return { className: rules.className, hasLetterSpacing: rules.hasLetterSpacing };\r\n }\r\n return null;\r\n };\r\n this.className = createCSSRules(0 /* ClassName */);\r\n const inlineData = createInlineCSSRules(1 /* InlineClassName */);\r\n if (inlineData) {\r\n this.inlineClassName = inlineData.className;\r\n this.inlineClassNameAffectsLetterSpacing = inlineData.hasLetterSpacing;\r\n }\r\n this.beforeContentClassName = createCSSRules(3 /* BeforeContentClassName */);\r\n this.afterContentClassName = createCSSRules(4 /* AfterContentClassName */);\r\n this.glyphMarginClassName = createCSSRules(2 /* GlyphMarginClassName */);\r\n const options = providerArgs.options;\r\n this.isWholeLine = Boolean(options.isWholeLine);\r\n this.stickiness = options.rangeBehavior;\r\n const lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor;\r\n const darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor;\r\n if (typeof lightOverviewRulerColor !== 'undefined'\r\n || typeof darkOverviewRulerColor !== 'undefined') {\r\n this.overviewRuler = {\r\n color: lightOverviewRulerColor || darkOverviewRulerColor,\r\n darkColor: darkOverviewRulerColor || lightOverviewRulerColor,\r\n position: options.overviewRulerLane || _common_model_js__WEBPACK_IMPORTED_MODULE_6__.OverviewRulerLane.Center\r\n };\r\n }\r\n }\r\n getOptions(codeEditorService, writable) {\r\n if (!writable) {\r\n return this;\r\n }\r\n return {\r\n inlineClassName: this.inlineClassName,\r\n beforeContentClassName: this.beforeContentClassName,\r\n afterContentClassName: this.afterContentClassName,\r\n className: this.className,\r\n glyphMarginClassName: this.glyphMarginClassName,\r\n isWholeLine: this.isWholeLine,\r\n overviewRuler: this.overviewRuler,\r\n stickiness: this.stickiness\r\n };\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._styleSheet.unref();\r\n }\r\n}\r\nconst _CSS_MAP = {\r\n color: 'color:{0} !important;',\r\n opacity: 'opacity:{0};',\r\n backgroundColor: 'background-color:{0};',\r\n outline: 'outline:{0};',\r\n outlineColor: 'outline-color:{0};',\r\n outlineStyle: 'outline-style:{0};',\r\n outlineWidth: 'outline-width:{0};',\r\n border: 'border:{0};',\r\n borderColor: 'border-color:{0};',\r\n borderRadius: 'border-radius:{0};',\r\n borderSpacing: 'border-spacing:{0};',\r\n borderStyle: 'border-style:{0};',\r\n borderWidth: 'border-width:{0};',\r\n fontStyle: 'font-style:{0};',\r\n fontWeight: 'font-weight:{0};',\r\n fontSize: 'font-size:{0};',\r\n fontFamily: 'font-family:{0};',\r\n textDecoration: 'text-decoration:{0};',\r\n cursor: 'cursor:{0};',\r\n letterSpacing: 'letter-spacing:{0};',\r\n gutterIconPath: 'background:{0} center center no-repeat;',\r\n gutterIconSize: 'background-size:{0};',\r\n contentText: 'content:\\'{0}\\';',\r\n contentIconPath: 'content:{0};',\r\n margin: 'margin:{0};',\r\n padding: 'padding:{0};',\r\n width: 'width:{0};',\r\n height: 'height:{0};'\r\n};\r\nclass DecorationCSSRules {\r\n constructor(ruleType, providerArgs, themeService) {\r\n this._theme = themeService.getColorTheme();\r\n this._ruleType = ruleType;\r\n this._providerArgs = providerArgs;\r\n this._usesThemeColors = false;\r\n this._hasContent = false;\r\n this._hasLetterSpacing = false;\r\n let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType);\r\n if (this._providerArgs.parentTypeKey) {\r\n className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType);\r\n }\r\n this._className = className;\r\n this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType);\r\n this._buildCSS();\r\n if (this._usesThemeColors) {\r\n this._themeListener = themeService.onDidColorThemeChange(theme => {\r\n this._theme = themeService.getColorTheme();\r\n this._removeCSS();\r\n this._buildCSS();\r\n });\r\n }\r\n else {\r\n this._themeListener = null;\r\n }\r\n }\r\n dispose() {\r\n if (this._hasContent) {\r\n this._removeCSS();\r\n this._hasContent = false;\r\n }\r\n if (this._themeListener) {\r\n this._themeListener.dispose();\r\n this._themeListener = null;\r\n }\r\n }\r\n get hasContent() {\r\n return this._hasContent;\r\n }\r\n get hasLetterSpacing() {\r\n return this._hasLetterSpacing;\r\n }\r\n get className() {\r\n return this._className;\r\n }\r\n _buildCSS() {\r\n const options = this._providerArgs.options;\r\n let unthemedCSS, lightCSS, darkCSS;\r\n switch (this._ruleType) {\r\n case 0 /* ClassName */:\r\n unthemedCSS = this.getCSSTextForModelDecorationClassName(options);\r\n lightCSS = this.getCSSTextForModelDecorationClassName(options.light);\r\n darkCSS = this.getCSSTextForModelDecorationClassName(options.dark);\r\n break;\r\n case 1 /* InlineClassName */:\r\n unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options);\r\n lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light);\r\n darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark);\r\n break;\r\n case 2 /* GlyphMarginClassName */:\r\n unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options);\r\n lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light);\r\n darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark);\r\n break;\r\n case 3 /* BeforeContentClassName */:\r\n unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before);\r\n lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before);\r\n darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before);\r\n break;\r\n case 4 /* AfterContentClassName */:\r\n unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after);\r\n lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after);\r\n darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after);\r\n break;\r\n default:\r\n throw new Error('Unknown rule type: ' + this._ruleType);\r\n }\r\n const sheet = this._providerArgs.styleSheet;\r\n let hasContent = false;\r\n if (unthemedCSS.length > 0) {\r\n sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0);\r\n hasContent = true;\r\n }\r\n if (lightCSS.length > 0) {\r\n sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0);\r\n hasContent = true;\r\n }\r\n if (darkCSS.length > 0) {\r\n sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0);\r\n hasContent = true;\r\n }\r\n this._hasContent = hasContent;\r\n }\r\n _removeCSS() {\r\n this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector);\r\n }\r\n /**\r\n * Build the CSS for decorations styled via `className`.\r\n */\r\n getCSSTextForModelDecorationClassName(opts) {\r\n if (!opts) {\r\n return '';\r\n }\r\n const cssTextArr = [];\r\n this.collectCSSText(opts, ['backgroundColor'], cssTextArr);\r\n this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr);\r\n this.collectBorderSettingsCSSText(opts, cssTextArr);\r\n return cssTextArr.join('');\r\n }\r\n /**\r\n * Build the CSS for decorations styled via `inlineClassName`.\r\n */\r\n getCSSTextForModelDecorationInlineClassName(opts) {\r\n if (!opts) {\r\n return '';\r\n }\r\n const cssTextArr = [];\r\n this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'cursor', 'color', 'opacity', 'letterSpacing'], cssTextArr);\r\n if (opts.letterSpacing) {\r\n this._hasLetterSpacing = true;\r\n }\r\n return cssTextArr.join('');\r\n }\r\n /**\r\n * Build the CSS for decorations styled before or after content.\r\n */\r\n getCSSTextForModelDecorationContentClassName(opts) {\r\n if (!opts) {\r\n return '';\r\n }\r\n const cssTextArr = [];\r\n if (typeof opts !== 'undefined') {\r\n this.collectBorderSettingsCSSText(opts, cssTextArr);\r\n if (typeof opts.contentIconPath !== 'undefined') {\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format(_CSS_MAP.contentIconPath, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.asCSSUrl(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.revive(opts.contentIconPath))));\r\n }\r\n if (typeof opts.contentText === 'string') {\r\n const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line\r\n const escaped = truncated.replace(/['\\\\]/g, '\\\\$&');\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format(_CSS_MAP.contentText, escaped));\r\n }\r\n this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin', 'padding'], cssTextArr);\r\n if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) {\r\n cssTextArr.push('display:inline-block;');\r\n }\r\n }\r\n return cssTextArr.join('');\r\n }\r\n /**\r\n * Build the CSS for decorations styled via `glpyhMarginClassName`.\r\n */\r\n getCSSTextForModelDecorationGlyphMarginClassName(opts) {\r\n if (!opts) {\r\n return '';\r\n }\r\n const cssTextArr = [];\r\n if (typeof opts.gutterIconPath !== 'undefined') {\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format(_CSS_MAP.gutterIconPath, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.asCSSUrl(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.revive(opts.gutterIconPath))));\r\n if (typeof opts.gutterIconSize !== 'undefined') {\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize));\r\n }\r\n }\r\n return cssTextArr.join('');\r\n }\r\n collectBorderSettingsCSSText(opts, cssTextArr) {\r\n if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) {\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format('box-sizing: border-box;'));\r\n return true;\r\n }\r\n return false;\r\n }\r\n collectCSSText(opts, properties, cssTextArr) {\r\n const lenBefore = cssTextArr.length;\r\n for (let property of properties) {\r\n const value = this.resolveValue(opts[property]);\r\n if (typeof value === 'string') {\r\n cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.format(_CSS_MAP[property], value));\r\n }\r\n }\r\n return cssTextArr.length !== lenBefore;\r\n }\r\n resolveValue(value) {\r\n if ((0,_common_editorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isThemeColor)(value)) {\r\n this._usesThemeColors = true;\r\n const color = this._theme.getColor(value.id);\r\n if (color) {\r\n return color.toString();\r\n }\r\n return 'transparent';\r\n }\r\n return value;\r\n }\r\n}\r\nclass CSSNameHelper {\r\n static getClassName(key, type) {\r\n return 'ced-' + key + '-' + type;\r\n }\r\n static getSelector(key, parentKey, ruleType) {\r\n let selector = '.monaco-editor .' + this.getClassName(key, ruleType);\r\n if (parentKey) {\r\n selector = selector + '.' + this.getClassName(parentKey, ruleType);\r\n }\r\n if (ruleType === 3 /* BeforeContentClassName */) {\r\n selector += '::before';\r\n }\r\n else if (ruleType === 4 /* AfterContentClassName */) {\r\n selector += '::after';\r\n }\r\n return selector;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerDecorationsContribution\": () => (/* binding */ MarkerDecorationsContribution)\n/* harmony export */ });\n/* harmony import */ var _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/services/markersDecorationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js\");\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\nlet MarkerDecorationsContribution = class MarkerDecorationsContribution {\r\n constructor(_editor, _markerDecorationsService) {\r\n // Doesn't do anything, just requires `IMarkerDecorationsService` to make sure it gets instantiated\r\n }\r\n dispose() {\r\n }\r\n};\r\nMarkerDecorationsContribution.ID = 'editor.contrib.markerDecorations';\r\nMarkerDecorationsContribution = __decorate([\r\n __param(1, _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_0__.IMarkerDecorationsService)\r\n], MarkerDecorationsContribution);\r\n\r\n(0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorContribution)(MarkerDecorationsContribution.ID, MarkerDecorationsContribution);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OpenerService\": () => (/* binding */ OpenerService)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/marshalling.js */ \"./node_modules/monaco-editor/esm/vs/base/common/marshalling.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/editor/common/editor.js */ \"./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet CommandOpener = class CommandOpener {\r\n constructor(_commandService) {\r\n this._commandService = _commandService;\r\n }\r\n open(target) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!(0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.command)) {\r\n return false;\r\n }\r\n // run command or bail out if command isn't known\r\n if (typeof target === 'string') {\r\n target = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_7__.URI.parse(target);\r\n }\r\n // execute as command\r\n let args = [];\r\n try {\r\n args = (0,_base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_4__.parse)(decodeURIComponent(target.query));\r\n }\r\n catch (_a) {\r\n // ignore and retry\r\n try {\r\n args = (0,_base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_4__.parse)(target.query);\r\n }\r\n catch (_b) {\r\n // ignore error\r\n }\r\n }\r\n if (!Array.isArray(args)) {\r\n args = [args];\r\n }\r\n yield this._commandService.executeCommand(target.path, ...args);\r\n return true;\r\n });\r\n }\r\n};\r\nCommandOpener = __decorate([\r\n __param(0, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_9__.ICommandService)\r\n], CommandOpener);\r\nlet EditorOpener = class EditorOpener {\r\n constructor(_editorService) {\r\n this._editorService = _editorService;\r\n }\r\n open(target, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (typeof target === 'string') {\r\n target = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_7__.URI.parse(target);\r\n }\r\n let selection = undefined;\r\n const match = /^L?(\\d+)(?:,(\\d+))?/.exec(target.fragment);\r\n if (match) {\r\n // support file:///some/file.js#73,84\r\n // support file:///some/file.js#L73\r\n selection = {\r\n startLineNumber: parseInt(match[1]),\r\n startColumn: match[2] ? parseInt(match[2]) : 1\r\n };\r\n // remove fragment\r\n target = target.with({ fragment: '' });\r\n }\r\n if (target.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.file) {\r\n target = (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__.normalizePath)(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\r\n }\r\n yield this._editorService.openCodeEditor({\r\n resource: target,\r\n options: Object.assign({ selection, context: (options === null || options === void 0 ? void 0 : options.fromUserGesture) ? _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_10__.EditorOpenContext.USER : _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_10__.EditorOpenContext.API }, options === null || options === void 0 ? void 0 : options.editorOptions)\r\n }, this._editorService.getFocusedCodeEditor(), options === null || options === void 0 ? void 0 : options.openToSide);\r\n return true;\r\n });\r\n }\r\n};\r\nEditorOpener = __decorate([\r\n __param(0, _codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__.ICodeEditorService)\r\n], EditorOpener);\r\nlet OpenerService = class OpenerService {\r\n constructor(editorService, commandService) {\r\n this._openers = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n this._validators = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n this._resolvers = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n this._resolvedUriTargets = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__.ResourceMap(uri => uri.with({ path: null, fragment: null, query: null }).toString());\r\n this._externalOpeners = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n // Default external opener is going through window.open()\r\n this._defaultExternalOpener = {\r\n openExternal: (href) => __awaiter(this, void 0, void 0, function* () {\r\n // ensure to open HTTP/HTTPS links into new windows\r\n // to not trigger a navigation. Any other link is\r\n // safe to be set as HREF to prevent a blank window\r\n // from opening.\r\n if ((0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(href, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.http) || (0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(href, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.https)) {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.windowOpenNoOpener(href);\r\n }\r\n else {\r\n window.location.href = href;\r\n }\r\n return true;\r\n })\r\n };\r\n // Default opener: any external, maito, http(s), command, and catch-all-editors\r\n this._openers.push({\r\n open: (target, options) => __awaiter(this, void 0, void 0, function* () {\r\n if ((options === null || options === void 0 ? void 0 : options.openExternal) || (0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.mailto) || (0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.http) || (0,_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_11__.matchesScheme)(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.https)) {\r\n // open externally\r\n yield this._doOpenExternal(target, options);\r\n return true;\r\n }\r\n return false;\r\n })\r\n });\r\n this._openers.push(new CommandOpener(commandService));\r\n this._openers.push(new EditorOpener(editorService));\r\n }\r\n registerOpener(opener) {\r\n const remove = this._openers.unshift(opener);\r\n return { dispose: remove };\r\n }\r\n registerValidator(validator) {\r\n const remove = this._validators.push(validator);\r\n return { dispose: remove };\r\n }\r\n registerExternalUriResolver(resolver) {\r\n const remove = this._resolvers.push(resolver);\r\n return { dispose: remove };\r\n }\r\n setDefaultExternalOpener(externalOpener) {\r\n this._defaultExternalOpener = externalOpener;\r\n }\r\n registerExternalOpener(opener) {\r\n const remove = this._externalOpeners.push(opener);\r\n return { dispose: remove };\r\n }\r\n open(target, options) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // check with contributed validators\r\n const targetURI = typeof target === 'string' ? _base_common_uri_js__WEBPACK_IMPORTED_MODULE_7__.URI.parse(target) : target;\r\n // validate against the original URI that this URI resolves to, if one exists\r\n const validationTarget = (_a = this._resolvedUriTargets.get(targetURI)) !== null && _a !== void 0 ? _a : targetURI;\r\n for (const validator of this._validators) {\r\n if (!(yield validator.shouldOpen(validationTarget))) {\r\n return false;\r\n }\r\n }\r\n // check with contributed openers\r\n for (const opener of this._openers) {\r\n const handled = yield opener.open(target, options);\r\n if (handled) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n }\r\n resolveExternalUri(resource, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n for (const resolver of this._resolvers) {\r\n const result = yield resolver.resolveExternalUri(resource, options);\r\n if (result) {\r\n if (!this._resolvedUriTargets.has(result.resolved)) {\r\n this._resolvedUriTargets.set(result.resolved, resource);\r\n }\r\n return result;\r\n }\r\n }\r\n return { resolved: resource, dispose: () => { } };\r\n });\r\n }\r\n _doOpenExternal(resource, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n //todo@jrieken IExternalUriResolver should support `uri: URI | string`\r\n const uri = typeof resource === 'string' ? _base_common_uri_js__WEBPACK_IMPORTED_MODULE_7__.URI.parse(resource) : resource;\r\n const { resolved } = yield this.resolveExternalUri(uri, options);\r\n let href;\r\n if (typeof resource === 'string' && uri.toString() === resolved.toString()) {\r\n // open the url-string AS IS\r\n href = resource;\r\n }\r\n else {\r\n // open URI using the toString(noEncode)+encodeURI-trick\r\n href = encodeURI(resolved.toString(true));\r\n }\r\n if (options === null || options === void 0 ? void 0 : options.allowContributedOpeners) {\r\n const preferredOpenerId = typeof (options === null || options === void 0 ? void 0 : options.allowContributedOpeners) === 'string' ? options === null || options === void 0 ? void 0 : options.allowContributedOpeners : undefined;\r\n for (const opener of this._externalOpeners) {\r\n const didOpen = yield opener.openExternal(href, {\r\n sourceUri: uri,\r\n preferredOpenerId,\r\n }, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None);\r\n if (didOpen) {\r\n return true;\r\n }\r\n }\r\n }\r\n return this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None);\r\n });\r\n }\r\n dispose() {\r\n this._validators.clear();\r\n }\r\n};\r\nOpenerService = __decorate([\r\n __param(0, _codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__.ICodeEditorService),\r\n __param(1, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_9__.ICommandService)\r\n], OpenerService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DOMLineBreaksComputerFactory\": () => (/* binding */ DOMLineBreaksComputerFactory)\n/* harmony export */ });\n/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\n\r\n\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('domLineBreaksComputer', { createHTML: value => value });\r\nclass DOMLineBreaksComputerFactory {\r\n static create() {\r\n return new DOMLineBreaksComputerFactory();\r\n }\r\n constructor() {\r\n }\r\n createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) {\r\n tabSize = tabSize | 0; //@perf\r\n wrappingColumn = +wrappingColumn; //@perf\r\n let requests = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n requests.push(lineText);\r\n },\r\n finalize: () => {\r\n return createLineBreaks(requests, fontInfo, tabSize, wrappingColumn, wrappingIndent);\r\n }\r\n };\r\n }\r\n}\r\nfunction createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wrappingIndent) {\r\n var _a;\r\n if (firstLineBreakColumn === -1) {\r\n const result = [];\r\n for (let i = 0, len = requests.length; i < len; i++) {\r\n result[i] = null;\r\n }\r\n return result;\r\n }\r\n const overallWidth = Math.round(firstLineBreakColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n // Cannot respect WrappingIndent.Indent and WrappingIndent.DeepIndent because that would require\r\n // two dom layouts, in order to first set the width of the first line, and then set the width of the wrapped lines\r\n if (wrappingIndent === 2 /* Indent */ || wrappingIndent === 3 /* DeepIndent */) {\r\n wrappingIndent = 1 /* Same */;\r\n }\r\n const containerDomNode = document.createElement('div');\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_2__.Configuration.applyFontInfoSlow(containerDomNode, fontInfo);\r\n const sb = (0,_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_0__.createStringBuilder)(10000);\r\n const firstNonWhitespaceIndices = [];\r\n const wrappedTextIndentLengths = [];\r\n const renderLineContents = [];\r\n const allCharOffsets = [];\r\n const allVisibleColumns = [];\r\n for (let i = 0; i < requests.length; i++) {\r\n const lineContent = requests[i];\r\n let firstNonWhitespaceIndex = 0;\r\n let wrappedTextIndentLength = 0;\r\n let width = overallWidth;\r\n if (wrappingIndent !== 0 /* None */) {\r\n firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(lineContent);\r\n if (firstNonWhitespaceIndex === -1) {\r\n // all whitespace line\r\n firstNonWhitespaceIndex = 0;\r\n }\r\n else {\r\n // Track existing indent\r\n for (let i = 0; i < firstNonWhitespaceIndex; i++) {\r\n const charWidth = (lineContent.charCodeAt(i) === 9 /* Tab */\r\n ? (tabSize - (wrappedTextIndentLength % tabSize))\r\n : 1);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n const indentWidth = Math.ceil(fontInfo.spaceWidth * wrappedTextIndentLength);\r\n // Force sticking to beginning of line if no character would fit except for the indentation\r\n if (indentWidth + fontInfo.typicalFullwidthCharacterWidth > overallWidth) {\r\n firstNonWhitespaceIndex = 0;\r\n wrappedTextIndentLength = 0;\r\n }\r\n else {\r\n width = overallWidth - indentWidth;\r\n }\r\n }\r\n }\r\n const renderLineContent = lineContent.substr(firstNonWhitespaceIndex);\r\n const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb);\r\n firstNonWhitespaceIndices[i] = firstNonWhitespaceIndex;\r\n wrappedTextIndentLengths[i] = wrappedTextIndentLength;\r\n renderLineContents[i] = renderLineContent;\r\n allCharOffsets[i] = tmp[0];\r\n allVisibleColumns[i] = tmp[1];\r\n }\r\n const html = sb.build();\r\n const trustedhtml = (_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(html)) !== null && _a !== void 0 ? _a : html;\r\n containerDomNode.innerHTML = trustedhtml;\r\n containerDomNode.style.position = 'absolute';\r\n containerDomNode.style.top = '10000';\r\n containerDomNode.style.wordWrap = 'break-word';\r\n document.body.appendChild(containerDomNode);\r\n let range = document.createRange();\r\n const lineDomNodes = Array.prototype.slice.call(containerDomNode.children, 0);\r\n let result = [];\r\n for (let i = 0; i < requests.length; i++) {\r\n const lineDomNode = lineDomNodes[i];\r\n const breakOffsets = readLineBreaks(range, lineDomNode, renderLineContents[i], allCharOffsets[i]);\r\n if (breakOffsets === null) {\r\n result[i] = null;\r\n continue;\r\n }\r\n const firstNonWhitespaceIndex = firstNonWhitespaceIndices[i];\r\n const wrappedTextIndentLength = wrappedTextIndentLengths[i];\r\n const visibleColumns = allVisibleColumns[i];\r\n const breakOffsetsVisibleColumn = [];\r\n for (let j = 0, len = breakOffsets.length; j < len; j++) {\r\n breakOffsetsVisibleColumn[j] = visibleColumns[breakOffsets[j]];\r\n }\r\n if (firstNonWhitespaceIndex !== 0) {\r\n // All break offsets are relative to the renderLineContent, make them absolute again\r\n for (let j = 0, len = breakOffsets.length; j < len; j++) {\r\n breakOffsets[j] += firstNonWhitespaceIndex;\r\n }\r\n }\r\n result[i] = new _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_3__.LineBreakData(breakOffsets, breakOffsetsVisibleColumn, wrappedTextIndentLength);\r\n }\r\n document.body.removeChild(containerDomNode);\r\n return result;\r\n}\r\nfunction renderLine(lineContent, initialVisibleColumn, tabSize, width, sb) {\r\n sb.appendASCIIString('<div style=\"width:');\r\n sb.appendASCIIString(String(width));\r\n sb.appendASCIIString('px;\">');\r\n // if (containsRTL) {\r\n // \tsb.appendASCIIString('\" dir=\"ltr');\r\n // }\r\n const len = lineContent.length;\r\n let visibleColumn = initialVisibleColumn;\r\n let charOffset = 0;\r\n let charOffsets = [];\r\n let visibleColumns = [];\r\n let nextCharCode = (0 < len ? lineContent.charCodeAt(0) : 0 /* Null */);\r\n sb.appendASCIIString('<span>');\r\n for (let charIndex = 0; charIndex < len; charIndex++) {\r\n if (charIndex !== 0 && charIndex % 16384 /* SPAN_MODULO_LIMIT */ === 0) {\r\n sb.appendASCIIString('</span><span>');\r\n }\r\n charOffsets[charIndex] = charOffset;\r\n visibleColumns[charIndex] = visibleColumn;\r\n const charCode = nextCharCode;\r\n nextCharCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */);\r\n let producedCharacters = 1;\r\n let charWidth = 1;\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n producedCharacters = (tabSize - (visibleColumn % tabSize));\r\n charWidth = producedCharacters;\r\n for (let space = 1; space <= producedCharacters; space++) {\r\n if (space < producedCharacters) {\r\n sb.write1(0xA0); // \r\n }\r\n else {\r\n sb.appendASCII(32 /* Space */);\r\n }\r\n }\r\n break;\r\n case 32 /* Space */:\r\n if (nextCharCode === 32 /* Space */) {\r\n sb.write1(0xA0); // \r\n }\r\n else {\r\n sb.appendASCII(32 /* Space */);\r\n }\r\n break;\r\n case 60 /* LessThan */:\r\n sb.appendASCIIString('<');\r\n break;\r\n case 62 /* GreaterThan */:\r\n sb.appendASCIIString('>');\r\n break;\r\n case 38 /* Ampersand */:\r\n sb.appendASCIIString('&');\r\n break;\r\n case 0 /* Null */:\r\n sb.appendASCIIString('�');\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR */:\r\n case 8233 /* PARAGRAPH_SEPARATOR */:\r\n case 133 /* NEXT_LINE */:\r\n sb.write1(0xFFFD);\r\n break;\r\n default:\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isFullWidthCharacter(charCode)) {\r\n charWidth++;\r\n }\r\n if (charCode < 32) {\r\n sb.write1(9216 + charCode);\r\n }\r\n else {\r\n sb.write1(charCode);\r\n }\r\n }\r\n charOffset += producedCharacters;\r\n visibleColumn += charWidth;\r\n }\r\n sb.appendASCIIString('</span>');\r\n charOffsets[lineContent.length] = charOffset;\r\n visibleColumns[lineContent.length] = visibleColumn;\r\n sb.appendASCIIString('</div>');\r\n return [charOffsets, visibleColumns];\r\n}\r\nfunction readLineBreaks(range, lineDomNode, lineContent, charOffsets) {\r\n if (lineContent.length <= 1) {\r\n return null;\r\n }\r\n const spans = Array.prototype.slice.call(lineDomNode.children, 0);\r\n const breakOffsets = [];\r\n try {\r\n discoverBreaks(range, spans, charOffsets, 0, null, lineContent.length - 1, null, breakOffsets);\r\n }\r\n catch (err) {\r\n console.log(err);\r\n return null;\r\n }\r\n if (breakOffsets.length === 0) {\r\n return null;\r\n }\r\n breakOffsets.push(lineContent.length);\r\n return breakOffsets;\r\n}\r\nfunction discoverBreaks(range, spans, charOffsets, low, lowRects, high, highRects, result) {\r\n if (low === high) {\r\n return;\r\n }\r\n lowRects = lowRects || readClientRect(range, spans, charOffsets[low], charOffsets[low + 1]);\r\n highRects = highRects || readClientRect(range, spans, charOffsets[high], charOffsets[high + 1]);\r\n if (Math.abs(lowRects[0].top - highRects[0].top) <= 0.1) {\r\n // same line\r\n return;\r\n }\r\n // there is at least one line break between these two offsets\r\n if (low + 1 === high) {\r\n // the two characters are adjacent, so the line break must be exactly between them\r\n result.push(high);\r\n return;\r\n }\r\n const mid = low + ((high - low) / 2) | 0;\r\n const midRects = readClientRect(range, spans, charOffsets[mid], charOffsets[mid + 1]);\r\n discoverBreaks(range, spans, charOffsets, low, lowRects, mid, midRects, result);\r\n discoverBreaks(range, spans, charOffsets, mid, midRects, high, highRects, result);\r\n}\r\nfunction readClientRect(range, spans, startOffset, endOffset) {\r\n range.setStart(spans[(startOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, startOffset % 16384 /* SPAN_MODULO_LIMIT */);\r\n range.setEnd(spans[(endOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, endOffset % 16384 /* SPAN_MODULO_LIMIT */);\r\n return range.getClientRects();\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DynamicViewOverlay\": () => (/* binding */ DynamicViewOverlay)\n/* harmony export */ });\n/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass DynamicViewOverlay extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_0__.ViewEventHandler {\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewController\": () => (/* binding */ ViewController)\n/* harmony export */ });\n/* harmony import */ var _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../controller/coreCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass ViewController {\r\n constructor(configuration, viewModel, userInputEvents, commandDelegate) {\r\n this.configuration = configuration;\r\n this.viewModel = viewModel;\r\n this.userInputEvents = userInputEvents;\r\n this.commandDelegate = commandDelegate;\r\n }\r\n paste(text, pasteOnNewLine, multicursorText, mode) {\r\n this.commandDelegate.paste(text, pasteOnNewLine, multicursorText, mode);\r\n }\r\n type(text) {\r\n this.commandDelegate.type(text);\r\n }\r\n compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) {\r\n this.commandDelegate.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta);\r\n }\r\n compositionStart() {\r\n this.commandDelegate.startComposition();\r\n }\r\n compositionEnd() {\r\n this.commandDelegate.endComposition();\r\n }\r\n cut() {\r\n this.commandDelegate.cut();\r\n }\r\n setSelection(modelSelection) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel, {\r\n source: 'keyboard',\r\n selection: modelSelection\r\n });\r\n }\r\n _validateViewColumn(viewPosition) {\r\n const minColumn = this.viewModel.getLineMinColumn(viewPosition.lineNumber);\r\n if (viewPosition.column < minColumn) {\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(viewPosition.lineNumber, minColumn);\r\n }\r\n return viewPosition;\r\n }\r\n _hasMulticursorModifier(data) {\r\n switch (this.configuration.options.get(64 /* multiCursorModifier */)) {\r\n case 'altKey':\r\n return data.altKey;\r\n case 'ctrlKey':\r\n return data.ctrlKey;\r\n case 'metaKey':\r\n return data.metaKey;\r\n default:\r\n return false;\r\n }\r\n }\r\n _hasNonMulticursorModifier(data) {\r\n switch (this.configuration.options.get(64 /* multiCursorModifier */)) {\r\n case 'altKey':\r\n return data.ctrlKey || data.metaKey;\r\n case 'ctrlKey':\r\n return data.altKey || data.metaKey;\r\n case 'metaKey':\r\n return data.ctrlKey || data.altKey;\r\n default:\r\n return false;\r\n }\r\n }\r\n dispatchMouse(data) {\r\n const options = this.configuration.options;\r\n const selectionClipboardIsOn = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isLinux && options.get(91 /* selectionClipboard */));\r\n const columnSelection = options.get(15 /* columnSelection */);\r\n if (data.middleButton && !selectionClipboardIsOn) {\r\n this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);\r\n }\r\n else if (data.startedOnLineNumbers) {\r\n // If the dragging started on the gutter, then have operations work on the entire line\r\n if (this._hasMulticursorModifier(data)) {\r\n if (data.inSelectionMode) {\r\n this._lastCursorLineSelect(data.position);\r\n }\r\n else {\r\n this._createCursor(data.position, true);\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._lineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lineSelect(data.position);\r\n }\r\n }\r\n }\r\n else if (data.mouseDownCount >= 4) {\r\n this._selectAll();\r\n }\r\n else if (data.mouseDownCount === 3) {\r\n if (this._hasMulticursorModifier(data)) {\r\n if (data.inSelectionMode) {\r\n this._lastCursorLineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lastCursorLineSelect(data.position);\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._lineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lineSelect(data.position);\r\n }\r\n }\r\n }\r\n else if (data.mouseDownCount === 2) {\r\n if (this._hasMulticursorModifier(data)) {\r\n this._lastCursorWordSelect(data.position);\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._wordSelectDrag(data.position);\r\n }\r\n else {\r\n this._wordSelect(data.position);\r\n }\r\n }\r\n }\r\n else {\r\n if (this._hasMulticursorModifier(data)) {\r\n if (!this._hasNonMulticursorModifier(data)) {\r\n if (data.shiftKey) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n // Do multi-cursor operations only when purely alt is pressed\r\n if (data.inSelectionMode) {\r\n this._lastCursorMoveToSelect(data.position);\r\n }\r\n else {\r\n this._createCursor(data.position, false);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n if (data.altKey) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n if (columnSelection) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n this._moveToSelect(data.position);\r\n }\r\n }\r\n }\r\n else {\r\n this.moveTo(data.position);\r\n }\r\n }\r\n }\r\n }\r\n _usualArgs(viewPosition) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n return {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition\r\n };\r\n }\r\n moveTo(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _moveToSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _columnSelect(viewPosition, mouseColumn, doColumnSelect) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel, {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition,\r\n mouseColumn: mouseColumn,\r\n doColumnSelect: doColumnSelect\r\n });\r\n }\r\n _createCursor(viewPosition, wholeLine) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel, {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition,\r\n wholeLine: wholeLine\r\n });\r\n }\r\n _lastCursorMoveToSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _wordSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _wordSelectDrag(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorWordSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lineSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lineSelectDrag(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorLineSelect(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorLineSelectDrag(viewPosition) {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _selectAll() {\r\n _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel, { source: 'mouse' });\r\n }\r\n // ----------------------\r\n _convertViewToModelPosition(viewPosition) {\r\n return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition);\r\n }\r\n emitKeyDown(e) {\r\n this.userInputEvents.emitKeyDown(e);\r\n }\r\n emitKeyUp(e) {\r\n this.userInputEvents.emitKeyUp(e);\r\n }\r\n emitContextMenu(e) {\r\n this.userInputEvents.emitContextMenu(e);\r\n }\r\n emitMouseMove(e) {\r\n this.userInputEvents.emitMouseMove(e);\r\n }\r\n emitMouseLeave(e) {\r\n this.userInputEvents.emitMouseLeave(e);\r\n }\r\n emitMouseUp(e) {\r\n this.userInputEvents.emitMouseUp(e);\r\n }\r\n emitMouseDown(e) {\r\n this.userInputEvents.emitMouseDown(e);\r\n }\r\n emitMouseDrag(e) {\r\n this.userInputEvents.emitMouseDrag(e);\r\n }\r\n emitMouseDrop(e) {\r\n this.userInputEvents.emitMouseDrop(e);\r\n }\r\n emitMouseDropCanceled() {\r\n this.userInputEvents.emitMouseDropCanceled();\r\n }\r\n emitMouseWheel(e) {\r\n this.userInputEvents.emitMouseWheel(e);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"View\": () => (/* binding */ View)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _controller_pointerHandler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../controller/pointerHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js\");\n/* harmony import */ var _controller_textAreaHandler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../controller/textAreaHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js\");\n/* harmony import */ var _viewController_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./viewController.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js\");\n/* harmony import */ var _viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./viewUserInputEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js\");\n/* harmony import */ var _viewOverlays_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./viewOverlays.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js\");\n/* harmony import */ var _viewPart_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _viewParts_contentWidgets_contentWidgets_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../viewParts/contentWidgets/contentWidgets.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js\");\n/* harmony import */ var _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../viewParts/currentLineHighlight/currentLineHighlight.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js\");\n/* harmony import */ var _viewParts_decorations_decorations_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../viewParts/decorations/decorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js\");\n/* harmony import */ var _viewParts_editorScrollbar_editorScrollbar_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../viewParts/editorScrollbar/editorScrollbar.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js\");\n/* harmony import */ var _viewParts_glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../viewParts/glyphMargin/glyphMargin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js\");\n/* harmony import */ var _viewParts_indentGuides_indentGuides_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../viewParts/indentGuides/indentGuides.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js\");\n/* harmony import */ var _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../viewParts/lineNumbers/lineNumbers.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js\");\n/* harmony import */ var _viewParts_lines_viewLines_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../viewParts/lines/viewLines.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js\");\n/* harmony import */ var _viewParts_linesDecorations_linesDecorations_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../viewParts/linesDecorations/linesDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js\");\n/* harmony import */ var _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../viewParts/margin/margin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js\");\n/* harmony import */ var _viewParts_marginDecorations_marginDecorations_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../viewParts/marginDecorations/marginDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js\");\n/* harmony import */ var _viewParts_minimap_minimap_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../viewParts/minimap/minimap.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js\");\n/* harmony import */ var _viewParts_overlayWidgets_overlayWidgets_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../viewParts/overlayWidgets/overlayWidgets.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js\");\n/* harmony import */ var _viewParts_overviewRuler_decorationsOverviewRuler_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../viewParts/overviewRuler/decorationsOverviewRuler.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js\");\n/* harmony import */ var _viewParts_overviewRuler_overviewRuler_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../viewParts/overviewRuler/overviewRuler.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js\");\n/* harmony import */ var _viewParts_rulers_rulers_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../viewParts/rulers/rulers.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js\");\n/* harmony import */ var _viewParts_scrollDecoration_scrollDecoration_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../viewParts/scrollDecoration/scrollDecoration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js\");\n/* harmony import */ var _viewParts_selections_selections_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../viewParts/selections/selections.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js\");\n/* harmony import */ var _viewParts_viewCursors_viewCursors_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../viewParts/viewCursors/viewCursors.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js\");\n/* harmony import */ var _viewParts_viewZones_viewZones_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../viewParts/viewZones/viewZones.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../common/view/renderingContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js\");\n/* harmony import */ var _common_view_viewContext_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../common/view/viewContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js\");\n/* harmony import */ var _common_viewLayout_viewLinesViewportData_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../common/viewLayout/viewLinesViewportData.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js\");\n/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../controller/mouseTarget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass View extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_36__.ViewEventHandler {\r\n constructor(commandDelegate, configuration, themeService, model, userInputEvents, overflowWidgetsDomNode) {\r\n super();\r\n this._selections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_2__.Selection(1, 1, 1, 1)];\r\n this._renderAnimationFrame = null;\r\n const viewController = new _viewController_js__WEBPACK_IMPORTED_MODULE_7__.ViewController(configuration, model, userInputEvents, commandDelegate);\r\n // The view context is passed on to most classes (basically to reduce param. counts in ctors)\r\n this._context = new _common_view_viewContext_js__WEBPACK_IMPORTED_MODULE_34__.ViewContext(configuration, themeService.getColorTheme(), model);\r\n this._configPixelRatio = this._configPixelRatio = this._context.configuration.options.get(122 /* pixelRatio */);\r\n // Ensure the view is the first event handler in order to update the layout\r\n this._context.addEventHandler(this);\r\n this._register(themeService.onDidColorThemeChange(theme => {\r\n this._context.theme.update(theme);\r\n this._context.model.onDidColorThemeChange();\r\n this.render(true, false);\r\n }));\r\n this._viewParts = [];\r\n // Keyboard handler\r\n this._textAreaHandler = new _controller_textAreaHandler_js__WEBPACK_IMPORTED_MODULE_6__.TextAreaHandler(this._context, viewController, this._createTextAreaHandlerHelper());\r\n this._viewParts.push(this._textAreaHandler);\r\n // These two dom nodes must be constructed up front, since references are needed in the layout provider (scrolling & co.)\r\n this._linesContent = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this._linesContent.setClassName('lines-content' + ' monaco-editor-background');\r\n this._linesContent.setPosition('absolute');\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this.domNode.setClassName(this._getEditorClassName());\r\n // Set role 'code' for better screen reader support https://github.com/microsoft/vscode/issues/93438\r\n this.domNode.setAttribute('role', 'code');\r\n this._overflowGuardContainer = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n _viewPart_js__WEBPACK_IMPORTED_MODULE_10__.PartFingerprints.write(this._overflowGuardContainer, 3 /* OverflowGuard */);\r\n this._overflowGuardContainer.setClassName('overflow-guard');\r\n this._scrollbar = new _viewParts_editorScrollbar_editorScrollbar_js__WEBPACK_IMPORTED_MODULE_14__.EditorScrollbar(this._context, this._linesContent, this.domNode, this._overflowGuardContainer);\r\n this._viewParts.push(this._scrollbar);\r\n // View Lines\r\n this._viewLines = new _viewParts_lines_viewLines_js__WEBPACK_IMPORTED_MODULE_18__.ViewLines(this._context, this._linesContent);\r\n // View Zones\r\n this._viewZones = new _viewParts_viewZones_viewZones_js__WEBPACK_IMPORTED_MODULE_30__.ViewZones(this._context);\r\n this._viewParts.push(this._viewZones);\r\n // Decorations overview ruler\r\n const decorationsOverviewRuler = new _viewParts_overviewRuler_decorationsOverviewRuler_js__WEBPACK_IMPORTED_MODULE_24__.DecorationsOverviewRuler(this._context);\r\n this._viewParts.push(decorationsOverviewRuler);\r\n const scrollDecoration = new _viewParts_scrollDecoration_scrollDecoration_js__WEBPACK_IMPORTED_MODULE_27__.ScrollDecorationViewPart(this._context);\r\n this._viewParts.push(scrollDecoration);\r\n const contentViewOverlays = new _viewOverlays_js__WEBPACK_IMPORTED_MODULE_9__.ContentViewOverlays(this._context);\r\n this._viewParts.push(contentViewOverlays);\r\n contentViewOverlays.addDynamicOverlay(new _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_12__.CurrentLineHighlightOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new _viewParts_selections_selections_js__WEBPACK_IMPORTED_MODULE_28__.SelectionsOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new _viewParts_indentGuides_indentGuides_js__WEBPACK_IMPORTED_MODULE_16__.IndentGuidesOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new _viewParts_decorations_decorations_js__WEBPACK_IMPORTED_MODULE_13__.DecorationsOverlay(this._context));\r\n const marginViewOverlays = new _viewOverlays_js__WEBPACK_IMPORTED_MODULE_9__.MarginViewOverlays(this._context);\r\n this._viewParts.push(marginViewOverlays);\r\n marginViewOverlays.addDynamicOverlay(new _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_12__.CurrentLineMarginHighlightOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new _viewParts_glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_15__.GlyphMarginOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new _viewParts_marginDecorations_marginDecorations_js__WEBPACK_IMPORTED_MODULE_21__.MarginViewLineDecorationsOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new _viewParts_linesDecorations_linesDecorations_js__WEBPACK_IMPORTED_MODULE_19__.LinesDecorationsOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_17__.LineNumbersOverlay(this._context));\r\n const margin = new _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_20__.Margin(this._context);\r\n margin.getDomNode().appendChild(this._viewZones.marginDomNode);\r\n margin.getDomNode().appendChild(marginViewOverlays.getDomNode());\r\n this._viewParts.push(margin);\r\n // Content widgets\r\n this._contentWidgets = new _viewParts_contentWidgets_contentWidgets_js__WEBPACK_IMPORTED_MODULE_11__.ViewContentWidgets(this._context, this.domNode);\r\n this._viewParts.push(this._contentWidgets);\r\n this._viewCursors = new _viewParts_viewCursors_viewCursors_js__WEBPACK_IMPORTED_MODULE_29__.ViewCursors(this._context);\r\n this._viewParts.push(this._viewCursors);\r\n // Overlay widgets\r\n this._overlayWidgets = new _viewParts_overlayWidgets_overlayWidgets_js__WEBPACK_IMPORTED_MODULE_23__.ViewOverlayWidgets(this._context);\r\n this._viewParts.push(this._overlayWidgets);\r\n const rulers = new _viewParts_rulers_rulers_js__WEBPACK_IMPORTED_MODULE_26__.Rulers(this._context);\r\n this._viewParts.push(rulers);\r\n const minimap = new _viewParts_minimap_minimap_js__WEBPACK_IMPORTED_MODULE_22__.Minimap(this._context);\r\n this._viewParts.push(minimap);\r\n // -------------- Wire dom nodes up\r\n if (decorationsOverviewRuler) {\r\n const overviewRulerData = this._scrollbar.getOverviewRulerLayoutInfo();\r\n overviewRulerData.parent.insertBefore(decorationsOverviewRuler.getDomNode(), overviewRulerData.insertBefore);\r\n }\r\n this._linesContent.appendChild(contentViewOverlays.getDomNode());\r\n this._linesContent.appendChild(rulers.domNode);\r\n this._linesContent.appendChild(this._viewZones.domNode);\r\n this._linesContent.appendChild(this._viewLines.getDomNode());\r\n this._linesContent.appendChild(this._contentWidgets.domNode);\r\n this._linesContent.appendChild(this._viewCursors.getDomNode());\r\n this._overflowGuardContainer.appendChild(margin.getDomNode());\r\n this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode());\r\n this._overflowGuardContainer.appendChild(scrollDecoration.getDomNode());\r\n this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea);\r\n this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover);\r\n this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode());\r\n this._overflowGuardContainer.appendChild(minimap.getDomNode());\r\n this.domNode.appendChild(this._overflowGuardContainer);\r\n if (overflowWidgetsDomNode) {\r\n overflowWidgetsDomNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode);\r\n }\r\n else {\r\n this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode);\r\n }\r\n this._applyLayout();\r\n // Pointer handler\r\n this._pointerHandler = this._register(new _controller_pointerHandler_js__WEBPACK_IMPORTED_MODULE_5__.PointerHandler(this._context, viewController, this._createPointerHandlerHelper()));\r\n }\r\n _flushAccumulatedAndRenderNow() {\r\n this._renderNow();\r\n }\r\n _createPointerHandlerHelper() {\r\n return {\r\n viewDomNode: this.domNode.domNode,\r\n linesContentDomNode: this._linesContent.domNode,\r\n focusTextArea: () => {\r\n this.focus();\r\n },\r\n dispatchTextAreaEvent: (event) => {\r\n this._textAreaHandler.textArea.domNode.dispatchEvent(event);\r\n },\r\n getLastRenderData: () => {\r\n const lastViewCursorsRenderData = this._viewCursors.getLastRenderData() || [];\r\n const lastTextareaPosition = this._textAreaHandler.getLastRenderData();\r\n return new _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_38__.PointerHandlerLastRenderData(lastViewCursorsRenderData, lastTextareaPosition);\r\n },\r\n shouldSuppressMouseDownOnViewZone: (viewZoneId) => {\r\n return this._viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId);\r\n },\r\n shouldSuppressMouseDownOnWidget: (widgetId) => {\r\n return this._contentWidgets.shouldSuppressMouseDownOnWidget(widgetId);\r\n },\r\n getPositionFromDOMInfo: (spanNode, offset) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.getPositionFromDOMInfo(spanNode, offset);\r\n },\r\n visibleRangeForPosition: (lineNumber, column) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_31__.Position(lineNumber, column));\r\n },\r\n getLineWidth: (lineNumber) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.getLineWidth(lineNumber);\r\n }\r\n };\r\n }\r\n _createTextAreaHandlerHelper() {\r\n return {\r\n visibleRangeForPositionRelativeToEditor: (lineNumber, column) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_31__.Position(lineNumber, column));\r\n }\r\n };\r\n }\r\n _applyLayout() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this.domNode.setWidth(layoutInfo.width);\r\n this.domNode.setHeight(layoutInfo.height);\r\n this._overflowGuardContainer.setWidth(layoutInfo.width);\r\n this._overflowGuardContainer.setHeight(layoutInfo.height);\r\n this._linesContent.setWidth(1000000);\r\n this._linesContent.setHeight(1000000);\r\n }\r\n _getEditorClassName() {\r\n const focused = this._textAreaHandler.isFocused() ? ' focused' : '';\r\n return this._context.configuration.options.get(121 /* editorClassName */) + ' ' + (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_37__.getThemeTypeSelector)(this._context.theme.type) + focused;\r\n }\r\n // --- begin event handlers\r\n handleEvents(events) {\r\n super.handleEvents(events);\r\n this._scheduleRender();\r\n }\r\n onConfigurationChanged(e) {\r\n this._configPixelRatio = this._context.configuration.options.get(122 /* pixelRatio */);\r\n this.domNode.setClassName(this._getEditorClassName());\r\n this._applyLayout();\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n return false;\r\n }\r\n onFocusChanged(e) {\r\n this.domNode.setClassName(this._getEditorClassName());\r\n return false;\r\n }\r\n onThemeChanged(e) {\r\n this.domNode.setClassName(this._getEditorClassName());\r\n return false;\r\n }\r\n // --- end event handlers\r\n dispose() {\r\n if (this._renderAnimationFrame !== null) {\r\n this._renderAnimationFrame.dispose();\r\n this._renderAnimationFrame = null;\r\n }\r\n this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove();\r\n this._context.removeEventHandler(this);\r\n this._viewLines.dispose();\r\n // Destroy view parts\r\n for (const viewPart of this._viewParts) {\r\n viewPart.dispose();\r\n }\r\n super.dispose();\r\n }\r\n _scheduleRender() {\r\n if (this._renderAnimationFrame === null) {\r\n this._renderAnimationFrame = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this), 100);\r\n }\r\n }\r\n _onRenderScheduled() {\r\n this._renderAnimationFrame = null;\r\n this._flushAccumulatedAndRenderNow();\r\n }\r\n _renderNow() {\r\n safeInvokeNoArg(() => this._actualRender());\r\n }\r\n _getViewPartsToRender() {\r\n let result = [], resultLen = 0;\r\n for (const viewPart of this._viewParts) {\r\n if (viewPart.shouldRender()) {\r\n result[resultLen++] = viewPart;\r\n }\r\n }\r\n return result;\r\n }\r\n _actualRender() {\r\n if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.isInDOM(this.domNode.domNode)) {\r\n return;\r\n }\r\n let viewPartsToRender = this._getViewPartsToRender();\r\n if (!this._viewLines.shouldRender() && viewPartsToRender.length === 0) {\r\n // Nothing to render\r\n return;\r\n }\r\n const partialViewportData = this._context.viewLayout.getLinesViewportData();\r\n this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber);\r\n const viewportData = new _common_viewLayout_viewLinesViewportData_js__WEBPACK_IMPORTED_MODULE_35__.ViewportData(this._selections, partialViewportData, this._context.viewLayout.getWhitespaceViewportData(), this._context.model);\r\n if (this._contentWidgets.shouldRender()) {\r\n // Give the content widgets a chance to set their max width before a possible synchronous layout\r\n this._contentWidgets.onBeforeRender(viewportData);\r\n }\r\n if (this._viewLines.shouldRender()) {\r\n this._viewLines.renderText(viewportData);\r\n this._viewLines.onDidRender();\r\n // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again\r\n viewPartsToRender = this._getViewPartsToRender();\r\n }\r\n const renderingContext = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_33__.RenderingContext(this._context.viewLayout, viewportData, this._viewLines);\r\n // Render the rest of the parts\r\n for (const viewPart of viewPartsToRender) {\r\n viewPart.prepareRender(renderingContext);\r\n }\r\n for (const viewPart of viewPartsToRender) {\r\n viewPart.render(renderingContext);\r\n viewPart.onDidRender();\r\n }\r\n // Try to detect browser zooming and paint again if necessary\r\n if (Math.abs(_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__.getPixelRatio() - this._configPixelRatio) > 0.001) {\r\n // looks like the pixel ratio has changed\r\n this._context.configuration.updatePixelRatio();\r\n }\r\n }\r\n // --- BEGIN CodeEditor helpers\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n restoreState(scrollPosition) {\r\n this._context.model.setScrollPosition({ scrollTop: scrollPosition.scrollTop }, 1 /* Immediate */);\r\n this._context.model.tokenizeViewport();\r\n this._renderNow();\r\n this._viewLines.updateLineWidths();\r\n this._context.model.setScrollPosition({ scrollLeft: scrollPosition.scrollLeft }, 1 /* Immediate */);\r\n }\r\n getOffsetForColumn(modelLineNumber, modelColumn) {\r\n const modelPosition = this._context.model.validateModelPosition({\r\n lineNumber: modelLineNumber,\r\n column: modelColumn\r\n });\r\n const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n this._flushAccumulatedAndRenderNow();\r\n const visibleRange = this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_31__.Position(viewPosition.lineNumber, viewPosition.column));\r\n if (!visibleRange) {\r\n return -1;\r\n }\r\n return visibleRange.left;\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n const mouseTarget = this._pointerHandler.getTargetAtClientPoint(clientX, clientY);\r\n if (!mouseTarget) {\r\n return null;\r\n }\r\n return _viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_8__.ViewUserInputEvents.convertViewToModelMouseTarget(mouseTarget, this._context.model.coordinatesConverter);\r\n }\r\n createOverviewRuler(cssClassName) {\r\n return new _viewParts_overviewRuler_overviewRuler_js__WEBPACK_IMPORTED_MODULE_25__.OverviewRuler(this._context, cssClassName);\r\n }\r\n change(callback) {\r\n this._viewZones.changeViewZones(callback);\r\n this._scheduleRender();\r\n }\r\n render(now, everything) {\r\n if (everything) {\r\n // Force everything to render...\r\n this._viewLines.forceShouldRender();\r\n for (const viewPart of this._viewParts) {\r\n viewPart.forceShouldRender();\r\n }\r\n }\r\n if (now) {\r\n this._flushAccumulatedAndRenderNow();\r\n }\r\n else {\r\n this._scheduleRender();\r\n }\r\n }\r\n focus() {\r\n this._textAreaHandler.focusTextArea();\r\n }\r\n isFocused() {\r\n return this._textAreaHandler.isFocused();\r\n }\r\n setAriaOptions(options) {\r\n this._textAreaHandler.setAriaOptions(options);\r\n }\r\n addContentWidget(widgetData) {\r\n this._contentWidgets.addWidget(widgetData.widget);\r\n this.layoutContentWidget(widgetData);\r\n this._scheduleRender();\r\n }\r\n layoutContentWidget(widgetData) {\r\n let newRange = widgetData.position ? widgetData.position.range || null : null;\r\n if (newRange === null) {\r\n const newPosition = widgetData.position ? widgetData.position.position : null;\r\n if (newPosition !== null) {\r\n newRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_32__.Range(newPosition.lineNumber, newPosition.column, newPosition.lineNumber, newPosition.column);\r\n }\r\n }\r\n const newPreference = widgetData.position ? widgetData.position.preference : null;\r\n this._contentWidgets.setWidgetPosition(widgetData.widget, newRange, newPreference);\r\n this._scheduleRender();\r\n }\r\n removeContentWidget(widgetData) {\r\n this._contentWidgets.removeWidget(widgetData.widget);\r\n this._scheduleRender();\r\n }\r\n addOverlayWidget(widgetData) {\r\n this._overlayWidgets.addWidget(widgetData.widget);\r\n this.layoutOverlayWidget(widgetData);\r\n this._scheduleRender();\r\n }\r\n layoutOverlayWidget(widgetData) {\r\n const newPreference = widgetData.position ? widgetData.position.preference : null;\r\n const shouldRender = this._overlayWidgets.setWidgetPosition(widgetData.widget, newPreference);\r\n if (shouldRender) {\r\n this._scheduleRender();\r\n }\r\n }\r\n removeOverlayWidget(widgetData) {\r\n this._overlayWidgets.removeWidget(widgetData.widget);\r\n this._scheduleRender();\r\n }\r\n}\r\nfunction safeInvokeNoArg(func) {\r\n try {\r\n return func();\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError)(e);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RenderedLinesCollection\": () => (/* binding */ RenderedLinesCollection),\n/* harmony export */ \"VisibleLinesCollection\": () => (/* binding */ VisibleLinesCollection)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\nclass RenderedLinesCollection {\r\n constructor(createLine) {\r\n this._createLine = createLine;\r\n this._set(1, []);\r\n }\r\n flush() {\r\n this._set(1, []);\r\n }\r\n _set(rendLineNumberStart, lines) {\r\n this._lines = lines;\r\n this._rendLineNumberStart = rendLineNumberStart;\r\n }\r\n _get() {\r\n return {\r\n rendLineNumberStart: this._rendLineNumberStart,\r\n lines: this._lines\r\n };\r\n }\r\n /**\r\n * @returns Inclusive line number that is inside this collection\r\n */\r\n getStartLineNumber() {\r\n return this._rendLineNumberStart;\r\n }\r\n /**\r\n * @returns Inclusive line number that is inside this collection\r\n */\r\n getEndLineNumber() {\r\n return this._rendLineNumberStart + this._lines.length - 1;\r\n }\r\n getCount() {\r\n return this._lines.length;\r\n }\r\n getLine(lineNumber) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n if (lineIndex < 0 || lineIndex >= this._lines.length) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._lines[lineIndex];\r\n }\r\n /**\r\n * @returns Lines that were removed from this collection\r\n */\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return null;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n if (deleteToLineNumber < startLineNumber) {\r\n // deleting above the viewport\r\n const deleteCnt = deleteToLineNumber - deleteFromLineNumber + 1;\r\n this._rendLineNumberStart -= deleteCnt;\r\n return null;\r\n }\r\n if (deleteFromLineNumber > endLineNumber) {\r\n // deleted below the viewport\r\n return null;\r\n }\r\n // Record what needs to be deleted\r\n let deleteStartIndex = 0;\r\n let deleteCount = 0;\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n if (deleteFromLineNumber <= lineNumber && lineNumber <= deleteToLineNumber) {\r\n // this is a line to be deleted\r\n if (deleteCount === 0) {\r\n // this is the first line to be deleted\r\n deleteStartIndex = lineIndex;\r\n deleteCount = 1;\r\n }\r\n else {\r\n deleteCount++;\r\n }\r\n }\r\n }\r\n // Adjust this._rendLineNumberStart for lines deleted above\r\n if (deleteFromLineNumber < startLineNumber) {\r\n // Something was deleted above\r\n let deleteAboveCount = 0;\r\n if (deleteToLineNumber < startLineNumber) {\r\n // the entire deleted lines are above\r\n deleteAboveCount = deleteToLineNumber - deleteFromLineNumber + 1;\r\n }\r\n else {\r\n deleteAboveCount = startLineNumber - deleteFromLineNumber;\r\n }\r\n this._rendLineNumberStart -= deleteAboveCount;\r\n }\r\n const deleted = this._lines.splice(deleteStartIndex, deleteCount);\r\n return deleted;\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return false;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n let someoneNotified = false;\r\n for (let changedLineNumber = changeFromLineNumber; changedLineNumber <= changeToLineNumber; changedLineNumber++) {\r\n if (changedLineNumber >= startLineNumber && changedLineNumber <= endLineNumber) {\r\n // Notify the line\r\n this._lines[changedLineNumber - this._rendLineNumberStart].onContentChanged();\r\n someoneNotified = true;\r\n }\r\n }\r\n return someoneNotified;\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return null;\r\n }\r\n const insertCnt = insertToLineNumber - insertFromLineNumber + 1;\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n if (insertFromLineNumber <= startLineNumber) {\r\n // inserting above the viewport\r\n this._rendLineNumberStart += insertCnt;\r\n return null;\r\n }\r\n if (insertFromLineNumber > endLineNumber) {\r\n // inserting below the viewport\r\n return null;\r\n }\r\n if (insertCnt + insertFromLineNumber > endLineNumber) {\r\n // insert inside the viewport in such a way that all remaining lines are pushed outside\r\n const deleted = this._lines.splice(insertFromLineNumber - this._rendLineNumberStart, endLineNumber - insertFromLineNumber + 1);\r\n return deleted;\r\n }\r\n // insert inside the viewport, push out some lines, but not all remaining lines\r\n const newLines = [];\r\n for (let i = 0; i < insertCnt; i++) {\r\n newLines[i] = this._createLine();\r\n }\r\n const insertIndex = insertFromLineNumber - this._rendLineNumberStart;\r\n const beforeLines = this._lines.slice(0, insertIndex);\r\n const afterLines = this._lines.slice(insertIndex, this._lines.length - insertCnt);\r\n const deletedLines = this._lines.slice(this._lines.length - insertCnt, this._lines.length);\r\n this._lines = beforeLines.concat(newLines).concat(afterLines);\r\n return deletedLines;\r\n }\r\n onTokensChanged(ranges) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return false;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n let notifiedSomeone = false;\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n const rng = ranges[i];\r\n if (rng.toLineNumber < startLineNumber || rng.fromLineNumber > endLineNumber) {\r\n // range outside viewport\r\n continue;\r\n }\r\n const from = Math.max(startLineNumber, rng.fromLineNumber);\r\n const to = Math.min(endLineNumber, rng.toLineNumber);\r\n for (let lineNumber = from; lineNumber <= to; lineNumber++) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n this._lines[lineIndex].onTokensChanged();\r\n notifiedSomeone = true;\r\n }\r\n }\r\n return notifiedSomeone;\r\n }\r\n}\r\nclass VisibleLinesCollection {\r\n constructor(host) {\r\n this._host = host;\r\n this.domNode = this._createDomNode();\r\n this._linesCollection = new RenderedLinesCollection(() => this._host.createVisibleLine());\r\n }\r\n _createDomNode() {\r\n const domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('div'));\r\n domNode.setClassName('view-layer');\r\n domNode.setPosition('absolute');\r\n domNode.domNode.setAttribute('role', 'presentation');\r\n domNode.domNode.setAttribute('aria-hidden', 'true');\r\n return domNode;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n this._linesCollection.flush();\r\n // No need to clear the dom node because a full .innerHTML will occur in ViewLayerRenderer._render\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber);\r\n }\r\n onLinesDeleted(e) {\r\n const deleted = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\r\n if (deleted) {\r\n // Remove from DOM\r\n for (let i = 0, len = deleted.length; i < len; i++) {\r\n const lineDomNode = deleted[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n const deleted = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber);\r\n if (deleted) {\r\n // Remove from DOM\r\n for (let i = 0, len = deleted.length; i < len; i++) {\r\n const lineDomNode = deleted[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onTokensChanged(e) {\r\n return this._linesCollection.onTokensChanged(e.ranges);\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n getStartLineNumber() {\r\n return this._linesCollection.getStartLineNumber();\r\n }\r\n getEndLineNumber() {\r\n return this._linesCollection.getEndLineNumber();\r\n }\r\n getVisibleLine(lineNumber) {\r\n return this._linesCollection.getLine(lineNumber);\r\n }\r\n renderLines(viewportData) {\r\n const inp = this._linesCollection._get();\r\n const renderer = new ViewLayerRenderer(this.domNode.domNode, this._host, viewportData);\r\n const ctx = {\r\n rendLineNumberStart: inp.rendLineNumberStart,\r\n lines: inp.lines,\r\n linesLength: inp.lines.length\r\n };\r\n // Decide if this render will do a single update (single large .innerHTML) or many updates (inserting/removing dom nodes)\r\n const resCtx = renderer.render(ctx, viewportData.startLineNumber, viewportData.endLineNumber, viewportData.relativeVerticalOffset);\r\n this._linesCollection._set(resCtx.rendLineNumberStart, resCtx.lines);\r\n }\r\n}\r\nclass ViewLayerRenderer {\r\n constructor(domNode, host, viewportData) {\r\n this.domNode = domNode;\r\n this.host = host;\r\n this.viewportData = viewportData;\r\n }\r\n render(inContext, startLineNumber, stopLineNumber, deltaTop) {\r\n const ctx = {\r\n rendLineNumberStart: inContext.rendLineNumberStart,\r\n lines: inContext.lines.slice(0),\r\n linesLength: inContext.linesLength\r\n };\r\n if ((ctx.rendLineNumberStart + ctx.linesLength - 1 < startLineNumber) || (stopLineNumber < ctx.rendLineNumberStart)) {\r\n // There is no overlap whatsoever\r\n ctx.rendLineNumberStart = startLineNumber;\r\n ctx.linesLength = stopLineNumber - startLineNumber + 1;\r\n ctx.lines = [];\r\n for (let x = startLineNumber; x <= stopLineNumber; x++) {\r\n ctx.lines[x - startLineNumber] = this.host.createVisibleLine();\r\n }\r\n this._finishRendering(ctx, true, deltaTop);\r\n return ctx;\r\n }\r\n // Update lines which will remain untouched\r\n this._renderUntouchedLines(ctx, Math.max(startLineNumber - ctx.rendLineNumberStart, 0), Math.min(stopLineNumber - ctx.rendLineNumberStart, ctx.linesLength - 1), deltaTop, startLineNumber);\r\n if (ctx.rendLineNumberStart > startLineNumber) {\r\n // Insert lines before\r\n const fromLineNumber = startLineNumber;\r\n const toLineNumber = Math.min(stopLineNumber, ctx.rendLineNumberStart - 1);\r\n if (fromLineNumber <= toLineNumber) {\r\n this._insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\r\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\r\n }\r\n }\r\n else if (ctx.rendLineNumberStart < startLineNumber) {\r\n // Remove lines before\r\n const removeCnt = Math.min(ctx.linesLength, startLineNumber - ctx.rendLineNumberStart);\r\n if (removeCnt > 0) {\r\n this._removeLinesBefore(ctx, removeCnt);\r\n ctx.linesLength -= removeCnt;\r\n }\r\n }\r\n ctx.rendLineNumberStart = startLineNumber;\r\n if (ctx.rendLineNumberStart + ctx.linesLength - 1 < stopLineNumber) {\r\n // Insert lines after\r\n const fromLineNumber = ctx.rendLineNumberStart + ctx.linesLength;\r\n const toLineNumber = stopLineNumber;\r\n if (fromLineNumber <= toLineNumber) {\r\n this._insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\r\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\r\n }\r\n }\r\n else if (ctx.rendLineNumberStart + ctx.linesLength - 1 > stopLineNumber) {\r\n // Remove lines after\r\n const fromLineNumber = Math.max(0, stopLineNumber - ctx.rendLineNumberStart + 1);\r\n const toLineNumber = ctx.linesLength - 1;\r\n const removeCnt = toLineNumber - fromLineNumber + 1;\r\n if (removeCnt > 0) {\r\n this._removeLinesAfter(ctx, removeCnt);\r\n ctx.linesLength -= removeCnt;\r\n }\r\n }\r\n this._finishRendering(ctx, false, deltaTop);\r\n return ctx;\r\n }\r\n _renderUntouchedLines(ctx, startIndex, endIndex, deltaTop, deltaLN) {\r\n const rendLineNumberStart = ctx.rendLineNumberStart;\r\n const lines = ctx.lines;\r\n for (let i = startIndex; i <= endIndex; i++) {\r\n const lineNumber = rendLineNumberStart + i;\r\n lines[i].layoutLine(lineNumber, deltaTop[lineNumber - deltaLN]);\r\n }\r\n }\r\n _insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\r\n const newLines = [];\r\n let newLinesLen = 0;\r\n for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\r\n newLines[newLinesLen++] = this.host.createVisibleLine();\r\n }\r\n ctx.lines = newLines.concat(ctx.lines);\r\n }\r\n _removeLinesBefore(ctx, removeCount) {\r\n for (let i = 0; i < removeCount; i++) {\r\n const lineDomNode = ctx.lines[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n ctx.lines.splice(0, removeCount);\r\n }\r\n _insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\r\n const newLines = [];\r\n let newLinesLen = 0;\r\n for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\r\n newLines[newLinesLen++] = this.host.createVisibleLine();\r\n }\r\n ctx.lines = ctx.lines.concat(newLines);\r\n }\r\n _removeLinesAfter(ctx, removeCount) {\r\n const removeIndex = ctx.linesLength - removeCount;\r\n for (let i = 0; i < removeCount; i++) {\r\n const lineDomNode = ctx.lines[removeIndex + i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n ctx.lines.splice(removeIndex, removeCount);\r\n }\r\n _finishRenderingNewLines(ctx, domNodeIsEmpty, newLinesHTML, wasNew) {\r\n if (ViewLayerRenderer._ttPolicy) {\r\n newLinesHTML = ViewLayerRenderer._ttPolicy.createHTML(newLinesHTML);\r\n }\r\n const lastChild = this.domNode.lastChild;\r\n if (domNodeIsEmpty || !lastChild) {\r\n this.domNode.innerHTML = newLinesHTML; // explains the ugly casts -> https://github.com/microsoft/vscode/issues/106396#issuecomment-692625393;\r\n }\r\n else {\r\n lastChild.insertAdjacentHTML('afterend', newLinesHTML);\r\n }\r\n let currChild = this.domNode.lastChild;\r\n for (let i = ctx.linesLength - 1; i >= 0; i--) {\r\n const line = ctx.lines[i];\r\n if (wasNew[i]) {\r\n line.setDomNode(currChild);\r\n currChild = currChild.previousSibling;\r\n }\r\n }\r\n }\r\n _finishRenderingInvalidLines(ctx, invalidLinesHTML, wasInvalid) {\r\n const hugeDomNode = document.createElement('div');\r\n if (ViewLayerRenderer._ttPolicy) {\r\n invalidLinesHTML = ViewLayerRenderer._ttPolicy.createHTML(invalidLinesHTML);\r\n }\r\n hugeDomNode.innerHTML = invalidLinesHTML;\r\n for (let i = 0; i < ctx.linesLength; i++) {\r\n const line = ctx.lines[i];\r\n if (wasInvalid[i]) {\r\n const source = hugeDomNode.firstChild;\r\n const lineDomNode = line.getDomNode();\r\n lineDomNode.parentNode.replaceChild(source, lineDomNode);\r\n line.setDomNode(source);\r\n }\r\n }\r\n }\r\n _finishRendering(ctx, domNodeIsEmpty, deltaTop) {\r\n const sb = ViewLayerRenderer._sb;\r\n const linesLength = ctx.linesLength;\r\n const lines = ctx.lines;\r\n const rendLineNumberStart = ctx.rendLineNumberStart;\r\n const wasNew = [];\r\n {\r\n sb.reset();\r\n let hadNewLine = false;\r\n for (let i = 0; i < linesLength; i++) {\r\n const line = lines[i];\r\n wasNew[i] = false;\r\n const lineDomNode = line.getDomNode();\r\n if (lineDomNode) {\r\n // line is not new\r\n continue;\r\n }\r\n const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\r\n if (!renderResult) {\r\n // line does not need rendering\r\n continue;\r\n }\r\n wasNew[i] = true;\r\n hadNewLine = true;\r\n }\r\n if (hadNewLine) {\r\n this._finishRenderingNewLines(ctx, domNodeIsEmpty, sb.build(), wasNew);\r\n }\r\n }\r\n {\r\n sb.reset();\r\n let hadInvalidLine = false;\r\n const wasInvalid = [];\r\n for (let i = 0; i < linesLength; i++) {\r\n const line = lines[i];\r\n wasInvalid[i] = false;\r\n if (wasNew[i]) {\r\n // line was new\r\n continue;\r\n }\r\n const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\r\n if (!renderResult) {\r\n // line does not need rendering\r\n continue;\r\n }\r\n wasInvalid[i] = true;\r\n hadInvalidLine = true;\r\n }\r\n if (hadInvalidLine) {\r\n this._finishRenderingInvalidLines(ctx, sb.build(), wasInvalid);\r\n }\r\n }\r\n }\r\n}\r\nViewLayerRenderer._ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('editorViewLayer', { createHTML: value => value });\r\nViewLayerRenderer._sb = (0,_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__.createStringBuilder)(100000);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewOverlays\": () => (/* binding */ ViewOverlays),\n/* harmony export */ \"ViewOverlayLine\": () => (/* binding */ ViewOverlayLine),\n/* harmony export */ \"ContentViewOverlays\": () => (/* binding */ ContentViewOverlays),\n/* harmony export */ \"MarginViewOverlays\": () => (/* binding */ MarginViewOverlays)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _viewLayer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./viewLayer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js\");\n/* harmony import */ var _viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass ViewOverlays extends _viewPart_js__WEBPACK_IMPORTED_MODULE_3__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._visibleLines = new _viewLayer_js__WEBPACK_IMPORTED_MODULE_2__.VisibleLinesCollection(this);\r\n this.domNode = this._visibleLines.domNode;\r\n this._dynamicOverlays = [];\r\n this._isFocused = false;\r\n this.domNode.setClassName('view-overlays');\r\n }\r\n shouldRender() {\r\n if (super.shouldRender()) {\r\n return true;\r\n }\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n if (dynamicOverlay.shouldRender()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n dispose() {\r\n super.dispose();\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n dynamicOverlay.dispose();\r\n }\r\n this._dynamicOverlays = [];\r\n }\r\n getDomNode() {\r\n return this.domNode;\r\n }\r\n // ---- begin IVisibleLinesHost\r\n createVisibleLine() {\r\n return new ViewOverlayLine(this._context.configuration, this._dynamicOverlays);\r\n }\r\n // ---- end IVisibleLinesHost\r\n addDynamicOverlay(overlay) {\r\n this._dynamicOverlays.push(overlay);\r\n }\r\n // ----- event handlers\r\n onConfigurationChanged(e) {\r\n this._visibleLines.onConfigurationChanged(e);\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n line.onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return this._visibleLines.onFlushed(e);\r\n }\r\n onFocusChanged(e) {\r\n this._isFocused = e.isFocused;\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return this._visibleLines.onLinesChanged(e);\r\n }\r\n onLinesDeleted(e) {\r\n return this._visibleLines.onLinesDeleted(e);\r\n }\r\n onLinesInserted(e) {\r\n return this._visibleLines.onLinesInserted(e);\r\n }\r\n onScrollChanged(e) {\r\n return this._visibleLines.onScrollChanged(e) || true;\r\n }\r\n onTokensChanged(e) {\r\n return this._visibleLines.onTokensChanged(e);\r\n }\r\n onZonesChanged(e) {\r\n return this._visibleLines.onZonesChanged(e);\r\n }\r\n // ----- end event handlers\r\n prepareRender(ctx) {\r\n const toRender = this._dynamicOverlays.filter(overlay => overlay.shouldRender());\r\n for (let i = 0, len = toRender.length; i < len; i++) {\r\n const dynamicOverlay = toRender[i];\r\n dynamicOverlay.prepareRender(ctx);\r\n dynamicOverlay.onDidRender();\r\n }\r\n }\r\n render(ctx) {\r\n // Overwriting to bypass `shouldRender` flag\r\n this._viewOverlaysRender(ctx);\r\n this.domNode.toggleClassName('focused', this._isFocused);\r\n }\r\n _viewOverlaysRender(ctx) {\r\n this._visibleLines.renderLines(ctx.viewportData);\r\n }\r\n}\r\nclass ViewOverlayLine {\r\n constructor(configuration, dynamicOverlays) {\r\n this._configuration = configuration;\r\n this._lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n this._dynamicOverlays = dynamicOverlays;\r\n this._domNode = null;\r\n this._renderedContent = null;\r\n }\r\n getDomNode() {\r\n if (!this._domNode) {\r\n return null;\r\n }\r\n return this._domNode.domNode;\r\n }\r\n setDomNode(domNode) {\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(domNode);\r\n }\r\n onContentChanged() {\r\n // Nothing\r\n }\r\n onTokensChanged() {\r\n // Nothing\r\n }\r\n onConfigurationChanged(e) {\r\n this._lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n }\r\n renderLine(lineNumber, deltaTop, viewportData, sb) {\r\n let result = '';\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n result += dynamicOverlay.render(viewportData.startLineNumber, lineNumber);\r\n }\r\n if (this._renderedContent === result) {\r\n // No rendering needed\r\n return false;\r\n }\r\n this._renderedContent = result;\r\n sb.appendASCIIString('<div style=\"position:absolute;top:');\r\n sb.appendASCIIString(String(deltaTop));\r\n sb.appendASCIIString('px;width:100%;height:');\r\n sb.appendASCIIString(String(this._lineHeight));\r\n sb.appendASCIIString('px;\">');\r\n sb.appendASCIIString(result);\r\n sb.appendASCIIString('</div>');\r\n return true;\r\n }\r\n layoutLine(lineNumber, deltaTop) {\r\n if (this._domNode) {\r\n this._domNode.setTop(deltaTop);\r\n this._domNode.setHeight(this._lineHeight);\r\n }\r\n }\r\n}\r\nclass ContentViewOverlays extends ViewOverlays {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this.domNode.setHeight(0);\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n return super.onConfigurationChanged(e) || true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollWidthChanged;\r\n }\r\n // --- end event handlers\r\n _viewOverlaysRender(ctx) {\r\n super._viewOverlaysRender(ctx);\r\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\r\n }\r\n}\r\nclass MarginViewOverlays extends ViewOverlays {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this.domNode.setClassName('margin-view-overlays');\r\n this.domNode.setWidth(1);\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__.Configuration.applyFontInfo(this.domNode, options.get(38 /* fontInfo */));\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__.Configuration.applyFontInfo(this.domNode, options.get(38 /* fontInfo */));\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n return super.onConfigurationChanged(e) || true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollHeightChanged;\r\n }\r\n _viewOverlaysRender(ctx) {\r\n super._viewOverlaysRender(ctx);\r\n const height = Math.min(ctx.scrollHeight, 1000000);\r\n this.domNode.setHeight(height);\r\n this.domNode.setWidth(this._contentLeft);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewPart\": () => (/* binding */ ViewPart),\n/* harmony export */ \"PartFingerprints\": () => (/* binding */ PartFingerprints)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass ViewPart extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_1__.ViewEventHandler {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n}\r\nclass PartFingerprints {\r\n static write(target, partId) {\r\n if (target instanceof _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.FastDomNode) {\r\n target.setAttribute('data-mprt', String(partId));\r\n }\r\n else {\r\n target.setAttribute('data-mprt', String(partId));\r\n }\r\n }\r\n static read(target) {\r\n const r = target.getAttribute('data-mprt');\r\n if (r === null) {\r\n return 0 /* None */;\r\n }\r\n return parseInt(r, 10);\r\n }\r\n static collect(child, stopAt) {\r\n let result = [], resultLen = 0;\r\n while (child && child !== document.body) {\r\n if (child === stopAt) {\r\n break;\r\n }\r\n if (child.nodeType === child.ELEMENT_NODE) {\r\n result[resultLen++] = this.read(child);\r\n }\r\n child = child.parentElement;\r\n }\r\n const r = new Uint8Array(resultLen);\r\n for (let i = 0; i < resultLen; i++) {\r\n r[i] = result[resultLen - i - 1];\r\n }\r\n return r;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewUserInputEvents\": () => (/* binding */ ViewUserInputEvents)\n/* harmony export */ });\n/* harmony import */ var _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../controller/mouseTarget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ViewUserInputEvents {\r\n constructor(coordinatesConverter) {\r\n this.onKeyDown = null;\r\n this.onKeyUp = null;\r\n this.onContextMenu = null;\r\n this.onMouseMove = null;\r\n this.onMouseLeave = null;\r\n this.onMouseDown = null;\r\n this.onMouseUp = null;\r\n this.onMouseDrag = null;\r\n this.onMouseDrop = null;\r\n this.onMouseDropCanceled = null;\r\n this.onMouseWheel = null;\r\n this._coordinatesConverter = coordinatesConverter;\r\n }\r\n emitKeyDown(e) {\r\n if (this.onKeyDown) {\r\n this.onKeyDown(e);\r\n }\r\n }\r\n emitKeyUp(e) {\r\n if (this.onKeyUp) {\r\n this.onKeyUp(e);\r\n }\r\n }\r\n emitContextMenu(e) {\r\n if (this.onContextMenu) {\r\n this.onContextMenu(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseMove(e) {\r\n if (this.onMouseMove) {\r\n this.onMouseMove(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseLeave(e) {\r\n if (this.onMouseLeave) {\r\n this.onMouseLeave(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDown(e) {\r\n if (this.onMouseDown) {\r\n this.onMouseDown(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseUp(e) {\r\n if (this.onMouseUp) {\r\n this.onMouseUp(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDrag(e) {\r\n if (this.onMouseDrag) {\r\n this.onMouseDrag(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDrop(e) {\r\n if (this.onMouseDrop) {\r\n this.onMouseDrop(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDropCanceled() {\r\n if (this.onMouseDropCanceled) {\r\n this.onMouseDropCanceled();\r\n }\r\n }\r\n emitMouseWheel(e) {\r\n if (this.onMouseWheel) {\r\n this.onMouseWheel(e);\r\n }\r\n }\r\n _convertViewToModelMouseEvent(e) {\r\n if (e.target) {\r\n return {\r\n event: e.event,\r\n target: this._convertViewToModelMouseTarget(e.target)\r\n };\r\n }\r\n return e;\r\n }\r\n _convertViewToModelMouseTarget(target) {\r\n return ViewUserInputEvents.convertViewToModelMouseTarget(target, this._coordinatesConverter);\r\n }\r\n static convertViewToModelMouseTarget(target, coordinatesConverter) {\r\n return new ExternalMouseTarget(target.element, target.type, target.mouseColumn, target.position ? coordinatesConverter.convertViewPositionToModelPosition(target.position) : null, target.range ? coordinatesConverter.convertViewRangeToModelRange(target.range) : null, target.detail);\r\n }\r\n}\r\nclass ExternalMouseTarget {\r\n constructor(element, type, mouseColumn, position, range, detail) {\r\n this.element = element;\r\n this.type = type;\r\n this.mouseColumn = mouseColumn;\r\n this.position = position;\r\n this.range = range;\r\n this.detail = detail;\r\n }\r\n toString() {\r\n return _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_0__.MouseTarget.toString(this);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js":
|
||
/*!*****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js ***!
|
||
\*****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewContentWidgets\": () => (/* binding */ ViewContentWidgets)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass Coordinate {\r\n constructor(top, left) {\r\n this.top = top;\r\n this.left = left;\r\n }\r\n}\r\nclass ViewContentWidgets extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context, viewDomNode) {\r\n super(context);\r\n this._viewDomNode = viewDomNode;\r\n this._widgets = {};\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.PartFingerprints.write(this.domNode, 1 /* ContentWidgets */);\r\n this.domNode.setClassName('contentWidgets');\r\n this.domNode.setPosition('absolute');\r\n this.domNode.setTop(0);\r\n this.overflowingContentWidgetsDomNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.PartFingerprints.write(this.overflowingContentWidgetsDomNode, 2 /* OverflowingContentWidgets */);\r\n this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets');\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._widgets = {};\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLineMappingChanged(e) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onLineMappingChanged(e);\r\n }\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n addWidget(_widget) {\r\n const myWidget = new Widget(this._context, this._viewDomNode, _widget);\r\n this._widgets[myWidget.id] = myWidget;\r\n if (myWidget.allowEditorOverflow) {\r\n this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode);\r\n }\r\n else {\r\n this.domNode.appendChild(myWidget.domNode);\r\n }\r\n this.setShouldRender();\r\n }\r\n setWidgetPosition(widget, range, preference) {\r\n const myWidget = this._widgets[widget.getId()];\r\n myWidget.setPosition(range, preference);\r\n this.setShouldRender();\r\n }\r\n removeWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n const myWidget = this._widgets[widgetId];\r\n delete this._widgets[widgetId];\r\n const domNode = myWidget.domNode.domNode;\r\n domNode.parentNode.removeChild(domNode);\r\n domNode.removeAttribute('monaco-visible-content-widget');\r\n this.setShouldRender();\r\n }\r\n }\r\n shouldSuppressMouseDownOnWidget(widgetId) {\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n return this._widgets[widgetId].suppressMouseDown;\r\n }\r\n return false;\r\n }\r\n onBeforeRender(viewportData) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onBeforeRender(viewportData);\r\n }\r\n }\r\n prepareRender(ctx) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].prepareRender(ctx);\r\n }\r\n }\r\n render(ctx) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].render(ctx);\r\n }\r\n }\r\n}\r\nclass Widget {\r\n constructor(context, viewDomNode, actual) {\r\n this._context = context;\r\n this._viewDomNode = viewDomNode;\r\n this._actual = actual;\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(this._actual.getDomNode());\r\n this.id = this._actual.getId();\r\n this.allowEditorOverflow = this._actual.allowEditorOverflow || false;\r\n this.suppressMouseDown = this._actual.suppressMouseDown || false;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._fixedOverflowWidgets = options.get(32 /* fixedOverflowWidgets */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._range = null;\r\n this._viewRange = null;\r\n this._preference = [];\r\n this._cachedDomNodeClientWidth = -1;\r\n this._cachedDomNodeClientHeight = -1;\r\n this._maxWidth = this._getMaxWidth();\r\n this._isVisible = false;\r\n this._renderData = null;\r\n this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute');\r\n this.domNode.setVisibility('hidden');\r\n this.domNode.setAttribute('widgetId', this.id);\r\n this.domNode.setMaxWidth(this._maxWidth);\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._maxWidth = this._getMaxWidth();\r\n }\r\n }\r\n onLineMappingChanged(e) {\r\n this._setPosition(this._range);\r\n }\r\n _setPosition(range) {\r\n this._range = range;\r\n this._viewRange = null;\r\n if (this._range) {\r\n // Do not trust that widgets give a valid position\r\n const validModelRange = this._context.model.validateModelRange(this._range);\r\n if (this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getStartPosition()) || this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getEndPosition())) {\r\n this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange(validModelRange);\r\n }\r\n }\r\n }\r\n _getMaxWidth() {\r\n return (this.allowEditorOverflow\r\n ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth\r\n : this._contentWidth);\r\n }\r\n setPosition(range, preference) {\r\n this._setPosition(range);\r\n this._preference = preference;\r\n this._cachedDomNodeClientWidth = -1;\r\n this._cachedDomNodeClientHeight = -1;\r\n }\r\n _layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) {\r\n // Our visible box is split horizontally by the current line => 2 boxes\r\n // a) the box above the line\r\n const aboveLineTop = topLeft.top;\r\n const heightAboveLine = aboveLineTop;\r\n // b) the box under the line\r\n const underLineTop = bottomLeft.top + this._lineHeight;\r\n const heightUnderLine = ctx.viewportHeight - underLineTop;\r\n const aboveTop = aboveLineTop - height;\r\n const fitsAbove = (heightAboveLine >= height);\r\n const belowTop = underLineTop;\r\n const fitsBelow = (heightUnderLine >= height);\r\n // And its left\r\n let actualAboveLeft = topLeft.left;\r\n let actualBelowLeft = bottomLeft.left;\r\n if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) {\r\n actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width;\r\n }\r\n if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) {\r\n actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width;\r\n }\r\n if (actualAboveLeft < ctx.scrollLeft) {\r\n actualAboveLeft = ctx.scrollLeft;\r\n }\r\n if (actualBelowLeft < ctx.scrollLeft) {\r\n actualBelowLeft = ctx.scrollLeft;\r\n }\r\n return {\r\n fitsAbove: fitsAbove,\r\n aboveTop: aboveTop,\r\n aboveLeft: actualAboveLeft,\r\n fitsBelow: fitsBelow,\r\n belowTop: belowTop,\r\n belowLeft: actualBelowLeft,\r\n };\r\n }\r\n _layoutHorizontalSegmentInPage(windowSize, domNodePosition, left, width) {\r\n // Initially, the limits are defined as the dom node limits\r\n const MIN_LIMIT = Math.max(0, domNodePosition.left - width);\r\n const MAX_LIMIT = Math.min(domNodePosition.left + domNodePosition.width + width, windowSize.width);\r\n let absoluteLeft = domNodePosition.left + left - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollX;\r\n if (absoluteLeft + width > MAX_LIMIT) {\r\n const delta = absoluteLeft - (MAX_LIMIT - width);\r\n absoluteLeft -= delta;\r\n left -= delta;\r\n }\r\n if (absoluteLeft < MIN_LIMIT) {\r\n const delta = absoluteLeft - MIN_LIMIT;\r\n absoluteLeft -= delta;\r\n left -= delta;\r\n }\r\n return [left, absoluteLeft];\r\n }\r\n _layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) {\r\n const aboveTop = topLeft.top - height;\r\n const belowTop = bottomLeft.top + this._lineHeight;\r\n const domNodePosition = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.getDomNodePagePosition(this._viewDomNode.domNode);\r\n const absoluteAboveTop = domNodePosition.top + aboveTop - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollY;\r\n const absoluteBelowTop = domNodePosition.top + belowTop - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.StandardWindow.scrollY;\r\n const windowSize = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.getClientArea(document.body);\r\n const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft, width);\r\n const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft, width);\r\n // Leave some clearance to the top/bottom\r\n const TOP_PADDING = 22;\r\n const BOTTOM_PADDING = 22;\r\n const fitsAbove = (absoluteAboveTop >= TOP_PADDING);\r\n const fitsBelow = (absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING);\r\n if (this._fixedOverflowWidgets) {\r\n return {\r\n fitsAbove,\r\n aboveTop: Math.max(absoluteAboveTop, TOP_PADDING),\r\n aboveLeft: absoluteAboveLeft,\r\n fitsBelow,\r\n belowTop: absoluteBelowTop,\r\n belowLeft: absoluteBelowLeft\r\n };\r\n }\r\n return {\r\n fitsAbove,\r\n aboveTop: aboveTop,\r\n aboveLeft,\r\n fitsBelow,\r\n belowTop,\r\n belowLeft\r\n };\r\n }\r\n _prepareRenderWidgetAtExactPositionOverflowing(topLeft) {\r\n return new Coordinate(topLeft.top, topLeft.left + this._contentLeft);\r\n }\r\n /**\r\n * Compute `this._topLeft`\r\n */\r\n _getTopAndBottomLeft(ctx) {\r\n if (!this._viewRange) {\r\n return [null, null];\r\n }\r\n const visibleRangesForRange = ctx.linesVisibleRangesForRange(this._viewRange, false);\r\n if (!visibleRangesForRange || visibleRangesForRange.length === 0) {\r\n return [null, null];\r\n }\r\n let firstLine = visibleRangesForRange[0];\r\n let lastLine = visibleRangesForRange[0];\r\n for (const visibleRangesForLine of visibleRangesForRange) {\r\n if (visibleRangesForLine.lineNumber < firstLine.lineNumber) {\r\n firstLine = visibleRangesForLine;\r\n }\r\n if (visibleRangesForLine.lineNumber > lastLine.lineNumber) {\r\n lastLine = visibleRangesForLine;\r\n }\r\n }\r\n let firstLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //firstLine.Constants.MAX_SAFE_SMALL_INTEGER;\r\n for (const visibleRange of firstLine.ranges) {\r\n if (visibleRange.left < firstLineMinLeft) {\r\n firstLineMinLeft = visibleRange.left;\r\n }\r\n }\r\n let lastLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //lastLine.Constants.MAX_SAFE_SMALL_INTEGER;\r\n for (const visibleRange of lastLine.ranges) {\r\n if (visibleRange.left < lastLineMinLeft) {\r\n lastLineMinLeft = visibleRange.left;\r\n }\r\n }\r\n const topForPosition = ctx.getVerticalOffsetForLineNumber(firstLine.lineNumber) - ctx.scrollTop;\r\n const topLeft = new Coordinate(topForPosition, firstLineMinLeft);\r\n const topForBottomLine = ctx.getVerticalOffsetForLineNumber(lastLine.lineNumber) - ctx.scrollTop;\r\n const bottomLeft = new Coordinate(topForBottomLine, lastLineMinLeft);\r\n return [topLeft, bottomLeft];\r\n }\r\n _prepareRenderWidget(ctx) {\r\n const [topLeft, bottomLeft] = this._getTopAndBottomLeft(ctx);\r\n if (!topLeft || !bottomLeft) {\r\n return null;\r\n }\r\n if (this._cachedDomNodeClientWidth === -1 || this._cachedDomNodeClientHeight === -1) {\r\n let preferredDimensions = null;\r\n if (typeof this._actual.beforeRender === 'function') {\r\n preferredDimensions = safeInvoke(this._actual.beforeRender, this._actual);\r\n }\r\n if (preferredDimensions) {\r\n this._cachedDomNodeClientWidth = preferredDimensions.width;\r\n this._cachedDomNodeClientHeight = preferredDimensions.height;\r\n }\r\n else {\r\n const domNode = this.domNode.domNode;\r\n this._cachedDomNodeClientWidth = domNode.clientWidth;\r\n this._cachedDomNodeClientHeight = domNode.clientHeight;\r\n }\r\n }\r\n let placement;\r\n if (this.allowEditorOverflow) {\r\n placement = this._layoutBoxInPage(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx);\r\n }\r\n else {\r\n placement = this._layoutBoxInViewport(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx);\r\n }\r\n // Do two passes, first for perfect fit, second picks first option\r\n if (this._preference) {\r\n for (let pass = 1; pass <= 2; pass++) {\r\n for (const pref of this._preference) {\r\n // placement\r\n if (pref === 1 /* ABOVE */) {\r\n if (!placement) {\r\n // Widget outside of viewport\r\n return null;\r\n }\r\n if (pass === 2 || placement.fitsAbove) {\r\n return { coordinate: new Coordinate(placement.aboveTop, placement.aboveLeft), position: 1 /* ABOVE */ };\r\n }\r\n }\r\n else if (pref === 2 /* BELOW */) {\r\n if (!placement) {\r\n // Widget outside of viewport\r\n return null;\r\n }\r\n if (pass === 2 || placement.fitsBelow) {\r\n return { coordinate: new Coordinate(placement.belowTop, placement.belowLeft), position: 2 /* BELOW */ };\r\n }\r\n }\r\n else {\r\n if (this.allowEditorOverflow) {\r\n return { coordinate: this._prepareRenderWidgetAtExactPositionOverflowing(topLeft), position: 0 /* EXACT */ };\r\n }\r\n else {\r\n return { coordinate: topLeft, position: 0 /* EXACT */ };\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * On this first pass, we ensure that the content widget (if it is in the viewport) has the max width set correctly.\r\n */\r\n onBeforeRender(viewportData) {\r\n if (!this._viewRange || !this._preference) {\r\n return;\r\n }\r\n if (this._viewRange.endLineNumber < viewportData.startLineNumber || this._viewRange.startLineNumber > viewportData.endLineNumber) {\r\n // Outside of viewport\r\n return;\r\n }\r\n this.domNode.setMaxWidth(this._maxWidth);\r\n }\r\n prepareRender(ctx) {\r\n this._renderData = this._prepareRenderWidget(ctx);\r\n }\r\n render(ctx) {\r\n if (!this._renderData) {\r\n // This widget should be invisible\r\n if (this._isVisible) {\r\n this.domNode.removeAttribute('monaco-visible-content-widget');\r\n this._isVisible = false;\r\n this.domNode.setVisibility('hidden');\r\n }\r\n if (typeof this._actual.afterRender === 'function') {\r\n safeInvoke(this._actual.afterRender, this._actual, null);\r\n }\r\n return;\r\n }\r\n // This widget should be visible\r\n if (this.allowEditorOverflow) {\r\n this.domNode.setTop(this._renderData.coordinate.top);\r\n this.domNode.setLeft(this._renderData.coordinate.left);\r\n }\r\n else {\r\n this.domNode.setTop(this._renderData.coordinate.top + ctx.scrollTop - ctx.bigNumbersDelta);\r\n this.domNode.setLeft(this._renderData.coordinate.left);\r\n }\r\n if (!this._isVisible) {\r\n this.domNode.setVisibility('inherit');\r\n this.domNode.setAttribute('monaco-visible-content-widget', 'true');\r\n this._isVisible = true;\r\n }\r\n if (typeof this._actual.afterRender === 'function') {\r\n safeInvoke(this._actual.afterRender, this._actual, this._renderData.position);\r\n }\r\n }\r\n}\r\nfunction safeInvoke(fn, thisArg, ...args) {\r\n try {\r\n return fn.call(thisArg, ...args);\r\n }\r\n catch (_a) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js":
|
||
/*!*****************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js ***!
|
||
\*****************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractLineHighlightOverlay\": () => (/* binding */ AbstractLineHighlightOverlay),\n/* harmony export */ \"CurrentLineHighlightOverlay\": () => (/* binding */ CurrentLineHighlightOverlay),\n/* harmony export */ \"CurrentLineMarginHighlightOverlay\": () => (/* binding */ CurrentLineMarginHighlightOverlay)\n/* harmony export */ });\n/* harmony import */ var _currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./currentLineHighlight.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet isRenderedUsingBorder = true;\r\nclass AbstractLineHighlightOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__.DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._renderLineHighlight = options.get(80 /* renderLineHighlight */);\r\n this._renderLineHighlightOnlyWhenFocus = options.get(81 /* renderLineHighlightOnlyWhenFocus */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._selectionIsEmpty = true;\r\n this._focused = false;\r\n this._cursorLineNumbers = [1];\r\n this._selections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__.Selection(1, 1, 1, 1)];\r\n this._renderData = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n _readFromSelections() {\r\n let hasChanged = false;\r\n // Only render the first selection when using border\r\n const renderSelections = isRenderedUsingBorder ? this._selections.slice(0, 1) : this._selections;\r\n const cursorsLineNumbers = renderSelections.map(s => s.positionLineNumber);\r\n cursorsLineNumbers.sort((a, b) => a - b);\r\n if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__.equals(this._cursorLineNumbers, cursorsLineNumbers)) {\r\n this._cursorLineNumbers = cursorsLineNumbers;\r\n hasChanged = true;\r\n }\r\n const selectionIsEmpty = renderSelections.every(s => s.isEmpty());\r\n if (this._selectionIsEmpty !== selectionIsEmpty) {\r\n this._selectionIsEmpty = selectionIsEmpty;\r\n hasChanged = true;\r\n }\r\n return hasChanged;\r\n }\r\n // --- begin event handlers\r\n onThemeChanged(e) {\r\n return this._readFromSelections();\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._renderLineHighlight = options.get(80 /* renderLineHighlight */);\r\n this._renderLineHighlightOnlyWhenFocus = options.get(81 /* renderLineHighlightOnlyWhenFocus */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n return this._readFromSelections();\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollWidthChanged || e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onFocusChanged(e) {\r\n if (!this._renderLineHighlightOnlyWhenFocus) {\r\n return false;\r\n }\r\n this._focused = e.isFocused;\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (!this._shouldRenderThis()) {\r\n this._renderData = null;\r\n return;\r\n }\r\n const renderedLine = this._renderOne(ctx);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const len = this._cursorLineNumbers.length;\r\n let index = 0;\r\n const renderData = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n while (index < len && this._cursorLineNumbers[index] < lineNumber) {\r\n index++;\r\n }\r\n if (index < len && this._cursorLineNumbers[index] === lineNumber) {\r\n renderData[lineIndex] = renderedLine;\r\n }\r\n else {\r\n renderData[lineIndex] = '';\r\n }\r\n }\r\n this._renderData = renderData;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderData) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex >= this._renderData.length) {\r\n return '';\r\n }\r\n return this._renderData[lineIndex];\r\n }\r\n}\r\nclass CurrentLineHighlightOverlay extends AbstractLineHighlightOverlay {\r\n _renderOne(ctx) {\r\n const className = 'current-line' + (this._shouldRenderOther() ? ' current-line-both' : '');\r\n return `<div class=\"${className}\" style=\"width:${Math.max(ctx.scrollWidth, this._contentWidth)}px; height:${this._lineHeight}px;\"></div>`;\r\n }\r\n _shouldRenderThis() {\r\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\r\n && this._selectionIsEmpty\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n _shouldRenderOther() {\r\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n}\r\nclass CurrentLineMarginHighlightOverlay extends AbstractLineHighlightOverlay {\r\n _renderOne(ctx) {\r\n const className = 'current-line' + (this._shouldRenderMargin() ? ' current-line-margin' : '') + (this._shouldRenderOther() ? ' current-line-margin-both' : '');\r\n return `<div class=\"${className}\" style=\"width:${this._contentLeft}px; height:${this._lineHeight}px;\"></div>`;\r\n }\r\n _shouldRenderMargin() {\r\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n _shouldRenderThis() {\r\n return true;\r\n }\r\n _shouldRenderOther() {\r\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\r\n && this._selectionIsEmpty\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.registerThemingParticipant)((theme, collector) => {\r\n isRenderedUsingBorder = false;\r\n const lineHighlight = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorLineHighlight);\r\n if (lineHighlight) {\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`);\r\n }\r\n if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorLineHighlightBorder)) {\r\n const lineHighlightBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorLineHighlightBorder);\r\n if (lineHighlightBorder) {\r\n isRenderedUsingBorder = true;\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`);\r\n if (theme.type === 'hc') {\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`);\r\n }\r\n }\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DecorationsOverlay\": () => (/* binding */ DecorationsOverlay)\n/* harmony export */ });\n/* harmony import */ var _decorations_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decorations.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass DecorationsOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__.DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n const _decorations = ctx.getDecorationsInViewport();\r\n // Keep only decorations with `className`\r\n let decorations = [], decorationsLen = 0;\r\n for (let i = 0, len = _decorations.length; i < len; i++) {\r\n const d = _decorations[i];\r\n if (d.options.className) {\r\n decorations[decorationsLen++] = d;\r\n }\r\n }\r\n // Sort decorations for consistent render output\r\n decorations = decorations.sort((a, b) => {\r\n if (a.options.zIndex < b.options.zIndex) {\r\n return -1;\r\n }\r\n if (a.options.zIndex > b.options.zIndex) {\r\n return 1;\r\n }\r\n const aClassName = a.options.className;\r\n const bClassName = b.options.className;\r\n if (aClassName < bClassName) {\r\n return -1;\r\n }\r\n if (aClassName > bClassName) {\r\n return 1;\r\n }\r\n return _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingStarts(a.range, b.range);\r\n });\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = '';\r\n }\r\n // Render first whole line decorations and then regular decorations\r\n this._renderWholeLineDecorations(ctx, decorations, output);\r\n this._renderNormalDecorations(ctx, decorations, output);\r\n this._renderResult = output;\r\n }\r\n _renderWholeLineDecorations(ctx, decorations, output) {\r\n const lineHeight = String(this._lineHeight);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n for (let i = 0, lenI = decorations.length; i < lenI; i++) {\r\n const d = decorations[i];\r\n if (!d.options.isWholeLine) {\r\n continue;\r\n }\r\n const decorationOutput = ('<div class=\"cdr '\r\n + d.options.className\r\n + '\" style=\"left:0;width:100%;height:'\r\n + lineHeight\r\n + 'px;\"></div>');\r\n const startLineNumber = Math.max(d.range.startLineNumber, visibleStartLineNumber);\r\n const endLineNumber = Math.min(d.range.endLineNumber, visibleEndLineNumber);\r\n for (let j = startLineNumber; j <= endLineNumber; j++) {\r\n const lineIndex = j - visibleStartLineNumber;\r\n output[lineIndex] += decorationOutput;\r\n }\r\n }\r\n }\r\n _renderNormalDecorations(ctx, decorations, output) {\r\n const lineHeight = String(this._lineHeight);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n let prevClassName = null;\r\n let prevShowIfCollapsed = false;\r\n let prevRange = null;\r\n for (let i = 0, lenI = decorations.length; i < lenI; i++) {\r\n const d = decorations[i];\r\n if (d.options.isWholeLine) {\r\n continue;\r\n }\r\n const className = d.options.className;\r\n const showIfCollapsed = Boolean(d.options.showIfCollapsed);\r\n let range = d.range;\r\n if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) {\r\n range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1));\r\n }\r\n if (prevClassName === className && prevShowIfCollapsed === showIfCollapsed && _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.areIntersectingOrTouching(prevRange, range)) {\r\n // merge into previous decoration\r\n prevRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.plusRange(prevRange, range);\r\n continue;\r\n }\r\n // flush previous decoration\r\n if (prevClassName !== null) {\r\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\r\n }\r\n prevClassName = className;\r\n prevShowIfCollapsed = showIfCollapsed;\r\n prevRange = range;\r\n }\r\n if (prevClassName !== null) {\r\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\r\n }\r\n }\r\n _renderNormalDecoration(ctx, range, className, showIfCollapsed, lineHeight, visibleStartLineNumber, output) {\r\n const linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/ className === 'findMatch');\r\n if (!linesVisibleRanges) {\r\n return;\r\n }\r\n for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) {\r\n const lineVisibleRanges = linesVisibleRanges[j];\r\n if (lineVisibleRanges.outsideRenderedLine) {\r\n continue;\r\n }\r\n const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber;\r\n if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) {\r\n const singleVisibleRange = lineVisibleRanges.ranges[0];\r\n if (singleVisibleRange.width === 0) {\r\n // collapsed range case => make the decoration visible by faking its width\r\n lineVisibleRanges.ranges[0] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_3__.HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth);\r\n }\r\n }\r\n for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) {\r\n const visibleRange = lineVisibleRanges.ranges[k];\r\n const decorationOutput = ('<div class=\"cdr '\r\n + className\r\n + '\" style=\"left:'\r\n + String(visibleRange.left)\r\n + 'px;width:'\r\n + String(visibleRange.width)\r\n + 'px;height:'\r\n + lineHeight\r\n + 'px;\"></div>');\r\n output[lineIndex] += decorationOutput;\r\n }\r\n }\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js":
|
||
/*!*******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js ***!
|
||
\*******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorScrollbar\": () => (/* binding */ EditorScrollbar)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/ui/scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass EditorScrollbar extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__.ViewPart {\r\n constructor(context, linesContent, viewDomNode, overflowGuardDomNode) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n const mouseWheelScrollSensitivity = options.get(61 /* mouseWheelScrollSensitivity */);\r\n const fastScrollSensitivity = options.get(30 /* fastScrollSensitivity */);\r\n const scrollPredominantAxis = options.get(90 /* scrollPredominantAxis */);\r\n const scrollbarOptions = {\r\n listenOnDomNode: viewDomNode.domNode,\r\n className: 'editor-scrollable' + ' ' + (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.getThemeTypeSelector)(context.theme.type),\r\n useShadows: false,\r\n lazyRender: true,\r\n vertical: scrollbar.vertical,\r\n horizontal: scrollbar.horizontal,\r\n verticalHasArrows: scrollbar.verticalHasArrows,\r\n horizontalHasArrows: scrollbar.horizontalHasArrows,\r\n verticalScrollbarSize: scrollbar.verticalScrollbarSize,\r\n verticalSliderSize: scrollbar.verticalSliderSize,\r\n horizontalScrollbarSize: scrollbar.horizontalScrollbarSize,\r\n horizontalSliderSize: scrollbar.horizontalSliderSize,\r\n handleMouseWheel: scrollbar.handleMouseWheel,\r\n alwaysConsumeMouseWheel: scrollbar.alwaysConsumeMouseWheel,\r\n arrowSize: scrollbar.arrowSize,\r\n mouseWheelScrollSensitivity: mouseWheelScrollSensitivity,\r\n fastScrollSensitivity: fastScrollSensitivity,\r\n scrollPredominantAxis: scrollPredominantAxis,\r\n scrollByPage: scrollbar.scrollByPage,\r\n };\r\n this.scrollbar = this._register(new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_2__.SmoothScrollableElement(linesContent.domNode, scrollbarOptions, this._context.viewLayout.getScrollable()));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__.PartFingerprints.write(this.scrollbar.getDomNode(), 5 /* ScrollableElement */);\r\n this.scrollbarDomNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(this.scrollbar.getDomNode());\r\n this.scrollbarDomNode.setPosition('absolute');\r\n this._setLayout();\r\n // When having a zone widget that calls .focus() on one of its dom elements,\r\n // the browser will try desperately to reveal that dom node, unexpectedly\r\n // changing the .scrollTop of this.linesContent\r\n const onBrowserDesperateReveal = (domNode, lookAtScrollTop, lookAtScrollLeft) => {\r\n const newScrollPosition = {};\r\n if (lookAtScrollTop) {\r\n const deltaTop = domNode.scrollTop;\r\n if (deltaTop) {\r\n newScrollPosition.scrollTop = this._context.viewLayout.getCurrentScrollTop() + deltaTop;\r\n domNode.scrollTop = 0;\r\n }\r\n }\r\n if (lookAtScrollLeft) {\r\n const deltaLeft = domNode.scrollLeft;\r\n if (deltaLeft) {\r\n newScrollPosition.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + deltaLeft;\r\n domNode.scrollLeft = 0;\r\n }\r\n }\r\n this._context.model.setScrollPosition(newScrollPosition, 1 /* Immediate */);\r\n };\r\n // I've seen this happen both on the view dom node & on the lines content dom node.\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(viewDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(viewDomNode.domNode, true, true)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(linesContent.domNode, 'scroll', (e) => onBrowserDesperateReveal(linesContent.domNode, true, false)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(overflowGuardDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(overflowGuardDomNode.domNode, true, false)));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this.scrollbarDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(this.scrollbarDomNode.domNode, true, false)));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _setLayout() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this.scrollbarDomNode.setLeft(layoutInfo.contentLeft);\r\n const minimap = options.get(59 /* minimap */);\r\n const side = minimap.side;\r\n if (side === 'right') {\r\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth + layoutInfo.minimap.minimapWidth);\r\n }\r\n else {\r\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth);\r\n }\r\n this.scrollbarDomNode.setHeight(layoutInfo.height);\r\n }\r\n getOverviewRulerLayoutInfo() {\r\n return this.scrollbar.getOverviewRulerLayoutInfo();\r\n }\r\n getDomNode() {\r\n return this.scrollbarDomNode;\r\n }\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n if (e.hasChanged(87 /* scrollbar */)\r\n || e.hasChanged(61 /* mouseWheelScrollSensitivity */)\r\n || e.hasChanged(30 /* fastScrollSensitivity */)) {\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n const mouseWheelScrollSensitivity = options.get(61 /* mouseWheelScrollSensitivity */);\r\n const fastScrollSensitivity = options.get(30 /* fastScrollSensitivity */);\r\n const scrollPredominantAxis = options.get(90 /* scrollPredominantAxis */);\r\n const newOpts = {\r\n handleMouseWheel: scrollbar.handleMouseWheel,\r\n mouseWheelScrollSensitivity: mouseWheelScrollSensitivity,\r\n fastScrollSensitivity: fastScrollSensitivity,\r\n scrollPredominantAxis: scrollPredominantAxis\r\n };\r\n this.scrollbar.updateOptions(newOpts);\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._setLayout();\r\n }\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onThemeChanged(e) {\r\n this.scrollbar.updateClassName('editor-scrollable' + ' ' + (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.getThemeTypeSelector)(this._context.theme.type));\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to do\r\n }\r\n render(ctx) {\r\n this.scrollbar.renderNow();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DecorationToRender\": () => (/* binding */ DecorationToRender),\n/* harmony export */ \"DedupOverlay\": () => (/* binding */ DedupOverlay),\n/* harmony export */ \"GlyphMarginOverlay\": () => (/* binding */ GlyphMarginOverlay)\n/* harmony export */ });\n/* harmony import */ var _glyphMargin_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./glyphMargin.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass DecorationToRender {\r\n constructor(startLineNumber, endLineNumber, className) {\r\n this.startLineNumber = +startLineNumber;\r\n this.endLineNumber = +endLineNumber;\r\n this.className = String(className);\r\n }\r\n}\r\nclass DedupOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__.DynamicViewOverlay {\r\n _render(visibleStartLineNumber, visibleEndLineNumber, decorations) {\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = [];\r\n }\r\n if (decorations.length === 0) {\r\n return output;\r\n }\r\n decorations.sort((a, b) => {\r\n if (a.className === b.className) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return (a.className < b.className ? -1 : 1);\r\n });\r\n let prevClassName = null;\r\n let prevEndLineIndex = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const className = d.className;\r\n let startLineIndex = Math.max(d.startLineNumber, visibleStartLineNumber) - visibleStartLineNumber;\r\n const endLineIndex = Math.min(d.endLineNumber, visibleEndLineNumber) - visibleStartLineNumber;\r\n if (prevClassName === className) {\r\n startLineIndex = Math.max(prevEndLineIndex + 1, startLineIndex);\r\n prevEndLineIndex = Math.max(prevEndLineIndex, endLineIndex);\r\n }\r\n else {\r\n prevClassName = className;\r\n prevEndLineIndex = endLineIndex;\r\n }\r\n for (let i = startLineIndex; i <= prevEndLineIndex; i++) {\r\n output[i].push(prevClassName);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nclass GlyphMarginOverlay extends DedupOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._glyphMargin = options.get(44 /* glyphMargin */);\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._glyphMargin = options.get(44 /* glyphMargin */);\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getDecorations(ctx) {\r\n const decorations = ctx.getDecorationsInViewport();\r\n let r = [], rLen = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const glyphMarginClassName = d.options.glyphMarginClassName;\r\n if (glyphMarginClassName) {\r\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, glyphMarginClassName);\r\n }\r\n }\r\n return r;\r\n }\r\n prepareRender(ctx) {\r\n if (!this._glyphMargin) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\r\n const lineHeight = this._lineHeight.toString();\r\n const left = this._glyphMarginLeft.toString();\r\n const width = this._glyphMarginWidth.toString();\r\n const common = '\" style=\"left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;\"></div>';\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const classNames = toRender[lineIndex];\r\n if (classNames.length === 0) {\r\n output[lineIndex] = '';\r\n }\r\n else {\r\n output[lineIndex] = ('<div class=\"cgmr codicon '\r\n + classNames.join(' ')\r\n + common);\r\n }\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IndentGuidesOverlay\": () => (/* binding */ IndentGuidesOverlay)\n/* harmony export */ });\n/* harmony import */ var _indentGuides_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indentGuides.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass IndentGuidesOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__.DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._primaryLineNumber = 0;\r\n const options = this._context.configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._spaceWidth = fontInfo.spaceWidth;\r\n this._enabled = options.get(78 /* renderIndentGuides */);\r\n this._activeIndentEnabled = options.get(47 /* highlightActiveIndentGuide */);\r\n this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._spaceWidth = fontInfo.spaceWidth;\r\n this._enabled = options.get(78 /* renderIndentGuides */);\r\n this._activeIndentEnabled = options.get(47 /* highlightActiveIndentGuide */);\r\n this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n const selection = e.selections[0];\r\n const newPrimaryLineNumber = selection.isEmpty() ? selection.positionLineNumber : 0;\r\n if (this._primaryLineNumber !== newPrimaryLineNumber) {\r\n this._primaryLineNumber = newPrimaryLineNumber;\r\n return true;\r\n }\r\n return false;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged; // || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onLanguageConfigurationChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (!this._enabled) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const { indentSize } = this._context.model.getTextModelOptions();\r\n const indentWidth = indentSize * this._spaceWidth;\r\n const scrollWidth = ctx.scrollWidth;\r\n const lineHeight = this._lineHeight;\r\n const indents = this._context.model.getLinesIndentGuides(visibleStartLineNumber, visibleEndLineNumber);\r\n let activeIndentStartLineNumber = 0;\r\n let activeIndentEndLineNumber = 0;\r\n let activeIndentLevel = 0;\r\n if (this._activeIndentEnabled && this._primaryLineNumber) {\r\n const activeIndentInfo = this._context.model.getActiveIndentGuide(this._primaryLineNumber, visibleStartLineNumber, visibleEndLineNumber);\r\n activeIndentStartLineNumber = activeIndentInfo.startLineNumber;\r\n activeIndentEndLineNumber = activeIndentInfo.endLineNumber;\r\n activeIndentLevel = activeIndentInfo.indent;\r\n }\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const containsActiveIndentGuide = (activeIndentStartLineNumber <= lineNumber && lineNumber <= activeIndentEndLineNumber);\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const indent = indents[lineIndex];\r\n let result = '';\r\n if (indent >= 1) {\r\n const leftMostVisiblePosition = ctx.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(lineNumber, 1));\r\n let left = leftMostVisiblePosition ? leftMostVisiblePosition.left : 0;\r\n for (let i = 1; i <= indent; i++) {\r\n const className = (containsActiveIndentGuide && i === activeIndentLevel ? 'cigra' : 'cigr');\r\n result += `<div class=\"${className}\" style=\"left:${left}px;height:${lineHeight}px;width:${indentWidth}px\"></div>`;\r\n left += indentWidth;\r\n if (left > scrollWidth || (this._maxIndentLeft > 0 && left > this._maxIndentLeft)) {\r\n break;\r\n }\r\n }\r\n }\r\n output[lineIndex] = result;\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.registerThemingParticipant)((theme, collector) => {\r\n const editorIndentGuidesColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.editorIndentGuides);\r\n if (editorIndentGuidesColor) {\r\n collector.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${editorIndentGuidesColor} inset; }`);\r\n }\r\n const editorActiveIndentGuidesColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.editorActiveIndentGuides) || editorIndentGuidesColor;\r\n if (editorActiveIndentGuidesColor) {\r\n collector.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${editorActiveIndentGuidesColor} inset; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineNumbersOverlay\": () => (/* binding */ LineNumbersOverlay)\n/* harmony export */ });\n/* harmony import */ var _lineNumbers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lineNumbers.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass LineNumbersOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__.DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._readConfig();\r\n this._lastCursorModelPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(1, 1);\r\n this._renderResult = null;\r\n this._activeLineNumber = 1;\r\n this._context.addEventHandler(this);\r\n }\r\n _readConfig() {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n const lineNumbers = options.get(54 /* lineNumbers */);\r\n this._renderLineNumbers = lineNumbers.renderType;\r\n this._renderCustomLineNumbers = lineNumbers.renderFn;\r\n this._renderFinalNewline = options.get(79 /* renderFinalNewline */);\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineNumbersLeft = layoutInfo.lineNumbersLeft;\r\n this._lineNumbersWidth = layoutInfo.lineNumbersWidth;\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n this._readConfig();\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n const primaryViewPosition = e.selections[0].getPosition();\r\n this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition);\r\n let shouldRender = false;\r\n if (this._activeLineNumber !== primaryViewPosition.lineNumber) {\r\n this._activeLineNumber = primaryViewPosition.lineNumber;\r\n shouldRender = true;\r\n }\r\n if (this._renderLineNumbers === 2 /* Relative */ || this._renderLineNumbers === 3 /* Interval */) {\r\n shouldRender = true;\r\n }\r\n return shouldRender;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getLineRenderLineNumber(viewLineNumber) {\r\n const modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(viewLineNumber, 1));\r\n if (modelPosition.column !== 1) {\r\n return '';\r\n }\r\n const modelLineNumber = modelPosition.lineNumber;\r\n if (this._renderCustomLineNumbers) {\r\n return this._renderCustomLineNumbers(modelLineNumber);\r\n }\r\n if (this._renderLineNumbers === 2 /* Relative */) {\r\n const diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber);\r\n if (diff === 0) {\r\n return '<span class=\"relative-current-line-number\">' + modelLineNumber + '</span>';\r\n }\r\n return String(diff);\r\n }\r\n if (this._renderLineNumbers === 3 /* Interval */) {\r\n if (this._lastCursorModelPosition.lineNumber === modelLineNumber) {\r\n return String(modelLineNumber);\r\n }\r\n if (modelLineNumber % 10 === 0) {\r\n return String(modelLineNumber);\r\n }\r\n return '';\r\n }\r\n return String(modelLineNumber);\r\n }\r\n prepareRender(ctx) {\r\n if (this._renderLineNumbers === 0 /* Off */) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const lineHeightClassName = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLinux ? (this._lineHeight % 2 === 0 ? ' lh-even' : ' lh-odd') : '');\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const common = '<div class=\"' + LineNumbersOverlay.CLASS_NAME + lineHeightClassName + '\" style=\"left:' + this._lineNumbersLeft + 'px;width:' + this._lineNumbersWidth + 'px;\">';\r\n const lineCount = this._context.model.getLineCount();\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n if (!this._renderFinalNewline) {\r\n if (lineNumber === lineCount && this._context.model.getLineLength(lineNumber) === 0) {\r\n // Do not render last (empty) line\r\n output[lineIndex] = '';\r\n continue;\r\n }\r\n }\r\n const renderLineNumber = this._getLineRenderLineNumber(lineNumber);\r\n if (renderLineNumber) {\r\n if (lineNumber === this._activeLineNumber) {\r\n output[lineIndex] = ('<div class=\"active-line-number ' + LineNumbersOverlay.CLASS_NAME + lineHeightClassName + '\" style=\"left:' + this._lineNumbersLeft + 'px;width:' + this._lineNumbersWidth + 'px;\">'\r\n + renderLineNumber\r\n + '</div>');\r\n }\r\n else {\r\n output[lineIndex] = (common\r\n + renderLineNumber\r\n + '</div>');\r\n }\r\n }\r\n else {\r\n output[lineIndex] = '';\r\n }\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\nLineNumbersOverlay.CLASS_NAME = 'line-numbers';\r\n// theming\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__.registerThemingParticipant)((theme, collector) => {\r\n const lineNumbers = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.editorLineNumbers);\r\n if (lineNumbers) {\r\n collector.addRule(`.monaco-editor .line-numbers { color: ${lineNumbers}; }`);\r\n }\r\n const activeLineNumber = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.editorActiveLineNumber);\r\n if (activeLineNumber) {\r\n collector.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${activeLineNumber}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RangeUtil\": () => (/* binding */ RangeUtil)\n/* harmony export */ });\n/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass FloatHorizontalRange {\r\n constructor(left, width) {\r\n this.left = left;\r\n this.width = width;\r\n }\r\n toString() {\r\n return `[${this.left},${this.width}]`;\r\n }\r\n static compare(a, b) {\r\n return a.left - b.left;\r\n }\r\n}\r\nclass RangeUtil {\r\n static _createRange() {\r\n if (!this._handyReadyRange) {\r\n this._handyReadyRange = document.createRange();\r\n }\r\n return this._handyReadyRange;\r\n }\r\n static _detachRange(range, endNode) {\r\n // Move range out of the span node, IE doesn't like having many ranges in\r\n // the same spot and will act badly for lines containing dashes ('-')\r\n range.selectNodeContents(endNode);\r\n }\r\n static _readClientRects(startElement, startOffset, endElement, endOffset, endNode) {\r\n const range = this._createRange();\r\n try {\r\n range.setStart(startElement, startOffset);\r\n range.setEnd(endElement, endOffset);\r\n return range.getClientRects();\r\n }\r\n catch (e) {\r\n // This is life ...\r\n return null;\r\n }\r\n finally {\r\n this._detachRange(range, endNode);\r\n }\r\n }\r\n static _mergeAdjacentRanges(ranges) {\r\n if (ranges.length === 1) {\r\n // There is nothing to merge\r\n return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__.HorizontalRange(ranges[0].left, ranges[0].width)];\r\n }\r\n ranges.sort(FloatHorizontalRange.compare);\r\n let result = [], resultLen = 0;\r\n let prevLeft = ranges[0].left;\r\n let prevWidth = ranges[0].width;\r\n for (let i = 1, len = ranges.length; i < len; i++) {\r\n const range = ranges[i];\r\n const myLeft = range.left;\r\n const myWidth = range.width;\r\n if (prevLeft + prevWidth + 0.9 /* account for browser's rounding errors*/ >= myLeft) {\r\n prevWidth = Math.max(prevWidth, myLeft + myWidth - prevLeft);\r\n }\r\n else {\r\n result[resultLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__.HorizontalRange(prevLeft, prevWidth);\r\n prevLeft = myLeft;\r\n prevWidth = myWidth;\r\n }\r\n }\r\n result[resultLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__.HorizontalRange(prevLeft, prevWidth);\r\n return result;\r\n }\r\n static _createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft) {\r\n if (!clientRects || clientRects.length === 0) {\r\n return null;\r\n }\r\n // We go through FloatHorizontalRange because it has been observed in bi-di text\r\n // that the clientRects are not coming in sorted from the browser\r\n const result = [];\r\n for (let i = 0, len = clientRects.length; i < len; i++) {\r\n const clientRect = clientRects[i];\r\n result[i] = new FloatHorizontalRange(Math.max(0, clientRect.left - clientRectDeltaLeft), clientRect.width);\r\n }\r\n return this._mergeAdjacentRanges(result);\r\n }\r\n static readHorizontalRanges(domNode, startChildIndex, startOffset, endChildIndex, endOffset, clientRectDeltaLeft, endNode) {\r\n // Panic check\r\n const min = 0;\r\n const max = domNode.children.length - 1;\r\n if (min > max) {\r\n return null;\r\n }\r\n startChildIndex = Math.min(max, Math.max(min, startChildIndex));\r\n endChildIndex = Math.min(max, Math.max(min, endChildIndex));\r\n if (startChildIndex === endChildIndex && startOffset === endOffset && startOffset === 0) {\r\n // We must find the position at the beginning of a <span>\r\n // To cover cases of empty <span>s, aboid using a range and use the <span>'s bounding box\r\n const clientRects = domNode.children[startChildIndex].getClientRects();\r\n return this._createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft);\r\n }\r\n // If crossing over to a span only to select offset 0, then use the previous span's maximum offset\r\n // Chrome is buggy and doesn't handle 0 offsets well sometimes.\r\n if (startChildIndex !== endChildIndex) {\r\n if (endChildIndex > 0 && endOffset === 0) {\r\n endChildIndex--;\r\n endOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n }\r\n let startElement = domNode.children[startChildIndex].firstChild;\r\n let endElement = domNode.children[endChildIndex].firstChild;\r\n if (!startElement || !endElement) {\r\n // When having an empty <span> (without any text content), try to move to the previous <span>\r\n if (!startElement && startOffset === 0 && startChildIndex > 0) {\r\n startElement = domNode.children[startChildIndex - 1].firstChild;\r\n startOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n if (!endElement && endOffset === 0 && endChildIndex > 0) {\r\n endElement = domNode.children[endChildIndex - 1].firstChild;\r\n endOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n }\r\n if (!startElement || !endElement) {\r\n return null;\r\n }\r\n startOffset = Math.min(startElement.textContent.length, Math.max(0, startOffset));\r\n endOffset = Math.min(endElement.textContent.length, Math.max(0, endOffset));\r\n const clientRects = this._readClientRects(startElement, startOffset, endElement, endOffset, endNode);\r\n return this._createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DomReadingContext\": () => (/* binding */ DomReadingContext),\n/* harmony export */ \"ViewLineOptions\": () => (/* binding */ ViewLineOptions),\n/* harmony export */ \"ViewLine\": () => (/* binding */ ViewLine)\n/* harmony export */ });\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rangeUtil.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js\");\n/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js\");\n/* harmony import */ var _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/viewLayout/lineDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js\");\n/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/viewLayout/viewLineRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js\");\n/* harmony import */ var _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/theme/common/theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst canUseFastRenderedViewLine = (function () {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative) {\r\n // In VSCode we know very well when the zoom level changes\r\n return true;\r\n }\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isLinux || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isFirefox || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isSafari) {\r\n // On Linux, it appears that zooming affects char widths (in pixels), which is unexpected.\r\n // --\r\n // Even though we read character widths correctly, having read them at a specific zoom level\r\n // does not mean they are the same at the current zoom level.\r\n // --\r\n // This could be improved if we ever figure out how to get an event when browsers zoom,\r\n // but until then we have to stick with reading client rects.\r\n // --\r\n // The same has been observed with Firefox on Windows7\r\n // --\r\n // The same has been oversved with Safari\r\n return false;\r\n }\r\n return true;\r\n})();\r\nlet monospaceAssumptionsAreValid = true;\r\nclass DomReadingContext {\r\n constructor(domNode, endNode) {\r\n this._domNode = domNode;\r\n this._clientRectDeltaLeft = 0;\r\n this._clientRectDeltaLeftRead = false;\r\n this.endNode = endNode;\r\n }\r\n get clientRectDeltaLeft() {\r\n if (!this._clientRectDeltaLeftRead) {\r\n this._clientRectDeltaLeftRead = true;\r\n this._clientRectDeltaLeft = this._domNode.getBoundingClientRect().left;\r\n }\r\n return this._clientRectDeltaLeft;\r\n }\r\n}\r\nclass ViewLineOptions {\r\n constructor(config, themeType) {\r\n this.themeType = themeType;\r\n const options = config.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this.renderWhitespace = options.get(83 /* renderWhitespace */);\r\n this.renderControlCharacters = options.get(77 /* renderControlCharacters */);\r\n this.spaceWidth = fontInfo.spaceWidth;\r\n this.middotWidth = fontInfo.middotWidth;\r\n this.wsmiddotWidth = fontInfo.wsmiddotWidth;\r\n this.useMonospaceOptimizations = (fontInfo.isMonospace\r\n && !options.get(26 /* disableMonospaceOptimizations */));\r\n this.canUseHalfwidthRightwardsArrow = fontInfo.canUseHalfwidthRightwardsArrow;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.stopRenderingLineAfter = options.get(100 /* stopRenderingLineAfter */);\r\n this.fontLigatures = options.get(39 /* fontLigatures */);\r\n }\r\n equals(other) {\r\n return (this.themeType === other.themeType\r\n && this.renderWhitespace === other.renderWhitespace\r\n && this.renderControlCharacters === other.renderControlCharacters\r\n && this.spaceWidth === other.spaceWidth\r\n && this.middotWidth === other.middotWidth\r\n && this.wsmiddotWidth === other.wsmiddotWidth\r\n && this.useMonospaceOptimizations === other.useMonospaceOptimizations\r\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\r\n && this.lineHeight === other.lineHeight\r\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\r\n && this.fontLigatures === other.fontLigatures);\r\n }\r\n}\r\nclass ViewLine {\r\n constructor(options) {\r\n this._options = options;\r\n this._isMaybeInvalid = true;\r\n this._renderedViewLine = null;\r\n }\r\n // --- begin IVisibleLineData\r\n getDomNode() {\r\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\r\n return this._renderedViewLine.domNode.domNode;\r\n }\r\n return null;\r\n }\r\n setDomNode(domNode) {\r\n if (this._renderedViewLine) {\r\n this._renderedViewLine.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(domNode);\r\n }\r\n else {\r\n throw new Error('I have no rendered view line to set the dom node to...');\r\n }\r\n }\r\n onContentChanged() {\r\n this._isMaybeInvalid = true;\r\n }\r\n onTokensChanged() {\r\n this._isMaybeInvalid = true;\r\n }\r\n onDecorationsChanged() {\r\n this._isMaybeInvalid = true;\r\n }\r\n onOptionsChanged(newOptions) {\r\n this._isMaybeInvalid = true;\r\n this._options = newOptions;\r\n }\r\n onSelectionChanged() {\r\n if (this._options.themeType === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_7__.ColorScheme.HIGH_CONTRAST || this._options.renderWhitespace === 'selection') {\r\n this._isMaybeInvalid = true;\r\n return true;\r\n }\r\n return false;\r\n }\r\n renderLine(lineNumber, deltaTop, viewportData, sb) {\r\n if (this._isMaybeInvalid === false) {\r\n // it appears that nothing relevant has changed\r\n return false;\r\n }\r\n this._isMaybeInvalid = false;\r\n const lineData = viewportData.getViewLineRenderingData(lineNumber);\r\n const options = this._options;\r\n const actualInlineDecorations = _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__.LineDecoration.filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn);\r\n // Only send selection information when needed for rendering whitespace\r\n let selectionsOnLine = null;\r\n if (options.themeType === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_7__.ColorScheme.HIGH_CONTRAST || this._options.renderWhitespace === 'selection') {\r\n const selections = viewportData.selections;\r\n for (const selection of selections) {\r\n if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) {\r\n // Selection does not intersect line\r\n continue;\r\n }\r\n const startColumn = (selection.startLineNumber === lineNumber ? selection.startColumn : lineData.minColumn);\r\n const endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn);\r\n if (startColumn < endColumn) {\r\n if (options.themeType === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_7__.ColorScheme.HIGH_CONTRAST || this._options.renderWhitespace !== 'selection') {\r\n actualInlineDecorations.push(new _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__.LineDecoration(startColumn, endColumn, 'inline-selected-text', 0 /* Regular */));\r\n }\r\n else {\r\n if (!selectionsOnLine) {\r\n selectionsOnLine = [];\r\n }\r\n selectionsOnLine.push(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.LineRange(startColumn - 1, endColumn - 1));\r\n }\r\n }\r\n }\r\n }\r\n const renderLineInput = new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.RenderLineInput(options.useMonospaceOptimizations, options.canUseHalfwidthRightwardsArrow, lineData.content, lineData.continuesWithWrappedLine, lineData.isBasicASCII, lineData.containsRTL, lineData.minColumn - 1, lineData.tokens, actualInlineDecorations, lineData.tabSize, lineData.startVisibleColumn, options.spaceWidth, options.middotWidth, options.wsmiddotWidth, options.stopRenderingLineAfter, options.renderWhitespace, options.renderControlCharacters, options.fontLigatures !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_8__.EditorFontLigatures.OFF, selectionsOnLine);\r\n if (this._renderedViewLine && this._renderedViewLine.input.equals(renderLineInput)) {\r\n // no need to do anything, we have the same render input\r\n return false;\r\n }\r\n sb.appendASCIIString('<div style=\"top:');\r\n sb.appendASCIIString(String(deltaTop));\r\n sb.appendASCIIString('px;height:');\r\n sb.appendASCIIString(String(this._options.lineHeight));\r\n sb.appendASCIIString('px;\" class=\"');\r\n sb.appendASCIIString(ViewLine.CLASS_NAME);\r\n sb.appendASCIIString('\">');\r\n const output = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.renderViewLine)(renderLineInput, sb);\r\n sb.appendASCIIString('</div>');\r\n let renderedViewLine = null;\r\n if (monospaceAssumptionsAreValid && canUseFastRenderedViewLine && lineData.isBasicASCII && options.useMonospaceOptimizations && output.containsForeignElements === 0 /* None */) {\r\n if (lineData.content.length < 300 && renderLineInput.lineTokens.getCount() < 100) {\r\n // Browser rounding errors have been observed in Chrome and IE, so using the fast\r\n // view line only for short lines. Please test before removing the length check...\r\n // ---\r\n // Another rounding error has been observed on Linux in VSCode, where <span> width\r\n // rounding errors add up to an observable large number...\r\n // ---\r\n // Also see another example of rounding errors on Windows in\r\n // https://github.com/microsoft/vscode/issues/33178\r\n renderedViewLine = new FastRenderedViewLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping);\r\n }\r\n }\r\n if (!renderedViewLine) {\r\n renderedViewLine = createRenderedLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping, output.containsRTL, output.containsForeignElements);\r\n }\r\n this._renderedViewLine = renderedViewLine;\r\n return true;\r\n }\r\n layoutLine(lineNumber, deltaTop) {\r\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\r\n this._renderedViewLine.domNode.setTop(deltaTop);\r\n this._renderedViewLine.domNode.setHeight(this._options.lineHeight);\r\n }\r\n }\r\n // --- end IVisibleLineData\r\n getWidth() {\r\n if (!this._renderedViewLine) {\r\n return 0;\r\n }\r\n return this._renderedViewLine.getWidth();\r\n }\r\n getWidthIsFast() {\r\n if (!this._renderedViewLine) {\r\n return true;\r\n }\r\n return this._renderedViewLine.getWidthIsFast();\r\n }\r\n needsMonospaceFontCheck() {\r\n if (!this._renderedViewLine) {\r\n return false;\r\n }\r\n return (this._renderedViewLine instanceof FastRenderedViewLine);\r\n }\r\n monospaceAssumptionsAreValid() {\r\n if (!this._renderedViewLine) {\r\n return monospaceAssumptionsAreValid;\r\n }\r\n if (this._renderedViewLine instanceof FastRenderedViewLine) {\r\n return this._renderedViewLine.monospaceAssumptionsAreValid();\r\n }\r\n return monospaceAssumptionsAreValid;\r\n }\r\n onMonospaceAssumptionsInvalidated() {\r\n if (this._renderedViewLine && this._renderedViewLine instanceof FastRenderedViewLine) {\r\n this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine();\r\n }\r\n }\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n if (!this._renderedViewLine) {\r\n return null;\r\n }\r\n startColumn = startColumn | 0; // @perf\r\n endColumn = endColumn | 0; // @perf\r\n startColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, startColumn));\r\n endColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, endColumn));\r\n const stopRenderingLineAfter = this._renderedViewLine.input.stopRenderingLineAfter | 0; // @perf\r\n let outsideRenderedLine = false;\r\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1 && endColumn > stopRenderingLineAfter + 1) {\r\n // This range is obviously not visible\r\n outsideRenderedLine = true;\r\n }\r\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1) {\r\n startColumn = stopRenderingLineAfter + 1;\r\n }\r\n if (stopRenderingLineAfter !== -1 && endColumn > stopRenderingLineAfter + 1) {\r\n endColumn = stopRenderingLineAfter + 1;\r\n }\r\n const horizontalRanges = this._renderedViewLine.getVisibleRangesForRange(startColumn, endColumn, context);\r\n if (horizontalRanges && horizontalRanges.length > 0) {\r\n return new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__.VisibleRanges(outsideRenderedLine, horizontalRanges);\r\n }\r\n return null;\r\n }\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n if (!this._renderedViewLine) {\r\n return 1;\r\n }\r\n return this._renderedViewLine.getColumnOfNodeOffset(lineNumber, spanNode, offset);\r\n }\r\n}\r\nViewLine.CLASS_NAME = 'view-line';\r\n/**\r\n * A rendered line which is guaranteed to contain only regular ASCII and is rendered with a monospace font.\r\n */\r\nclass FastRenderedViewLine {\r\n constructor(domNode, renderLineInput, characterMapping) {\r\n this.domNode = domNode;\r\n this.input = renderLineInput;\r\n this._characterMapping = characterMapping;\r\n this._charWidth = renderLineInput.spaceWidth;\r\n }\r\n getWidth() {\r\n return this._getCharPosition(this._characterMapping.length);\r\n }\r\n getWidthIsFast() {\r\n return true;\r\n }\r\n monospaceAssumptionsAreValid() {\r\n if (!this.domNode) {\r\n return monospaceAssumptionsAreValid;\r\n }\r\n const expectedWidth = this.getWidth();\r\n const actualWidth = this.domNode.domNode.firstChild.offsetWidth;\r\n if (Math.abs(expectedWidth - actualWidth) >= 2) {\r\n // more than 2px off\r\n console.warn(`monospace assumptions have been violated, therefore disabling monospace optimizations!`);\r\n monospaceAssumptionsAreValid = false;\r\n }\r\n return monospaceAssumptionsAreValid;\r\n }\r\n toSlowRenderedLine() {\r\n return createRenderedLine(this.domNode, this.input, this._characterMapping, false, 0 /* None */);\r\n }\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n const startPosition = this._getCharPosition(startColumn);\r\n const endPosition = this._getCharPosition(endColumn);\r\n return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__.HorizontalRange(startPosition, endPosition - startPosition)];\r\n }\r\n _getCharPosition(column) {\r\n const charOffset = this._characterMapping.getAbsoluteOffsets();\r\n if (charOffset.length === 0) {\r\n // No characters on this line\r\n return 0;\r\n }\r\n return Math.round(this._charWidth * charOffset[column - 1]);\r\n }\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n const spanNodeTextContentLength = spanNode.textContent.length;\r\n let spanIndex = -1;\r\n while (spanNode) {\r\n spanNode = spanNode.previousSibling;\r\n spanIndex++;\r\n }\r\n const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\r\n return charOffset + 1;\r\n }\r\n}\r\n/**\r\n * Every time we render a line, we save what we have rendered in an instance of this class.\r\n */\r\nclass RenderedViewLine {\r\n constructor(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n this.domNode = domNode;\r\n this.input = renderLineInput;\r\n this._characterMapping = characterMapping;\r\n this._isWhitespaceOnly = /^\\s*$/.test(renderLineInput.lineContent);\r\n this._containsForeignElements = containsForeignElements;\r\n this._cachedWidth = -1;\r\n this._pixelOffsetCache = null;\r\n if (!containsRTL || this._characterMapping.length === 0 /* the line is empty */) {\r\n this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1));\r\n for (let column = 0, len = this._characterMapping.length; column <= len; column++) {\r\n this._pixelOffsetCache[column] = -1;\r\n }\r\n }\r\n }\r\n // --- Reading from the DOM methods\r\n _getReadingTarget(myDomNode) {\r\n return myDomNode.domNode.firstChild;\r\n }\r\n /**\r\n * Width of the line in pixels\r\n */\r\n getWidth() {\r\n if (!this.domNode) {\r\n return 0;\r\n }\r\n if (this._cachedWidth === -1) {\r\n this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth;\r\n }\r\n return this._cachedWidth;\r\n }\r\n getWidthIsFast() {\r\n if (this._cachedWidth === -1) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Visible ranges for a model range\r\n */\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n if (!this.domNode) {\r\n return null;\r\n }\r\n if (this._pixelOffsetCache !== null) {\r\n // the text is LTR\r\n const startOffset = this._readPixelOffset(this.domNode, startColumn, context);\r\n if (startOffset === -1) {\r\n return null;\r\n }\r\n const endOffset = this._readPixelOffset(this.domNode, endColumn, context);\r\n if (endOffset === -1) {\r\n return null;\r\n }\r\n return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__.HorizontalRange(startOffset, endOffset - startOffset)];\r\n }\r\n return this._readVisibleRangesForRange(this.domNode, startColumn, endColumn, context);\r\n }\r\n _readVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n if (startColumn === endColumn) {\r\n const pixelOffset = this._readPixelOffset(domNode, startColumn, context);\r\n if (pixelOffset === -1) {\r\n return null;\r\n }\r\n else {\r\n return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__.HorizontalRange(pixelOffset, 0)];\r\n }\r\n }\r\n else {\r\n return this._readRawVisibleRangesForRange(domNode, startColumn, endColumn, context);\r\n }\r\n }\r\n _readPixelOffset(domNode, column, context) {\r\n if (this._characterMapping.length === 0) {\r\n // This line has no content\r\n if (this._containsForeignElements === 0 /* None */) {\r\n // We can assume the line is really empty\r\n return 0;\r\n }\r\n if (this._containsForeignElements === 2 /* After */) {\r\n // We have foreign elements after the (empty) line\r\n return 0;\r\n }\r\n if (this._containsForeignElements === 1 /* Before */) {\r\n // We have foreign elements before the (empty) line\r\n return this.getWidth();\r\n }\r\n // We have foreign elements before & after the (empty) line\r\n const readingTarget = this._getReadingTarget(domNode);\r\n if (readingTarget.firstChild) {\r\n return readingTarget.firstChild.offsetWidth;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n if (this._pixelOffsetCache !== null) {\r\n // the text is LTR\r\n const cachedPixelOffset = this._pixelOffsetCache[column];\r\n if (cachedPixelOffset !== -1) {\r\n return cachedPixelOffset;\r\n }\r\n const result = this._actualReadPixelOffset(domNode, column, context);\r\n this._pixelOffsetCache[column] = result;\r\n return result;\r\n }\r\n return this._actualReadPixelOffset(domNode, column, context);\r\n }\r\n _actualReadPixelOffset(domNode, column, context) {\r\n if (this._characterMapping.length === 0) {\r\n // This line has no content\r\n const r = _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__.RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), 0, 0, 0, 0, context.clientRectDeltaLeft, context.endNode);\r\n if (!r || r.length === 0) {\r\n return -1;\r\n }\r\n return r[0].left;\r\n }\r\n if (column === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0 /* None */) {\r\n // This branch helps in the case of whitespace only lines which have a width set\r\n return this.getWidth();\r\n }\r\n const partData = this._characterMapping.charOffsetToPartData(column - 1);\r\n const partIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getPartIndex(partData);\r\n const charOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getCharIndex(partData);\r\n const r = _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__.RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), partIndex, charOffsetInPart, partIndex, charOffsetInPart, context.clientRectDeltaLeft, context.endNode);\r\n if (!r || r.length === 0) {\r\n return -1;\r\n }\r\n const result = r[0].left;\r\n if (this.input.isBasicASCII) {\r\n const charOffset = this._characterMapping.getAbsoluteOffsets();\r\n const expectedResult = Math.round(this.input.spaceWidth * charOffset[column - 1]);\r\n if (Math.abs(expectedResult - result) <= 1) {\r\n return expectedResult;\r\n }\r\n }\r\n return result;\r\n }\r\n _readRawVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n if (startColumn === 1 && endColumn === this._characterMapping.length) {\r\n // This branch helps IE with bidi text & gives a performance boost to other browsers when reading visible ranges for an entire line\r\n return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__.HorizontalRange(0, this.getWidth())];\r\n }\r\n const startPartData = this._characterMapping.charOffsetToPartData(startColumn - 1);\r\n const startPartIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getPartIndex(startPartData);\r\n const startCharOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getCharIndex(startPartData);\r\n const endPartData = this._characterMapping.charOffsetToPartData(endColumn - 1);\r\n const endPartIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getPartIndex(endPartData);\r\n const endCharOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__.CharacterMapping.getCharIndex(endPartData);\r\n return _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__.RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), startPartIndex, startCharOffsetInPart, endPartIndex, endCharOffsetInPart, context.clientRectDeltaLeft, context.endNode);\r\n }\r\n /**\r\n * Returns the column for the text found at a specific offset inside a rendered dom node\r\n */\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n const spanNodeTextContentLength = spanNode.textContent.length;\r\n let spanIndex = -1;\r\n while (spanNode) {\r\n spanNode = spanNode.previousSibling;\r\n spanIndex++;\r\n }\r\n const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\r\n return charOffset + 1;\r\n }\r\n}\r\nclass WebKitRenderedViewLine extends RenderedViewLine {\r\n _readVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n const output = super._readVisibleRangesForRange(domNode, startColumn, endColumn, context);\r\n if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) {\r\n return output;\r\n }\r\n // WebKit is buggy and returns an expanded range (to contain words in some cases)\r\n // The last client rect is enlarged (I think)\r\n if (!this.input.containsRTL) {\r\n // This is an attempt to patch things up\r\n // Find position of last column\r\n const endPixelOffset = this._readPixelOffset(domNode, endColumn, context);\r\n if (endPixelOffset !== -1) {\r\n const lastRange = output[output.length - 1];\r\n if (lastRange.left < endPixelOffset) {\r\n // Trim down the width of the last visible range to not go after the last column's position\r\n lastRange.width = endPixelOffset - lastRange.left;\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nconst createRenderedLine = (function () {\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__.isWebKit) {\r\n return createWebKitRenderedLine;\r\n }\r\n return createNormalRenderedLine;\r\n})();\r\nfunction createWebKitRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n return new WebKitRenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\r\n}\r\nfunction createNormalRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n return new RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewLines\": () => (/* binding */ ViewLines)\n/* harmony export */ });\n/* harmony import */ var _viewLines_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./viewLines.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../view/viewLayer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _viewLine_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./viewLine.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js\");\n/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/browser/ui/mouseCursor/mouseCursor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass LastRenderedData {\r\n constructor() {\r\n this._currentVisibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range(1, 1, 1, 1);\r\n }\r\n getCurrentVisibleRange() {\r\n return this._currentVisibleRange;\r\n }\r\n setCurrentVisibleRange(currentVisibleRange) {\r\n this._currentVisibleRange = currentVisibleRange;\r\n }\r\n}\r\nclass HorizontalRevealRangeRequest {\r\n constructor(lineNumber, startColumn, endColumn, startScrollTop, stopScrollTop, scrollType) {\r\n this.lineNumber = lineNumber;\r\n this.startColumn = startColumn;\r\n this.endColumn = endColumn;\r\n this.startScrollTop = startScrollTop;\r\n this.stopScrollTop = stopScrollTop;\r\n this.scrollType = scrollType;\r\n this.type = 'range';\r\n this.minLineNumber = lineNumber;\r\n this.maxLineNumber = lineNumber;\r\n }\r\n}\r\nclass HorizontalRevealSelectionsRequest {\r\n constructor(selections, startScrollTop, stopScrollTop, scrollType) {\r\n this.selections = selections;\r\n this.startScrollTop = startScrollTop;\r\n this.stopScrollTop = stopScrollTop;\r\n this.scrollType = scrollType;\r\n this.type = 'selections';\r\n let minLineNumber = selections[0].startLineNumber;\r\n let maxLineNumber = selections[0].endLineNumber;\r\n for (let i = 1, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n minLineNumber = Math.min(minLineNumber, selection.startLineNumber);\r\n maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber);\r\n }\r\n this.minLineNumber = minLineNumber;\r\n this.maxLineNumber = maxLineNumber;\r\n }\r\n}\r\nclass ViewLines extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__.ViewPart {\r\n constructor(context, linesContent) {\r\n super(context);\r\n this._linesContent = linesContent;\r\n this._textRangeRestingSpot = document.createElement('div');\r\n this._visibleLines = new _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_4__.VisibleLinesCollection(this);\r\n this.domNode = this._visibleLines.domNode;\r\n const conf = this._context.configuration;\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._isViewportWrapping = wrappingInfo.isViewportWrapping;\r\n this._revealHorizontalRightPadding = options.get(84 /* revealHorizontalRightPadding */);\r\n this._cursorSurroundingLines = options.get(22 /* cursorSurroundingLines */);\r\n this._cursorSurroundingLinesStyle = options.get(23 /* cursorSurroundingLinesStyle */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._viewLineOptions = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.ViewLineOptions(conf, this._context.theme.type);\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__.PartFingerprints.write(this.domNode, 7 /* ViewLines */);\r\n this.domNode.setClassName(`view-lines ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_10__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__.Configuration.applyFontInfo(this.domNode, fontInfo);\r\n // --- width & height\r\n this._maxLineWidth = 0;\r\n this._asyncUpdateLineWidths = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.RunOnceScheduler(() => {\r\n this._updateLineWidthsSlow();\r\n }, 200);\r\n this._asyncCheckMonospaceFontAssumptions = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.RunOnceScheduler(() => {\r\n this._checkMonospaceFontAssumptions();\r\n }, 2000);\r\n this._lastRenderedData = new LastRenderedData();\r\n this._horizontalRevealRequest = null;\r\n }\r\n dispose() {\r\n this._asyncUpdateLineWidths.dispose();\r\n this._asyncCheckMonospaceFontAssumptions.dispose();\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this.domNode;\r\n }\r\n // ---- begin IVisibleLinesHost\r\n createVisibleLine() {\r\n return new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.ViewLine(this._viewLineOptions);\r\n }\r\n // ---- end IVisibleLinesHost\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n this._visibleLines.onConfigurationChanged(e);\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._maxLineWidth = 0;\r\n }\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._isViewportWrapping = wrappingInfo.isViewportWrapping;\r\n this._revealHorizontalRightPadding = options.get(84 /* revealHorizontalRightPadding */);\r\n this._cursorSurroundingLines = options.get(22 /* cursorSurroundingLines */);\r\n this._cursorSurroundingLinesStyle = options.get(23 /* cursorSurroundingLinesStyle */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__.Configuration.applyFontInfo(this.domNode, fontInfo);\r\n this._onOptionsMaybeChanged();\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._maxLineWidth = 0;\r\n }\r\n return true;\r\n }\r\n _onOptionsMaybeChanged() {\r\n const conf = this._context.configuration;\r\n const newViewLineOptions = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.ViewLineOptions(conf, this._context.theme.type);\r\n if (!this._viewLineOptions.equals(newViewLineOptions)) {\r\n this._viewLineOptions = newViewLineOptions;\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n line.onOptionsChanged(this._viewLineOptions);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n let r = false;\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n r = this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged() || r;\r\n }\r\n return r;\r\n }\r\n onDecorationsChanged(e) {\r\n if (true /*e.inlineDecorationsChanged*/) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n this._visibleLines.getVisibleLine(lineNumber).onDecorationsChanged();\r\n }\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n const shouldRender = this._visibleLines.onFlushed(e);\r\n this._maxLineWidth = 0;\r\n return shouldRender;\r\n }\r\n onLinesChanged(e) {\r\n return this._visibleLines.onLinesChanged(e);\r\n }\r\n onLinesDeleted(e) {\r\n return this._visibleLines.onLinesDeleted(e);\r\n }\r\n onLinesInserted(e) {\r\n return this._visibleLines.onLinesInserted(e);\r\n }\r\n onRevealRangeRequest(e) {\r\n // Using the future viewport here in order to handle multiple\r\n // incoming reveal range requests that might all desire to be animated\r\n const desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.selections, e.verticalType);\r\n if (desiredScrollTop === -1) {\r\n // marker to abort the reveal range request\r\n return false;\r\n }\r\n // validate the new desired scroll top\r\n let newScrollPosition = this._context.viewLayout.validateScrollPosition({ scrollTop: desiredScrollTop });\r\n if (e.revealHorizontal) {\r\n if (e.range && e.range.startLineNumber !== e.range.endLineNumber) {\r\n // Two or more lines? => scroll to base (That's how you see most of the two lines)\r\n newScrollPosition = {\r\n scrollTop: newScrollPosition.scrollTop,\r\n scrollLeft: 0\r\n };\r\n }\r\n else if (e.range) {\r\n // We don't necessarily know the horizontal offset of this range since the line might not be in the view...\r\n this._horizontalRevealRequest = new HorizontalRevealRangeRequest(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType);\r\n }\r\n else if (e.selections && e.selections.length > 0) {\r\n this._horizontalRevealRequest = new HorizontalRevealSelectionsRequest(e.selections, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType);\r\n }\r\n }\r\n else {\r\n this._horizontalRevealRequest = null;\r\n }\r\n const scrollTopDelta = Math.abs(this._context.viewLayout.getCurrentScrollTop() - newScrollPosition.scrollTop);\r\n const scrollType = (scrollTopDelta <= this._lineHeight ? 1 /* Immediate */ : e.scrollType);\r\n this._context.model.setScrollPosition(newScrollPosition, scrollType);\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n if (this._horizontalRevealRequest && e.scrollLeftChanged) {\r\n // cancel any outstanding horizontal reveal request if someone else scrolls horizontally.\r\n this._horizontalRevealRequest = null;\r\n }\r\n if (this._horizontalRevealRequest && e.scrollTopChanged) {\r\n const min = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\r\n const max = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\r\n if (e.scrollTop < min || e.scrollTop > max) {\r\n // cancel any outstanding horizontal reveal request if someone else scrolls vertically.\r\n this._horizontalRevealRequest = null;\r\n }\r\n }\r\n this.domNode.setWidth(e.scrollWidth);\r\n return this._visibleLines.onScrollChanged(e) || true;\r\n }\r\n onTokensChanged(e) {\r\n return this._visibleLines.onTokensChanged(e);\r\n }\r\n onZonesChanged(e) {\r\n this._context.model.setMaxLineWidth(this._maxLineWidth);\r\n return this._visibleLines.onZonesChanged(e);\r\n }\r\n onThemeChanged(e) {\r\n return this._onOptionsMaybeChanged();\r\n }\r\n // ---- end view event handlers\r\n // ----------- HELPERS FOR OTHERS\r\n getPositionFromDOMInfo(spanNode, offset) {\r\n const viewLineDomNode = this._getViewLineDomNode(spanNode);\r\n if (viewLineDomNode === null) {\r\n // Couldn't find view line node\r\n return null;\r\n }\r\n const lineNumber = this._getLineNumberFor(viewLineDomNode);\r\n if (lineNumber === -1) {\r\n // Couldn't find view line node\r\n return null;\r\n }\r\n if (lineNumber < 1 || lineNumber > this._context.model.getLineCount()) {\r\n // lineNumber is outside range\r\n return null;\r\n }\r\n if (this._context.model.getLineMaxColumn(lineNumber) === 1) {\r\n // Line is empty\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position(lineNumber, 1);\r\n }\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n // Couldn't find line\r\n return null;\r\n }\r\n let column = this._visibleLines.getVisibleLine(lineNumber).getColumnOfNodeOffset(lineNumber, spanNode, offset);\r\n const minColumn = this._context.model.getLineMinColumn(lineNumber);\r\n if (column < minColumn) {\r\n column = minColumn;\r\n }\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position(lineNumber, column);\r\n }\r\n _getViewLineDomNode(node) {\r\n while (node && node.nodeType === 1) {\r\n if (node.className === _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.ViewLine.CLASS_NAME) {\r\n return node;\r\n }\r\n node = node.parentElement;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @returns the line number of this view line dom node.\r\n */\r\n _getLineNumberFor(domNode) {\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n if (domNode === line.getDomNode()) {\r\n return lineNumber;\r\n }\r\n }\r\n return -1;\r\n }\r\n getLineWidth(lineNumber) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n // Couldn't find line\r\n return -1;\r\n }\r\n return this._visibleLines.getVisibleLine(lineNumber).getWidth();\r\n }\r\n linesVisibleRangesForRange(_range, includeNewLines) {\r\n if (this.shouldRender()) {\r\n // Cannot read from the DOM because it is dirty\r\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\r\n return null;\r\n }\r\n const originalEndLineNumber = _range.endLineNumber;\r\n const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.intersectRanges(_range, this._lastRenderedData.getCurrentVisibleRange());\r\n if (!range) {\r\n return null;\r\n }\r\n let visibleRanges = [], visibleRangesLen = 0;\r\n const domReadingContext = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot);\r\n let nextLineModelLineNumber = 0;\r\n if (includeNewLines) {\r\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position(range.startLineNumber, 1)).lineNumber;\r\n }\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) {\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n continue;\r\n }\r\n const startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1;\r\n const endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.model.getLineMaxColumn(lineNumber);\r\n const visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, domReadingContext);\r\n if (!visibleRangesForLine) {\r\n continue;\r\n }\r\n if (includeNewLines && lineNumber < originalEndLineNumber) {\r\n const currentLineModelLineNumber = nextLineModelLineNumber;\r\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position(lineNumber + 1, 1)).lineNumber;\r\n if (currentLineModelLineNumber !== nextLineModelLineNumber) {\r\n visibleRangesForLine.ranges[visibleRangesForLine.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth;\r\n }\r\n }\r\n visibleRanges[visibleRangesLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__.LineVisibleRanges(visibleRangesForLine.outsideRenderedLine, lineNumber, visibleRangesForLine.ranges);\r\n }\r\n if (visibleRangesLen === 0) {\r\n return null;\r\n }\r\n return visibleRanges;\r\n }\r\n _visibleRangesForLineRange(lineNumber, startColumn, endColumn) {\r\n if (this.shouldRender()) {\r\n // Cannot read from the DOM because it is dirty\r\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\r\n return null;\r\n }\r\n if (lineNumber < this._visibleLines.getStartLineNumber() || lineNumber > this._visibleLines.getEndLineNumber()) {\r\n return null;\r\n }\r\n return this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot));\r\n }\r\n visibleRangeForPosition(position) {\r\n const visibleRanges = this._visibleRangesForLineRange(position.lineNumber, position.column, position.column);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n return new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__.HorizontalPosition(visibleRanges.outsideRenderedLine, visibleRanges.ranges[0].left);\r\n }\r\n // --- implementation\r\n updateLineWidths() {\r\n this._updateLineWidths(false);\r\n }\r\n /**\r\n * Updates the max line width if it is fast to compute.\r\n * Returns true if all lines were taken into account.\r\n * Returns false if some lines need to be reevaluated (in a slow fashion).\r\n */\r\n _updateLineWidthsFast() {\r\n return this._updateLineWidths(true);\r\n }\r\n _updateLineWidthsSlow() {\r\n this._updateLineWidths(false);\r\n }\r\n _updateLineWidths(fast) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n let localMaxLineWidth = 1;\r\n let allWidthsComputed = true;\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (fast && !visibleLine.getWidthIsFast()) {\r\n // Cannot compute width in a fast way for this line\r\n allWidthsComputed = false;\r\n continue;\r\n }\r\n localMaxLineWidth = Math.max(localMaxLineWidth, visibleLine.getWidth());\r\n }\r\n if (allWidthsComputed && rendStartLineNumber === 1 && rendEndLineNumber === this._context.model.getLineCount()) {\r\n // we know the max line width for all the lines\r\n this._maxLineWidth = 0;\r\n }\r\n this._ensureMaxLineWidth(localMaxLineWidth);\r\n return allWidthsComputed;\r\n }\r\n _checkMonospaceFontAssumptions() {\r\n // Problems with monospace assumptions are more apparent for longer lines,\r\n // as small rounding errors start to sum up, so we will select the longest\r\n // line for a closer inspection\r\n let longestLineNumber = -1;\r\n let longestWidth = -1;\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (visibleLine.needsMonospaceFontCheck()) {\r\n const lineWidth = visibleLine.getWidth();\r\n if (lineWidth > longestWidth) {\r\n longestWidth = lineWidth;\r\n longestLineNumber = lineNumber;\r\n }\r\n }\r\n }\r\n if (longestLineNumber === -1) {\r\n return;\r\n }\r\n if (!this._visibleLines.getVisibleLine(longestLineNumber).monospaceAssumptionsAreValid()) {\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n visibleLine.onMonospaceAssumptionsInvalidated();\r\n }\r\n }\r\n }\r\n prepareRender() {\r\n throw new Error('Not supported');\r\n }\r\n render() {\r\n throw new Error('Not supported');\r\n }\r\n renderText(viewportData) {\r\n // (1) render lines - ensures lines are in the DOM\r\n this._visibleLines.renderLines(viewportData);\r\n this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange);\r\n this.domNode.setWidth(this._context.viewLayout.getScrollWidth());\r\n this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000));\r\n // (2) compute horizontal scroll position:\r\n // - this must happen after the lines are in the DOM since it might need a line that rendered just now\r\n // - it might change `scrollWidth` and `scrollLeft`\r\n if (this._horizontalRevealRequest) {\r\n const horizontalRevealRequest = this._horizontalRevealRequest;\r\n // Check that we have the line that contains the horizontal range in the viewport\r\n if (viewportData.startLineNumber <= horizontalRevealRequest.minLineNumber && horizontalRevealRequest.maxLineNumber <= viewportData.endLineNumber) {\r\n this._horizontalRevealRequest = null;\r\n // allow `visibleRangesForRange2` to work\r\n this.onDidRender();\r\n // compute new scroll position\r\n const newScrollLeft = this._computeScrollLeftToReveal(horizontalRevealRequest);\r\n if (newScrollLeft) {\r\n if (!this._isViewportWrapping) {\r\n // ensure `scrollWidth` is large enough\r\n this._ensureMaxLineWidth(newScrollLeft.maxHorizontalOffset);\r\n }\r\n // set `scrollLeft`\r\n this._context.model.setScrollPosition({\r\n scrollLeft: newScrollLeft.scrollLeft\r\n }, horizontalRevealRequest.scrollType);\r\n }\r\n }\r\n }\r\n // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small)\r\n if (!this._updateLineWidthsFast()) {\r\n // Computing the width of some lines would be slow => delay it\r\n this._asyncUpdateLineWidths.schedule();\r\n }\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLinux && !this._asyncCheckMonospaceFontAssumptions.isScheduled()) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (visibleLine.needsMonospaceFontCheck()) {\r\n this._asyncCheckMonospaceFontAssumptions.schedule();\r\n break;\r\n }\r\n }\r\n }\r\n // (3) handle scrolling\r\n this._linesContent.setLayerHinting(this._canUseLayerHinting);\r\n this._linesContent.setContain('strict');\r\n const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;\r\n this._linesContent.setTop(-adjustedScrollTop);\r\n this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());\r\n }\r\n // --- width\r\n _ensureMaxLineWidth(lineWidth) {\r\n const iLineWidth = Math.ceil(lineWidth);\r\n if (this._maxLineWidth < iLineWidth) {\r\n this._maxLineWidth = iLineWidth;\r\n this._context.model.setMaxLineWidth(this._maxLineWidth);\r\n }\r\n }\r\n _computeScrollTopToRevealRange(viewport, source, range, selections, verticalType) {\r\n const viewportStartY = viewport.top;\r\n const viewportHeight = viewport.height;\r\n const viewportEndY = viewportStartY + viewportHeight;\r\n let boxIsSingleRange;\r\n let boxStartY;\r\n let boxEndY;\r\n // Have a box that includes one extra line height (for the horizontal scrollbar)\r\n if (selections && selections.length > 0) {\r\n let minLineNumber = selections[0].startLineNumber;\r\n let maxLineNumber = selections[0].endLineNumber;\r\n for (let i = 1, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n minLineNumber = Math.min(minLineNumber, selection.startLineNumber);\r\n maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber);\r\n }\r\n boxIsSingleRange = false;\r\n boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(minLineNumber);\r\n boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(maxLineNumber) + this._lineHeight;\r\n }\r\n else if (range) {\r\n boxIsSingleRange = true;\r\n boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber);\r\n boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight;\r\n }\r\n else {\r\n return -1;\r\n }\r\n const shouldIgnoreScrollOff = source === 'mouse' && this._cursorSurroundingLinesStyle === 'default';\r\n if (!shouldIgnoreScrollOff) {\r\n const context = Math.min((viewportHeight / this._lineHeight) / 2, this._cursorSurroundingLines);\r\n boxStartY -= context * this._lineHeight;\r\n boxEndY += Math.max(0, (context - 1)) * this._lineHeight;\r\n }\r\n if (verticalType === 0 /* Simple */ || verticalType === 4 /* Bottom */) {\r\n // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom\r\n boxEndY += this._lineHeight;\r\n }\r\n let newScrollTop;\r\n if (boxEndY - boxStartY > viewportHeight) {\r\n // the box is larger than the viewport ... scroll to its top\r\n if (!boxIsSingleRange) {\r\n // do not reveal multiple cursors if there are more than fit the viewport\r\n return -1;\r\n }\r\n newScrollTop = boxStartY;\r\n }\r\n else if (verticalType === 5 /* NearTop */ || verticalType === 6 /* NearTopIfOutsideViewport */) {\r\n if (verticalType === 6 /* NearTopIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) {\r\n // Box is already in the viewport... do nothing\r\n newScrollTop = viewportStartY;\r\n }\r\n else {\r\n // We want a gap that is 20% of the viewport, but with a minimum of 5 lines\r\n const desiredGapAbove = Math.max(5 * this._lineHeight, viewportHeight * 0.2);\r\n // Try to scroll just above the box with the desired gap\r\n const desiredScrollTop = boxStartY - desiredGapAbove;\r\n // But ensure that the box is not pushed out of viewport\r\n const minScrollTop = boxEndY - viewportHeight;\r\n newScrollTop = Math.max(minScrollTop, desiredScrollTop);\r\n }\r\n }\r\n else if (verticalType === 1 /* Center */ || verticalType === 2 /* CenterIfOutsideViewport */) {\r\n if (verticalType === 2 /* CenterIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) {\r\n // Box is already in the viewport... do nothing\r\n newScrollTop = viewportStartY;\r\n }\r\n else {\r\n // Box is outside the viewport... center it\r\n const boxMiddleY = (boxStartY + boxEndY) / 2;\r\n newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2);\r\n }\r\n }\r\n else {\r\n newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === 3 /* Top */, verticalType === 4 /* Bottom */);\r\n }\r\n return newScrollTop;\r\n }\r\n _computeScrollLeftToReveal(horizontalRevealRequest) {\r\n const viewport = this._context.viewLayout.getCurrentViewport();\r\n const viewportStartX = viewport.left;\r\n const viewportEndX = viewportStartX + viewport.width;\r\n let boxStartX = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let boxEndX = 0;\r\n if (horizontalRevealRequest.type === 'range') {\r\n const visibleRanges = this._visibleRangesForLineRange(horizontalRevealRequest.lineNumber, horizontalRevealRequest.startColumn, horizontalRevealRequest.endColumn);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n for (const visibleRange of visibleRanges.ranges) {\r\n boxStartX = Math.min(boxStartX, visibleRange.left);\r\n boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width);\r\n }\r\n }\r\n else {\r\n for (const selection of horizontalRevealRequest.selections) {\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n return null;\r\n }\r\n const visibleRanges = this._visibleRangesForLineRange(selection.startLineNumber, selection.startColumn, selection.endColumn);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n for (const visibleRange of visibleRanges.ranges) {\r\n boxStartX = Math.min(boxStartX, visibleRange.left);\r\n boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width);\r\n }\r\n }\r\n }\r\n boxStartX = Math.max(0, boxStartX - ViewLines.HORIZONTAL_EXTRA_PX);\r\n boxEndX += this._revealHorizontalRightPadding;\r\n if (horizontalRevealRequest.type === 'selections' && boxEndX - boxStartX > viewport.width) {\r\n return null;\r\n }\r\n const newScrollLeft = this._computeMinimumScrolling(viewportStartX, viewportEndX, boxStartX, boxEndX);\r\n return {\r\n scrollLeft: newScrollLeft,\r\n maxHorizontalOffset: boxEndX\r\n };\r\n }\r\n _computeMinimumScrolling(viewportStart, viewportEnd, boxStart, boxEnd, revealAtStart, revealAtEnd) {\r\n viewportStart = viewportStart | 0;\r\n viewportEnd = viewportEnd | 0;\r\n boxStart = boxStart | 0;\r\n boxEnd = boxEnd | 0;\r\n revealAtStart = !!revealAtStart;\r\n revealAtEnd = !!revealAtEnd;\r\n const viewportLength = viewportEnd - viewportStart;\r\n const boxLength = boxEnd - boxStart;\r\n if (boxLength < viewportLength) {\r\n // The box would fit in the viewport\r\n if (revealAtStart) {\r\n return boxStart;\r\n }\r\n if (revealAtEnd) {\r\n return Math.max(0, boxEnd - viewportLength);\r\n }\r\n if (boxStart < viewportStart) {\r\n // The box is above the viewport\r\n return boxStart;\r\n }\r\n else if (boxEnd > viewportEnd) {\r\n // The box is below the viewport\r\n return Math.max(0, boxEnd - viewportLength);\r\n }\r\n }\r\n else {\r\n // The box would not fit in the viewport\r\n // Reveal the beginning of the box\r\n return boxStart;\r\n }\r\n return viewportStart;\r\n }\r\n}\r\n/**\r\n * Adds this amount of pixels to the right of lines (no-one wants to type near the edge of the viewport)\r\n */\r\nViewLines.HORIZONTAL_EXTRA_PX = 30;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js":
|
||
/*!*********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js ***!
|
||
\*********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LinesDecorationsOverlay\": () => (/* binding */ LinesDecorationsOverlay)\n/* harmony export */ });\n/* harmony import */ var _linesDecorations_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linesDecorations.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css\");\n/* harmony import */ var _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../glyphMargin/glyphMargin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass LinesDecorationsOverlay extends _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__.DedupOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n this._decorationsWidth = layoutInfo.decorationsWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n this._decorationsWidth = layoutInfo.decorationsWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getDecorations(ctx) {\r\n const decorations = ctx.getDecorationsInViewport();\r\n let r = [], rLen = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const linesDecorationsClassName = d.options.linesDecorationsClassName;\r\n if (linesDecorationsClassName) {\r\n r[rLen++] = new _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__.DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, linesDecorationsClassName);\r\n }\r\n const firstLineDecorationClassName = d.options.firstLineDecorationClassName;\r\n if (firstLineDecorationClassName) {\r\n r[rLen++] = new _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__.DecorationToRender(d.range.startLineNumber, d.range.startLineNumber, firstLineDecorationClassName);\r\n }\r\n }\r\n return r;\r\n }\r\n prepareRender(ctx) {\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\r\n const left = this._decorationsLeft.toString();\r\n const width = this._decorationsWidth.toString();\r\n const common = '\" style=\"left:' + left + 'px;width:' + width + 'px;\"></div>';\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const classNames = toRender[lineIndex];\r\n let lineOutput = '';\r\n for (let i = 0, len = classNames.length; i < len; i++) {\r\n lineOutput += '<div class=\"cldr ' + classNames[i] + common;\r\n }\r\n output[lineIndex] = lineOutput;\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n return this._renderResult[lineNumber - startLineNumber];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Margin\": () => (/* binding */ Margin)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass Margin extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_1__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('div'));\r\n this._domNode.setClassName(Margin.OUTER_CLASS_NAME);\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._glyphMarginBackgroundDomNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('div'));\r\n this._glyphMarginBackgroundDomNode.setClassName(Margin.CLASS_NAME);\r\n this._domNode.appendChild(this._glyphMarginBackgroundDomNode);\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollTopChanged;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setLayerHinting(this._canUseLayerHinting);\r\n this._domNode.setContain('strict');\r\n const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;\r\n this._domNode.setTop(-adjustedScrollTop);\r\n const height = Math.min(ctx.scrollHeight, 1000000);\r\n this._domNode.setHeight(height);\r\n this._domNode.setWidth(this._contentLeft);\r\n this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);\r\n this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);\r\n this._glyphMarginBackgroundDomNode.setHeight(height);\r\n }\r\n}\r\nMargin.CLASS_NAME = 'glyph-margin';\r\nMargin.OUTER_CLASS_NAME = 'margin';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js":
|
||
/*!***********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js ***!
|
||
\***********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarginViewLineDecorationsOverlay\": () => (/* binding */ MarginViewLineDecorationsOverlay)\n/* harmony export */ });\n/* harmony import */ var _marginDecorations_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./marginDecorations.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css\");\n/* harmony import */ var _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../glyphMargin/glyphMargin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass MarginViewLineDecorationsOverlay extends _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__.DedupOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getDecorations(ctx) {\r\n const decorations = ctx.getDecorationsInViewport();\r\n let r = [], rLen = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const marginClassName = d.options.marginClassName;\r\n if (marginClassName) {\r\n r[rLen++] = new _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__.DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, marginClassName);\r\n }\r\n }\r\n return r;\r\n }\r\n prepareRender(ctx) {\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const classNames = toRender[lineIndex];\r\n let lineOutput = '';\r\n for (let i = 0, len = classNames.length; i < len; i++) {\r\n lineOutput += '<div class=\"cmdr ' + classNames[i] + '\" style=\"\"></div>';\r\n }\r\n output[lineIndex] = lineOutput;\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n return this._renderResult[lineNumber - startLineNumber];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Minimap\": () => (/* binding */ Minimap)\n/* harmony export */ });\n/* harmony import */ var _minimap_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimap.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../view/viewLayer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_rgba_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/core/rgba.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js\");\n/* harmony import */ var _common_viewModel_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/viewModel/minimapTokensColorTracker.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js\");\n/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../base/browser/touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _minimapCharRendererFactory_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./minimapCharRendererFactory.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\r\n */\r\nconst MOUSE_DRAG_RESET_DISTANCE = 140;\r\nconst GUTTER_DECORATION_WIDTH = 2;\r\nclass MinimapOptions {\r\n constructor(configuration, theme, tokensColorTracker) {\r\n const options = configuration.options;\r\n const pixelRatio = options.get(122 /* pixelRatio */);\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const minimapLayout = layoutInfo.minimap;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const minimapOpts = options.get(59 /* minimap */);\r\n this.renderMinimap = minimapLayout.renderMinimap;\r\n this.size = minimapOpts.size;\r\n this.minimapHeightIsEditorHeight = minimapLayout.minimapHeightIsEditorHeight;\r\n this.scrollBeyondLastLine = options.get(89 /* scrollBeyondLastLine */);\r\n this.showSlider = minimapOpts.showSlider;\r\n this.pixelRatio = pixelRatio;\r\n this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.minimapLeft = minimapLayout.minimapLeft;\r\n this.minimapWidth = minimapLayout.minimapWidth;\r\n this.minimapHeight = layoutInfo.height;\r\n this.canvasInnerWidth = minimapLayout.minimapCanvasInnerWidth;\r\n this.canvasInnerHeight = minimapLayout.minimapCanvasInnerHeight;\r\n this.canvasOuterWidth = minimapLayout.minimapCanvasOuterWidth;\r\n this.canvasOuterHeight = minimapLayout.minimapCanvasOuterHeight;\r\n this.isSampling = minimapLayout.minimapIsSampling;\r\n this.editorHeight = layoutInfo.height;\r\n this.fontScale = minimapLayout.minimapScale;\r\n this.minimapLineHeight = minimapLayout.minimapLineHeight;\r\n this.minimapCharWidth = 1 /* BASE_CHAR_WIDTH */ * this.fontScale;\r\n this.charRenderer = (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_20__.once)(() => _minimapCharRendererFactory_js__WEBPACK_IMPORTED_MODULE_18__.MinimapCharRendererFactory.create(this.fontScale, fontInfo.fontFamily));\r\n this.backgroundColor = MinimapOptions._getMinimapBackground(theme, tokensColorTracker);\r\n }\r\n static _getMinimapBackground(theme, tokensColorTracker) {\r\n const themeColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapBackground);\r\n if (themeColor) {\r\n return new _common_core_rgba_js__WEBPACK_IMPORTED_MODULE_11__.RGBA8(themeColor.rgba.r, themeColor.rgba.g, themeColor.rgba.b, themeColor.rgba.a);\r\n }\r\n return tokensColorTracker.getColor(2 /* DefaultBackground */);\r\n }\r\n equals(other) {\r\n return (this.renderMinimap === other.renderMinimap\r\n && this.size === other.size\r\n && this.minimapHeightIsEditorHeight === other.minimapHeightIsEditorHeight\r\n && this.scrollBeyondLastLine === other.scrollBeyondLastLine\r\n && this.showSlider === other.showSlider\r\n && this.pixelRatio === other.pixelRatio\r\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\r\n && this.lineHeight === other.lineHeight\r\n && this.minimapLeft === other.minimapLeft\r\n && this.minimapWidth === other.minimapWidth\r\n && this.minimapHeight === other.minimapHeight\r\n && this.canvasInnerWidth === other.canvasInnerWidth\r\n && this.canvasInnerHeight === other.canvasInnerHeight\r\n && this.canvasOuterWidth === other.canvasOuterWidth\r\n && this.canvasOuterHeight === other.canvasOuterHeight\r\n && this.isSampling === other.isSampling\r\n && this.editorHeight === other.editorHeight\r\n && this.fontScale === other.fontScale\r\n && this.minimapLineHeight === other.minimapLineHeight\r\n && this.minimapCharWidth === other.minimapCharWidth\r\n && this.backgroundColor && this.backgroundColor.equals(other.backgroundColor));\r\n }\r\n}\r\nclass MinimapLayout {\r\n constructor(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber) {\r\n this.scrollTop = scrollTop;\r\n this.scrollHeight = scrollHeight;\r\n this.sliderNeeded = sliderNeeded;\r\n this._computedSliderRatio = computedSliderRatio;\r\n this.sliderTop = sliderTop;\r\n this.sliderHeight = sliderHeight;\r\n this.startLineNumber = startLineNumber;\r\n this.endLineNumber = endLineNumber;\r\n }\r\n /**\r\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\r\n */\r\n getDesiredScrollTopFromDelta(delta) {\r\n return Math.round(this.scrollTop + delta / this._computedSliderRatio);\r\n }\r\n getDesiredScrollTopFromTouchLocation(pageY) {\r\n return Math.round((pageY - this.sliderHeight / 2) / this._computedSliderRatio);\r\n }\r\n static create(options, viewportStartLineNumber, viewportEndLineNumber, viewportStartLineNumberVerticalOffset, viewportHeight, viewportContainsWhitespaceGaps, lineCount, realLineCount, scrollTop, scrollHeight, previousLayout) {\r\n const pixelRatio = options.pixelRatio;\r\n const minimapLineHeight = options.minimapLineHeight;\r\n const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight);\r\n const lineHeight = options.lineHeight;\r\n if (options.minimapHeightIsEditorHeight) {\r\n const logicalScrollHeight = (realLineCount * options.lineHeight\r\n + (options.scrollBeyondLastLine ? viewportHeight - options.lineHeight : 0));\r\n const sliderHeight = Math.max(1, Math.floor(viewportHeight * viewportHeight / logicalScrollHeight));\r\n const maxMinimapSliderTop = Math.max(0, options.minimapHeight - sliderHeight);\r\n // The slider can move from 0 to `maxMinimapSliderTop`\r\n // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`.\r\n const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight);\r\n const sliderTop = (scrollTop * computedSliderRatio);\r\n const sliderNeeded = (maxMinimapSliderTop > 0);\r\n const maxLinesFitting = Math.floor(options.canvasInnerHeight / options.minimapLineHeight);\r\n return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, 1, Math.min(lineCount, maxLinesFitting));\r\n }\r\n // The visible line count in a viewport can change due to a number of reasons:\r\n // a) with the same viewport width, different scroll positions can result in partial lines being visible:\r\n // e.g. for a line height of 20, and a viewport height of 600\r\n // * scrollTop = 0 => visible lines are [1, 30]\r\n // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible)\r\n // * scrollTop = 20 => visible lines are [2, 31]\r\n // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count)\r\n // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible)\r\n // We must first establish a desirable slider height.\r\n let sliderHeight;\r\n if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) {\r\n // case b) from above: there are whitespace gaps in the viewport.\r\n // In this case, the height of the slider directly reflects the visible line count.\r\n const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1;\r\n sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio);\r\n }\r\n else {\r\n // The slider has a stable height\r\n const expectedViewportLineCount = viewportHeight / lineHeight;\r\n sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio);\r\n }\r\n let maxMinimapSliderTop;\r\n if (options.scrollBeyondLastLine) {\r\n // The minimap slider, when dragged all the way down, will contain the last line at its top\r\n maxMinimapSliderTop = (lineCount - 1) * minimapLineHeight / pixelRatio;\r\n }\r\n else {\r\n // The minimap slider, when dragged all the way down, will contain the last line at its bottom\r\n maxMinimapSliderTop = Math.max(0, lineCount * minimapLineHeight / pixelRatio - sliderHeight);\r\n }\r\n maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, maxMinimapSliderTop);\r\n // The slider can move from 0 to `maxMinimapSliderTop`\r\n // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`.\r\n const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight);\r\n const sliderTop = (scrollTop * computedSliderRatio);\r\n let extraLinesAtTheBottom = 0;\r\n if (options.scrollBeyondLastLine) {\r\n const expectedViewportLineCount = viewportHeight / lineHeight;\r\n extraLinesAtTheBottom = expectedViewportLineCount - 1;\r\n }\r\n if (minimapLinesFitting >= lineCount + extraLinesAtTheBottom) {\r\n // All lines fit in the minimap\r\n const startLineNumber = 1;\r\n const endLineNumber = lineCount;\r\n const sliderNeeded = (maxMinimapSliderTop > 0);\r\n return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber);\r\n }\r\n else {\r\n let startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight));\r\n // Avoid flickering caused by a partial viewport start line\r\n // by being consistent w.r.t. the previous layout decision\r\n if (previousLayout && previousLayout.scrollHeight === scrollHeight) {\r\n if (previousLayout.scrollTop > scrollTop) {\r\n // Scrolling up => never increase `startLineNumber`\r\n startLineNumber = Math.min(startLineNumber, previousLayout.startLineNumber);\r\n }\r\n if (previousLayout.scrollTop < scrollTop) {\r\n // Scrolling down => never decrease `startLineNumber`\r\n startLineNumber = Math.max(startLineNumber, previousLayout.startLineNumber);\r\n }\r\n }\r\n const endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1);\r\n const partialLine = (scrollTop - viewportStartLineNumberVerticalOffset) / lineHeight;\r\n const sliderTopAligned = (viewportStartLineNumber - startLineNumber + partialLine) * minimapLineHeight / pixelRatio;\r\n return new MinimapLayout(scrollTop, scrollHeight, true, computedSliderRatio, sliderTopAligned, sliderHeight, startLineNumber, endLineNumber);\r\n }\r\n }\r\n}\r\nclass MinimapLine {\r\n constructor(dy) {\r\n this.dy = dy;\r\n }\r\n onContentChanged() {\r\n this.dy = -1;\r\n }\r\n onTokensChanged() {\r\n this.dy = -1;\r\n }\r\n}\r\nMinimapLine.INVALID = new MinimapLine(-1);\r\nclass RenderData {\r\n constructor(renderedLayout, imageData, lines) {\r\n this.renderedLayout = renderedLayout;\r\n this._imageData = imageData;\r\n this._renderedLines = new _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_7__.RenderedLinesCollection(() => MinimapLine.INVALID);\r\n this._renderedLines._set(renderedLayout.startLineNumber, lines);\r\n }\r\n /**\r\n * Check if the current RenderData matches accurately the new desired layout and no painting is needed.\r\n */\r\n linesEquals(layout) {\r\n if (!this.scrollEquals(layout)) {\r\n return false;\r\n }\r\n const tmp = this._renderedLines._get();\r\n const lines = tmp.lines;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].dy === -1) {\r\n // This line is invalid\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Check if the current RenderData matches the new layout's scroll position\r\n */\r\n scrollEquals(layout) {\r\n return this.renderedLayout.startLineNumber === layout.startLineNumber\r\n && this.renderedLayout.endLineNumber === layout.endLineNumber;\r\n }\r\n _get() {\r\n const tmp = this._renderedLines._get();\r\n return {\r\n imageData: this._imageData,\r\n rendLineNumberStart: tmp.rendLineNumberStart,\r\n lines: tmp.lines\r\n };\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n return this._renderedLines.onLinesChanged(changeFromLineNumber, changeToLineNumber);\r\n }\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n this._renderedLines.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber);\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n this._renderedLines.onLinesInserted(insertFromLineNumber, insertToLineNumber);\r\n }\r\n onTokensChanged(ranges) {\r\n return this._renderedLines.onTokensChanged(ranges);\r\n }\r\n}\r\n/**\r\n * Some sort of double buffering.\r\n *\r\n * Keeps two buffers around that will be rotated for painting.\r\n * Always gives a buffer that is filled with the background color.\r\n */\r\nclass MinimapBuffers {\r\n constructor(ctx, WIDTH, HEIGHT, background) {\r\n this._backgroundFillData = MinimapBuffers._createBackgroundFillData(WIDTH, HEIGHT, background);\r\n this._buffers = [\r\n ctx.createImageData(WIDTH, HEIGHT),\r\n ctx.createImageData(WIDTH, HEIGHT)\r\n ];\r\n this._lastUsedBuffer = 0;\r\n }\r\n getBuffer() {\r\n // rotate buffers\r\n this._lastUsedBuffer = 1 - this._lastUsedBuffer;\r\n const result = this._buffers[this._lastUsedBuffer];\r\n // fill with background color\r\n result.data.set(this._backgroundFillData);\r\n return result;\r\n }\r\n static _createBackgroundFillData(WIDTH, HEIGHT, background) {\r\n const backgroundR = background.r;\r\n const backgroundG = background.g;\r\n const backgroundB = background.b;\r\n const result = new Uint8ClampedArray(WIDTH * HEIGHT * 4);\r\n let offset = 0;\r\n for (let i = 0; i < HEIGHT; i++) {\r\n for (let j = 0; j < WIDTH; j++) {\r\n result[offset] = backgroundR;\r\n result[offset + 1] = backgroundG;\r\n result[offset + 2] = backgroundB;\r\n result[offset + 3] = 255;\r\n offset += 4;\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\nclass MinimapSamplingState {\r\n constructor(samplingRatio, minimapLines) {\r\n this.samplingRatio = samplingRatio;\r\n this.minimapLines = minimapLines;\r\n }\r\n static compute(options, viewLineCount, oldSamplingState) {\r\n if (options.renderMinimap === 0 /* None */ || !options.isSampling) {\r\n return [null, []];\r\n }\r\n // ratio is intentionally not part of the layout to avoid the layout changing all the time\r\n // so we need to recompute it again...\r\n const pixelRatio = options.pixelRatio;\r\n const lineHeight = options.lineHeight;\r\n const scrollBeyondLastLine = options.scrollBeyondLastLine;\r\n const { minimapLineCount } = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__.EditorLayoutInfoComputer.computeContainedMinimapLineCount({\r\n viewLineCount: viewLineCount,\r\n scrollBeyondLastLine: scrollBeyondLastLine,\r\n height: options.editorHeight,\r\n lineHeight: lineHeight,\r\n pixelRatio: pixelRatio\r\n });\r\n const ratio = viewLineCount / minimapLineCount;\r\n const halfRatio = ratio / 2;\r\n if (!oldSamplingState || oldSamplingState.minimapLines.length === 0) {\r\n let result = [];\r\n result[0] = 1;\r\n if (minimapLineCount > 1) {\r\n for (let i = 0, lastIndex = minimapLineCount - 1; i < lastIndex; i++) {\r\n result[i] = Math.round(i * ratio + halfRatio);\r\n }\r\n result[minimapLineCount - 1] = viewLineCount;\r\n }\r\n return [new MinimapSamplingState(ratio, result), []];\r\n }\r\n const oldMinimapLines = oldSamplingState.minimapLines;\r\n const oldLength = oldMinimapLines.length;\r\n let result = [];\r\n let oldIndex = 0;\r\n let oldDeltaLineCount = 0;\r\n let minViewLineNumber = 1;\r\n const MAX_EVENT_COUNT = 10; // generate at most 10 events, if there are more than 10 changes, just flush all previous data\r\n let events = [];\r\n let lastEvent = null;\r\n for (let i = 0; i < minimapLineCount; i++) {\r\n const fromViewLineNumber = Math.max(minViewLineNumber, Math.round(i * ratio));\r\n const toViewLineNumber = Math.max(fromViewLineNumber, Math.round((i + 1) * ratio));\r\n while (oldIndex < oldLength && oldMinimapLines[oldIndex] < fromViewLineNumber) {\r\n if (events.length < MAX_EVENT_COUNT) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) {\r\n lastEvent.deleteToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount--;\r\n }\r\n oldIndex++;\r\n }\r\n let selectedViewLineNumber;\r\n if (oldIndex < oldLength && oldMinimapLines[oldIndex] <= toViewLineNumber) {\r\n // reuse the old sampled line\r\n selectedViewLineNumber = oldMinimapLines[oldIndex];\r\n oldIndex++;\r\n }\r\n else {\r\n if (i === 0) {\r\n selectedViewLineNumber = 1;\r\n }\r\n else if (i + 1 === minimapLineCount) {\r\n selectedViewLineNumber = viewLineCount;\r\n }\r\n else {\r\n selectedViewLineNumber = Math.round(i * ratio + halfRatio);\r\n }\r\n if (events.length < MAX_EVENT_COUNT) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'inserted' && lastEvent._i === i - 1) {\r\n lastEvent.insertToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'inserted', _i: i, insertFromLineNumber: oldMinimapLineNumber, insertToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount++;\r\n }\r\n }\r\n result[i] = selectedViewLineNumber;\r\n minViewLineNumber = selectedViewLineNumber;\r\n }\r\n if (events.length < MAX_EVENT_COUNT) {\r\n while (oldIndex < oldLength) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) {\r\n lastEvent.deleteToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount--;\r\n oldIndex++;\r\n }\r\n }\r\n else {\r\n // too many events, just give up\r\n events = [{ type: 'flush' }];\r\n }\r\n return [new MinimapSamplingState(ratio, result), events];\r\n }\r\n modelLineToMinimapLine(lineNumber) {\r\n return Math.min(this.minimapLines.length, Math.max(1, Math.round(lineNumber / this.samplingRatio)));\r\n }\r\n /**\r\n * Will return null if the model line ranges are not intersecting with a sampled model line.\r\n */\r\n modelLineRangeToMinimapLineRange(fromLineNumber, toLineNumber) {\r\n let fromLineIndex = this.modelLineToMinimapLine(fromLineNumber) - 1;\r\n while (fromLineIndex > 0 && this.minimapLines[fromLineIndex - 1] >= fromLineNumber) {\r\n fromLineIndex--;\r\n }\r\n let toLineIndex = this.modelLineToMinimapLine(toLineNumber) - 1;\r\n while (toLineIndex + 1 < this.minimapLines.length && this.minimapLines[toLineIndex + 1] <= toLineNumber) {\r\n toLineIndex++;\r\n }\r\n if (fromLineIndex === toLineIndex) {\r\n const sampledLineNumber = this.minimapLines[fromLineIndex];\r\n if (sampledLineNumber < fromLineNumber || sampledLineNumber > toLineNumber) {\r\n // This line is not part of the sampled lines ==> nothing to do\r\n return null;\r\n }\r\n }\r\n return [fromLineIndex + 1, toLineIndex + 1];\r\n }\r\n /**\r\n * Will always return a range, even if it is not intersecting with a sampled model line.\r\n */\r\n decorationLineRangeToMinimapLineRange(startLineNumber, endLineNumber) {\r\n let minimapLineStart = this.modelLineToMinimapLine(startLineNumber);\r\n let minimapLineEnd = this.modelLineToMinimapLine(endLineNumber);\r\n if (startLineNumber !== endLineNumber && minimapLineEnd === minimapLineStart) {\r\n if (minimapLineEnd === this.minimapLines.length) {\r\n if (minimapLineStart > 1) {\r\n minimapLineStart--;\r\n }\r\n }\r\n else {\r\n minimapLineEnd++;\r\n }\r\n }\r\n return [minimapLineStart, minimapLineEnd];\r\n }\r\n onLinesDeleted(e) {\r\n // have the mapping be sticky\r\n const deletedLineCount = e.toLineNumber - e.fromLineNumber + 1;\r\n let changeStartIndex = this.minimapLines.length;\r\n let changeEndIndex = 0;\r\n for (let i = this.minimapLines.length - 1; i >= 0; i--) {\r\n if (this.minimapLines[i] < e.fromLineNumber) {\r\n break;\r\n }\r\n if (this.minimapLines[i] <= e.toLineNumber) {\r\n // this line got deleted => move to previous available\r\n this.minimapLines[i] = Math.max(1, e.fromLineNumber - 1);\r\n changeStartIndex = Math.min(changeStartIndex, i);\r\n changeEndIndex = Math.max(changeEndIndex, i);\r\n }\r\n else {\r\n this.minimapLines[i] -= deletedLineCount;\r\n }\r\n }\r\n return [changeStartIndex, changeEndIndex];\r\n }\r\n onLinesInserted(e) {\r\n // have the mapping be sticky\r\n const insertedLineCount = e.toLineNumber - e.fromLineNumber + 1;\r\n for (let i = this.minimapLines.length - 1; i >= 0; i--) {\r\n if (this.minimapLines[i] < e.fromLineNumber) {\r\n break;\r\n }\r\n this.minimapLines[i] += insertedLineCount;\r\n }\r\n }\r\n}\r\nclass Minimap extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this.tokensColorTracker = _common_viewModel_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_12__.MinimapTokensColorTracker.getInstance();\r\n this._selections = [];\r\n this._minimapSelections = null;\r\n this.options = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker);\r\n const [samplingState,] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), null);\r\n this._samplingState = samplingState;\r\n this._shouldCheckSampling = false;\r\n this._actual = new InnerMinimap(context.theme, this);\r\n }\r\n dispose() {\r\n this._actual.dispose();\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this._actual.getDomNode();\r\n }\r\n _onOptionsMaybeChanged() {\r\n const opts = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker);\r\n if (this.options.equals(opts)) {\r\n return false;\r\n }\r\n this.options = opts;\r\n this._recreateLineSampling();\r\n this._actual.onDidChangeOptions();\r\n return true;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n return this._onOptionsMaybeChanged();\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n this._minimapSelections = null;\r\n return this._actual.onSelectionChanged();\r\n }\r\n onDecorationsChanged(e) {\r\n if (e.affectsMinimap) {\r\n return this._actual.onDecorationsChanged();\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n if (this._samplingState) {\r\n this._shouldCheckSampling = true;\r\n }\r\n return this._actual.onFlushed();\r\n }\r\n onLinesChanged(e) {\r\n if (this._samplingState) {\r\n const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, e.toLineNumber);\r\n if (minimapLineRange) {\r\n return this._actual.onLinesChanged(minimapLineRange[0], minimapLineRange[1]);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onLinesDeleted(e) {\r\n if (this._samplingState) {\r\n const [changeStartIndex, changeEndIndex] = this._samplingState.onLinesDeleted(e);\r\n if (changeStartIndex <= changeEndIndex) {\r\n this._actual.onLinesChanged(changeStartIndex + 1, changeEndIndex + 1);\r\n }\r\n this._shouldCheckSampling = true;\r\n return true;\r\n }\r\n else {\r\n return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onLinesInserted(e) {\r\n if (this._samplingState) {\r\n this._samplingState.onLinesInserted(e);\r\n this._shouldCheckSampling = true;\r\n return true;\r\n }\r\n else {\r\n return this._actual.onLinesInserted(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onScrollChanged(e) {\r\n return this._actual.onScrollChanged();\r\n }\r\n onThemeChanged(e) {\r\n this._context.model.invalidateMinimapColorCache();\r\n this._actual.onThemeChanged();\r\n this._onOptionsMaybeChanged();\r\n return true;\r\n }\r\n onTokensChanged(e) {\r\n if (this._samplingState) {\r\n let ranges = [];\r\n for (const range of e.ranges) {\r\n const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(range.fromLineNumber, range.toLineNumber);\r\n if (minimapLineRange) {\r\n ranges.push({ fromLineNumber: minimapLineRange[0], toLineNumber: minimapLineRange[1] });\r\n }\r\n }\r\n if (ranges.length) {\r\n return this._actual.onTokensChanged(ranges);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n return this._actual.onTokensChanged(e.ranges);\r\n }\r\n }\r\n onTokensColorsChanged(e) {\r\n this._onOptionsMaybeChanged();\r\n return this._actual.onTokensColorsChanged();\r\n }\r\n onZonesChanged(e) {\r\n return this._actual.onZonesChanged();\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (this._shouldCheckSampling) {\r\n this._shouldCheckSampling = false;\r\n this._recreateLineSampling();\r\n }\r\n }\r\n render(ctx) {\r\n let viewportStartLineNumber = ctx.visibleRange.startLineNumber;\r\n let viewportEndLineNumber = ctx.visibleRange.endLineNumber;\r\n if (this._samplingState) {\r\n viewportStartLineNumber = this._samplingState.modelLineToMinimapLine(viewportStartLineNumber);\r\n viewportEndLineNumber = this._samplingState.modelLineToMinimapLine(viewportEndLineNumber);\r\n }\r\n const minimapCtx = {\r\n viewportContainsWhitespaceGaps: (ctx.viewportData.whitespaceViewportData.length > 0),\r\n scrollWidth: ctx.scrollWidth,\r\n scrollHeight: ctx.scrollHeight,\r\n viewportStartLineNumber: viewportStartLineNumber,\r\n viewportEndLineNumber: viewportEndLineNumber,\r\n viewportStartLineNumberVerticalOffset: ctx.getVerticalOffsetForLineNumber(viewportStartLineNumber),\r\n scrollTop: ctx.scrollTop,\r\n scrollLeft: ctx.scrollLeft,\r\n viewportWidth: ctx.viewportWidth,\r\n viewportHeight: ctx.viewportHeight,\r\n };\r\n this._actual.render(minimapCtx);\r\n }\r\n //#region IMinimapModel\r\n _recreateLineSampling() {\r\n this._minimapSelections = null;\r\n const wasSampling = Boolean(this._samplingState);\r\n const [samplingState, events] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), this._samplingState);\r\n this._samplingState = samplingState;\r\n if (wasSampling && this._samplingState) {\r\n // was sampling, is sampling\r\n for (const event of events) {\r\n switch (event.type) {\r\n case 'deleted':\r\n this._actual.onLinesDeleted(event.deleteFromLineNumber, event.deleteToLineNumber);\r\n break;\r\n case 'inserted':\r\n this._actual.onLinesInserted(event.insertFromLineNumber, event.insertToLineNumber);\r\n break;\r\n case 'flush':\r\n this._actual.onFlushed();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n getLineCount() {\r\n if (this._samplingState) {\r\n return this._samplingState.minimapLines.length;\r\n }\r\n return this._context.model.getLineCount();\r\n }\r\n getRealLineCount() {\r\n return this._context.model.getLineCount();\r\n }\r\n getLineContent(lineNumber) {\r\n if (this._samplingState) {\r\n return this._context.model.getLineContent(this._samplingState.minimapLines[lineNumber - 1]);\r\n }\r\n return this._context.model.getLineContent(lineNumber);\r\n }\r\n getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) {\r\n if (this._samplingState) {\r\n let result = [];\r\n for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) {\r\n if (needed[lineIndex]) {\r\n result[lineIndex] = this._context.model.getViewLineData(this._samplingState.minimapLines[startLineNumber + lineIndex - 1]);\r\n }\r\n else {\r\n result[lineIndex] = null;\r\n }\r\n }\r\n return result;\r\n }\r\n return this._context.model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed).data;\r\n }\r\n getSelections() {\r\n if (this._minimapSelections === null) {\r\n if (this._samplingState) {\r\n this._minimapSelections = [];\r\n for (const selection of this._selections) {\r\n const [minimapLineStart, minimapLineEnd] = this._samplingState.decorationLineRangeToMinimapLineRange(selection.startLineNumber, selection.endLineNumber);\r\n this._minimapSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__.Selection(minimapLineStart, selection.startColumn, minimapLineEnd, selection.endColumn));\r\n }\r\n }\r\n else {\r\n this._minimapSelections = this._selections;\r\n }\r\n }\r\n return this._minimapSelections;\r\n }\r\n getMinimapDecorationsInViewport(startLineNumber, endLineNumber) {\r\n let visibleRange;\r\n if (this._samplingState) {\r\n const modelStartLineNumber = this._samplingState.minimapLines[startLineNumber - 1];\r\n const modelEndLineNumber = this._samplingState.minimapLines[endLineNumber - 1];\r\n visibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range(modelStartLineNumber, 1, modelEndLineNumber, this._context.model.getLineMaxColumn(modelEndLineNumber));\r\n }\r\n else {\r\n visibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range(startLineNumber, 1, endLineNumber, this._context.model.getLineMaxColumn(endLineNumber));\r\n }\r\n const decorations = this._context.model.getDecorationsInViewport(visibleRange);\r\n if (this._samplingState) {\r\n let result = [];\r\n for (const decoration of decorations) {\r\n if (!decoration.options.minimap) {\r\n continue;\r\n }\r\n const range = decoration.range;\r\n const minimapStartLineNumber = this._samplingState.modelLineToMinimapLine(range.startLineNumber);\r\n const minimapEndLineNumber = this._samplingState.modelLineToMinimapLine(range.endLineNumber);\r\n result.push(new _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_13__.ViewModelDecoration(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range(minimapStartLineNumber, range.startColumn, minimapEndLineNumber, range.endColumn), decoration.options));\r\n }\r\n return result;\r\n }\r\n return decorations;\r\n }\r\n getOptions() {\r\n return this._context.model.getTextModelOptions();\r\n }\r\n revealLineNumber(lineNumber) {\r\n if (this._samplingState) {\r\n lineNumber = this._samplingState.minimapLines[lineNumber - 1];\r\n }\r\n this._context.model.revealRange('mouse', false, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range(lineNumber, 1, lineNumber, 1), 1 /* Center */, 0 /* Smooth */);\r\n }\r\n setScrollTop(scrollTop) {\r\n this._context.model.setScrollPosition({\r\n scrollTop: scrollTop\r\n }, 1 /* Immediate */);\r\n }\r\n}\r\nclass InnerMinimap extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(theme, model) {\r\n super();\r\n this._renderDecorations = false;\r\n this._gestureInProgress = false;\r\n this._theme = theme;\r\n this._model = model;\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n this._selectionColor = this._theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapSelection);\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__.PartFingerprints.write(this._domNode, 8 /* Minimap */);\r\n this._domNode.setClassName(this._getMinimapDomNodeClassName());\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._shadow = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n this._domNode.appendChild(this._shadow);\r\n this._canvas = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('canvas'));\r\n this._canvas.setPosition('absolute');\r\n this._canvas.setLeft(0);\r\n this._domNode.appendChild(this._canvas);\r\n this._decorationsCanvas = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('canvas'));\r\n this._decorationsCanvas.setPosition('absolute');\r\n this._decorationsCanvas.setClassName('minimap-decorations-layer');\r\n this._decorationsCanvas.setLeft(0);\r\n this._domNode.appendChild(this._decorationsCanvas);\r\n this._slider = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._slider.setPosition('absolute');\r\n this._slider.setClassName('minimap-slider');\r\n this._slider.setLayerHinting(true);\r\n this._slider.setContain('strict');\r\n this._domNode.appendChild(this._slider);\r\n this._sliderHorizontal = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._sliderHorizontal.setPosition('absolute');\r\n this._sliderHorizontal.setClassName('minimap-slider-horizontal');\r\n this._slider.appendChild(this._sliderHorizontal);\r\n this._applyLayout();\r\n this._mouseDownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._domNode.domNode, 'mousedown', (e) => {\r\n e.preventDefault();\r\n const renderMinimap = this._model.options.renderMinimap;\r\n if (renderMinimap === 0 /* None */) {\r\n return;\r\n }\r\n if (!this._lastRenderData) {\r\n return;\r\n }\r\n if (this._model.options.size !== 'proportional') {\r\n if (e.leftButton && this._lastRenderData) {\r\n // pretend the click occured in the center of the slider\r\n const position = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this._slider.domNode);\r\n const initialPosY = position.top + position.height / 2;\r\n this._startSliderDragging(e.buttons, e.posx, initialPosY, e.posy, this._lastRenderData.renderedLayout);\r\n }\r\n return;\r\n }\r\n const minimapLineHeight = this._model.options.minimapLineHeight;\r\n const internalOffsetY = (this._model.options.canvasInnerHeight / this._model.options.canvasOuterHeight) * e.browserEvent.offsetY;\r\n const lineIndex = Math.floor(internalOffsetY / minimapLineHeight);\r\n let lineNumber = lineIndex + this._lastRenderData.renderedLayout.startLineNumber;\r\n lineNumber = Math.min(lineNumber, this._model.getLineCount());\r\n this._model.revealLineNumber(lineNumber);\r\n });\r\n this._sliderMouseMoveMonitor = new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.GlobalMouseMoveMonitor();\r\n this._sliderMouseDownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._slider.domNode, 'mousedown', (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (e.leftButton && this._lastRenderData) {\r\n this._startSliderDragging(e.buttons, e.posx, e.posy, e.posy, this._lastRenderData.renderedLayout);\r\n }\r\n });\r\n this._gestureDisposable = _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__.Gesture.addTarget(this._domNode.domNode);\r\n this._sliderTouchStartListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__.EventType.Start, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (this._lastRenderData) {\r\n this._slider.toggleClassName('active', true);\r\n this._gestureInProgress = true;\r\n this.scrollDueToTouchEvent(e);\r\n }\r\n }, { passive: false });\r\n this._sliderTouchMoveListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__.EventType.Change, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (this._lastRenderData && this._gestureInProgress) {\r\n this.scrollDueToTouchEvent(e);\r\n }\r\n }, { passive: false });\r\n this._sliderTouchEndListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__.EventType.End, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._gestureInProgress = false;\r\n this._slider.toggleClassName('active', false);\r\n });\r\n }\r\n _startSliderDragging(initialButtons, initialPosX, initialPosY, posy, initialSliderState) {\r\n this._slider.toggleClassName('active', true);\r\n const handleMouseMove = (posy, posx) => {\r\n const mouseOrthogonalDelta = Math.abs(posx - initialPosX);\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) {\r\n // The mouse has wondered away from the scrollbar => reset dragging\r\n this._model.setScrollTop(initialSliderState.scrollTop);\r\n return;\r\n }\r\n const mouseDelta = posy - initialPosY;\r\n this._model.setScrollTop(initialSliderState.getDesiredScrollTopFromDelta(mouseDelta));\r\n };\r\n if (posy !== initialPosY) {\r\n handleMouseMove(posy, initialPosX);\r\n }\r\n this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode, initialButtons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.standardMouseMoveMerger, (mouseMoveData) => handleMouseMove(mouseMoveData.posy, mouseMoveData.posx), () => {\r\n this._slider.toggleClassName('active', false);\r\n });\r\n }\r\n scrollDueToTouchEvent(touch) {\r\n const startY = this._domNode.domNode.getBoundingClientRect().top;\r\n const scrollTop = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(touch.pageY - startY);\r\n this._model.setScrollTop(scrollTop);\r\n }\r\n dispose() {\r\n this._mouseDownListener.dispose();\r\n this._sliderMouseMoveMonitor.dispose();\r\n this._sliderMouseDownListener.dispose();\r\n this._gestureDisposable.dispose();\r\n this._sliderTouchStartListener.dispose();\r\n this._sliderTouchMoveListener.dispose();\r\n this._sliderTouchEndListener.dispose();\r\n super.dispose();\r\n }\r\n _getMinimapDomNodeClassName() {\r\n if (this._model.options.showSlider === 'always') {\r\n return 'minimap slider-always';\r\n }\r\n return 'minimap slider-mouseover';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n _applyLayout() {\r\n this._domNode.setLeft(this._model.options.minimapLeft);\r\n this._domNode.setWidth(this._model.options.minimapWidth);\r\n this._domNode.setHeight(this._model.options.minimapHeight);\r\n this._shadow.setHeight(this._model.options.minimapHeight);\r\n this._canvas.setWidth(this._model.options.canvasOuterWidth);\r\n this._canvas.setHeight(this._model.options.canvasOuterHeight);\r\n this._canvas.domNode.width = this._model.options.canvasInnerWidth;\r\n this._canvas.domNode.height = this._model.options.canvasInnerHeight;\r\n this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth);\r\n this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight);\r\n this._decorationsCanvas.domNode.width = this._model.options.canvasInnerWidth;\r\n this._decorationsCanvas.domNode.height = this._model.options.canvasInnerHeight;\r\n this._slider.setWidth(this._model.options.minimapWidth);\r\n }\r\n _getBuffer() {\r\n if (!this._buffers) {\r\n if (this._model.options.canvasInnerWidth > 0 && this._model.options.canvasInnerHeight > 0) {\r\n this._buffers = new MinimapBuffers(this._canvas.domNode.getContext('2d'), this._model.options.canvasInnerWidth, this._model.options.canvasInnerHeight, this._model.options.backgroundColor);\r\n }\r\n }\r\n return this._buffers ? this._buffers.getBuffer() : null;\r\n }\r\n // ---- begin view event handlers\r\n onDidChangeOptions() {\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n this._applyLayout();\r\n this._domNode.setClassName(this._getMinimapDomNodeClassName());\r\n }\r\n onSelectionChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onDecorationsChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onFlushed() {\r\n this._lastRenderData = null;\r\n return true;\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n if (this._lastRenderData) {\r\n return this._lastRenderData.onLinesChanged(changeFromLineNumber, changeToLineNumber);\r\n }\r\n return false;\r\n }\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n if (this._lastRenderData) {\r\n this._lastRenderData.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber);\r\n }\r\n return true;\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n if (this._lastRenderData) {\r\n this._lastRenderData.onLinesInserted(insertFromLineNumber, insertToLineNumber);\r\n }\r\n return true;\r\n }\r\n onScrollChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onThemeChanged() {\r\n this._selectionColor = this._theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapSelection);\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onTokensChanged(ranges) {\r\n if (this._lastRenderData) {\r\n return this._lastRenderData.onTokensChanged(ranges);\r\n }\r\n return false;\r\n }\r\n onTokensColorsChanged() {\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n return true;\r\n }\r\n onZonesChanged() {\r\n this._lastRenderData = null;\r\n return true;\r\n }\r\n // --- end event handlers\r\n render(renderingCtx) {\r\n const renderMinimap = this._model.options.renderMinimap;\r\n if (renderMinimap === 0 /* None */) {\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n this._sliderHorizontal.setWidth(0);\r\n this._sliderHorizontal.setHeight(0);\r\n return;\r\n }\r\n if (renderingCtx.scrollLeft + renderingCtx.viewportWidth >= renderingCtx.scrollWidth) {\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n }\r\n else {\r\n this._shadow.setClassName('minimap-shadow-visible');\r\n }\r\n const layout = MinimapLayout.create(this._model.options, renderingCtx.viewportStartLineNumber, renderingCtx.viewportEndLineNumber, renderingCtx.viewportStartLineNumberVerticalOffset, renderingCtx.viewportHeight, renderingCtx.viewportContainsWhitespaceGaps, this._model.getLineCount(), this._model.getRealLineCount(), renderingCtx.scrollTop, renderingCtx.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null);\r\n this._slider.setDisplay(layout.sliderNeeded ? 'block' : 'none');\r\n this._slider.setTop(layout.sliderTop);\r\n this._slider.setHeight(layout.sliderHeight);\r\n // Compute horizontal slider coordinates\r\n const scrollLeftChars = renderingCtx.scrollLeft / this._model.options.typicalHalfwidthCharacterWidth;\r\n const horizontalSliderLeft = Math.min(this._model.options.minimapWidth, Math.round(scrollLeftChars * this._model.options.minimapCharWidth / this._model.options.pixelRatio));\r\n this._sliderHorizontal.setLeft(horizontalSliderLeft);\r\n this._sliderHorizontal.setWidth(this._model.options.minimapWidth - horizontalSliderLeft);\r\n this._sliderHorizontal.setTop(0);\r\n this._sliderHorizontal.setHeight(layout.sliderHeight);\r\n this.renderDecorations(layout);\r\n this._lastRenderData = this.renderLines(layout);\r\n }\r\n renderDecorations(layout) {\r\n if (this._renderDecorations) {\r\n this._renderDecorations = false;\r\n const selections = this._model.getSelections();\r\n const decorations = this._model.getMinimapDecorationsInViewport(layout.startLineNumber, layout.endLineNumber);\r\n const { canvasInnerWidth, canvasInnerHeight } = this._model.options;\r\n const lineHeight = this._model.options.minimapLineHeight;\r\n const characterWidth = this._model.options.minimapCharWidth;\r\n const tabSize = this._model.getOptions().tabSize;\r\n const canvasContext = this._decorationsCanvas.domNode.getContext('2d');\r\n canvasContext.clearRect(0, 0, canvasInnerWidth, canvasInnerHeight);\r\n const lineOffsetMap = new Map();\r\n for (let i = 0; i < selections.length; i++) {\r\n const selection = selections[i];\r\n for (let line = selection.startLineNumber; line <= selection.endLineNumber; line++) {\r\n this.renderDecorationOnLine(canvasContext, lineOffsetMap, selection, this._selectionColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth);\r\n }\r\n }\r\n // Loop over decorations, ignoring those that don't have the minimap property set and rendering rectangles for each line the decoration spans\r\n for (let i = 0; i < decorations.length; i++) {\r\n const decoration = decorations[i];\r\n if (!decoration.options.minimap) {\r\n continue;\r\n }\r\n const decorationColor = decoration.options.minimap.getColor(this._theme);\r\n for (let line = decoration.range.startLineNumber; line <= decoration.range.endLineNumber; line++) {\r\n switch (decoration.options.minimap.position) {\r\n case _common_model_js__WEBPACK_IMPORTED_MODULE_19__.MinimapPosition.Inline:\r\n this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration.range, decorationColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth);\r\n continue;\r\n case _common_model_js__WEBPACK_IMPORTED_MODULE_19__.MinimapPosition.Gutter:\r\n const y = (line - layout.startLineNumber) * lineHeight;\r\n const x = 2;\r\n this.renderDecoration(canvasContext, decorationColor, x, y, GUTTER_DECORATION_WIDTH, lineHeight);\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout, lineNumber, height, lineHeight, tabSize, charWidth) {\r\n const y = (lineNumber - layout.startLineNumber) * lineHeight;\r\n // Skip rendering the line if it's vertically outside our viewport\r\n if (y + height < 0 || y > this._model.options.canvasInnerHeight) {\r\n return;\r\n }\r\n // Cache line offset data so that it is only read once per line\r\n let lineIndexToXOffset = lineOffsetMap.get(lineNumber);\r\n const isFirstDecorationForLine = !lineIndexToXOffset;\r\n if (!lineIndexToXOffset) {\r\n const lineData = this._model.getLineContent(lineNumber);\r\n lineIndexToXOffset = [_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__.MINIMAP_GUTTER_WIDTH];\r\n for (let i = 1; i < lineData.length + 1; i++) {\r\n const charCode = lineData.charCodeAt(i - 1);\r\n const dx = charCode === 9 /* Tab */\r\n ? tabSize * charWidth\r\n : _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__.isFullWidthCharacter(charCode)\r\n ? 2 * charWidth\r\n : charWidth;\r\n lineIndexToXOffset[i] = lineIndexToXOffset[i - 1] + dx;\r\n }\r\n lineOffsetMap.set(lineNumber, lineIndexToXOffset);\r\n }\r\n const { startColumn, endColumn, startLineNumber, endLineNumber } = decorationRange;\r\n const x = startLineNumber === lineNumber ? lineIndexToXOffset[startColumn - 1] : _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__.MINIMAP_GUTTER_WIDTH;\r\n const endColumnForLine = endLineNumber > lineNumber ? lineIndexToXOffset.length - 1 : endColumn - 1;\r\n if (endColumnForLine > 0) {\r\n // If the decoration starts at the last character of the column and spans over it, ensure it has a width\r\n const width = lineIndexToXOffset[endColumnForLine] - x || 2;\r\n this.renderDecoration(canvasContext, decorationColor, x, y, width, height);\r\n }\r\n if (isFirstDecorationForLine) {\r\n this.renderLineHighlight(canvasContext, decorationColor, y, height);\r\n }\r\n }\r\n renderLineHighlight(canvasContext, decorationColor, y, height) {\r\n canvasContext.fillStyle = decorationColor && decorationColor.transparent(0.5).toString() || '';\r\n canvasContext.fillRect(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__.MINIMAP_GUTTER_WIDTH, y, canvasContext.canvas.width, height);\r\n }\r\n renderDecoration(canvasContext, decorationColor, x, y, width, height) {\r\n canvasContext.fillStyle = decorationColor && decorationColor.toString() || '';\r\n canvasContext.fillRect(x, y, width, height);\r\n }\r\n renderLines(layout) {\r\n const startLineNumber = layout.startLineNumber;\r\n const endLineNumber = layout.endLineNumber;\r\n const minimapLineHeight = this._model.options.minimapLineHeight;\r\n // Check if nothing changed w.r.t. lines from last frame\r\n if (this._lastRenderData && this._lastRenderData.linesEquals(layout)) {\r\n const _lastData = this._lastRenderData._get();\r\n // Nice!! Nothing changed from last frame\r\n return new RenderData(layout, _lastData.imageData, _lastData.lines);\r\n }\r\n // Oh well!! We need to repaint some lines...\r\n const imageData = this._getBuffer();\r\n if (!imageData) {\r\n // 0 width or 0 height canvas, nothing to do\r\n return null;\r\n }\r\n // Render untouched lines by using last rendered data.\r\n let [_dirtyY1, _dirtyY2, needed] = InnerMinimap._renderUntouchedLines(imageData, startLineNumber, endLineNumber, minimapLineHeight, this._lastRenderData);\r\n // Fetch rendering info from view model for rest of lines that need rendering.\r\n const lineInfo = this._model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed);\r\n const tabSize = this._model.getOptions().tabSize;\r\n const background = this._model.options.backgroundColor;\r\n const tokensColorTracker = this._model.tokensColorTracker;\r\n const useLighterFont = tokensColorTracker.backgroundIsLight();\r\n const renderMinimap = this._model.options.renderMinimap;\r\n const charRenderer = this._model.options.charRenderer();\r\n const fontScale = this._model.options.fontScale;\r\n const minimapCharWidth = this._model.options.minimapCharWidth;\r\n const baseCharHeight = (renderMinimap === 1 /* Text */ ? 2 /* BASE_CHAR_HEIGHT */ : 2 /* BASE_CHAR_HEIGHT */ + 1);\r\n const renderMinimapLineHeight = baseCharHeight * fontScale;\r\n const innerLinePadding = (minimapLineHeight > renderMinimapLineHeight ? Math.floor((minimapLineHeight - renderMinimapLineHeight) / 2) : 0);\r\n // Render the rest of lines\r\n let dy = 0;\r\n const renderedLines = [];\r\n for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) {\r\n if (needed[lineIndex]) {\r\n InnerMinimap._renderLine(imageData, background, useLighterFont, renderMinimap, minimapCharWidth, tokensColorTracker, charRenderer, dy, innerLinePadding, tabSize, lineInfo[lineIndex], fontScale, minimapLineHeight);\r\n }\r\n renderedLines[lineIndex] = new MinimapLine(dy);\r\n dy += minimapLineHeight;\r\n }\r\n const dirtyY1 = (_dirtyY1 === -1 ? 0 : _dirtyY1);\r\n const dirtyY2 = (_dirtyY2 === -1 ? imageData.height : _dirtyY2);\r\n const dirtyHeight = dirtyY2 - dirtyY1;\r\n // Finally, paint to the canvas\r\n const ctx = this._canvas.domNode.getContext('2d');\r\n ctx.putImageData(imageData, 0, 0, 0, dirtyY1, imageData.width, dirtyHeight);\r\n // Save rendered data for reuse on next frame if possible\r\n return new RenderData(layout, imageData, renderedLines);\r\n }\r\n static _renderUntouchedLines(target, startLineNumber, endLineNumber, minimapLineHeight, lastRenderData) {\r\n const needed = [];\r\n if (!lastRenderData) {\r\n for (let i = 0, len = endLineNumber - startLineNumber + 1; i < len; i++) {\r\n needed[i] = true;\r\n }\r\n return [-1, -1, needed];\r\n }\r\n const _lastData = lastRenderData._get();\r\n const lastTargetData = _lastData.imageData.data;\r\n const lastStartLineNumber = _lastData.rendLineNumberStart;\r\n const lastLines = _lastData.lines;\r\n const lastLinesLength = lastLines.length;\r\n const WIDTH = target.width;\r\n const targetData = target.data;\r\n const maxDestPixel = (endLineNumber - startLineNumber + 1) * minimapLineHeight * WIDTH * 4;\r\n let dirtyPixel1 = -1; // the pixel offset up to which all the data is equal to the prev frame\r\n let dirtyPixel2 = -1; // the pixel offset after which all the data is equal to the prev frame\r\n let copySourceStart = -1;\r\n let copySourceEnd = -1;\r\n let copyDestStart = -1;\r\n let copyDestEnd = -1;\r\n let dest_dy = 0;\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - startLineNumber;\r\n const lastLineIndex = lineNumber - lastStartLineNumber;\r\n const source_dy = (lastLineIndex >= 0 && lastLineIndex < lastLinesLength ? lastLines[lastLineIndex].dy : -1);\r\n if (source_dy === -1) {\r\n needed[lineIndex] = true;\r\n dest_dy += minimapLineHeight;\r\n continue;\r\n }\r\n const sourceStart = source_dy * WIDTH * 4;\r\n const sourceEnd = (source_dy + minimapLineHeight) * WIDTH * 4;\r\n const destStart = dest_dy * WIDTH * 4;\r\n const destEnd = (dest_dy + minimapLineHeight) * WIDTH * 4;\r\n if (copySourceEnd === sourceStart && copyDestEnd === destStart) {\r\n // contiguous zone => extend copy request\r\n copySourceEnd = sourceEnd;\r\n copyDestEnd = destEnd;\r\n }\r\n else {\r\n if (copySourceStart !== -1) {\r\n // flush existing copy request\r\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\r\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\r\n dirtyPixel1 = copySourceEnd;\r\n }\r\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\r\n dirtyPixel2 = copySourceStart;\r\n }\r\n }\r\n copySourceStart = sourceStart;\r\n copySourceEnd = sourceEnd;\r\n copyDestStart = destStart;\r\n copyDestEnd = destEnd;\r\n }\r\n needed[lineIndex] = false;\r\n dest_dy += minimapLineHeight;\r\n }\r\n if (copySourceStart !== -1) {\r\n // flush existing copy request\r\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\r\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\r\n dirtyPixel1 = copySourceEnd;\r\n }\r\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\r\n dirtyPixel2 = copySourceStart;\r\n }\r\n }\r\n const dirtyY1 = (dirtyPixel1 === -1 ? -1 : dirtyPixel1 / (WIDTH * 4));\r\n const dirtyY2 = (dirtyPixel2 === -1 ? -1 : dirtyPixel2 / (WIDTH * 4));\r\n return [dirtyY1, dirtyY2, needed];\r\n }\r\n static _renderLine(target, backgroundColor, useLighterFont, renderMinimap, charWidth, colorTracker, minimapCharRenderer, dy, innerLinePadding, tabSize, lineData, fontScale, minimapLineHeight) {\r\n const content = lineData.content;\r\n const tokens = lineData.tokens;\r\n const maxDx = target.width - charWidth;\r\n const force1pxHeight = (minimapLineHeight === 1);\r\n let dx = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__.MINIMAP_GUTTER_WIDTH;\r\n let charIndex = 0;\r\n let tabsCharDelta = 0;\r\n for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\r\n const tokenEndIndex = tokens.getEndOffset(tokenIndex);\r\n const tokenColorId = tokens.getForeground(tokenIndex);\r\n const tokenColor = colorTracker.getColor(tokenColorId);\r\n for (; charIndex < tokenEndIndex; charIndex++) {\r\n if (dx > maxDx) {\r\n // hit edge of minimap\r\n return;\r\n }\r\n const charCode = content.charCodeAt(charIndex);\r\n if (charCode === 9 /* Tab */) {\r\n const insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\r\n tabsCharDelta += insertSpacesCount - 1;\r\n // No need to render anything since tab is invisible\r\n dx += insertSpacesCount * charWidth;\r\n }\r\n else if (charCode === 32 /* Space */) {\r\n // No need to render anything since space is invisible\r\n dx += charWidth;\r\n }\r\n else {\r\n // Render twice for a full width character\r\n const count = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__.isFullWidthCharacter(charCode) ? 2 : 1;\r\n for (let i = 0; i < count; i++) {\r\n if (renderMinimap === 2 /* Blocks */) {\r\n minimapCharRenderer.blockRenderChar(target, dx, dy + innerLinePadding, tokenColor, backgroundColor, useLighterFont, force1pxHeight);\r\n }\r\n else { // RenderMinimap.Text\r\n minimapCharRenderer.renderChar(target, dx, dy + innerLinePadding, charCode, tokenColor, backgroundColor, fontScale, useLighterFont, force1pxHeight);\r\n }\r\n dx += charWidth;\r\n if (dx > maxDx) {\r\n // hit edge of minimap\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.registerThemingParticipant)((theme, collector) => {\r\n const minimapBackgroundValue = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapBackground);\r\n if (minimapBackgroundValue) {\r\n collector.addRule(`.monaco-editor .minimap > canvas { opacity: ${minimapBackgroundValue.rgba.a}; will-change: opacity; }`);\r\n }\r\n const sliderBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapSliderBackground);\r\n if (sliderBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${sliderBackground}; }`);\r\n }\r\n const sliderHoverBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapSliderHoverBackground);\r\n if (sliderHoverBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${sliderHoverBackground}; }`);\r\n }\r\n const sliderActiveBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.minimapSliderActiveBackground);\r\n if (sliderActiveBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${sliderActiveBackground}; }`);\r\n }\r\n const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${shadow} -6px 0 6px -6px inset; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MinimapCharRenderer\": () => (/* binding */ MinimapCharRenderer)\n/* harmony export */ });\n/* harmony import */ var _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimapCharSheet.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js\");\n/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/uint.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uint.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass MinimapCharRenderer {\r\n constructor(charData, scale) {\r\n this.scale = scale;\r\n this.charDataNormal = MinimapCharRenderer.soften(charData, 12 / 15);\r\n this.charDataLight = MinimapCharRenderer.soften(charData, 50 / 60);\r\n }\r\n static soften(input, ratio) {\r\n let result = new Uint8ClampedArray(input.length);\r\n for (let i = 0, len = input.length; i < len; i++) {\r\n result[i] = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_1__.toUint8)(input[i] * ratio);\r\n }\r\n return result;\r\n }\r\n renderChar(target, dx, dy, chCode, color, backgroundColor, fontScale, useLighterFont, force1pxHeight) {\r\n const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale;\r\n const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale;\r\n const renderHeight = (force1pxHeight ? 1 : charHeight);\r\n if (dx + charWidth > target.width || dy + renderHeight > target.height) {\r\n console.warn('bad render request outside image data');\r\n return;\r\n }\r\n const charData = useLighterFont ? this.charDataLight : this.charDataNormal;\r\n const charIndex = (0,_minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_0__.getCharIndex)(chCode, fontScale);\r\n const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\r\n const backgroundR = backgroundColor.r;\r\n const backgroundG = backgroundColor.g;\r\n const backgroundB = backgroundColor.b;\r\n const deltaR = color.r - backgroundR;\r\n const deltaG = color.g - backgroundG;\r\n const deltaB = color.b - backgroundB;\r\n const dest = target.data;\r\n let sourceOffset = charIndex * charWidth * charHeight;\r\n let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\r\n for (let y = 0; y < renderHeight; y++) {\r\n let column = row;\r\n for (let x = 0; x < charWidth; x++) {\r\n const c = charData[sourceOffset++] / 255;\r\n dest[column++] = backgroundR + deltaR * c;\r\n dest[column++] = backgroundG + deltaG * c;\r\n dest[column++] = backgroundB + deltaB * c;\r\n column++;\r\n }\r\n row += destWidth;\r\n }\r\n }\r\n blockRenderChar(target, dx, dy, color, backgroundColor, useLighterFont, force1pxHeight) {\r\n const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale;\r\n const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale;\r\n const renderHeight = (force1pxHeight ? 1 : charHeight);\r\n if (dx + charWidth > target.width || dy + renderHeight > target.height) {\r\n console.warn('bad render request outside image data');\r\n return;\r\n }\r\n const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\r\n const c = 0.5;\r\n const backgroundR = backgroundColor.r;\r\n const backgroundG = backgroundColor.g;\r\n const backgroundB = backgroundColor.b;\r\n const deltaR = color.r - backgroundR;\r\n const deltaG = color.g - backgroundG;\r\n const deltaB = color.b - backgroundB;\r\n const colorR = backgroundR + deltaR * c;\r\n const colorG = backgroundG + deltaG * c;\r\n const colorB = backgroundB + deltaB * c;\r\n const dest = target.data;\r\n let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\r\n for (let y = 0; y < renderHeight; y++) {\r\n let column = row;\r\n for (let x = 0; x < charWidth; x++) {\r\n dest[column++] = colorR;\r\n dest[column++] = colorG;\r\n dest[column++] = colorB;\r\n column++;\r\n }\r\n row += destWidth;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js":
|
||
/*!**********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js ***!
|
||
\**********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MinimapCharRendererFactory\": () => (/* binding */ MinimapCharRendererFactory)\n/* harmony export */ });\n/* harmony import */ var _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimapCharRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js\");\n/* harmony import */ var _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minimapCharSheet.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js\");\n/* harmony import */ var _minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./minimapPreBaked.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js\");\n/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/uint.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uint.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n/**\r\n * Creates character renderers. It takes a 'scale' that determines how large\r\n * characters should be drawn. Using this, it draws data into a canvas and\r\n * then downsamples the characters as necessary for the current display.\r\n * This makes rendering more efficient, rather than drawing a full (tiny)\r\n * font, or downsampling in real-time.\r\n */\r\nclass MinimapCharRendererFactory {\r\n /**\r\n * Creates a new character renderer factory with the given scale.\r\n */\r\n static create(scale, fontFamily) {\r\n // renderers are immutable. By default we'll 'create' a new minimap\r\n // character renderer whenever we switch editors, no need to do extra work.\r\n if (this.lastCreated && scale === this.lastCreated.scale && fontFamily === this.lastFontFamily) {\r\n return this.lastCreated;\r\n }\r\n let factory;\r\n if (_minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__.prebakedMiniMaps[scale]) {\r\n factory = new _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__.MinimapCharRenderer(_minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__.prebakedMiniMaps[scale](), scale);\r\n }\r\n else {\r\n factory = MinimapCharRendererFactory.createFromSampleData(MinimapCharRendererFactory.createSampleData(fontFamily).data, scale);\r\n }\r\n this.lastFontFamily = fontFamily;\r\n this.lastCreated = factory;\r\n return factory;\r\n }\r\n /**\r\n * Creates the font sample data, writing to a canvas.\r\n */\r\n static createSampleData(fontFamily) {\r\n const canvas = document.createElement('canvas');\r\n const ctx = canvas.getContext('2d');\r\n canvas.style.height = `${16 /* SAMPLED_CHAR_HEIGHT */}px`;\r\n canvas.height = 16 /* SAMPLED_CHAR_HEIGHT */;\r\n canvas.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */;\r\n canvas.style.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */ + 'px';\r\n ctx.fillStyle = '#ffffff';\r\n ctx.font = `bold ${16 /* SAMPLED_CHAR_HEIGHT */}px ${fontFamily}`;\r\n ctx.textBaseline = 'middle';\r\n let x = 0;\r\n for (const code of _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_1__.allCharCodes) {\r\n ctx.fillText(String.fromCharCode(code), x, 16 /* SAMPLED_CHAR_HEIGHT */ / 2);\r\n x += 10 /* SAMPLED_CHAR_WIDTH */;\r\n }\r\n return ctx.getImageData(0, 0, 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */, 16 /* SAMPLED_CHAR_HEIGHT */);\r\n }\r\n /**\r\n * Creates a character renderer from the canvas sample data.\r\n */\r\n static createFromSampleData(source, scale) {\r\n const expectedLength = 16 /* SAMPLED_CHAR_HEIGHT */ * 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */ * 96 /* CHAR_COUNT */;\r\n if (source.length !== expectedLength) {\r\n throw new Error('Unexpected source in MinimapCharRenderer');\r\n }\r\n let charData = MinimapCharRendererFactory._downsample(source, scale);\r\n return new _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__.MinimapCharRenderer(charData, scale);\r\n }\r\n static _downsampleChar(source, sourceOffset, dest, destOffset, scale) {\r\n const width = 1 /* BASE_CHAR_WIDTH */ * scale;\r\n const height = 2 /* BASE_CHAR_HEIGHT */ * scale;\r\n let targetIndex = destOffset;\r\n let brightest = 0;\r\n // This is essentially an ad-hoc rescaling algorithm. Standard approaches\r\n // like bicubic interpolation are awesome for scaling between image sizes,\r\n // but don't work so well when scaling to very small pixel values, we end\r\n // up with blurry, indistinct forms.\r\n //\r\n // The approach taken here is simply mapping each source pixel to the target\r\n // pixels, and taking the weighted values for all pixels in each, and then\r\n // averaging them out. Finally we apply an intensity boost in _downsample,\r\n // since when scaling to the smallest pixel sizes there's more black space\r\n // which causes characters to be much less distinct.\r\n for (let y = 0; y < height; y++) {\r\n // 1. For this destination pixel, get the source pixels we're sampling\r\n // from (x1, y1) to the next pixel (x2, y2)\r\n const sourceY1 = (y / height) * 16 /* SAMPLED_CHAR_HEIGHT */;\r\n const sourceY2 = ((y + 1) / height) * 16 /* SAMPLED_CHAR_HEIGHT */;\r\n for (let x = 0; x < width; x++) {\r\n const sourceX1 = (x / width) * 10 /* SAMPLED_CHAR_WIDTH */;\r\n const sourceX2 = ((x + 1) / width) * 10 /* SAMPLED_CHAR_WIDTH */;\r\n // 2. Sample all of them, summing them up and weighting them. Similar\r\n // to bilinear interpolation.\r\n let value = 0;\r\n let samples = 0;\r\n for (let sy = sourceY1; sy < sourceY2; sy++) {\r\n const sourceRow = sourceOffset + Math.floor(sy) * 3840 /* RGBA_SAMPLED_ROW_WIDTH */;\r\n const yBalance = 1 - (sy - Math.floor(sy));\r\n for (let sx = sourceX1; sx < sourceX2; sx++) {\r\n const xBalance = 1 - (sx - Math.floor(sx));\r\n const sourceIndex = sourceRow + Math.floor(sx) * 4 /* RGBA_CHANNELS_CNT */;\r\n const weight = xBalance * yBalance;\r\n samples += weight;\r\n value += ((source[sourceIndex] * source[sourceIndex + 3]) / 255) * weight;\r\n }\r\n }\r\n const final = value / samples;\r\n brightest = Math.max(brightest, final);\r\n dest[targetIndex++] = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_3__.toUint8)(final);\r\n }\r\n }\r\n return brightest;\r\n }\r\n static _downsample(data, scale) {\r\n const pixelsPerCharacter = 2 /* BASE_CHAR_HEIGHT */ * scale * 1 /* BASE_CHAR_WIDTH */ * scale;\r\n const resultLen = pixelsPerCharacter * 96 /* CHAR_COUNT */;\r\n const result = new Uint8ClampedArray(resultLen);\r\n let resultOffset = 0;\r\n let sourceOffset = 0;\r\n let brightest = 0;\r\n for (let charIndex = 0; charIndex < 96 /* CHAR_COUNT */; charIndex++) {\r\n brightest = Math.max(brightest, this._downsampleChar(data, sourceOffset, result, resultOffset, scale));\r\n resultOffset += pixelsPerCharacter;\r\n sourceOffset += 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */;\r\n }\r\n if (brightest > 0) {\r\n const adjust = 255 / brightest;\r\n for (let i = 0; i < resultLen; i++) {\r\n result[i] *= adjust;\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"allCharCodes\": () => (/* binding */ allCharCodes),\n/* harmony export */ \"getCharIndex\": () => (/* binding */ getCharIndex)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst allCharCodes = (() => {\r\n const v = [];\r\n for (let i = 32 /* START_CH_CODE */; i <= 126 /* END_CH_CODE */; i++) {\r\n v.push(i);\r\n }\r\n v.push(65533 /* UNKNOWN_CODE */);\r\n return v;\r\n})();\r\nconst getCharIndex = (chCode, fontScale) => {\r\n chCode -= 32 /* START_CH_CODE */;\r\n if (chCode < 0 || chCode > 96 /* CHAR_COUNT */) {\r\n if (fontScale <= 2) {\r\n // for smaller scales, we can get away with using any ASCII character...\r\n return (chCode + 96 /* CHAR_COUNT */) % 96 /* CHAR_COUNT */;\r\n }\r\n return 96 /* CHAR_COUNT */ - 1; // unknown symbol\r\n }\r\n return chCode;\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"prebakedMiniMaps\": () => (/* binding */ prebakedMiniMaps)\n/* harmony export */ });\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst charTable = {\r\n '0': 0,\r\n '1': 1,\r\n '2': 2,\r\n '3': 3,\r\n '4': 4,\r\n '5': 5,\r\n '6': 6,\r\n '7': 7,\r\n '8': 8,\r\n '9': 9,\r\n A: 10,\r\n B: 11,\r\n C: 12,\r\n D: 13,\r\n E: 14,\r\n F: 15\r\n};\r\nconst decodeData = (str) => {\r\n const output = new Uint8ClampedArray(str.length / 2);\r\n for (let i = 0; i < str.length; i += 2) {\r\n output[i >> 1] = (charTable[str[i]] << 4) | (charTable[str[i + 1]] & 0xF);\r\n }\r\n return output;\r\n};\r\n/*\r\nconst encodeData = (data: Uint8ClampedArray, length: string) => {\r\n const chars = '0123456789ABCDEF';\r\n let output = '';\r\n for (let i = 0; i < data.length; i++) {\r\n output += chars[data[i] >> 4] + chars[data[i] & 0xf];\r\n }\r\n return output;\r\n};\r\n*/\r\n/**\r\n * Map of minimap scales to prebaked sample data at those scales. We don't\r\n * sample much larger data, because then font family becomes visible, which\r\n * is use-configurable.\r\n */\r\nconst prebakedMiniMaps = {\r\n 1: (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__.once)(() => decodeData('0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792')),\r\n 2: (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__.once)(() => decodeData('000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126'))\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js":
|
||
/*!*****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js ***!
|
||
\*****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewOverlayWidgets\": () => (/* binding */ ViewOverlayWidgets)\n/* harmony export */ });\n/* harmony import */ var _overlayWidgets_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./overlayWidgets.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass ViewOverlayWidgets extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._widgets = {};\r\n this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;\r\n this._minimapWidth = layoutInfo.minimap.minimapWidth;\r\n this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight;\r\n this._editorHeight = layoutInfo.height;\r\n this._editorWidth = layoutInfo.width;\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.PartFingerprints.write(this._domNode, 4 /* OverlayWidgets */);\r\n this._domNode.setClassName('overlayWidgets');\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._widgets = {};\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;\r\n this._minimapWidth = layoutInfo.minimap.minimapWidth;\r\n this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight;\r\n this._editorHeight = layoutInfo.height;\r\n this._editorWidth = layoutInfo.width;\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n addWidget(widget) {\r\n const domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(widget.getDomNode());\r\n this._widgets[widget.getId()] = {\r\n widget: widget,\r\n preference: null,\r\n domNode: domNode\r\n };\r\n // This is sync because a widget wants to be in the dom\r\n domNode.setPosition('absolute');\r\n domNode.setAttribute('widgetId', widget.getId());\r\n this._domNode.appendChild(domNode);\r\n this.setShouldRender();\r\n }\r\n setWidgetPosition(widget, preference) {\r\n const widgetData = this._widgets[widget.getId()];\r\n if (widgetData.preference === preference) {\r\n return false;\r\n }\r\n widgetData.preference = preference;\r\n this.setShouldRender();\r\n return true;\r\n }\r\n removeWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._widgets[widgetId];\r\n const domNode = widgetData.domNode.domNode;\r\n delete this._widgets[widgetId];\r\n domNode.parentNode.removeChild(domNode);\r\n this.setShouldRender();\r\n }\r\n }\r\n _renderWidget(widgetData) {\r\n const domNode = widgetData.domNode;\r\n if (widgetData.preference === null) {\r\n domNode.unsetTop();\r\n return;\r\n }\r\n if (widgetData.preference === 0 /* TOP_RIGHT_CORNER */) {\r\n domNode.setTop(0);\r\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\r\n }\r\n else if (widgetData.preference === 1 /* BOTTOM_RIGHT_CORNER */) {\r\n const widgetHeight = domNode.domNode.clientHeight;\r\n domNode.setTop((this._editorHeight - widgetHeight - 2 * this._horizontalScrollbarHeight));\r\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\r\n }\r\n else if (widgetData.preference === 2 /* TOP_CENTER */) {\r\n domNode.setTop(0);\r\n domNode.domNode.style.right = '50%';\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setWidth(this._editorWidth);\r\n const keys = Object.keys(this._widgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n this._renderWidget(this._widgets[widgetId]);\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js":
|
||
/*!**************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js ***!
|
||
\**************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DecorationsOverviewRuler\": () => (/* binding */ DecorationsOverviewRuler)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass Settings {\r\n constructor(config, theme) {\r\n const options = config.options;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.pixelRatio = options.get(122 /* pixelRatio */);\r\n this.overviewRulerLanes = options.get(68 /* overviewRulerLanes */);\r\n this.renderBorder = options.get(67 /* overviewRulerBorder */);\r\n const borderColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorOverviewRulerBorder);\r\n this.borderColor = borderColor ? borderColor.toString() : null;\r\n this.hideCursor = options.get(46 /* hideCursorInOverviewRuler */);\r\n const cursorColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorCursorForeground);\r\n this.cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null;\r\n this.themeType = theme.type;\r\n const minimapOpts = options.get(59 /* minimap */);\r\n const minimapEnabled = minimapOpts.enabled;\r\n const minimapSide = minimapOpts.side;\r\n const backgroundColor = minimapEnabled\r\n ? theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorOverviewRulerBackground) || _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.TokenizationRegistry.getDefaultBackground()\r\n : null;\r\n if (backgroundColor === null || minimapSide === 'left') {\r\n this.backgroundColor = null;\r\n }\r\n else {\r\n this.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.Format.CSS.formatHex(backgroundColor);\r\n }\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const position = layoutInfo.overviewRuler;\r\n this.top = position.top;\r\n this.right = position.right;\r\n this.domWidth = position.width;\r\n this.domHeight = position.height;\r\n if (this.overviewRulerLanes === 0) {\r\n // overview ruler is off\r\n this.canvasWidth = 0;\r\n this.canvasHeight = 0;\r\n }\r\n else {\r\n this.canvasWidth = (this.domWidth * this.pixelRatio) | 0;\r\n this.canvasHeight = (this.domHeight * this.pixelRatio) | 0;\r\n }\r\n const [x, w] = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes);\r\n this.x = x;\r\n this.w = w;\r\n }\r\n _initLanes(canvasLeftOffset, canvasWidth, laneCount) {\r\n const remainingWidth = canvasWidth - canvasLeftOffset;\r\n if (laneCount >= 3) {\r\n const leftWidth = Math.floor(remainingWidth / 3);\r\n const rightWidth = Math.floor(remainingWidth / 3);\r\n const centerWidth = remainingWidth - leftWidth - rightWidth;\r\n const leftOffset = canvasLeftOffset;\r\n const centerOffset = leftOffset + leftWidth;\r\n const rightOffset = leftOffset + leftWidth + centerWidth;\r\n return [\r\n [\r\n 0,\r\n leftOffset,\r\n centerOffset,\r\n leftOffset,\r\n rightOffset,\r\n leftOffset,\r\n centerOffset,\r\n leftOffset, // Left | Center | Right\r\n ], [\r\n 0,\r\n leftWidth,\r\n centerWidth,\r\n leftWidth + centerWidth,\r\n rightWidth,\r\n leftWidth + centerWidth + rightWidth,\r\n centerWidth + rightWidth,\r\n leftWidth + centerWidth + rightWidth, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n else if (laneCount === 2) {\r\n const leftWidth = Math.floor(remainingWidth / 2);\r\n const rightWidth = remainingWidth - leftWidth;\r\n const leftOffset = canvasLeftOffset;\r\n const rightOffset = leftOffset + leftWidth;\r\n return [\r\n [\r\n 0,\r\n leftOffset,\r\n leftOffset,\r\n leftOffset,\r\n rightOffset,\r\n leftOffset,\r\n leftOffset,\r\n leftOffset, // Left | Center | Right\r\n ], [\r\n 0,\r\n leftWidth,\r\n leftWidth,\r\n leftWidth,\r\n rightWidth,\r\n leftWidth + rightWidth,\r\n leftWidth + rightWidth,\r\n leftWidth + rightWidth, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n else {\r\n const offset = canvasLeftOffset;\r\n const width = remainingWidth;\r\n return [\r\n [\r\n 0,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset, // Left | Center | Right\r\n ], [\r\n 0,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n }\r\n equals(other) {\r\n return (this.lineHeight === other.lineHeight\r\n && this.pixelRatio === other.pixelRatio\r\n && this.overviewRulerLanes === other.overviewRulerLanes\r\n && this.renderBorder === other.renderBorder\r\n && this.borderColor === other.borderColor\r\n && this.hideCursor === other.hideCursor\r\n && this.cursorColor === other.cursorColor\r\n && this.themeType === other.themeType\r\n && this.backgroundColor === other.backgroundColor\r\n && this.top === other.top\r\n && this.right === other.right\r\n && this.domWidth === other.domWidth\r\n && this.domHeight === other.domHeight\r\n && this.canvasWidth === other.canvasWidth\r\n && this.canvasHeight === other.canvasHeight);\r\n }\r\n}\r\nclass DecorationsOverviewRuler extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('canvas'));\r\n this._domNode.setClassName('decorationsOverviewRuler');\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setLayerHinting(true);\r\n this._domNode.setContain('strict');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._updateSettings(false);\r\n this._tokensColorTrackerListener = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.TokenizationRegistry.onDidChange((e) => {\r\n if (e.changedColorMap) {\r\n this._updateSettings(true);\r\n }\r\n });\r\n this._cursorPositions = [];\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._tokensColorTrackerListener.dispose();\r\n }\r\n _updateSettings(renderNow) {\r\n const newSettings = new Settings(this._context.configuration, this._context.theme);\r\n if (this._settings && this._settings.equals(newSettings)) {\r\n // nothing to do\r\n return false;\r\n }\r\n this._settings = newSettings;\r\n this._domNode.setTop(this._settings.top);\r\n this._domNode.setRight(this._settings.right);\r\n this._domNode.setWidth(this._settings.domWidth);\r\n this._domNode.setHeight(this._settings.domHeight);\r\n this._domNode.domNode.width = this._settings.canvasWidth;\r\n this._domNode.domNode.height = this._settings.canvasHeight;\r\n if (renderNow) {\r\n this._render();\r\n }\r\n return true;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n return this._updateSettings(false);\r\n }\r\n onCursorStateChanged(e) {\r\n this._cursorPositions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n this._cursorPositions[i] = e.selections[i].getPosition();\r\n }\r\n this._cursorPositions.sort(_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.compare);\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n if (e.affectsOverviewRuler) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollHeightChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onThemeChanged(e) {\r\n // invalidate color cache\r\n this._context.model.invalidateOverviewRulerColorCache();\r\n return this._updateSettings(false);\r\n }\r\n // ---- end view event handlers\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(editorCtx) {\r\n this._render();\r\n }\r\n _render() {\r\n if (this._settings.overviewRulerLanes === 0) {\r\n // overview ruler is off\r\n this._domNode.setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : '');\r\n return;\r\n }\r\n const canvasWidth = this._settings.canvasWidth;\r\n const canvasHeight = this._settings.canvasHeight;\r\n const lineHeight = this._settings.lineHeight;\r\n const viewLayout = this._context.viewLayout;\r\n const outerHeight = this._context.viewLayout.getScrollHeight();\r\n const heightRatio = canvasHeight / outerHeight;\r\n const decorations = this._context.model.getAllOverviewRulerDecorations(this._context.theme);\r\n const minDecorationHeight = (6 /* MIN_DECORATION_HEIGHT */ * this._settings.pixelRatio) | 0;\r\n const halfMinDecorationHeight = (minDecorationHeight / 2) | 0;\r\n const canvasCtx = this._domNode.domNode.getContext('2d');\r\n if (this._settings.backgroundColor === null) {\r\n canvasCtx.clearRect(0, 0, canvasWidth, canvasHeight);\r\n }\r\n else {\r\n canvasCtx.fillStyle = this._settings.backgroundColor;\r\n canvasCtx.fillRect(0, 0, canvasWidth, canvasHeight);\r\n }\r\n const x = this._settings.x;\r\n const w = this._settings.w;\r\n // Avoid flickering by always rendering the colors in the same order\r\n // colors that don't use transparency will be sorted last (they start with #)\r\n const colors = Object.keys(decorations);\r\n colors.sort();\r\n for (let cIndex = 0, cLen = colors.length; cIndex < cLen; cIndex++) {\r\n const color = colors[cIndex];\r\n const colorDecorations = decorations[color];\r\n canvasCtx.fillStyle = color;\r\n let prevLane = 0;\r\n let prevY1 = 0;\r\n let prevY2 = 0;\r\n for (let i = 0, len = colorDecorations.length; i < len; i++) {\r\n const lane = colorDecorations[3 * i];\r\n const startLineNumber = colorDecorations[3 * i + 1];\r\n const endLineNumber = colorDecorations[3 * i + 2];\r\n let y1 = (viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio) | 0;\r\n let y2 = ((viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio) | 0;\r\n const height = y2 - y1;\r\n if (height < minDecorationHeight) {\r\n let yCenter = ((y1 + y2) / 2) | 0;\r\n if (yCenter < halfMinDecorationHeight) {\r\n yCenter = halfMinDecorationHeight;\r\n }\r\n else if (yCenter + halfMinDecorationHeight > canvasHeight) {\r\n yCenter = canvasHeight - halfMinDecorationHeight;\r\n }\r\n y1 = yCenter - halfMinDecorationHeight;\r\n y2 = yCenter + halfMinDecorationHeight;\r\n }\r\n if (y1 > prevY2 + 1 || lane !== prevLane) {\r\n // flush prev\r\n if (i !== 0) {\r\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\r\n }\r\n prevLane = lane;\r\n prevY1 = y1;\r\n prevY2 = y2;\r\n }\r\n else {\r\n // merge into prev\r\n if (y2 > prevY2) {\r\n prevY2 = y2;\r\n }\r\n }\r\n }\r\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\r\n }\r\n // Draw cursors\r\n if (!this._settings.hideCursor && this._settings.cursorColor) {\r\n const cursorHeight = (2 * this._settings.pixelRatio) | 0;\r\n const halfCursorHeight = (cursorHeight / 2) | 0;\r\n const cursorX = this._settings.x[7 /* Full */];\r\n const cursorW = this._settings.w[7 /* Full */];\r\n canvasCtx.fillStyle = this._settings.cursorColor;\r\n let prevY1 = -100;\r\n let prevY2 = -100;\r\n for (let i = 0, len = this._cursorPositions.length; i < len; i++) {\r\n const cursor = this._cursorPositions[i];\r\n let yCenter = (viewLayout.getVerticalOffsetForLineNumber(cursor.lineNumber) * heightRatio) | 0;\r\n if (yCenter < halfCursorHeight) {\r\n yCenter = halfCursorHeight;\r\n }\r\n else if (yCenter + halfCursorHeight > canvasHeight) {\r\n yCenter = canvasHeight - halfCursorHeight;\r\n }\r\n const y1 = yCenter - halfCursorHeight;\r\n const y2 = y1 + cursorHeight;\r\n if (y1 > prevY2 + 1) {\r\n // flush prev\r\n if (i !== 0) {\r\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\r\n }\r\n prevY1 = y1;\r\n prevY2 = y2;\r\n }\r\n else {\r\n // merge into prev\r\n if (y2 > prevY2) {\r\n prevY2 = y2;\r\n }\r\n }\r\n }\r\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\r\n }\r\n if (this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0) {\r\n canvasCtx.beginPath();\r\n canvasCtx.lineWidth = 1;\r\n canvasCtx.strokeStyle = this._settings.borderColor;\r\n canvasCtx.moveTo(0, 0);\r\n canvasCtx.lineTo(0, canvasHeight);\r\n canvasCtx.stroke();\r\n canvasCtx.moveTo(0, 0);\r\n canvasCtx.lineTo(canvasWidth, 0);\r\n canvasCtx.stroke();\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OverviewRuler\": () => (/* binding */ OverviewRuler)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/view/overviewZoneManager.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js\");\n/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/viewModel/viewEventHandler.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass OverviewRuler extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_2__.ViewEventHandler {\r\n constructor(context, cssClassName) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('canvas'));\r\n this._domNode.setClassName(cssClassName);\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setLayerHinting(true);\r\n this._domNode.setContain('strict');\r\n this._zoneManager = new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_1__.OverviewZoneManager((lineNumber) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber));\r\n this._zoneManager.setDOMWidth(0);\r\n this._zoneManager.setDOMHeight(0);\r\n this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight());\r\n this._zoneManager.setLineHeight(options.get(53 /* lineHeight */));\r\n this._zoneManager.setPixelRatio(options.get(122 /* pixelRatio */));\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._zoneManager.setLineHeight(options.get(53 /* lineHeight */));\r\n this._render();\r\n }\r\n if (e.hasChanged(122 /* pixelRatio */)) {\r\n this._zoneManager.setPixelRatio(options.get(122 /* pixelRatio */));\r\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\r\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\r\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\r\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\r\n this._render();\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n this._render();\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n if (e.scrollHeightChanged) {\r\n this._zoneManager.setOuterHeight(e.scrollHeight);\r\n this._render();\r\n }\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n this._render();\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n setLayout(position) {\r\n this._domNode.setTop(position.top);\r\n this._domNode.setRight(position.right);\r\n let hasChanged = false;\r\n hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged;\r\n hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged;\r\n if (hasChanged) {\r\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\r\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\r\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\r\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\r\n this._render();\r\n }\r\n }\r\n setZones(zones) {\r\n this._zoneManager.setZones(zones);\r\n this._render();\r\n }\r\n _render() {\r\n if (this._zoneManager.getOuterHeight() === 0) {\r\n return false;\r\n }\r\n const width = this._zoneManager.getCanvasWidth();\r\n const height = this._zoneManager.getCanvasHeight();\r\n const colorZones = this._zoneManager.resolveColorZones();\r\n const id2Color = this._zoneManager.getId2Color();\r\n const ctx = this._domNode.domNode.getContext('2d');\r\n ctx.clearRect(0, 0, width, height);\r\n if (colorZones.length > 0) {\r\n this._renderOneLane(ctx, colorZones, id2Color, width);\r\n }\r\n return true;\r\n }\r\n _renderOneLane(ctx, colorZones, id2Color, width) {\r\n let currentColorId = 0;\r\n let currentFrom = 0;\r\n let currentTo = 0;\r\n for (const zone of colorZones) {\r\n const zoneColorId = zone.colorId;\r\n const zoneFrom = zone.from;\r\n const zoneTo = zone.to;\r\n if (zoneColorId !== currentColorId) {\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n currentColorId = zoneColorId;\r\n ctx.fillStyle = id2Color[currentColorId];\r\n currentFrom = zoneFrom;\r\n currentTo = zoneTo;\r\n }\r\n else {\r\n if (currentTo >= zoneFrom) {\r\n currentTo = Math.max(currentTo, zoneTo);\r\n }\r\n else {\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n currentFrom = zoneFrom;\r\n currentTo = zoneTo;\r\n }\r\n }\r\n }\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Rulers\": () => (/* binding */ Rulers)\n/* harmony export */ });\n/* harmony import */ var _rulers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rulers.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass Rulers extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this.domNode.setAttribute('role', 'presentation');\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.domNode.setClassName('view-rulers');\r\n this._renderedRulers = [];\r\n const options = this._context.configuration.options;\r\n this._rulers = options.get(86 /* rulers */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._rulers = options.get(86 /* rulers */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollHeightChanged;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n _ensureRulersCount() {\r\n const currentCount = this._renderedRulers.length;\r\n const desiredCount = this._rulers.length;\r\n if (currentCount === desiredCount) {\r\n // Nothing to do\r\n return;\r\n }\r\n if (currentCount < desiredCount) {\r\n const { tabSize } = this._context.model.getTextModelOptions();\r\n const rulerWidth = tabSize;\r\n let addCount = desiredCount - currentCount;\r\n while (addCount > 0) {\r\n const node = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n node.setClassName('view-ruler');\r\n node.setWidth(rulerWidth);\r\n this.domNode.appendChild(node);\r\n this._renderedRulers.push(node);\r\n addCount--;\r\n }\r\n return;\r\n }\r\n let removeCount = currentCount - desiredCount;\r\n while (removeCount > 0) {\r\n const node = this._renderedRulers.pop();\r\n this.domNode.removeChild(node);\r\n removeCount--;\r\n }\r\n }\r\n render(ctx) {\r\n this._ensureRulersCount();\r\n for (let i = 0, len = this._rulers.length; i < len; i++) {\r\n const node = this._renderedRulers[i];\r\n const ruler = this._rulers[i];\r\n node.setBoxShadow(ruler.color ? `1px 0 0 0 ${ruler.color} inset` : ``);\r\n node.setHeight(Math.min(ctx.scrollHeight, 1000000));\r\n node.setLeft(ruler.column * this._typicalHalfwidthCharacterWidth);\r\n }\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.registerThemingParticipant)((theme, collector) => {\r\n const rulerColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.editorRuler);\r\n if (rulerColor) {\r\n collector.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${rulerColor} inset; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js":
|
||
/*!*********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js ***!
|
||
\*********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ScrollDecorationViewPart\": () => (/* binding */ ScrollDecorationViewPart)\n/* harmony export */ });\n/* harmony import */ var _scrollDecoration_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scrollDecoration.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass ScrollDecorationViewPart extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._scrollTop = 0;\r\n this._width = 0;\r\n this._updateWidth();\r\n this._shouldShow = false;\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n this._useShadows = scrollbar.useShadows;\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _updateShouldShow() {\r\n const newShouldShow = (this._useShadows && this._scrollTop > 0);\r\n if (this._shouldShow !== newShouldShow) {\r\n this._shouldShow = newShouldShow;\r\n return true;\r\n }\r\n return false;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n _updateWidth() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n if (layoutInfo.minimap.renderMinimap === 0 || (layoutInfo.minimap.minimapWidth > 0 && layoutInfo.minimap.minimapLeft === 0)) {\r\n this._width = layoutInfo.width;\r\n }\r\n else {\r\n this._width = layoutInfo.width - layoutInfo.minimap.minimapWidth - layoutInfo.verticalScrollbarWidth;\r\n }\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n this._useShadows = scrollbar.useShadows;\r\n this._updateWidth();\r\n this._updateShouldShow();\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n this._scrollTop = e.scrollTop;\r\n return this._updateShouldShow();\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setWidth(this._width);\r\n this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : '');\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.registerThemingParticipant)((theme, collector) => {\r\n const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${shadow} 0 6px 6px -6px inset; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SelectionsOverlay\": () => (/* binding */ SelectionsOverlay)\n/* harmony export */ });\n/* harmony import */ var _selections_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selections.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css\");\n/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass HorizontalRangeWithStyle {\r\n constructor(other) {\r\n this.left = other.left;\r\n this.width = other.width;\r\n this.startStyle = null;\r\n this.endStyle = null;\r\n }\r\n}\r\nclass LineVisibleRangesWithStyle {\r\n constructor(lineNumber, ranges) {\r\n this.lineNumber = lineNumber;\r\n this.ranges = ranges;\r\n }\r\n}\r\nfunction toStyledRange(item) {\r\n return new HorizontalRangeWithStyle(item);\r\n}\r\nfunction toStyled(item) {\r\n return new LineVisibleRangesWithStyle(item.lineNumber, item.ranges.map(toStyledRange));\r\n}\r\nclass SelectionsOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__.DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._previousFrameVisibleRangesWithStyle = [];\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._roundedSelection = options.get(85 /* roundedSelection */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this._selections = [];\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._roundedSelection = options.get(85 /* roundedSelection */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections.slice(0);\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true; //e.inlineDecorationsChanged;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _visibleRangesHaveGaps(linesVisibleRanges) {\r\n for (let i = 0, len = linesVisibleRanges.length; i < len; i++) {\r\n const lineVisibleRanges = linesVisibleRanges[i];\r\n if (lineVisibleRanges.ranges.length > 1) {\r\n // There are two ranges on the same line\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _enrichVisibleRangesWithStyle(viewport, linesVisibleRanges, previousFrame) {\r\n const epsilon = this._typicalHalfwidthCharacterWidth / 4;\r\n let previousFrameTop = null;\r\n let previousFrameBottom = null;\r\n if (previousFrame && previousFrame.length > 0 && linesVisibleRanges.length > 0) {\r\n const topLineNumber = linesVisibleRanges[0].lineNumber;\r\n if (topLineNumber === viewport.startLineNumber) {\r\n for (let i = 0; !previousFrameTop && i < previousFrame.length; i++) {\r\n if (previousFrame[i].lineNumber === topLineNumber) {\r\n previousFrameTop = previousFrame[i].ranges[0];\r\n }\r\n }\r\n }\r\n const bottomLineNumber = linesVisibleRanges[linesVisibleRanges.length - 1].lineNumber;\r\n if (bottomLineNumber === viewport.endLineNumber) {\r\n for (let i = previousFrame.length - 1; !previousFrameBottom && i >= 0; i--) {\r\n if (previousFrame[i].lineNumber === bottomLineNumber) {\r\n previousFrameBottom = previousFrame[i].ranges[0];\r\n }\r\n }\r\n }\r\n if (previousFrameTop && !previousFrameTop.startStyle) {\r\n previousFrameTop = null;\r\n }\r\n if (previousFrameBottom && !previousFrameBottom.startStyle) {\r\n previousFrameBottom = null;\r\n }\r\n }\r\n for (let i = 0, len = linesVisibleRanges.length; i < len; i++) {\r\n // We know for a fact that there is precisely one range on each line\r\n const curLineRange = linesVisibleRanges[i].ranges[0];\r\n const curLeft = curLineRange.left;\r\n const curRight = curLineRange.left + curLineRange.width;\r\n const startStyle = {\r\n top: 0 /* EXTERN */,\r\n bottom: 0 /* EXTERN */\r\n };\r\n const endStyle = {\r\n top: 0 /* EXTERN */,\r\n bottom: 0 /* EXTERN */\r\n };\r\n if (i > 0) {\r\n // Look above\r\n const prevLeft = linesVisibleRanges[i - 1].ranges[0].left;\r\n const prevRight = linesVisibleRanges[i - 1].ranges[0].left + linesVisibleRanges[i - 1].ranges[0].width;\r\n if (abs(curLeft - prevLeft) < epsilon) {\r\n startStyle.top = 2 /* FLAT */;\r\n }\r\n else if (curLeft > prevLeft) {\r\n startStyle.top = 1 /* INTERN */;\r\n }\r\n if (abs(curRight - prevRight) < epsilon) {\r\n endStyle.top = 2 /* FLAT */;\r\n }\r\n else if (prevLeft < curRight && curRight < prevRight) {\r\n endStyle.top = 1 /* INTERN */;\r\n }\r\n }\r\n else if (previousFrameTop) {\r\n // Accept some hiccups near the viewport edges to save on repaints\r\n startStyle.top = previousFrameTop.startStyle.top;\r\n endStyle.top = previousFrameTop.endStyle.top;\r\n }\r\n if (i + 1 < len) {\r\n // Look below\r\n const nextLeft = linesVisibleRanges[i + 1].ranges[0].left;\r\n const nextRight = linesVisibleRanges[i + 1].ranges[0].left + linesVisibleRanges[i + 1].ranges[0].width;\r\n if (abs(curLeft - nextLeft) < epsilon) {\r\n startStyle.bottom = 2 /* FLAT */;\r\n }\r\n else if (nextLeft < curLeft && curLeft < nextRight) {\r\n startStyle.bottom = 1 /* INTERN */;\r\n }\r\n if (abs(curRight - nextRight) < epsilon) {\r\n endStyle.bottom = 2 /* FLAT */;\r\n }\r\n else if (curRight < nextRight) {\r\n endStyle.bottom = 1 /* INTERN */;\r\n }\r\n }\r\n else if (previousFrameBottom) {\r\n // Accept some hiccups near the viewport edges to save on repaints\r\n startStyle.bottom = previousFrameBottom.startStyle.bottom;\r\n endStyle.bottom = previousFrameBottom.endStyle.bottom;\r\n }\r\n curLineRange.startStyle = startStyle;\r\n curLineRange.endStyle = endStyle;\r\n }\r\n }\r\n _getVisibleRangesWithStyle(selection, ctx, previousFrame) {\r\n const _linesVisibleRanges = ctx.linesVisibleRangesForRange(selection, true) || [];\r\n const linesVisibleRanges = _linesVisibleRanges.map(toStyled);\r\n const visibleRangesHaveGaps = this._visibleRangesHaveGaps(linesVisibleRanges);\r\n if (!visibleRangesHaveGaps && this._roundedSelection) {\r\n this._enrichVisibleRangesWithStyle(ctx.visibleRange, linesVisibleRanges, previousFrame);\r\n }\r\n // The visible ranges are sorted TOP-BOTTOM and LEFT-RIGHT\r\n return linesVisibleRanges;\r\n }\r\n _createSelectionPiece(top, height, className, left, width) {\r\n return ('<div class=\"cslr '\r\n + className\r\n + '\" style=\"top:'\r\n + top.toString()\r\n + 'px;left:'\r\n + left.toString()\r\n + 'px;width:'\r\n + width.toString()\r\n + 'px;height:'\r\n + height\r\n + 'px;\"></div>');\r\n }\r\n _actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {\r\n if (visibleRanges.length === 0) {\r\n return;\r\n }\r\n const visibleRangesHaveStyle = !!visibleRanges[0].ranges[0].startStyle;\r\n const fullLineHeight = (this._lineHeight).toString();\r\n const reducedLineHeight = (this._lineHeight - 1).toString();\r\n const firstLineNumber = visibleRanges[0].lineNumber;\r\n const lastLineNumber = visibleRanges[visibleRanges.length - 1].lineNumber;\r\n for (let i = 0, len = visibleRanges.length; i < len; i++) {\r\n const lineVisibleRanges = visibleRanges[i];\r\n const lineNumber = lineVisibleRanges.lineNumber;\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const lineHeight = hasMultipleSelections ? (lineNumber === lastLineNumber || lineNumber === firstLineNumber ? reducedLineHeight : fullLineHeight) : fullLineHeight;\r\n const top = hasMultipleSelections ? (lineNumber === firstLineNumber ? 1 : 0) : 0;\r\n let innerCornerOutput = '';\r\n let restOfSelectionOutput = '';\r\n for (let j = 0, lenJ = lineVisibleRanges.ranges.length; j < lenJ; j++) {\r\n const visibleRange = lineVisibleRanges.ranges[j];\r\n if (visibleRangesHaveStyle) {\r\n const startStyle = visibleRange.startStyle;\r\n const endStyle = visibleRange.endStyle;\r\n if (startStyle.top === 1 /* INTERN */ || startStyle.bottom === 1 /* INTERN */) {\r\n // Reverse rounded corner to the left\r\n // First comes the selection (blue layer)\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n // Second comes the background (white layer) with inverse border radius\r\n let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\r\n if (startStyle.top === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\r\n }\r\n if (startStyle.bottom === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\r\n }\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n }\r\n if (endStyle.top === 1 /* INTERN */ || endStyle.bottom === 1 /* INTERN */) {\r\n // Reverse rounded corner to the right\r\n // First comes the selection (blue layer)\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n // Second comes the background (white layer) with inverse border radius\r\n let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\r\n if (endStyle.top === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\r\n }\r\n if (endStyle.bottom === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\r\n }\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n }\r\n }\r\n let className = SelectionsOverlay.SELECTION_CLASS_NAME;\r\n if (visibleRangesHaveStyle) {\r\n const startStyle = visibleRange.startStyle;\r\n const endStyle = visibleRange.endStyle;\r\n if (startStyle.top === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\r\n }\r\n if (startStyle.bottom === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\r\n }\r\n if (endStyle.top === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\r\n }\r\n if (endStyle.bottom === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\r\n }\r\n }\r\n restOfSelectionOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left, visibleRange.width);\r\n }\r\n output2[lineIndex][0] += innerCornerOutput;\r\n output2[lineIndex][1] += restOfSelectionOutput;\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Build HTML for inner corners separate from HTML for the rest of selections,\r\n // as the inner corner HTML can interfere with that of other selections.\r\n // In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777.\r\n const output = [];\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = ['', ''];\r\n }\r\n const thisFrameVisibleRangesWithStyle = [];\r\n for (let i = 0, len = this._selections.length; i < len; i++) {\r\n const selection = this._selections[i];\r\n if (selection.isEmpty()) {\r\n thisFrameVisibleRangesWithStyle[i] = null;\r\n continue;\r\n }\r\n const visibleRangesWithStyle = this._getVisibleRangesWithStyle(selection, ctx, this._previousFrameVisibleRangesWithStyle[i]);\r\n thisFrameVisibleRangesWithStyle[i] = visibleRangesWithStyle;\r\n this._actualRenderOneSelection(output, visibleStartLineNumber, this._selections.length > 1, visibleRangesWithStyle);\r\n }\r\n this._previousFrameVisibleRangesWithStyle = thisFrameVisibleRangesWithStyle;\r\n this._renderResult = output.map(([internalCorners, restOfSelection]) => internalCorners + restOfSelection);\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\nSelectionsOverlay.SELECTION_CLASS_NAME = 'selected-text';\r\nSelectionsOverlay.SELECTION_TOP_LEFT = 'top-left-radius';\r\nSelectionsOverlay.SELECTION_BOTTOM_LEFT = 'bottom-left-radius';\r\nSelectionsOverlay.SELECTION_TOP_RIGHT = 'top-right-radius';\r\nSelectionsOverlay.SELECTION_BOTTOM_RIGHT = 'bottom-right-radius';\r\nSelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME = 'monaco-editor-background';\r\nSelectionsOverlay.ROUNDED_PIECE_WIDTH = 10;\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.registerThemingParticipant)((theme, collector) => {\r\n const editorSelectionColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorSelectionBackground);\r\n if (editorSelectionColor) {\r\n collector.addRule(`.monaco-editor .focused .selected-text { background-color: ${editorSelectionColor}; }`);\r\n }\r\n const editorInactiveSelectionColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorInactiveSelection);\r\n if (editorInactiveSelectionColor) {\r\n collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`);\r\n }\r\n const editorSelectionForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorSelectionForeground);\r\n if (editorSelectionForegroundColor && !editorSelectionForegroundColor.isTransparent()) {\r\n collector.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${editorSelectionForegroundColor}; }`);\r\n }\r\n});\r\nfunction abs(n) {\r\n return n < 0 ? -n : n;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewCursor\": () => (/* binding */ ViewCursor)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/browser/ui/mouseCursor/mouseCursor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ViewCursorRenderData {\r\n constructor(top, left, width, height, textContent, textContentClassName) {\r\n this.top = top;\r\n this.left = left;\r\n this.width = width;\r\n this.height = height;\r\n this.textContent = textContent;\r\n this.textContentClassName = textContentClassName;\r\n }\r\n}\r\nclass ViewCursor {\r\n constructor(context) {\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._lineCursorWidth = Math.min(options.get(24 /* cursorWidth */), this._typicalHalfwidthCharacterWidth);\r\n this._isVisible = true;\r\n // Create the dom node\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this._domNode.setClassName(`cursor ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this._domNode.setHeight(this._lineHeight);\r\n this._domNode.setTop(0);\r\n this._domNode.setLeft(0);\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__.Configuration.applyFontInfo(this._domNode, fontInfo);\r\n this._domNode.setDisplay('none');\r\n this._position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__.Position(1, 1);\r\n this._lastRenderedContent = '';\r\n this._renderData = null;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return this._position;\r\n }\r\n show() {\r\n if (!this._isVisible) {\r\n this._domNode.setVisibility('inherit');\r\n this._isVisible = true;\r\n }\r\n }\r\n hide() {\r\n if (this._isVisible) {\r\n this._domNode.setVisibility('hidden');\r\n this._isVisible = false;\r\n }\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._lineCursorWidth = Math.min(options.get(24 /* cursorWidth */), this._typicalHalfwidthCharacterWidth);\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__.Configuration.applyFontInfo(this._domNode, fontInfo);\r\n return true;\r\n }\r\n onCursorPositionChanged(position) {\r\n this._position = position;\r\n return true;\r\n }\r\n _prepareRender(ctx) {\r\n let textContent = '';\r\n if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.Line || this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.LineThin) {\r\n const visibleRange = ctx.visibleRangeForPosition(this._position);\r\n if (!visibleRange || visibleRange.outsideRenderedLine) {\r\n // Outside viewport\r\n return null;\r\n }\r\n let width;\r\n if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.Line) {\r\n width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);\r\n if (width > 2) {\r\n const lineContent = this._context.model.getLineContent(this._position.lineNumber);\r\n const nextCharLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.nextCharLength(lineContent, this._position.column - 1);\r\n textContent = lineContent.substr(this._position.column - 1, nextCharLength);\r\n }\r\n }\r\n else {\r\n width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.computeScreenAwareSize(1);\r\n }\r\n let left = visibleRange.left;\r\n if (width >= 2 && left >= 1) {\r\n // try to center cursor\r\n left -= 1;\r\n }\r\n const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\r\n return new ViewCursorRenderData(top, left, width, this._lineHeight, textContent, '');\r\n }\r\n const lineContent = this._context.model.getLineContent(this._position.lineNumber);\r\n const nextCharLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.nextCharLength(lineContent, this._position.column - 1);\r\n const visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + nextCharLength), false);\r\n if (!visibleRangeForCharacter || visibleRangeForCharacter.length === 0) {\r\n // Outside viewport\r\n return null;\r\n }\r\n const firstVisibleRangeForCharacter = visibleRangeForCharacter[0];\r\n if (firstVisibleRangeForCharacter.outsideRenderedLine || firstVisibleRangeForCharacter.ranges.length === 0) {\r\n // Outside viewport\r\n return null;\r\n }\r\n const range = firstVisibleRangeForCharacter.ranges[0];\r\n const width = range.width < 1 ? this._typicalHalfwidthCharacterWidth : range.width;\r\n let textContentClassName = '';\r\n if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.Block) {\r\n const lineData = this._context.model.getViewLineData(this._position.lineNumber);\r\n textContent = lineContent.substr(this._position.column - 1, nextCharLength);\r\n const tokenIndex = lineData.tokens.findTokenIndexAtOffset(this._position.column - 1);\r\n textContentClassName = lineData.tokens.getClassName(tokenIndex);\r\n }\r\n let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\r\n let height = this._lineHeight;\r\n // Underline might interfere with clicking\r\n if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.Underline || this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.TextEditorCursorStyle.UnderlineThin) {\r\n top += this._lineHeight - 2;\r\n height = 2;\r\n }\r\n return new ViewCursorRenderData(top, range.left, width, height, textContent, textContentClassName);\r\n }\r\n prepareRender(ctx) {\r\n this._renderData = this._prepareRender(ctx);\r\n }\r\n render(ctx) {\r\n if (!this._renderData) {\r\n this._domNode.setDisplay('none');\r\n return null;\r\n }\r\n if (this._lastRenderedContent !== this._renderData.textContent) {\r\n this._lastRenderedContent = this._renderData.textContent;\r\n this._domNode.domNode.textContent = this._lastRenderedContent;\r\n }\r\n this._domNode.setClassName(`cursor ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`);\r\n this._domNode.setDisplay('block');\r\n this._domNode.setTop(this._renderData.top);\r\n this._domNode.setLeft(this._renderData.left);\r\n this._domNode.setWidth(this._renderData.width);\r\n this._domNode.setLineHeight(this._renderData.height);\r\n this._domNode.setHeight(this._renderData.height);\r\n return {\r\n domNode: this._domNode.domNode,\r\n position: this._position,\r\n contentLeft: this._renderData.left,\r\n height: this._renderData.height,\r\n width: 2\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewCursors\": () => (/* binding */ ViewCursors)\n/* harmony export */ });\n/* harmony import */ var _viewCursors_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./viewCursors.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./viewCursor.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ViewCursors extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n this._readOnly = options.get(75 /* readOnly */);\r\n this._cursorBlinking = options.get(19 /* cursorBlinking */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._cursorSmoothCaretAnimation = options.get(20 /* cursorSmoothCaretAnimation */);\r\n this._selectionIsEmpty = true;\r\n this._isComposingInput = false;\r\n this._isVisible = false;\r\n this._primaryCursor = new _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__.ViewCursor(this._context);\r\n this._secondaryCursors = [];\r\n this._renderData = [];\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__.createFastDomNode)(document.createElement('div'));\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._updateDomClassName();\r\n this._domNode.appendChild(this._primaryCursor.getDomNode());\r\n this._startCursorBlinkAnimation = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.TimeoutTimer();\r\n this._cursorFlatBlinkInterval = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.IntervalTimer();\r\n this._blinkingEnabled = false;\r\n this._editorHasFocus = false;\r\n this._updateBlinking();\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._startCursorBlinkAnimation.dispose();\r\n this._cursorFlatBlinkInterval.dispose();\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // --- begin event handlers\r\n onCompositionStart(e) {\r\n this._isComposingInput = true;\r\n this._updateBlinking();\r\n return true;\r\n }\r\n onCompositionEnd(e) {\r\n this._isComposingInput = false;\r\n this._updateBlinking();\r\n return true;\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._readOnly = options.get(75 /* readOnly */);\r\n this._cursorBlinking = options.get(19 /* cursorBlinking */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._cursorSmoothCaretAnimation = options.get(20 /* cursorSmoothCaretAnimation */);\r\n this._updateBlinking();\r\n this._updateDomClassName();\r\n this._primaryCursor.onConfigurationChanged(e);\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n _onCursorPositionChanged(position, secondaryPositions) {\r\n this._primaryCursor.onCursorPositionChanged(position);\r\n this._updateBlinking();\r\n if (this._secondaryCursors.length < secondaryPositions.length) {\r\n // Create new cursors\r\n const addCnt = secondaryPositions.length - this._secondaryCursors.length;\r\n for (let i = 0; i < addCnt; i++) {\r\n const newCursor = new _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__.ViewCursor(this._context);\r\n this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling);\r\n this._secondaryCursors.push(newCursor);\r\n }\r\n }\r\n else if (this._secondaryCursors.length > secondaryPositions.length) {\r\n // Remove some cursors\r\n const removeCnt = this._secondaryCursors.length - secondaryPositions.length;\r\n for (let i = 0; i < removeCnt; i++) {\r\n this._domNode.removeChild(this._secondaryCursors[0].getDomNode());\r\n this._secondaryCursors.splice(0, 1);\r\n }\r\n }\r\n for (let i = 0; i < secondaryPositions.length; i++) {\r\n this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i]);\r\n }\r\n }\r\n onCursorStateChanged(e) {\r\n const positions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n positions[i] = e.selections[i].getPosition();\r\n }\r\n this._onCursorPositionChanged(positions[0], positions.slice(1));\r\n const selectionIsEmpty = e.selections[0].isEmpty();\r\n if (this._selectionIsEmpty !== selectionIsEmpty) {\r\n this._selectionIsEmpty = selectionIsEmpty;\r\n this._updateDomClassName();\r\n }\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onFocusChanged(e) {\r\n this._editorHasFocus = e.isFocused;\r\n this._updateBlinking();\r\n return false;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onTokensChanged(e) {\r\n const shouldRender = (position) => {\r\n for (let i = 0, len = e.ranges.length; i < len; i++) {\r\n if (e.ranges[i].fromLineNumber <= position.lineNumber && position.lineNumber <= e.ranges[i].toLineNumber) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n if (shouldRender(this._primaryCursor.getPosition())) {\r\n return true;\r\n }\r\n for (const secondaryCursor of this._secondaryCursors) {\r\n if (shouldRender(secondaryCursor.getPosition())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n // ---- blinking logic\r\n _getCursorBlinking() {\r\n if (this._isComposingInput) {\r\n // avoid double cursors\r\n return 0 /* Hidden */;\r\n }\r\n if (!this._editorHasFocus) {\r\n return 0 /* Hidden */;\r\n }\r\n if (this._readOnly) {\r\n return 5 /* Solid */;\r\n }\r\n return this._cursorBlinking;\r\n }\r\n _updateBlinking() {\r\n this._startCursorBlinkAnimation.cancel();\r\n this._cursorFlatBlinkInterval.cancel();\r\n const blinkingStyle = this._getCursorBlinking();\r\n // hidden and solid are special as they involve no animations\r\n const isHidden = (blinkingStyle === 0 /* Hidden */);\r\n const isSolid = (blinkingStyle === 5 /* Solid */);\r\n if (isHidden) {\r\n this._hide();\r\n }\r\n else {\r\n this._show();\r\n }\r\n this._blinkingEnabled = false;\r\n this._updateDomClassName();\r\n if (!isHidden && !isSolid) {\r\n if (blinkingStyle === 1 /* Blink */) {\r\n // flat blinking is handled by JavaScript to save battery life due to Chromium step timing issue https://bugs.chromium.org/p/chromium/issues/detail?id=361587\r\n this._cursorFlatBlinkInterval.cancelAndSet(() => {\r\n if (this._isVisible) {\r\n this._hide();\r\n }\r\n else {\r\n this._show();\r\n }\r\n }, ViewCursors.BLINK_INTERVAL);\r\n }\r\n else {\r\n this._startCursorBlinkAnimation.setIfNotSet(() => {\r\n this._blinkingEnabled = true;\r\n this._updateDomClassName();\r\n }, ViewCursors.BLINK_INTERVAL);\r\n }\r\n }\r\n }\r\n // --- end blinking logic\r\n _updateDomClassName() {\r\n this._domNode.setClassName(this._getClassName());\r\n }\r\n _getClassName() {\r\n let result = 'cursors-layer';\r\n if (!this._selectionIsEmpty) {\r\n result += ' has-selection';\r\n }\r\n switch (this._cursorStyle) {\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.Line:\r\n result += ' cursor-line-style';\r\n break;\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.Block:\r\n result += ' cursor-block-style';\r\n break;\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.Underline:\r\n result += ' cursor-underline-style';\r\n break;\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.LineThin:\r\n result += ' cursor-line-thin-style';\r\n break;\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.BlockOutline:\r\n result += ' cursor-block-outline-style';\r\n break;\r\n case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.TextEditorCursorStyle.UnderlineThin:\r\n result += ' cursor-underline-thin-style';\r\n break;\r\n default:\r\n result += ' cursor-line-style';\r\n }\r\n if (this._blinkingEnabled) {\r\n switch (this._getCursorBlinking()) {\r\n case 1 /* Blink */:\r\n result += ' cursor-blink';\r\n break;\r\n case 2 /* Smooth */:\r\n result += ' cursor-smooth';\r\n break;\r\n case 3 /* Phase */:\r\n result += ' cursor-phase';\r\n break;\r\n case 4 /* Expand */:\r\n result += ' cursor-expand';\r\n break;\r\n case 5 /* Solid */:\r\n result += ' cursor-solid';\r\n break;\r\n default:\r\n result += ' cursor-solid';\r\n }\r\n }\r\n else {\r\n result += ' cursor-solid';\r\n }\r\n if (this._cursorSmoothCaretAnimation) {\r\n result += ' cursor-smooth-caret-animation';\r\n }\r\n return result;\r\n }\r\n _show() {\r\n this._primaryCursor.show();\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].show();\r\n }\r\n this._isVisible = true;\r\n }\r\n _hide() {\r\n this._primaryCursor.hide();\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].hide();\r\n }\r\n this._isVisible = false;\r\n }\r\n // ---- IViewPart implementation\r\n prepareRender(ctx) {\r\n this._primaryCursor.prepareRender(ctx);\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].prepareRender(ctx);\r\n }\r\n }\r\n render(ctx) {\r\n let renderData = [], renderDataLen = 0;\r\n const primaryRenderData = this._primaryCursor.render(ctx);\r\n if (primaryRenderData) {\r\n renderData[renderDataLen++] = primaryRenderData;\r\n }\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n const secondaryRenderData = this._secondaryCursors[i].render(ctx);\r\n if (secondaryRenderData) {\r\n renderData[renderDataLen++] = secondaryRenderData;\r\n }\r\n }\r\n this._renderData = renderData;\r\n }\r\n getLastRenderData() {\r\n return this._renderData;\r\n }\r\n}\r\nViewCursors.BLINK_INTERVAL = 500;\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__.registerThemingParticipant)((theme, collector) => {\r\n const caret = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorCursorForeground);\r\n if (caret) {\r\n let caretBackground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorCursorBackground);\r\n if (!caretBackground) {\r\n caretBackground = caret.opposite();\r\n }\r\n collector.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${caret}; border-color: ${caret}; color: ${caretBackground}; }`);\r\n if (theme.type === 'hc') {\r\n collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${caretBackground}; border-right: 1px solid ${caretBackground}; }`);\r\n }\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewZones\": () => (/* binding */ ViewZones)\n/* harmony export */ });\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nconst invalidFunc = () => { throw new Error(`Invalid change accessor`); };\r\nclass ViewZones extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__.ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('div'));\r\n this.domNode.setClassName('view-zones');\r\n this.domNode.setPosition('absolute');\r\n this.domNode.setAttribute('role', 'presentation');\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.marginDomNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(document.createElement('div'));\r\n this.marginDomNode.setClassName('margin-view-zones');\r\n this.marginDomNode.setPosition('absolute');\r\n this.marginDomNode.setAttribute('role', 'presentation');\r\n this.marginDomNode.setAttribute('aria-hidden', 'true');\r\n this._zones = {};\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._zones = {};\r\n }\r\n // ---- begin view event handlers\r\n _recomputeWhitespacesProps() {\r\n const whitespaces = this._context.viewLayout.getWhitespaces();\r\n const oldWhitespaces = new Map();\r\n for (const whitespace of whitespaces) {\r\n oldWhitespaces.set(whitespace.id, whitespace);\r\n }\r\n let hadAChange = false;\r\n this._context.model.changeWhitespace((whitespaceAccessor) => {\r\n const keys = Object.keys(this._zones);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const zone = this._zones[id];\r\n const props = this._computeWhitespaceProps(zone.delegate);\r\n const oldWhitespace = oldWhitespaces.get(id);\r\n if (oldWhitespace && (oldWhitespace.afterLineNumber !== props.afterViewLineNumber || oldWhitespace.height !== props.heightInPx)) {\r\n whitespaceAccessor.changeOneWhitespace(id, props.afterViewLineNumber, props.heightInPx);\r\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\r\n hadAChange = true;\r\n }\r\n }\r\n });\r\n return hadAChange;\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._recomputeWhitespacesProps();\r\n }\r\n return true;\r\n }\r\n onLineMappingChanged(e) {\r\n return this._recomputeWhitespacesProps();\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n _getZoneOrdinal(zone) {\r\n if (typeof zone.afterColumn !== 'undefined') {\r\n return zone.afterColumn;\r\n }\r\n return 10000;\r\n }\r\n _computeWhitespaceProps(zone) {\r\n if (zone.afterLineNumber === 0) {\r\n return {\r\n afterViewLineNumber: 0,\r\n heightInPx: this._heightInPixels(zone),\r\n minWidthInPx: this._minWidthInPixels(zone)\r\n };\r\n }\r\n let zoneAfterModelPosition;\r\n if (typeof zone.afterColumn !== 'undefined') {\r\n zoneAfterModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zone.afterLineNumber,\r\n column: zone.afterColumn\r\n });\r\n }\r\n else {\r\n const validAfterLineNumber = this._context.model.validateModelPosition({\r\n lineNumber: zone.afterLineNumber,\r\n column: 1\r\n }).lineNumber;\r\n zoneAfterModelPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(validAfterLineNumber, this._context.model.getModelLineMaxColumn(validAfterLineNumber));\r\n }\r\n let zoneBeforeModelPosition;\r\n if (zoneAfterModelPosition.column === this._context.model.getModelLineMaxColumn(zoneAfterModelPosition.lineNumber)) {\r\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zoneAfterModelPosition.lineNumber + 1,\r\n column: 1\r\n });\r\n }\r\n else {\r\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zoneAfterModelPosition.lineNumber,\r\n column: zoneAfterModelPosition.column + 1\r\n });\r\n }\r\n const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition);\r\n const isVisible = this._context.model.coordinatesConverter.modelPositionIsVisible(zoneBeforeModelPosition);\r\n return {\r\n afterViewLineNumber: viewPosition.lineNumber,\r\n heightInPx: (isVisible ? this._heightInPixels(zone) : 0),\r\n minWidthInPx: this._minWidthInPixels(zone)\r\n };\r\n }\r\n changeViewZones(callback) {\r\n let zonesHaveChanged = false;\r\n this._context.model.changeWhitespace((whitespaceAccessor) => {\r\n const changeAccessor = {\r\n addZone: (zone) => {\r\n zonesHaveChanged = true;\r\n return this._addZone(whitespaceAccessor, zone);\r\n },\r\n removeZone: (id) => {\r\n if (!id) {\r\n return;\r\n }\r\n zonesHaveChanged = this._removeZone(whitespaceAccessor, id) || zonesHaveChanged;\r\n },\r\n layoutZone: (id) => {\r\n if (!id) {\r\n return;\r\n }\r\n zonesHaveChanged = this._layoutZone(whitespaceAccessor, id) || zonesHaveChanged;\r\n }\r\n };\r\n safeInvoke1Arg(callback, changeAccessor);\r\n // Invalidate changeAccessor\r\n changeAccessor.addZone = invalidFunc;\r\n changeAccessor.removeZone = invalidFunc;\r\n changeAccessor.layoutZone = invalidFunc;\r\n });\r\n return zonesHaveChanged;\r\n }\r\n _addZone(whitespaceAccessor, zone) {\r\n const props = this._computeWhitespaceProps(zone);\r\n const whitespaceId = whitespaceAccessor.insertWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx, props.minWidthInPx);\r\n const myZone = {\r\n whitespaceId: whitespaceId,\r\n delegate: zone,\r\n isVisible: false,\r\n domNode: (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(zone.domNode),\r\n marginDomNode: zone.marginDomNode ? (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__.createFastDomNode)(zone.marginDomNode) : null\r\n };\r\n this._safeCallOnComputedHeight(myZone.delegate, props.heightInPx);\r\n myZone.domNode.setPosition('absolute');\r\n myZone.domNode.domNode.style.width = '100%';\r\n myZone.domNode.setDisplay('none');\r\n myZone.domNode.setAttribute('monaco-view-zone', myZone.whitespaceId);\r\n this.domNode.appendChild(myZone.domNode);\r\n if (myZone.marginDomNode) {\r\n myZone.marginDomNode.setPosition('absolute');\r\n myZone.marginDomNode.domNode.style.width = '100%';\r\n myZone.marginDomNode.setDisplay('none');\r\n myZone.marginDomNode.setAttribute('monaco-view-zone', myZone.whitespaceId);\r\n this.marginDomNode.appendChild(myZone.marginDomNode);\r\n }\r\n this._zones[myZone.whitespaceId] = myZone;\r\n this.setShouldRender();\r\n return myZone.whitespaceId;\r\n }\r\n _removeZone(whitespaceAccessor, id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n delete this._zones[id];\r\n whitespaceAccessor.removeWhitespace(zone.whitespaceId);\r\n zone.domNode.removeAttribute('monaco-visible-view-zone');\r\n zone.domNode.removeAttribute('monaco-view-zone');\r\n zone.domNode.domNode.parentNode.removeChild(zone.domNode.domNode);\r\n if (zone.marginDomNode) {\r\n zone.marginDomNode.removeAttribute('monaco-visible-view-zone');\r\n zone.marginDomNode.removeAttribute('monaco-view-zone');\r\n zone.marginDomNode.domNode.parentNode.removeChild(zone.marginDomNode.domNode);\r\n }\r\n this.setShouldRender();\r\n return true;\r\n }\r\n return false;\r\n }\r\n _layoutZone(whitespaceAccessor, id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n const props = this._computeWhitespaceProps(zone.delegate);\r\n // const newOrdinal = this._getZoneOrdinal(zone.delegate);\r\n whitespaceAccessor.changeOneWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx);\r\n // TODO@Alex: change `newOrdinal` too\r\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\r\n this.setShouldRender();\r\n return true;\r\n }\r\n return false;\r\n }\r\n shouldSuppressMouseDownOnViewZone(id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n return Boolean(zone.delegate.suppressMouseDown);\r\n }\r\n return false;\r\n }\r\n _heightInPixels(zone) {\r\n if (typeof zone.heightInPx === 'number') {\r\n return zone.heightInPx;\r\n }\r\n if (typeof zone.heightInLines === 'number') {\r\n return this._lineHeight * zone.heightInLines;\r\n }\r\n return this._lineHeight;\r\n }\r\n _minWidthInPixels(zone) {\r\n if (typeof zone.minWidthInPx === 'number') {\r\n return zone.minWidthInPx;\r\n }\r\n return 0;\r\n }\r\n _safeCallOnComputedHeight(zone, height) {\r\n if (typeof zone.onComputedHeight === 'function') {\r\n try {\r\n zone.onComputedHeight(height);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n }\r\n }\r\n }\r\n _safeCallOnDomNodeTop(zone, top) {\r\n if (typeof zone.onDomNodeTop === 'function') {\r\n try {\r\n zone.onDomNodeTop(top);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n }\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n const visibleWhitespaces = ctx.viewportData.whitespaceViewportData;\r\n const visibleZones = {};\r\n let hasVisibleZone = false;\r\n for (let i = 0, len = visibleWhitespaces.length; i < len; i++) {\r\n visibleZones[visibleWhitespaces[i].id] = visibleWhitespaces[i];\r\n hasVisibleZone = true;\r\n }\r\n const keys = Object.keys(this._zones);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const zone = this._zones[id];\r\n let newTop = 0;\r\n let newHeight = 0;\r\n let newDisplay = 'none';\r\n if (visibleZones.hasOwnProperty(id)) {\r\n newTop = visibleZones[id].verticalOffset - ctx.bigNumbersDelta;\r\n newHeight = visibleZones[id].height;\r\n newDisplay = 'block';\r\n // zone is visible\r\n if (!zone.isVisible) {\r\n zone.domNode.setAttribute('monaco-visible-view-zone', 'true');\r\n zone.isVisible = true;\r\n }\r\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(visibleZones[id].verticalOffset));\r\n }\r\n else {\r\n if (zone.isVisible) {\r\n zone.domNode.removeAttribute('monaco-visible-view-zone');\r\n zone.isVisible = false;\r\n }\r\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(-1000000));\r\n }\r\n zone.domNode.setTop(newTop);\r\n zone.domNode.setHeight(newHeight);\r\n zone.domNode.setDisplay(newDisplay);\r\n if (zone.marginDomNode) {\r\n zone.marginDomNode.setTop(newTop);\r\n zone.marginDomNode.setHeight(newHeight);\r\n zone.marginDomNode.setDisplay(newDisplay);\r\n }\r\n }\r\n if (hasVisibleZone) {\r\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\r\n this.marginDomNode.setWidth(this._contentLeft);\r\n }\r\n }\r\n}\r\nfunction safeInvoke1Arg(func, arg1) {\r\n try {\r\n return func(arg1);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeEditorWidget\": () => (/* binding */ CodeEditorWidget),\n/* harmony export */ \"BooleanEventEmitter\": () => (/* binding */ BooleanEventEmitter),\n/* harmony export */ \"EditorModeContext\": () => (/* binding */ EditorModeContext)\n/* harmony export */ });\n/* harmony import */ var _services_markerDecorations_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../services/markerDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js\");\n/* harmony import */ var _media_editor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./media/editor.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _view_viewImpl_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../view/viewImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js\");\n/* harmony import */ var _view_viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../view/viewUserInputEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_controller_cursor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/controller/cursor.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js\");\n/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorAction_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/editorAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js\");\n/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../common/editorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _common_viewModel_viewModelImpl_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../common/viewModel/viewModelImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_viewModel_monospaceLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../common/viewModel/monospaceLineBreaksComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js\");\n/* harmony import */ var _view_domLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../view/domLineBreaksComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js\");\n/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet EDITOR_ID = 0;\r\nclass ModelData {\r\n constructor(model, viewModel, view, hasRealView, listenersToRemove) {\r\n this.model = model;\r\n this.viewModel = viewModel;\r\n this.view = view;\r\n this.hasRealView = hasRealView;\r\n this.listenersToRemove = listenersToRemove;\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.dispose)(this.listenersToRemove);\r\n this.model.onBeforeDetached();\r\n if (this.hasRealView) {\r\n this.view.dispose();\r\n }\r\n this.viewModel.dispose();\r\n }\r\n}\r\nlet CodeEditorWidget = class CodeEditorWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(domElement, _options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) {\r\n super();\r\n //#region Eventing\r\n this._onDidDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidDispose = this._onDidDispose.event;\r\n this._onDidChangeModelContent = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModelContent = this._onDidChangeModelContent.event;\r\n this._onDidChangeModelLanguage = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModelLanguage = this._onDidChangeModelLanguage.event;\r\n this._onDidChangeModelLanguageConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModelLanguageConfiguration = this._onDidChangeModelLanguageConfiguration.event;\r\n this._onDidChangeModelOptions = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModelOptions = this._onDidChangeModelOptions.event;\r\n this._onDidChangeModelDecorations = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModelDecorations = this._onDidChangeModelDecorations.event;\r\n this._onDidChangeConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;\r\n this._onDidChangeModel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeModel = this._onDidChangeModel.event;\r\n this._onDidChangeCursorPosition = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeCursorPosition = this._onDidChangeCursorPosition.event;\r\n this._onDidChangeCursorSelection = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeCursorSelection = this._onDidChangeCursorSelection.event;\r\n this._onDidAttemptReadOnlyEdit = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidAttemptReadOnlyEdit = this._onDidAttemptReadOnlyEdit.event;\r\n this._onDidLayoutChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidLayoutChange = this._onDidLayoutChange.event;\r\n this._editorTextFocus = this._register(new BooleanEventEmitter());\r\n this.onDidFocusEditorText = this._editorTextFocus.onDidChangeToTrue;\r\n this.onDidBlurEditorText = this._editorTextFocus.onDidChangeToFalse;\r\n this._editorWidgetFocus = this._register(new BooleanEventEmitter());\r\n this.onDidFocusEditorWidget = this._editorWidgetFocus.onDidChangeToTrue;\r\n this.onDidBlurEditorWidget = this._editorWidgetFocus.onDidChangeToFalse;\r\n this._onWillType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onWillType = this._onWillType.event;\r\n this._onDidType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidType = this._onDidType.event;\r\n this._onDidCompositionStart = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidCompositionStart = this._onDidCompositionStart.event;\r\n this._onDidCompositionEnd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidCompositionEnd = this._onDidCompositionEnd.event;\r\n this._onDidPaste = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidPaste = this._onDidPaste.event;\r\n this._onMouseUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseUp = this._onMouseUp.event;\r\n this._onMouseDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseDown = this._onMouseDown.event;\r\n this._onMouseDrag = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseDrag = this._onMouseDrag.event;\r\n this._onMouseDrop = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseDrop = this._onMouseDrop.event;\r\n this._onMouseDropCanceled = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseDropCanceled = this._onMouseDropCanceled.event;\r\n this._onContextMenu = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onContextMenu = this._onContextMenu.event;\r\n this._onMouseMove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseMove = this._onMouseMove.event;\r\n this._onMouseLeave = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseLeave = this._onMouseLeave.event;\r\n this._onMouseWheel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onMouseWheel = this._onMouseWheel.event;\r\n this._onKeyUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onKeyUp = this._onKeyUp.event;\r\n this._onKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidContentSizeChange = this._onDidContentSizeChange.event;\r\n this._onDidScrollChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidScrollChange = this._onDidScrollChange.event;\r\n this._onDidChangeViewZones = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeViewZones = this._onDidChangeViewZones.event;\r\n const options = Object.assign({}, _options);\r\n this._domElement = domElement;\r\n this._overflowWidgetsDomNode = options.overflowWidgetsDomNode;\r\n delete options.overflowWidgetsDomNode;\r\n this._id = (++EDITOR_ID);\r\n this._decorationTypeKeysToIds = {};\r\n this._decorationTypeSubtypes = {};\r\n this.isSimpleWidget = codeEditorWidgetOptions.isSimpleWidget || false;\r\n this._telemetryData = codeEditorWidgetOptions.telemetryData;\r\n this._configuration = this._register(this._createConfiguration(options, accessibilityService));\r\n this._register(this._configuration.onDidChange((e) => {\r\n this._onDidChangeConfiguration.fire(e);\r\n const options = this._configuration.options;\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._onDidLayoutChange.fire(layoutInfo);\r\n }\r\n }));\r\n this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement));\r\n this._notificationService = notificationService;\r\n this._codeEditorService = codeEditorService;\r\n this._commandService = commandService;\r\n this._themeService = themeService;\r\n this._register(new EditorContextKeysManager(this, this._contextKeyService));\r\n this._register(new EditorModeContext(this, this._contextKeyService));\r\n this._instantiationService = instantiationService.createChild(new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_29__.ServiceCollection([_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_27__.IContextKeyService, this._contextKeyService]));\r\n this._modelData = null;\r\n this._contributions = {};\r\n this._actions = {};\r\n this._focusTracker = new CodeEditorWidgetFocusTracker(domElement);\r\n this._focusTracker.onChange(() => {\r\n this._editorWidgetFocus.setValue(this._focusTracker.hasFocus());\r\n });\r\n this._contentWidgets = {};\r\n this._overlayWidgets = {};\r\n let contributions;\r\n if (Array.isArray(codeEditorWidgetOptions.contributions)) {\r\n contributions = codeEditorWidgetOptions.contributions;\r\n }\r\n else {\r\n contributions = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorExtensionsRegistry.getEditorContributions();\r\n }\r\n for (const desc of contributions) {\r\n try {\r\n const contribution = this._instantiationService.createInstance(desc.ctor, this);\r\n this._contributions[desc.id] = contribution;\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError)(err);\r\n }\r\n }\r\n _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorExtensionsRegistry.getEditorActions().forEach((action) => {\r\n const internalAction = new _common_editorAction_js__WEBPACK_IMPORTED_MODULE_19__.InternalEditorAction(action.id, action.label, action.alias, (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_33__.withNullAsUndefined)(action.precondition), () => {\r\n return this._instantiationService.invokeFunction((accessor) => {\r\n return Promise.resolve(action.runEditorCommand(accessor, this, null));\r\n });\r\n }, this._contextKeyService);\r\n this._actions[internalAction.id] = internalAction;\r\n });\r\n this._codeEditorService.addCodeEditor(this);\r\n }\r\n _createConfiguration(options, accessibilityService) {\r\n return new _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__.Configuration(this.isSimpleWidget, options, this._domElement, accessibilityService);\r\n }\r\n getId() {\r\n return this.getEditorType() + ':' + this._id;\r\n }\r\n getEditorType() {\r\n return _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_20__.EditorType.ICodeEditor;\r\n }\r\n dispose() {\r\n this._codeEditorService.removeCodeEditor(this);\r\n this._focusTracker.dispose();\r\n const keys = Object.keys(this._contributions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const contributionId = keys[i];\r\n this._contributions[contributionId].dispose();\r\n }\r\n this._removeDecorationTypes();\r\n this._postDetachModelCleanup(this._detachModel());\r\n this._onDidDispose.fire();\r\n super.dispose();\r\n }\r\n invokeWithinContext(fn) {\r\n return this._instantiationService.invokeFunction(fn);\r\n }\r\n updateOptions(newOptions) {\r\n this._configuration.updateOptions(newOptions);\r\n }\r\n getOptions() {\r\n return this._configuration.options;\r\n }\r\n getOption(id) {\r\n return this._configuration.options.get(id);\r\n }\r\n getRawOptions() {\r\n return this._configuration.getRawOptions();\r\n }\r\n getOverflowWidgetsDomNode() {\r\n return this._overflowWidgetsDomNode;\r\n }\r\n getConfiguredWordAtPosition(position) {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_36__.WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(110 /* wordSeparators */), position);\r\n }\r\n getValue(options = null) {\r\n if (!this._modelData) {\r\n return '';\r\n }\r\n const preserveBOM = (options && options.preserveBOM) ? true : false;\r\n let eolPreference = 0 /* TextDefined */;\r\n if (options && options.lineEnding && options.lineEnding === '\\n') {\r\n eolPreference = 1 /* LF */;\r\n }\r\n else if (options && options.lineEnding && options.lineEnding === '\\r\\n') {\r\n eolPreference = 2 /* CRLF */;\r\n }\r\n return this._modelData.model.getValue(eolPreference, preserveBOM);\r\n }\r\n setValue(newValue) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.model.setValue(newValue);\r\n }\r\n getModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.model;\r\n }\r\n setModel(_model = null) {\r\n const model = _model;\r\n if (this._modelData === null && model === null) {\r\n // Current model is the new model\r\n return;\r\n }\r\n if (this._modelData && this._modelData.model === model) {\r\n // Current model is the new model\r\n return;\r\n }\r\n const hasTextFocus = this.hasTextFocus();\r\n const detachedModel = this._detachModel();\r\n this._attachModel(model);\r\n if (hasTextFocus && this.hasModel()) {\r\n this.focus();\r\n }\r\n const e = {\r\n oldModelUrl: detachedModel ? detachedModel.uri : null,\r\n newModelUrl: model ? model.uri : null\r\n };\r\n this._removeDecorationTypes();\r\n this._onDidChangeModel.fire(e);\r\n this._postDetachModelCleanup(detachedModel);\r\n }\r\n _removeDecorationTypes() {\r\n this._decorationTypeKeysToIds = {};\r\n if (this._decorationTypeSubtypes) {\r\n for (let decorationType in this._decorationTypeSubtypes) {\r\n const subTypes = this._decorationTypeSubtypes[decorationType];\r\n for (let subType in subTypes) {\r\n this._removeDecorationType(decorationType + '-' + subType);\r\n }\r\n }\r\n this._decorationTypeSubtypes = {};\r\n }\r\n }\r\n getVisibleRanges() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.getVisibleRanges();\r\n }\r\n getVisibleRangesPlusViewportAboveBelow() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow();\r\n }\r\n getWhitespaces() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.viewLayout.getWhitespaces();\r\n }\r\n static _getVerticalOffsetForPosition(modelData, modelLineNumber, modelColumn) {\r\n const modelPosition = modelData.model.validatePosition({\r\n lineNumber: modelLineNumber,\r\n column: modelColumn\r\n });\r\n const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n }\r\n getTopForLineNumber(lineNumber) {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, 1);\r\n }\r\n getTopForPosition(lineNumber, column) {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, column);\r\n }\r\n setHiddenAreas(ranges) {\r\n if (this._modelData) {\r\n this._modelData.viewModel.setHiddenAreas(ranges.map(r => _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range.lift(r)));\r\n }\r\n }\r\n getVisibleColumnFromPosition(rawPosition) {\r\n if (!this._modelData) {\r\n return rawPosition.column;\r\n }\r\n const position = this._modelData.model.validatePosition(rawPosition);\r\n const tabSize = this._modelData.model.getOptions().tabSize;\r\n return _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_15__.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1;\r\n }\r\n getPosition() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getPosition();\r\n }\r\n setPosition(position) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!_common_core_position_js__WEBPACK_IMPORTED_MODULE_16__.Position.isIPosition(position)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setSelections('api', [{\r\n selectionStartLineNumber: position.lineNumber,\r\n selectionStartColumn: position.column,\r\n positionLineNumber: position.lineNumber,\r\n positionColumn: position.column\r\n }]);\r\n }\r\n _sendRevealRange(modelRange, verticalType, revealHorizontal, scrollType) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range.isIRange(modelRange)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n const validatedModelRange = this._modelData.model.validateRange(modelRange);\r\n const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);\r\n this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType);\r\n }\r\n revealLine(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 0 /* Simple */, scrollType);\r\n }\r\n revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 1 /* Center */, scrollType);\r\n }\r\n revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\r\n }\r\n revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 5 /* NearTop */, scrollType);\r\n }\r\n _revealLine(lineNumber, revealType, scrollType) {\r\n if (typeof lineNumber !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range(lineNumber, 1, lineNumber, 1), revealType, false, scrollType);\r\n }\r\n revealPosition(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 0 /* Simple */, true, scrollType);\r\n }\r\n revealPositionInCenter(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 1 /* Center */, true, scrollType);\r\n }\r\n revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 2 /* CenterIfOutsideViewport */, true, scrollType);\r\n }\r\n revealPositionNearTop(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 5 /* NearTop */, true, scrollType);\r\n }\r\n _revealPosition(position, verticalType, revealHorizontal, scrollType) {\r\n if (!_common_core_position_js__WEBPACK_IMPORTED_MODULE_16__.Position.isIPosition(position)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range(position.lineNumber, position.column, position.lineNumber, position.column), verticalType, revealHorizontal, scrollType);\r\n }\r\n getSelection() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getSelection();\r\n }\r\n getSelections() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getSelections();\r\n }\r\n setSelection(something) {\r\n const isSelection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_18__.Selection.isISelection(something);\r\n const isRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range.isIRange(something);\r\n if (!isSelection && !isRange) {\r\n throw new Error('Invalid arguments');\r\n }\r\n if (isSelection) {\r\n this._setSelectionImpl(something);\r\n }\r\n else if (isRange) {\r\n // act as if it was an IRange\r\n const selection = {\r\n selectionStartLineNumber: something.startLineNumber,\r\n selectionStartColumn: something.startColumn,\r\n positionLineNumber: something.endLineNumber,\r\n positionColumn: something.endColumn\r\n };\r\n this._setSelectionImpl(selection);\r\n }\r\n }\r\n _setSelectionImpl(sel) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n const selection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_18__.Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\r\n this._modelData.viewModel.setSelections('api', [selection]);\r\n }\r\n revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 0 /* Simple */, scrollType);\r\n }\r\n revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 1 /* Center */, scrollType);\r\n }\r\n revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\r\n }\r\n revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 5 /* NearTop */, scrollType);\r\n }\r\n _revealLines(startLineNumber, endLineNumber, verticalType, scrollType) {\r\n if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range(startLineNumber, 1, endLineNumber, 1), verticalType, false, scrollType);\r\n }\r\n revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) {\r\n this._revealRange(range, revealVerticalInCenter ? 1 /* Center */ : 0 /* Simple */, revealHorizontal, scrollType);\r\n }\r\n revealRangeInCenter(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 1 /* Center */, true, scrollType);\r\n }\r\n revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 2 /* CenterIfOutsideViewport */, true, scrollType);\r\n }\r\n revealRangeNearTop(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 5 /* NearTop */, true, scrollType);\r\n }\r\n revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 6 /* NearTopIfOutsideViewport */, true, scrollType);\r\n }\r\n revealRangeAtTop(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 3 /* Top */, true, scrollType);\r\n }\r\n _revealRange(range, verticalType, revealHorizontal, scrollType) {\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range.isIRange(range)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range.lift(range), verticalType, revealHorizontal, scrollType);\r\n }\r\n setSelections(ranges, source = 'api', reason = 0 /* NotSet */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!ranges || ranges.length === 0) {\r\n throw new Error('Invalid arguments');\r\n }\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n if (!_common_core_selection_js__WEBPACK_IMPORTED_MODULE_18__.Selection.isISelection(ranges[i])) {\r\n throw new Error('Invalid arguments');\r\n }\r\n }\r\n this._modelData.viewModel.setSelections(source, ranges, reason);\r\n }\r\n getContentWidth() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getContentWidth();\r\n }\r\n getScrollWidth() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getScrollWidth();\r\n }\r\n getScrollLeft() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getCurrentScrollLeft();\r\n }\r\n getContentHeight() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getContentHeight();\r\n }\r\n getScrollHeight() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getScrollHeight();\r\n }\r\n getScrollTop() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getCurrentScrollTop();\r\n }\r\n setScrollLeft(newScrollLeft, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (typeof newScrollLeft !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setScrollPosition({\r\n scrollLeft: newScrollLeft\r\n }, scrollType);\r\n }\r\n setScrollTop(newScrollTop, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (typeof newScrollTop !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setScrollPosition({\r\n scrollTop: newScrollTop\r\n }, scrollType);\r\n }\r\n setScrollPosition(position, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.setScrollPosition(position, scrollType);\r\n }\r\n saveViewState() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n const contributionsState = {};\r\n const keys = Object.keys(this._contributions);\r\n for (const id of keys) {\r\n const contribution = this._contributions[id];\r\n if (typeof contribution.saveViewState === 'function') {\r\n contributionsState[id] = contribution.saveViewState();\r\n }\r\n }\r\n const cursorState = this._modelData.viewModel.saveCursorState();\r\n const viewState = this._modelData.viewModel.saveState();\r\n return {\r\n cursorState: cursorState,\r\n viewState: viewState,\r\n contributionsState: contributionsState\r\n };\r\n }\r\n restoreViewState(s) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n const codeEditorState = s;\r\n if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) {\r\n const cursorState = codeEditorState.cursorState;\r\n if (Array.isArray(cursorState)) {\r\n this._modelData.viewModel.restoreCursorState(cursorState);\r\n }\r\n else {\r\n // Backwards compatibility\r\n this._modelData.viewModel.restoreCursorState([cursorState]);\r\n }\r\n const contributionsState = codeEditorState.contributionsState || {};\r\n const keys = Object.keys(this._contributions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const contribution = this._contributions[id];\r\n if (typeof contribution.restoreViewState === 'function') {\r\n contribution.restoreViewState(contributionsState[id]);\r\n }\r\n }\r\n const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState);\r\n this._modelData.view.restoreState(reducedState);\r\n }\r\n }\r\n getContribution(id) {\r\n return (this._contributions[id] || null);\r\n }\r\n getActions() {\r\n const result = [];\r\n const keys = Object.keys(this._actions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n result.push(this._actions[id]);\r\n }\r\n return result;\r\n }\r\n getSupportedActions() {\r\n let result = this.getActions();\r\n result = result.filter(action => action.isSupported());\r\n return result;\r\n }\r\n getAction(id) {\r\n return this._actions[id] || null;\r\n }\r\n trigger(source, handlerId, payload) {\r\n payload = payload || {};\r\n switch (handlerId) {\r\n case \"compositionStart\" /* CompositionStart */:\r\n this._startComposition();\r\n return;\r\n case \"compositionEnd\" /* CompositionEnd */:\r\n this._endComposition(source);\r\n return;\r\n case \"type\" /* Type */: {\r\n const args = payload;\r\n this._type(source, args.text || '');\r\n return;\r\n }\r\n case \"replacePreviousChar\" /* ReplacePreviousChar */: {\r\n const args = payload;\r\n this._compositionType(source, args.text || '', args.replaceCharCnt || 0, 0, 0);\r\n return;\r\n }\r\n case \"compositionType\" /* CompositionType */: {\r\n const args = payload;\r\n this._compositionType(source, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0);\r\n return;\r\n }\r\n case \"paste\" /* Paste */: {\r\n const args = payload;\r\n this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null);\r\n return;\r\n }\r\n case \"cut\" /* Cut */:\r\n this._cut(source);\r\n return;\r\n }\r\n const action = this.getAction(handlerId);\r\n if (action) {\r\n Promise.resolve(action.run()).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError);\r\n return;\r\n }\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (this._triggerEditorCommand(source, handlerId, payload)) {\r\n return;\r\n }\r\n this._commandService.executeCommand(handlerId, payload);\r\n }\r\n _startComposition() {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.startComposition();\r\n this._onDidCompositionStart.fire();\r\n }\r\n _endComposition(source) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.endComposition(source);\r\n this._onDidCompositionEnd.fire();\r\n }\r\n _type(source, text) {\r\n if (!this._modelData || text.length === 0) {\r\n return;\r\n }\r\n if (source === 'keyboard') {\r\n this._onWillType.fire(text);\r\n }\r\n this._modelData.viewModel.type(text, source);\r\n if (source === 'keyboard') {\r\n this._onDidType.fire(text);\r\n }\r\n }\r\n _compositionType(source, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source);\r\n }\r\n _paste(source, text, pasteOnNewLine, multicursorText, mode) {\r\n if (!this._modelData || text.length === 0) {\r\n return;\r\n }\r\n const startPosition = this._modelData.viewModel.getSelection().getStartPosition();\r\n this._modelData.viewModel.paste(text, pasteOnNewLine, multicursorText, source);\r\n const endPosition = this._modelData.viewModel.getSelection().getStartPosition();\r\n if (source === 'keyboard') {\r\n this._onDidPaste.fire({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_17__.Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column),\r\n mode: mode\r\n });\r\n }\r\n }\r\n _cut(source) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.cut(source);\r\n }\r\n _triggerEditorCommand(source, handlerId, payload) {\r\n const command = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorExtensionsRegistry.getEditorCommand(handlerId);\r\n if (command) {\r\n payload = payload || {};\r\n payload.source = source;\r\n this._instantiationService.invokeFunction((accessor) => {\r\n Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError);\r\n });\r\n return true;\r\n }\r\n return false;\r\n }\r\n _getViewModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel;\r\n }\r\n pushUndoStop() {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n this._modelData.model.pushStackElement();\r\n return true;\r\n }\r\n popUndoStop() {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n this._modelData.model.popStackElement();\r\n return true;\r\n }\r\n executeEdits(source, edits, endCursorState) {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n let cursorStateComputer;\r\n if (!endCursorState) {\r\n cursorStateComputer = () => null;\r\n }\r\n else if (Array.isArray(endCursorState)) {\r\n cursorStateComputer = () => endCursorState;\r\n }\r\n else {\r\n cursorStateComputer = endCursorState;\r\n }\r\n this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer);\r\n return true;\r\n }\r\n executeCommand(source, command) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.executeCommand(command, source);\r\n }\r\n executeCommands(source, commands) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.executeCommands(commands, source);\r\n }\r\n changeDecorations(callback) {\r\n if (!this._modelData) {\r\n // callback will not be called\r\n return null;\r\n }\r\n return this._modelData.model.changeDecorations(callback, this._id);\r\n }\r\n getLineDecorations(lineNumber) {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.model.getLineDecorations(lineNumber, this._id, (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.filterValidationDecorations)(this._configuration.options));\r\n }\r\n deltaDecorations(oldDecorations, newDecorations) {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\r\n return oldDecorations;\r\n }\r\n return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id);\r\n }\r\n removeDecorations(decorationTypeKey) {\r\n // remove decorations for type and sub type\r\n const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey];\r\n if (oldDecorationsIds) {\r\n this.deltaDecorations(oldDecorationsIds, []);\r\n }\r\n if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) {\r\n delete this._decorationTypeKeysToIds[decorationTypeKey];\r\n }\r\n if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) {\r\n delete this._decorationTypeSubtypes[decorationTypeKey];\r\n }\r\n }\r\n getLayoutInfo() {\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n return layoutInfo;\r\n }\r\n createOverviewRuler(cssClassName) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.createOverviewRuler(cssClassName);\r\n }\r\n getContainerDomNode() {\r\n return this._domElement;\r\n }\r\n getDomNode() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.domNode.domNode;\r\n }\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n layout(dimension) {\r\n this._configuration.observeReferenceElement(dimension);\r\n this.render();\r\n }\r\n focus() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.focus();\r\n }\r\n hasTextFocus() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return false;\r\n }\r\n return this._modelData.view.isFocused();\r\n }\r\n hasWidgetFocus() {\r\n return this._focusTracker && this._focusTracker.hasFocus();\r\n }\r\n addContentWidget(widget) {\r\n const widgetData = {\r\n widget: widget,\r\n position: widget.getPosition()\r\n };\r\n if (this._contentWidgets.hasOwnProperty(widget.getId())) {\r\n console.warn('Overwriting a content widget with the same id.');\r\n }\r\n this._contentWidgets[widget.getId()] = widgetData;\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.addContentWidget(widgetData);\r\n }\r\n }\r\n layoutContentWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._contentWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._contentWidgets[widgetId];\r\n widgetData.position = widget.getPosition();\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.layoutContentWidget(widgetData);\r\n }\r\n }\r\n }\r\n removeContentWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._contentWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._contentWidgets[widgetId];\r\n delete this._contentWidgets[widgetId];\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.removeContentWidget(widgetData);\r\n }\r\n }\r\n }\r\n addOverlayWidget(widget) {\r\n const widgetData = {\r\n widget: widget,\r\n position: widget.getPosition()\r\n };\r\n if (this._overlayWidgets.hasOwnProperty(widget.getId())) {\r\n console.warn('Overwriting an overlay widget with the same id.');\r\n }\r\n this._overlayWidgets[widget.getId()] = widgetData;\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.addOverlayWidget(widgetData);\r\n }\r\n }\r\n layoutOverlayWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._overlayWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._overlayWidgets[widgetId];\r\n widgetData.position = widget.getPosition();\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.layoutOverlayWidget(widgetData);\r\n }\r\n }\r\n }\r\n removeOverlayWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._overlayWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._overlayWidgets[widgetId];\r\n delete this._overlayWidgets[widgetId];\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.removeOverlayWidget(widgetData);\r\n }\r\n }\r\n }\r\n changeViewZones(callback) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.change(callback);\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.getTargetAtClientPoint(clientX, clientY);\r\n }\r\n getScrolledVisiblePosition(rawPosition) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n const position = this._modelData.model.validatePosition(rawPosition);\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop();\r\n const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft();\r\n return {\r\n top: top,\r\n left: left,\r\n height: options.get(53 /* lineHeight */)\r\n };\r\n }\r\n getOffsetForColumn(lineNumber, column) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return -1;\r\n }\r\n return this._modelData.view.getOffsetForColumn(lineNumber, column);\r\n }\r\n render(forceRedraw = false) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.render(true, forceRedraw);\r\n }\r\n setAriaOptions(options) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.setAriaOptions(options);\r\n }\r\n applyFontInfo(target) {\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__.Configuration.applyFontInfoSlow(target, this._configuration.options.get(38 /* fontInfo */));\r\n }\r\n _attachModel(model) {\r\n if (!model) {\r\n this._modelData = null;\r\n return;\r\n }\r\n const listenersToRemove = [];\r\n this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language);\r\n this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines());\r\n this._configuration.setMaxLineNumber(model.getLineCount());\r\n model.onBeforeAttached();\r\n const viewModel = new _common_viewModel_viewModelImpl_js__WEBPACK_IMPORTED_MODULE_25__.ViewModel(this._id, this._configuration, model, _view_domLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_35__.DOMLineBreaksComputerFactory.create(), _common_viewModel_monospaceLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_34__.MonospaceLineBreaksComputerFactory.create(this._configuration.options), (callback) => _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.scheduleAtNextAnimationFrame(callback));\r\n listenersToRemove.push(model.onDidChangeDecorations((e) => this._onDidChangeModelDecorations.fire(e)));\r\n listenersToRemove.push(model.onDidChangeLanguage((e) => {\r\n this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language);\r\n this._onDidChangeModelLanguage.fire(e);\r\n }));\r\n listenersToRemove.push(model.onDidChangeLanguageConfiguration((e) => this._onDidChangeModelLanguageConfiguration.fire(e)));\r\n listenersToRemove.push(model.onDidChangeContent((e) => this._onDidChangeModelContent.fire(e)));\r\n listenersToRemove.push(model.onDidChangeOptions((e) => this._onDidChangeModelOptions.fire(e)));\r\n // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model\r\n listenersToRemove.push(model.onWillDispose(() => this.setModel(null)));\r\n listenersToRemove.push(viewModel.onEvent((e) => {\r\n switch (e.kind) {\r\n case 0 /* ContentSizeChanged */:\r\n this._onDidContentSizeChange.fire(e);\r\n break;\r\n case 1 /* FocusChanged */:\r\n this._editorTextFocus.setValue(e.hasFocus);\r\n break;\r\n case 2 /* ScrollChanged */:\r\n this._onDidScrollChange.fire(e);\r\n break;\r\n case 3 /* ViewZonesChanged */:\r\n this._onDidChangeViewZones.fire();\r\n break;\r\n case 4 /* ReadOnlyEditAttempt */:\r\n this._onDidAttemptReadOnlyEdit.fire();\r\n break;\r\n case 5 /* CursorStateChanged */: {\r\n if (e.reachedMaxCursorCount) {\r\n this._notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize('cursors.maximum', \"The number of cursors has been limited to {0}.\", _common_controller_cursor_js__WEBPACK_IMPORTED_MODULE_14__.Cursor.MAX_CURSOR_COUNT));\r\n }\r\n const positions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n positions[i] = e.selections[i].getPosition();\r\n }\r\n const e1 = {\r\n position: positions[0],\r\n secondaryPositions: positions.slice(1),\r\n reason: e.reason,\r\n source: e.source\r\n };\r\n this._onDidChangeCursorPosition.fire(e1);\r\n const e2 = {\r\n selection: e.selections[0],\r\n secondarySelections: e.selections.slice(1),\r\n modelVersionId: e.modelVersionId,\r\n oldSelections: e.oldSelections,\r\n oldModelVersionId: e.oldModelVersionId,\r\n source: e.source,\r\n reason: e.reason\r\n };\r\n this._onDidChangeCursorSelection.fire(e2);\r\n break;\r\n }\r\n }\r\n }));\r\n const [view, hasRealView] = this._createView(viewModel);\r\n if (hasRealView) {\r\n this._domElement.appendChild(view.domNode.domNode);\r\n let keys = Object.keys(this._contentWidgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n view.addContentWidget(this._contentWidgets[widgetId]);\r\n }\r\n keys = Object.keys(this._overlayWidgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n view.addOverlayWidget(this._overlayWidgets[widgetId]);\r\n }\r\n view.render(false, true);\r\n view.domNode.domNode.setAttribute('data-uri', model.uri.toString());\r\n }\r\n this._modelData = new ModelData(model, viewModel, view, hasRealView, listenersToRemove);\r\n }\r\n _createView(viewModel) {\r\n let commandDelegate;\r\n if (this.isSimpleWidget) {\r\n commandDelegate = {\r\n paste: (text, pasteOnNewLine, multicursorText, mode) => {\r\n this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode);\r\n },\r\n type: (text) => {\r\n this._type('keyboard', text);\r\n },\r\n compositionType: (text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) => {\r\n this._compositionType('keyboard', text, replacePrevCharCnt, replaceNextCharCnt, positionDelta);\r\n },\r\n startComposition: () => {\r\n this._startComposition();\r\n },\r\n endComposition: () => {\r\n this._endComposition('keyboard');\r\n },\r\n cut: () => {\r\n this._cut('keyboard');\r\n }\r\n };\r\n }\r\n else {\r\n commandDelegate = {\r\n paste: (text, pasteOnNewLine, multicursorText, mode) => {\r\n const payload = { text, pasteOnNewLine, multicursorText, mode };\r\n this._commandService.executeCommand(\"paste\" /* Paste */, payload);\r\n },\r\n type: (text) => {\r\n const payload = { text };\r\n this._commandService.executeCommand(\"type\" /* Type */, payload);\r\n },\r\n compositionType: (text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) => {\r\n // Try if possible to go through the existing `replacePreviousChar` command\r\n if (replaceNextCharCnt || positionDelta) {\r\n // must be handled through the new command\r\n const payload = { text, replacePrevCharCnt, replaceNextCharCnt, positionDelta };\r\n this._commandService.executeCommand(\"compositionType\" /* CompositionType */, payload);\r\n }\r\n else {\r\n const payload = { text, replaceCharCnt: replacePrevCharCnt };\r\n this._commandService.executeCommand(\"replacePreviousChar\" /* ReplacePreviousChar */, payload);\r\n }\r\n },\r\n startComposition: () => {\r\n this._commandService.executeCommand(\"compositionStart\" /* CompositionStart */, {});\r\n },\r\n endComposition: () => {\r\n this._commandService.executeCommand(\"compositionEnd\" /* CompositionEnd */, {});\r\n },\r\n cut: () => {\r\n this._commandService.executeCommand(\"cut\" /* Cut */, {});\r\n }\r\n };\r\n }\r\n const viewUserInputEvents = new _view_viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_12__.ViewUserInputEvents(viewModel.coordinatesConverter);\r\n viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e);\r\n viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e);\r\n viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e);\r\n viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e);\r\n viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e);\r\n viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e);\r\n viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e);\r\n viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e);\r\n viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e);\r\n viewUserInputEvents.onMouseDropCanceled = (e) => this._onMouseDropCanceled.fire(e);\r\n viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e);\r\n const view = new _view_viewImpl_js__WEBPACK_IMPORTED_MODULE_11__.View(commandDelegate, this._configuration, this._themeService, viewModel, viewUserInputEvents, this._overflowWidgetsDomNode);\r\n return [view, true];\r\n }\r\n _postDetachModelCleanup(detachedModel) {\r\n if (detachedModel) {\r\n detachedModel.removeAllDecorationsWithOwnerId(this._id);\r\n }\r\n }\r\n _detachModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n const model = this._modelData.model;\r\n const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null;\r\n this._modelData.dispose();\r\n this._modelData = null;\r\n this._domElement.removeAttribute('data-mode-id');\r\n if (removeDomNode && this._domElement.contains(removeDomNode)) {\r\n this._domElement.removeChild(removeDomNode);\r\n }\r\n return model;\r\n }\r\n _removeDecorationType(key) {\r\n this._codeEditorService.removeDecorationType(key);\r\n }\r\n hasModel() {\r\n return (this._modelData !== null);\r\n }\r\n};\r\nCodeEditorWidget = __decorate([\r\n __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_28__.IInstantiationService),\r\n __param(4, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__.ICodeEditorService),\r\n __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_26__.ICommandService),\r\n __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_27__.IContextKeyService),\r\n __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_31__.IThemeService),\r\n __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_30__.INotificationService),\r\n __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_32__.IAccessibilityService)\r\n], CodeEditorWidget);\r\n\r\nclass BooleanEventEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor() {\r\n super();\r\n this._onDidChangeToTrue = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeToTrue = this._onDidChangeToTrue.event;\r\n this._onDidChangeToFalse = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onDidChangeToFalse = this._onDidChangeToFalse.event;\r\n this._value = 0 /* NotSet */;\r\n }\r\n setValue(_value) {\r\n const value = (_value ? 2 /* True */ : 1 /* False */);\r\n if (this._value === value) {\r\n return;\r\n }\r\n this._value = value;\r\n if (this._value === 2 /* True */) {\r\n this._onDidChangeToTrue.fire();\r\n }\r\n else if (this._value === 1 /* False */) {\r\n this._onDidChangeToFalse.fire();\r\n }\r\n }\r\n}\r\nclass EditorContextKeysManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this._editor = editor;\r\n contextKeyService.createKey('editorId', editor.getId());\r\n this._editorSimpleInput = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.editorSimpleInput.bindTo(contextKeyService);\r\n this._editorFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.focus.bindTo(contextKeyService);\r\n this._textInputFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.textInputFocus.bindTo(contextKeyService);\r\n this._editorTextFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.editorTextFocus.bindTo(contextKeyService);\r\n this._editorTabMovesFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);\r\n this._editorReadonly = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.readOnly.bindTo(contextKeyService);\r\n this._inDiffEditor = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.inDiffEditor.bindTo(contextKeyService);\r\n this._editorColumnSelection = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.columnSelection.bindTo(contextKeyService);\r\n this._hasMultipleSelections = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);\r\n this._hasNonEmptySelection = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService);\r\n this._canUndo = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.canUndo.bindTo(contextKeyService);\r\n this._canRedo = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.canRedo.bindTo(contextKeyService);\r\n this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig()));\r\n this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection()));\r\n this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidChangeModel(() => this._updateFromModel()));\r\n this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel()));\r\n this._updateFromConfig();\r\n this._updateFromSelection();\r\n this._updateFromFocus();\r\n this._updateFromModel();\r\n this._editorSimpleInput.set(this._editor.isSimpleWidget);\r\n }\r\n _updateFromConfig() {\r\n const options = this._editor.getOptions();\r\n this._editorTabMovesFocus.set(options.get(123 /* tabFocusMode */));\r\n this._editorReadonly.set(options.get(75 /* readOnly */));\r\n this._inDiffEditor.set(options.get(49 /* inDiffEditor */));\r\n this._editorColumnSelection.set(options.get(15 /* columnSelection */));\r\n }\r\n _updateFromSelection() {\r\n const selections = this._editor.getSelections();\r\n if (!selections) {\r\n this._hasMultipleSelections.reset();\r\n this._hasNonEmptySelection.reset();\r\n }\r\n else {\r\n this._hasMultipleSelections.set(selections.length > 1);\r\n this._hasNonEmptySelection.set(selections.some(s => !s.isEmpty()));\r\n }\r\n }\r\n _updateFromFocus() {\r\n this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget);\r\n this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget);\r\n this._textInputFocus.set(this._editor.hasTextFocus());\r\n }\r\n _updateFromModel() {\r\n const model = this._editor.getModel();\r\n this._canUndo.set(Boolean(model && model.canUndo()));\r\n this._canRedo.set(Boolean(model && model.canRedo()));\r\n }\r\n}\r\nclass EditorModeContext extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(_editor, _contextKeyService) {\r\n super();\r\n this._editor = _editor;\r\n this._contextKeyService = _contextKeyService;\r\n this._langId = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.languageId.bindTo(_contextKeyService);\r\n this._hasCompletionItemProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService);\r\n this._hasCodeActionsProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService);\r\n this._hasCodeLensProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService);\r\n this._hasDefinitionProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService);\r\n this._hasDeclarationProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService);\r\n this._hasImplementationProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService);\r\n this._hasTypeDefinitionProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService);\r\n this._hasHoverProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService);\r\n this._hasDocumentHighlightProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService);\r\n this._hasDocumentSymbolProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService);\r\n this._hasReferenceProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService);\r\n this._hasRenameProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService);\r\n this._hasSignatureHelpProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService);\r\n this._hasInlineHintsProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasInlineHintsProvider.bindTo(_contextKeyService);\r\n this._hasDocumentFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService);\r\n this._hasDocumentSelectionFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService);\r\n this._hasMultipleDocumentFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService);\r\n this._hasMultipleDocumentSelectionFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService);\r\n this._isInWalkThrough = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_21__.EditorContextKeys.isInWalkThroughSnippet.bindTo(_contextKeyService);\r\n const update = () => this._update();\r\n // update when model/mode changes\r\n this._register(_editor.onDidChangeModel(update));\r\n this._register(_editor.onDidChangeModelLanguage(update));\r\n // update when registries change\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CompletionProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CodeActionProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CodeLensProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DefinitionProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DeclarationProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.ImplementationProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.TypeDefinitionProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.HoverProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentHighlightProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentSymbolProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.ReferenceProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.RenameProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentFormattingEditProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentRangeFormattingEditProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.SignatureHelpProviderRegistry.onDidChange(update));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.InlineHintsProviderRegistry.onDidChange(update));\r\n update();\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n reset() {\r\n this._contextKeyService.bufferChangeEvents(() => {\r\n this._langId.reset();\r\n this._hasCompletionItemProvider.reset();\r\n this._hasCodeActionsProvider.reset();\r\n this._hasCodeLensProvider.reset();\r\n this._hasDefinitionProvider.reset();\r\n this._hasDeclarationProvider.reset();\r\n this._hasImplementationProvider.reset();\r\n this._hasTypeDefinitionProvider.reset();\r\n this._hasHoverProvider.reset();\r\n this._hasDocumentHighlightProvider.reset();\r\n this._hasDocumentSymbolProvider.reset();\r\n this._hasReferenceProvider.reset();\r\n this._hasRenameProvider.reset();\r\n this._hasDocumentFormattingProvider.reset();\r\n this._hasDocumentSelectionFormattingProvider.reset();\r\n this._hasSignatureHelpProvider.reset();\r\n this._isInWalkThrough.reset();\r\n });\r\n }\r\n _update() {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n this.reset();\r\n return;\r\n }\r\n this._contextKeyService.bufferChangeEvents(() => {\r\n this._langId.set(model.getLanguageIdentifier().language);\r\n this._hasCompletionItemProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CompletionProviderRegistry.has(model));\r\n this._hasCodeActionsProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CodeActionProviderRegistry.has(model));\r\n this._hasCodeLensProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.CodeLensProviderRegistry.has(model));\r\n this._hasDefinitionProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DefinitionProviderRegistry.has(model));\r\n this._hasDeclarationProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DeclarationProviderRegistry.has(model));\r\n this._hasImplementationProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.ImplementationProviderRegistry.has(model));\r\n this._hasTypeDefinitionProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.TypeDefinitionProviderRegistry.has(model));\r\n this._hasHoverProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.HoverProviderRegistry.has(model));\r\n this._hasDocumentHighlightProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentHighlightProviderRegistry.has(model));\r\n this._hasDocumentSymbolProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentSymbolProviderRegistry.has(model));\r\n this._hasReferenceProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.ReferenceProviderRegistry.has(model));\r\n this._hasRenameProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.RenameProviderRegistry.has(model));\r\n this._hasSignatureHelpProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.SignatureHelpProviderRegistry.has(model));\r\n this._hasInlineHintsProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.InlineHintsProviderRegistry.has(model));\r\n this._hasDocumentFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentFormattingEditProviderRegistry.has(model) || _common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentRangeFormattingEditProviderRegistry.has(model));\r\n this._hasDocumentSelectionFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentRangeFormattingEditProviderRegistry.has(model));\r\n this._hasMultipleDocumentFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentFormattingEditProviderRegistry.all(model).length + _common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentRangeFormattingEditProviderRegistry.all(model).length > 1);\r\n this._hasMultipleDocumentSelectionFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_22__.DocumentRangeFormattingEditProviderRegistry.all(model).length > 1);\r\n this._isInWalkThrough.set(model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__.Schemas.walkThroughSnippet);\r\n });\r\n }\r\n}\r\nclass CodeEditorWidgetFocusTracker extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(domElement) {\r\n super();\r\n this._onChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter());\r\n this.onChange = this._onChange.event;\r\n this._hasFocus = false;\r\n this._domFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.trackFocus(domElement));\r\n this._register(this._domFocusTracker.onDidFocus(() => {\r\n this._hasFocus = true;\r\n this._onChange.fire(undefined);\r\n }));\r\n this._register(this._domFocusTracker.onDidBlur(() => {\r\n this._hasFocus = false;\r\n this._onChange.fire(undefined);\r\n }));\r\n }\r\n hasFocus() {\r\n return this._hasFocus;\r\n }\r\n}\r\nconst squigglyStart = encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='`);\r\nconst squigglyEnd = encodeURIComponent(`'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>`);\r\nfunction getSquigglySVGData(color) {\r\n return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd;\r\n}\r\nconst dotdotdotStart = encodeURIComponent(`<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"3\" width=\"12\"><g fill=\"`);\r\nconst dotdotdotEnd = encodeURIComponent(`\"><circle cx=\"1\" cy=\"1\" r=\"1\"/><circle cx=\"5\" cy=\"1\" r=\"1\"/><circle cx=\"9\" cy=\"1\" r=\"1\"/></g></svg>`);\r\nfunction getDotDotDotSVGData(color) {\r\n return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd;\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_31__.registerThemingParticipant)((theme, collector) => {\r\n const errorBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorErrorBorder);\r\n if (errorBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */} { border-bottom: 4px double ${errorBorderColor}; }`);\r\n }\r\n const errorForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorErrorForeground);\r\n if (errorForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(errorForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const errorBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorErrorBackground);\r\n if (errorBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${errorBackground}; }`);\r\n }\r\n const warningBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorWarningBorder);\r\n if (warningBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */} { border-bottom: 4px double ${warningBorderColor}; }`);\r\n }\r\n const warningForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorWarningForeground);\r\n if (warningForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(warningForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const warningBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorWarningBackground);\r\n if (warningBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${warningBackground}; }`);\r\n }\r\n const infoBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorInfoBorder);\r\n if (infoBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */} { border-bottom: 4px double ${infoBorderColor}; }`);\r\n }\r\n const infoForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorInfoForeground);\r\n if (infoForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(infoForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const infoBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorInfoBackground);\r\n if (infoBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${infoBackground}; }`);\r\n }\r\n const hintBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorHintBorder);\r\n if (hintBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-hint\" /* EditorHintDecoration */} { border-bottom: 2px dotted ${hintBorderColor}; }`);\r\n }\r\n const hintForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorHintForeground);\r\n if (hintForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-hint\" /* EditorHintDecoration */} { background: url(\"data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}\") no-repeat bottom left; }`);\r\n }\r\n const unnecessaryForeground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_23__.editorUnnecessaryCodeOpacity);\r\n if (unnecessaryForeground) {\r\n collector.addRule(`.monaco-editor.showUnused .${\"squiggly-inline-unnecessary\" /* EditorUnnecessaryInlineDecoration */} { opacity: ${unnecessaryForeground.rgba.a}; }`);\r\n }\r\n const unnecessaryBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_23__.editorUnnecessaryCodeBorder);\r\n if (unnecessaryBorder) {\r\n collector.addRule(`.monaco-editor.showUnused .${\"squiggly-unnecessary\" /* EditorUnnecessaryDecoration */} { border-bottom: 2px dashed ${unnecessaryBorder}; }`);\r\n }\r\n const deprecatedForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_24__.editorForeground) || 'inherit';\r\n collector.addRule(`.monaco-editor.showDeprecated .${\"squiggly-inline-deprecated\" /* EditorDeprecatedInlineDecoration */} { text-decoration: line-through; text-decoration-color: ${deprecatedForeground}}`);\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiffEditorWidget\": () => (/* binding */ DiffEditorWidget)\n/* harmony export */ });\n/* harmony import */ var _media_diffEditor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/diffEditor.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _core_editorState_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./codeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js\");\n/* harmony import */ var _diffReview_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diffReview.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/editorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/view/overviewZoneManager.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js\");\n/* harmony import */ var _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../common/viewLayout/lineDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js\");\n/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js\");\n/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _inlineDiffMargin_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./inlineDiffMargin.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _config_elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../config/elementSizeObserver.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../base/browser/ui/mouseCursor/mouseCursor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass VisualEditorState {\r\n constructor(_contextMenuService, _clipboardService) {\r\n this._contextMenuService = _contextMenuService;\r\n this._clipboardService = _clipboardService;\r\n this._zones = [];\r\n this._inlineDiffMargins = [];\r\n this._zonesMap = {};\r\n this._decorations = [];\r\n }\r\n getForeignViewZones(allViewZones) {\r\n return allViewZones.filter((z) => !this._zonesMap[String(z.id)]);\r\n }\r\n clean(editor) {\r\n // (1) View zones\r\n if (this._zones.length > 0) {\r\n editor.changeViewZones((viewChangeAccessor) => {\r\n for (const zoneId of this._zones) {\r\n viewChangeAccessor.removeZone(zoneId);\r\n }\r\n });\r\n }\r\n this._zones = [];\r\n this._zonesMap = {};\r\n // (2) Model decorations\r\n this._decorations = editor.deltaDecorations(this._decorations, []);\r\n }\r\n apply(editor, overviewRuler, newDecorations, restoreScrollState) {\r\n const scrollState = restoreScrollState ? _core_editorState_js__WEBPACK_IMPORTED_MODULE_9__.StableEditorScrollState.capture(editor) : null;\r\n // view zones\r\n editor.changeViewZones((viewChangeAccessor) => {\r\n for (const zoneId of this._zones) {\r\n viewChangeAccessor.removeZone(zoneId);\r\n }\r\n for (const inlineDiffMargin of this._inlineDiffMargins) {\r\n inlineDiffMargin.dispose();\r\n }\r\n this._zones = [];\r\n this._zonesMap = {};\r\n this._inlineDiffMargins = [];\r\n for (let i = 0, length = newDecorations.zones.length; i < length; i++) {\r\n const viewZone = newDecorations.zones[i];\r\n viewZone.suppressMouseDown = true;\r\n const zoneId = viewChangeAccessor.addZone(viewZone);\r\n this._zones.push(zoneId);\r\n this._zonesMap[String(zoneId)] = true;\r\n if (newDecorations.zones[i].diff && viewZone.marginDomNode) {\r\n viewZone.suppressMouseDown = false;\r\n this._inlineDiffMargins.push(new _inlineDiffMargin_js__WEBPACK_IMPORTED_MODULE_30__.InlineDiffMargin(zoneId, viewZone.marginDomNode, editor, newDecorations.zones[i].diff, this._contextMenuService, this._clipboardService));\r\n }\r\n }\r\n });\r\n if (scrollState) {\r\n scrollState.restore(editor);\r\n }\r\n // decorations\r\n this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations);\r\n // overview ruler\r\n if (overviewRuler) {\r\n overviewRuler.setZones(newDecorations.overviewZones);\r\n }\r\n }\r\n}\r\nlet DIFF_EDITOR_ID = 0;\r\nconst diffInsertIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_38__.registerIcon)('diff-insert', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__.Codicon.add, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('diffInsertIcon', 'Line decoration for inserts in the diff editor.'));\r\nconst diffRemoveIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_38__.registerIcon)('diff-remove', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__.Codicon.remove, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('diffRemoveIcon', 'Line decoration for removals in the diff editor.'));\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('diffEditorWidget', { createHTML: value => value });\r\nlet DiffEditorWidget = class DiffEditorWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(domElement, options, codeEditorWidgetOptions, clipboardService, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, _editorProgressService) {\r\n super();\r\n this._editorProgressService = _editorProgressService;\r\n this._onDidDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidDispose = this._onDidDispose.event;\r\n this._onDidUpdateDiff = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this.onDidUpdateDiff = this._onDidUpdateDiff.event;\r\n this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter());\r\n this._lastOriginalWarning = null;\r\n this._lastModifiedWarning = null;\r\n this._editorWorkerService = editorWorkerService;\r\n this._codeEditorService = codeEditorService;\r\n this._contextKeyService = this._register(contextKeyService.createScoped(domElement));\r\n this._instantiationService = instantiationService.createChild(new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__.ServiceCollection([_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_23__.IContextKeyService, this._contextKeyService]));\r\n this._contextKeyService.createKey('isInDiffEditor', true);\r\n this._themeService = themeService;\r\n this._notificationService = notificationService;\r\n this._id = (++DIFF_EDITOR_ID);\r\n this._state = 0 /* Idle */;\r\n this._updatingDiffProgress = null;\r\n this._domElement = domElement;\r\n options = options || {};\r\n // renderSideBySide\r\n this._renderSideBySide = true;\r\n if (typeof options.renderSideBySide !== 'undefined') {\r\n this._renderSideBySide = options.renderSideBySide;\r\n }\r\n // maxComputationTime\r\n this._maxComputationTime = 5000;\r\n if (typeof options.maxComputationTime !== 'undefined') {\r\n this._maxComputationTime = options.maxComputationTime;\r\n }\r\n // ignoreTrimWhitespace\r\n this._ignoreTrimWhitespace = true;\r\n if (typeof options.ignoreTrimWhitespace !== 'undefined') {\r\n this._ignoreTrimWhitespace = options.ignoreTrimWhitespace;\r\n }\r\n // renderIndicators\r\n this._renderIndicators = true;\r\n if (typeof options.renderIndicators !== 'undefined') {\r\n this._renderIndicators = options.renderIndicators;\r\n }\r\n this._originalIsEditable = (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.boolean)(options.originalEditable, false);\r\n this._diffCodeLens = (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.boolean)(options.diffCodeLens, false);\r\n this._diffWordWrap = validateDiffWordWrap(options.diffWordWrap, 'inherit');\r\n if (typeof options.isInEmbeddedEditor !== 'undefined') {\r\n this._contextKeyService.createKey('isInEmbeddedDiffEditor', options.isInEmbeddedEditor);\r\n }\r\n else {\r\n this._contextKeyService.createKey('isInEmbeddedDiffEditor', false);\r\n }\r\n this._renderOverviewRuler = true;\r\n if (typeof options.renderOverviewRuler !== 'undefined') {\r\n this._renderOverviewRuler = Boolean(options.renderOverviewRuler);\r\n }\r\n this._updateDecorationsRunner = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__.RunOnceScheduler(() => this._updateDecorations(), 0));\r\n this._containerDomElement = document.createElement('div');\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n this._containerDomElement.style.position = 'relative';\r\n this._containerDomElement.style.height = '100%';\r\n this._domElement.appendChild(this._containerDomElement);\r\n this._overviewViewportDomElement = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this._overviewViewportDomElement.setClassName('diffViewport');\r\n this._overviewViewportDomElement.setPosition('absolute');\r\n this._overviewDomElement = document.createElement('div');\r\n this._overviewDomElement.className = 'diffOverview';\r\n this._overviewDomElement.style.position = 'absolute';\r\n this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode);\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addStandardDisposableListener(this._overviewDomElement, 'mousedown', (e) => {\r\n this._modifiedEditor.delegateVerticalScrollbarMouseDown(e);\r\n }));\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.appendChild(this._overviewDomElement);\r\n }\r\n // Create left side\r\n this._originalDomNode = document.createElement('div');\r\n this._originalDomNode.className = 'editor original';\r\n this._originalDomNode.style.position = 'absolute';\r\n this._originalDomNode.style.height = '100%';\r\n this._containerDomElement.appendChild(this._originalDomNode);\r\n // Create right side\r\n this._modifiedDomNode = document.createElement('div');\r\n this._modifiedDomNode.className = 'editor modified';\r\n this._modifiedDomNode.style.position = 'absolute';\r\n this._modifiedDomNode.style.height = '100%';\r\n this._containerDomElement.appendChild(this._modifiedDomNode);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n this._currentlyChangingViewZones = false;\r\n this._diffComputationToken = 0;\r\n this._originalEditorState = new VisualEditorState(contextMenuService, clipboardService);\r\n this._modifiedEditorState = new VisualEditorState(contextMenuService, clipboardService);\r\n this._isVisible = true;\r\n this._isHandlingScrollEvent = false;\r\n this._elementSizeObserver = this._register(new _config_elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_35__.ElementSizeObserver(this._containerDomElement, options.dimension, () => this._onDidContainerSizeChanged()));\r\n if (options.automaticLayout) {\r\n this._elementSizeObserver.startObserving();\r\n }\r\n this._diffComputationResult = null;\r\n this._originalEditor = this._createLeftHandSideEditor(options, codeEditorWidgetOptions.originalEditor || {});\r\n this._modifiedEditor = this._createRightHandSideEditor(options, codeEditorWidgetOptions.modifiedEditor || {});\r\n this._originalOverviewRuler = null;\r\n this._modifiedOverviewRuler = null;\r\n this._reviewPane = new _diffReview_js__WEBPACK_IMPORTED_MODULE_12__.DiffReview(this);\r\n this._containerDomElement.appendChild(this._reviewPane.domNode.domNode);\r\n this._containerDomElement.appendChild(this._reviewPane.shadow.domNode);\r\n this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode);\r\n // enableSplitViewResizing\r\n this._enableSplitViewResizing = true;\r\n if (typeof options.enableSplitViewResizing !== 'undefined') {\r\n this._enableSplitViewResizing = options.enableSplitViewResizing;\r\n }\r\n if (this._renderSideBySide) {\r\n this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n else {\r\n this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n this._register(themeService.onDidColorThemeChange(t => {\r\n if (this._strategy && this._strategy.applyColors(t)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n }));\r\n const contributions = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_32__.EditorExtensionsRegistry.getDiffEditorContributions();\r\n for (const desc of contributions) {\r\n try {\r\n this._register(instantiationService.createInstance(desc.ctor, this));\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_33__.onUnexpectedError)(err);\r\n }\r\n }\r\n this._codeEditorService.addDiffEditor(this);\r\n }\r\n _setState(newState) {\r\n if (this._state === newState) {\r\n return;\r\n }\r\n this._state = newState;\r\n if (this._updatingDiffProgress) {\r\n this._updatingDiffProgress.done();\r\n this._updatingDiffProgress = null;\r\n }\r\n if (this._state === 1 /* ComputingDiff */) {\r\n this._updatingDiffProgress = this._editorProgressService.show(true, 1000);\r\n }\r\n }\r\n diffReviewNext() {\r\n this._reviewPane.next();\r\n }\r\n diffReviewPrev() {\r\n this._reviewPane.prev();\r\n }\r\n static _getClassName(theme, renderSideBySide) {\r\n let result = 'monaco-diff-editor monaco-editor-background ';\r\n if (renderSideBySide) {\r\n result += 'side-by-side ';\r\n }\r\n result += (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.getThemeTypeSelector)(theme.type);\r\n return result;\r\n }\r\n _recreateOverviewRulers() {\r\n if (!this._renderOverviewRuler) {\r\n return;\r\n }\r\n if (this._originalOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\r\n this._originalOverviewRuler.dispose();\r\n }\r\n if (this._originalEditor.hasModel()) {\r\n this._originalOverviewRuler = this._originalEditor.createOverviewRuler('original diffOverviewRuler');\r\n this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode());\r\n }\r\n if (this._modifiedOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\r\n this._modifiedOverviewRuler.dispose();\r\n }\r\n if (this._modifiedEditor.hasModel()) {\r\n this._modifiedOverviewRuler = this._modifiedEditor.createOverviewRuler('modified diffOverviewRuler');\r\n this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode());\r\n }\r\n this._layoutOverviewRulers();\r\n }\r\n _createLeftHandSideEditor(options, codeEditorWidgetOptions) {\r\n const editor = this._createInnerEditor(this._instantiationService, this._originalDomNode, this._adjustOptionsForLeftHandSide(options), codeEditorWidgetOptions);\r\n this._register(editor.onDidScrollChange((e) => {\r\n if (this._isHandlingScrollEvent) {\r\n return;\r\n }\r\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\r\n return;\r\n }\r\n this._isHandlingScrollEvent = true;\r\n this._modifiedEditor.setScrollPosition({\r\n scrollLeft: e.scrollLeft,\r\n scrollTop: e.scrollTop\r\n });\r\n this._isHandlingScrollEvent = false;\r\n this._layoutOverviewViewport();\r\n }));\r\n this._register(editor.onDidChangeViewZones(() => {\r\n this._onViewZonesChanged();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (!editor.getModel()) {\r\n return;\r\n }\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._updateDecorationsRunner.cancel();\r\n this._updateDecorations();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelContent(() => {\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }));\r\n const isInDiffLeftEditorKey = this._contextKeyService.createKey('isInDiffLeftEditor', editor.hasWidgetFocus());\r\n this._register(editor.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));\r\n this._register(editor.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));\r\n this._register(editor.onDidContentSizeChange(e => {\r\n const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());\r\n this._onDidContentSizeChange.fire({\r\n contentHeight: height,\r\n contentWidth: width,\r\n contentHeightChanged: e.contentHeightChanged,\r\n contentWidthChanged: e.contentWidthChanged\r\n });\r\n }));\r\n return editor;\r\n }\r\n _createRightHandSideEditor(options, codeEditorWidgetOptions) {\r\n const editor = this._createInnerEditor(this._instantiationService, this._modifiedDomNode, this._adjustOptionsForRightHandSide(options), codeEditorWidgetOptions);\r\n this._register(editor.onDidScrollChange((e) => {\r\n if (this._isHandlingScrollEvent) {\r\n return;\r\n }\r\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\r\n return;\r\n }\r\n this._isHandlingScrollEvent = true;\r\n this._originalEditor.setScrollPosition({\r\n scrollLeft: e.scrollLeft,\r\n scrollTop: e.scrollTop\r\n });\r\n this._isHandlingScrollEvent = false;\r\n this._layoutOverviewViewport();\r\n }));\r\n this._register(editor.onDidChangeViewZones(() => {\r\n this._onViewZonesChanged();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (!editor.getModel()) {\r\n return;\r\n }\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._updateDecorationsRunner.cancel();\r\n this._updateDecorations();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelContent(() => {\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelOptions((e) => {\r\n if (e.tabSize) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n }));\r\n const isInDiffRightEditorKey = this._contextKeyService.createKey('isInDiffRightEditor', editor.hasWidgetFocus());\r\n this._register(editor.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));\r\n this._register(editor.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));\r\n this._register(editor.onDidContentSizeChange(e => {\r\n const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());\r\n this._onDidContentSizeChange.fire({\r\n contentHeight: height,\r\n contentWidth: width,\r\n contentHeightChanged: e.contentHeightChanged,\r\n contentWidthChanged: e.contentWidthChanged\r\n });\r\n }));\r\n return editor;\r\n }\r\n _createInnerEditor(instantiationService, container, options, editorWidgetOptions) {\r\n return instantiationService.createInstance(_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_11__.CodeEditorWidget, container, options, editorWidgetOptions);\r\n }\r\n dispose() {\r\n this._codeEditorService.removeDiffEditor(this);\r\n if (this._beginUpdateDecorationsTimeout !== -1) {\r\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n }\r\n this._cleanViewZonesAndDecorations();\r\n if (this._originalOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\r\n this._originalOverviewRuler.dispose();\r\n }\r\n if (this._modifiedOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\r\n this._modifiedOverviewRuler.dispose();\r\n }\r\n this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode);\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.removeChild(this._overviewDomElement);\r\n }\r\n this._containerDomElement.removeChild(this._originalDomNode);\r\n this._originalEditor.dispose();\r\n this._containerDomElement.removeChild(this._modifiedDomNode);\r\n this._modifiedEditor.dispose();\r\n this._strategy.dispose();\r\n this._containerDomElement.removeChild(this._reviewPane.domNode.domNode);\r\n this._containerDomElement.removeChild(this._reviewPane.shadow.domNode);\r\n this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode);\r\n this._reviewPane.dispose();\r\n this._domElement.removeChild(this._containerDomElement);\r\n this._onDidDispose.fire();\r\n super.dispose();\r\n }\r\n //------------ begin IDiffEditor methods\r\n getId() {\r\n return this.getEditorType() + ':' + this._id;\r\n }\r\n getEditorType() {\r\n return _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_16__.EditorType.IDiffEditor;\r\n }\r\n getLineChanges() {\r\n if (!this._diffComputationResult) {\r\n return null;\r\n }\r\n return this._diffComputationResult.changes;\r\n }\r\n getOriginalEditor() {\r\n return this._originalEditor;\r\n }\r\n getModifiedEditor() {\r\n return this._modifiedEditor;\r\n }\r\n updateOptions(newOptions) {\r\n // Handle side by side\r\n let renderSideBySideChanged = false;\r\n if (typeof newOptions.renderSideBySide !== 'undefined') {\r\n if (this._renderSideBySide !== newOptions.renderSideBySide) {\r\n this._renderSideBySide = newOptions.renderSideBySide;\r\n renderSideBySideChanged = true;\r\n }\r\n }\r\n if (typeof newOptions.maxComputationTime !== 'undefined') {\r\n this._maxComputationTime = newOptions.maxComputationTime;\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }\r\n let beginUpdateDecorations = false;\r\n if (typeof newOptions.ignoreTrimWhitespace !== 'undefined') {\r\n if (this._ignoreTrimWhitespace !== newOptions.ignoreTrimWhitespace) {\r\n this._ignoreTrimWhitespace = newOptions.ignoreTrimWhitespace;\r\n // Begin comparing\r\n beginUpdateDecorations = true;\r\n }\r\n }\r\n if (typeof newOptions.renderIndicators !== 'undefined') {\r\n if (this._renderIndicators !== newOptions.renderIndicators) {\r\n this._renderIndicators = newOptions.renderIndicators;\r\n beginUpdateDecorations = true;\r\n }\r\n }\r\n if (beginUpdateDecorations) {\r\n this._beginUpdateDecorations();\r\n }\r\n this._originalIsEditable = (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.boolean)(newOptions.originalEditable, this._originalIsEditable);\r\n this._diffCodeLens = (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.boolean)(newOptions.diffCodeLens, this._diffCodeLens);\r\n this._diffWordWrap = validateDiffWordWrap(newOptions.diffWordWrap, this._diffWordWrap);\r\n this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions));\r\n this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions));\r\n // enableSplitViewResizing\r\n if (typeof newOptions.enableSplitViewResizing !== 'undefined') {\r\n this._enableSplitViewResizing = newOptions.enableSplitViewResizing;\r\n }\r\n this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing);\r\n // renderSideBySide\r\n if (renderSideBySideChanged) {\r\n if (this._renderSideBySide) {\r\n this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n else {\r\n this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n // Update class name\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n }\r\n // renderOverviewRuler\r\n if (typeof newOptions.renderOverviewRuler !== 'undefined' && this._renderOverviewRuler !== newOptions.renderOverviewRuler) {\r\n this._renderOverviewRuler = newOptions.renderOverviewRuler;\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.appendChild(this._overviewDomElement);\r\n }\r\n else {\r\n this._containerDomElement.removeChild(this._overviewDomElement);\r\n }\r\n }\r\n }\r\n getModel() {\r\n return {\r\n original: this._originalEditor.getModel(),\r\n modified: this._modifiedEditor.getModel()\r\n };\r\n }\r\n setModel(model) {\r\n // Guard us against partial null model\r\n if (model && (!model.original || !model.modified)) {\r\n throw new Error(!model.original ? 'DiffEditorWidget.setModel: Original model is null' : 'DiffEditorWidget.setModel: Modified model is null');\r\n }\r\n // Remove all view zones & decorations\r\n this._cleanViewZonesAndDecorations();\r\n // Update code editor models\r\n this._originalEditor.setModel(model ? model.original : null);\r\n this._modifiedEditor.setModel(model ? model.modified : null);\r\n this._updateDecorationsRunner.cancel();\r\n // this.originalEditor.onDidChangeModelOptions\r\n if (model) {\r\n this._originalEditor.setScrollTop(0);\r\n this._modifiedEditor.setScrollTop(0);\r\n }\r\n // Disable any diff computations that will come in\r\n this._diffComputationResult = null;\r\n this._diffComputationToken++;\r\n this._setState(0 /* Idle */);\r\n if (model) {\r\n this._recreateOverviewRulers();\r\n // Begin comparing\r\n this._beginUpdateDecorations();\r\n }\r\n this._layoutOverviewViewport();\r\n }\r\n getDomNode() {\r\n return this._domElement;\r\n }\r\n getVisibleColumnFromPosition(position) {\r\n return this._modifiedEditor.getVisibleColumnFromPosition(position);\r\n }\r\n getPosition() {\r\n return this._modifiedEditor.getPosition();\r\n }\r\n setPosition(position) {\r\n this._modifiedEditor.setPosition(position);\r\n }\r\n revealLine(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLine(lineNumber, scrollType);\r\n }\r\n revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineInCenter(lineNumber, scrollType);\r\n }\r\n revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\r\n }\r\n revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineNearTop(lineNumber, scrollType);\r\n }\r\n revealPosition(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPosition(position, scrollType);\r\n }\r\n revealPositionInCenter(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionInCenter(position, scrollType);\r\n }\r\n revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\r\n }\r\n revealPositionNearTop(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionNearTop(position, scrollType);\r\n }\r\n getSelection() {\r\n return this._modifiedEditor.getSelection();\r\n }\r\n getSelections() {\r\n return this._modifiedEditor.getSelections();\r\n }\r\n setSelection(something) {\r\n this._modifiedEditor.setSelection(something);\r\n }\r\n setSelections(ranges) {\r\n this._modifiedEditor.setSelections(ranges);\r\n }\r\n revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLines(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) {\r\n this._modifiedEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\r\n }\r\n revealRangeInCenter(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeInCenter(range, scrollType);\r\n }\r\n revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\r\n }\r\n revealRangeNearTop(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeNearTop(range, scrollType);\r\n }\r\n revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\r\n }\r\n revealRangeAtTop(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeAtTop(range, scrollType);\r\n }\r\n getSupportedActions() {\r\n return this._modifiedEditor.getSupportedActions();\r\n }\r\n saveViewState() {\r\n const originalViewState = this._originalEditor.saveViewState();\r\n const modifiedViewState = this._modifiedEditor.saveViewState();\r\n return {\r\n original: originalViewState,\r\n modified: modifiedViewState\r\n };\r\n }\r\n restoreViewState(s) {\r\n if (s && s.original && s.modified) {\r\n const diffEditorState = s;\r\n this._originalEditor.restoreViewState(diffEditorState.original);\r\n this._modifiedEditor.restoreViewState(diffEditorState.modified);\r\n }\r\n }\r\n layout(dimension) {\r\n this._elementSizeObserver.observe(dimension);\r\n }\r\n focus() {\r\n this._modifiedEditor.focus();\r\n }\r\n hasTextFocus() {\r\n return this._originalEditor.hasTextFocus() || this._modifiedEditor.hasTextFocus();\r\n }\r\n trigger(source, handlerId, payload) {\r\n this._modifiedEditor.trigger(source, handlerId, payload);\r\n }\r\n changeDecorations(callback) {\r\n return this._modifiedEditor.changeDecorations(callback);\r\n }\r\n //------------ end IDiffEditor methods\r\n //------------ begin layouting methods\r\n _onDidContainerSizeChanged() {\r\n this._doLayout();\r\n }\r\n _getReviewHeight() {\r\n return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : 0;\r\n }\r\n _layoutOverviewRulers() {\r\n if (!this._renderOverviewRuler) {\r\n return;\r\n }\r\n if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) {\r\n return;\r\n }\r\n const height = this._elementSizeObserver.getHeight();\r\n const reviewHeight = this._getReviewHeight();\r\n const freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const layoutInfo = this._modifiedEditor.getLayoutInfo();\r\n if (layoutInfo) {\r\n this._originalOverviewRuler.setLayout({\r\n top: 0,\r\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n height: (height - reviewHeight)\r\n });\r\n this._modifiedOverviewRuler.setLayout({\r\n top: 0,\r\n right: 0,\r\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n height: (height - reviewHeight)\r\n });\r\n }\r\n }\r\n //------------ end layouting methods\r\n _onViewZonesChanged() {\r\n if (this._currentlyChangingViewZones) {\r\n return;\r\n }\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n _beginUpdateDecorationsSoon() {\r\n // Clear previous timeout if necessary\r\n if (this._beginUpdateDecorationsTimeout !== -1) {\r\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n }\r\n this._beginUpdateDecorationsTimeout = window.setTimeout(() => this._beginUpdateDecorations(), DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY);\r\n }\r\n static _equals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n return (a.toString() === b.toString());\r\n }\r\n _beginUpdateDecorations() {\r\n this._beginUpdateDecorationsTimeout = -1;\r\n const currentOriginalModel = this._originalEditor.getModel();\r\n const currentModifiedModel = this._modifiedEditor.getModel();\r\n if (!currentOriginalModel || !currentModifiedModel) {\r\n return;\r\n }\r\n // Prevent old diff requests to come if a new request has been initiated\r\n // The best method would be to call cancel on the Promise, but this is not\r\n // yet supported, so using tokens for now.\r\n this._diffComputationToken++;\r\n const currentToken = this._diffComputationToken;\r\n this._setState(1 /* ComputingDiff */);\r\n if (!this._editorWorkerService.canComputeDiff(currentOriginalModel.uri, currentModifiedModel.uri)) {\r\n if (!DiffEditorWidget._equals(currentOriginalModel.uri, this._lastOriginalWarning)\r\n || !DiffEditorWidget._equals(currentModifiedModel.uri, this._lastModifiedWarning)) {\r\n this._lastOriginalWarning = currentOriginalModel.uri;\r\n this._lastModifiedWarning = currentModifiedModel.uri;\r\n this._notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize(\"diff.tooLarge\", \"Cannot compare files because one file is too large.\"));\r\n }\r\n return;\r\n }\r\n this._editorWorkerService.computeDiff(currentOriginalModel.uri, currentModifiedModel.uri, this._ignoreTrimWhitespace, this._maxComputationTime).then((result) => {\r\n if (currentToken === this._diffComputationToken\r\n && currentOriginalModel === this._originalEditor.getModel()\r\n && currentModifiedModel === this._modifiedEditor.getModel()) {\r\n this._setState(2 /* DiffComputed */);\r\n this._diffComputationResult = result;\r\n this._updateDecorationsRunner.schedule();\r\n this._onDidUpdateDiff.fire();\r\n }\r\n }, (error) => {\r\n if (currentToken === this._diffComputationToken\r\n && currentOriginalModel === this._originalEditor.getModel()\r\n && currentModifiedModel === this._modifiedEditor.getModel()) {\r\n this._setState(2 /* DiffComputed */);\r\n this._diffComputationResult = null;\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n });\r\n }\r\n _cleanViewZonesAndDecorations() {\r\n this._originalEditorState.clean(this._originalEditor);\r\n this._modifiedEditorState.clean(this._modifiedEditor);\r\n }\r\n _updateDecorations() {\r\n if (!this._originalEditor.getModel() || !this._modifiedEditor.getModel()) {\r\n return;\r\n }\r\n const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []);\r\n const foreignOriginal = this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces());\r\n const foreignModified = this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces());\r\n const diffDecorations = this._strategy.getEditorsDiffDecorations(lineChanges, this._ignoreTrimWhitespace, this._renderIndicators, foreignOriginal, foreignModified);\r\n try {\r\n this._currentlyChangingViewZones = true;\r\n this._originalEditorState.apply(this._originalEditor, this._originalOverviewRuler, diffDecorations.original, false);\r\n this._modifiedEditorState.apply(this._modifiedEditor, this._modifiedOverviewRuler, diffDecorations.modified, true);\r\n }\r\n finally {\r\n this._currentlyChangingViewZones = false;\r\n }\r\n }\r\n _adjustOptionsForSubEditor(options) {\r\n const clonedOptions = Object.assign({}, options);\r\n clonedOptions.inDiffEditor = true;\r\n clonedOptions.automaticLayout = false;\r\n // Clone scrollbar options before changing them\r\n clonedOptions.scrollbar = Object.assign({}, (clonedOptions.scrollbar || {}));\r\n clonedOptions.scrollbar.vertical = 'visible';\r\n clonedOptions.folding = false;\r\n clonedOptions.codeLens = this._diffCodeLens;\r\n clonedOptions.fixedOverflowWidgets = true;\r\n // clonedOptions.lineDecorationsWidth = '2ch';\r\n // Clone minimap options before changing them\r\n clonedOptions.minimap = Object.assign({}, (clonedOptions.minimap || {}));\r\n clonedOptions.minimap.enabled = false;\r\n return clonedOptions;\r\n }\r\n _adjustOptionsForLeftHandSide(options) {\r\n const result = this._adjustOptionsForSubEditor(options);\r\n if (!this._renderSideBySide) {\r\n // never wrap hidden editor\r\n result.wordWrapOverride1 = 'off';\r\n }\r\n else {\r\n result.wordWrapOverride1 = this._diffWordWrap;\r\n }\r\n if (options.originalAriaLabel) {\r\n result.ariaLabel = options.originalAriaLabel;\r\n }\r\n result.readOnly = !this._originalIsEditable;\r\n result.extraEditorClassName = 'original-in-monaco-diff-editor';\r\n return Object.assign(Object.assign({}, result), { dimension: {\r\n height: 0,\r\n width: 0\r\n } });\r\n }\r\n _adjustOptionsForRightHandSide(options) {\r\n const result = this._adjustOptionsForSubEditor(options);\r\n if (options.modifiedAriaLabel) {\r\n result.ariaLabel = options.modifiedAriaLabel;\r\n }\r\n result.wordWrapOverride1 = this._diffWordWrap;\r\n result.revealHorizontalRightPadding = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.EditorOptions.revealHorizontalRightPadding.defaultValue + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH;\r\n result.scrollbar.verticalHasArrows = false;\r\n result.extraEditorClassName = 'modified-in-monaco-diff-editor';\r\n return Object.assign(Object.assign({}, result), { dimension: {\r\n height: 0,\r\n width: 0\r\n } });\r\n }\r\n doLayout() {\r\n this._elementSizeObserver.observe();\r\n this._doLayout();\r\n }\r\n _doLayout() {\r\n const width = this._elementSizeObserver.getWidth();\r\n const height = this._elementSizeObserver.getHeight();\r\n const reviewHeight = this._getReviewHeight();\r\n const splitPoint = this._strategy.layout();\r\n this._originalDomNode.style.width = splitPoint + 'px';\r\n this._originalDomNode.style.left = '0px';\r\n this._modifiedDomNode.style.width = (width - splitPoint) + 'px';\r\n this._modifiedDomNode.style.left = splitPoint + 'px';\r\n this._overviewDomElement.style.top = '0px';\r\n this._overviewDomElement.style.height = (height - reviewHeight) + 'px';\r\n this._overviewDomElement.style.width = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px';\r\n this._overviewDomElement.style.left = (width - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH) + 'px';\r\n this._overviewViewportDomElement.setWidth(DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH);\r\n this._overviewViewportDomElement.setHeight(30);\r\n this._originalEditor.layout({ width: splitPoint, height: (height - reviewHeight) });\r\n this._modifiedEditor.layout({ width: width - splitPoint - (this._renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0), height: (height - reviewHeight) });\r\n if (this._originalOverviewRuler || this._modifiedOverviewRuler) {\r\n this._layoutOverviewRulers();\r\n }\r\n this._reviewPane.layout(height - reviewHeight, width, reviewHeight);\r\n this._layoutOverviewViewport();\r\n }\r\n _layoutOverviewViewport() {\r\n const layout = this._computeOverviewViewport();\r\n if (!layout) {\r\n this._overviewViewportDomElement.setTop(0);\r\n this._overviewViewportDomElement.setHeight(0);\r\n }\r\n else {\r\n this._overviewViewportDomElement.setTop(layout.top);\r\n this._overviewViewportDomElement.setHeight(layout.height);\r\n }\r\n }\r\n _computeOverviewViewport() {\r\n const layoutInfo = this._modifiedEditor.getLayoutInfo();\r\n if (!layoutInfo) {\r\n return null;\r\n }\r\n const scrollTop = this._modifiedEditor.getScrollTop();\r\n const scrollHeight = this._modifiedEditor.getScrollHeight();\r\n const computedAvailableSize = Math.max(0, layoutInfo.height);\r\n const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * 0);\r\n const computedRatio = scrollHeight > 0 ? (computedRepresentableSize / scrollHeight) : 0;\r\n const computedSliderSize = Math.max(0, Math.floor(layoutInfo.height * computedRatio));\r\n const computedSliderPosition = Math.floor(scrollTop * computedRatio);\r\n return {\r\n height: computedSliderSize,\r\n top: computedSliderPosition\r\n };\r\n }\r\n _createDataSource() {\r\n return {\r\n getWidth: () => {\r\n return this._elementSizeObserver.getWidth();\r\n },\r\n getHeight: () => {\r\n return (this._elementSizeObserver.getHeight() - this._getReviewHeight());\r\n },\r\n getOptions: () => {\r\n return {\r\n renderOverviewRuler: this._renderOverviewRuler\r\n };\r\n },\r\n getContainerDomNode: () => {\r\n return this._containerDomElement;\r\n },\r\n relayoutEditors: () => {\r\n this._doLayout();\r\n },\r\n getOriginalEditor: () => {\r\n return this._originalEditor;\r\n },\r\n getModifiedEditor: () => {\r\n return this._modifiedEditor;\r\n }\r\n };\r\n }\r\n _setStrategy(newStrategy) {\r\n if (this._strategy) {\r\n this._strategy.dispose();\r\n }\r\n this._strategy = newStrategy;\r\n newStrategy.applyColors(this._themeService.getColorTheme());\r\n if (this._diffComputationResult) {\r\n this._updateDecorations();\r\n }\r\n // Just do a layout, the strategy might need it\r\n this._doLayout();\r\n }\r\n _getLineChangeAtOrBeforeLineNumber(lineNumber, startLineNumberExtractor) {\r\n const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []);\r\n if (lineChanges.length === 0 || lineNumber < startLineNumberExtractor(lineChanges[0])) {\r\n // There are no changes or `lineNumber` is before the first change\r\n return null;\r\n }\r\n let min = 0;\r\n let max = lineChanges.length - 1;\r\n while (min < max) {\r\n const mid = Math.floor((min + max) / 2);\r\n const midStart = startLineNumberExtractor(lineChanges[mid]);\r\n const midEnd = (mid + 1 <= max ? startLineNumberExtractor(lineChanges[mid + 1]) : 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n if (lineNumber < midStart) {\r\n max = mid - 1;\r\n }\r\n else if (lineNumber >= midEnd) {\r\n min = mid + 1;\r\n }\r\n else {\r\n // HIT!\r\n min = mid;\r\n max = mid;\r\n }\r\n }\r\n return lineChanges[min];\r\n }\r\n _getEquivalentLineForOriginalLineNumber(lineNumber) {\r\n const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.originalStartLineNumber);\r\n if (!lineChange) {\r\n return lineNumber;\r\n }\r\n const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\r\n const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\r\n const delta = lineNumber - originalEquivalentLineNumber;\r\n if (delta <= lineChangeOriginalLength) {\r\n return modifiedEquivalentLineNumber + Math.min(delta, lineChangeModifiedLength);\r\n }\r\n return modifiedEquivalentLineNumber + lineChangeModifiedLength - lineChangeOriginalLength + delta;\r\n }\r\n _getEquivalentLineForModifiedLineNumber(lineNumber) {\r\n const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.modifiedStartLineNumber);\r\n if (!lineChange) {\r\n return lineNumber;\r\n }\r\n const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\r\n const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\r\n const delta = lineNumber - modifiedEquivalentLineNumber;\r\n if (delta <= lineChangeModifiedLength) {\r\n return originalEquivalentLineNumber + Math.min(delta, lineChangeOriginalLength);\r\n }\r\n return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta;\r\n }\r\n getDiffLineInformationForOriginal(lineNumber) {\r\n if (!this._diffComputationResult) {\r\n // Cannot answer that which I don't know\r\n return null;\r\n }\r\n return {\r\n equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(lineNumber)\r\n };\r\n }\r\n getDiffLineInformationForModified(lineNumber) {\r\n if (!this._diffComputationResult) {\r\n // Cannot answer that which I don't know\r\n return null;\r\n }\r\n return {\r\n equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(lineNumber)\r\n };\r\n }\r\n};\r\nDiffEditorWidget.ONE_OVERVIEW_WIDTH = 15;\r\nDiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH = 30;\r\nDiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms\r\nDiffEditorWidget = __decorate([\r\n __param(3, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_31__.IClipboardService),\r\n __param(4, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_18__.IEditorWorkerService),\r\n __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_23__.IContextKeyService),\r\n __param(6, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_24__.IInstantiationService),\r\n __param(7, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__.ICodeEditorService),\r\n __param(8, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.IThemeService),\r\n __param(9, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_26__.INotificationService),\r\n __param(10, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_29__.IContextMenuService),\r\n __param(11, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_34__.IEditorProgressService)\r\n], DiffEditorWidget);\r\n\r\nclass DiffEditorWidgetStyle extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(dataSource) {\r\n super();\r\n this._dataSource = dataSource;\r\n this._insertColor = null;\r\n this._removeColor = null;\r\n }\r\n applyColors(theme) {\r\n const newInsertColor = (theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffInserted) || _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.defaultInsertColor).transparent(2);\r\n const newRemoveColor = (theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffRemoved) || _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.defaultRemoveColor).transparent(2);\r\n const hasChanges = !newInsertColor.equals(this._insertColor) || !newRemoveColor.equals(this._removeColor);\r\n this._insertColor = newInsertColor;\r\n this._removeColor = newRemoveColor;\r\n return hasChanges;\r\n }\r\n getEditorsDiffDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalWhitespaces, modifiedWhitespaces) {\r\n // Get view zones\r\n modifiedWhitespaces = modifiedWhitespaces.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n originalWhitespaces = originalWhitespaces.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n const zones = this._getViewZones(lineChanges, originalWhitespaces, modifiedWhitespaces, renderIndicators);\r\n // Get decorations & overview ruler zones\r\n const originalDecorations = this._getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators);\r\n const modifiedDecorations = this._getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators);\r\n return {\r\n original: {\r\n decorations: originalDecorations.decorations,\r\n overviewZones: originalDecorations.overviewZones,\r\n zones: zones.original\r\n },\r\n modified: {\r\n decorations: modifiedDecorations.decorations,\r\n overviewZones: modifiedDecorations.overviewZones,\r\n zones: zones.modified\r\n }\r\n };\r\n }\r\n}\r\nclass ForeignViewZonesIterator {\r\n constructor(source) {\r\n this._source = source;\r\n this._index = -1;\r\n this.current = null;\r\n this.advance();\r\n }\r\n advance() {\r\n this._index++;\r\n if (this._index < this._source.length) {\r\n this.current = this._source[this._index];\r\n }\r\n else {\r\n this.current = null;\r\n }\r\n }\r\n}\r\nclass ViewZonesComputer {\r\n constructor(_lineChanges, _originalForeignVZ, _modifiedForeignVZ, _originalEditor, _modifiedEditor) {\r\n this._lineChanges = _lineChanges;\r\n this._originalForeignVZ = _originalForeignVZ;\r\n this._modifiedForeignVZ = _modifiedForeignVZ;\r\n this._originalEditor = _originalEditor;\r\n this._modifiedEditor = _modifiedEditor;\r\n }\r\n static _getViewLineCount(editor, startLineNumber, endLineNumber) {\r\n const model = editor.getModel();\r\n const viewModel = editor._getViewModel();\r\n if (model && viewModel) {\r\n const viewRange = getViewRange(model, viewModel, startLineNumber, endLineNumber);\r\n return (viewRange.endLineNumber - viewRange.startLineNumber + 1);\r\n }\r\n return (endLineNumber - startLineNumber + 1);\r\n }\r\n getViewZones() {\r\n const originalLineHeight = this._originalEditor.getOption(53 /* lineHeight */);\r\n const modifiedLineHeight = this._modifiedEditor.getOption(53 /* lineHeight */);\r\n const originalHasWrapping = (this._originalEditor.getOption(125 /* wrappingInfo */).wrappingColumn !== -1);\r\n const modifiedHasWrapping = (this._modifiedEditor.getOption(125 /* wrappingInfo */).wrappingColumn !== -1);\r\n const hasWrapping = (originalHasWrapping || modifiedHasWrapping);\r\n const originalModel = this._originalEditor.getModel();\r\n const originalCoordinatesConverter = this._originalEditor._getViewModel().coordinatesConverter;\r\n const modifiedCoordinatesConverter = this._modifiedEditor._getViewModel().coordinatesConverter;\r\n const result = {\r\n original: [],\r\n modified: []\r\n };\r\n let lineChangeModifiedLength = 0;\r\n let lineChangeOriginalLength = 0;\r\n let originalEquivalentLineNumber = 0;\r\n let modifiedEquivalentLineNumber = 0;\r\n let originalEndEquivalentLineNumber = 0;\r\n let modifiedEndEquivalentLineNumber = 0;\r\n const sortMyViewZones = (a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n };\r\n const addAndCombineIfPossible = (destination, item) => {\r\n if (item.domNode === null && destination.length > 0) {\r\n const lastItem = destination[destination.length - 1];\r\n if (lastItem.afterLineNumber === item.afterLineNumber && lastItem.domNode === null) {\r\n lastItem.heightInLines += item.heightInLines;\r\n return;\r\n }\r\n }\r\n destination.push(item);\r\n };\r\n const modifiedForeignVZ = new ForeignViewZonesIterator(this._modifiedForeignVZ);\r\n const originalForeignVZ = new ForeignViewZonesIterator(this._originalForeignVZ);\r\n let lastOriginalLineNumber = 1;\r\n let lastModifiedLineNumber = 1;\r\n // In order to include foreign view zones after the last line change, the for loop will iterate once more after the end of the `lineChanges` array\r\n for (let i = 0, length = this._lineChanges.length; i <= length; i++) {\r\n const lineChange = (i < length ? this._lineChanges[i] : null);\r\n if (lineChange !== null) {\r\n originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? ViewZonesComputer._getViewLineCount(this._originalEditor, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber) : 0);\r\n lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? ViewZonesComputer._getViewLineCount(this._modifiedEditor, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber) : 0);\r\n originalEndEquivalentLineNumber = Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n modifiedEndEquivalentLineNumber = Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n }\r\n else {\r\n // Increase to very large value to get the producing tests of foreign view zones running\r\n originalEquivalentLineNumber += 10000000 + lineChangeOriginalLength;\r\n modifiedEquivalentLineNumber += 10000000 + lineChangeModifiedLength;\r\n originalEndEquivalentLineNumber = originalEquivalentLineNumber;\r\n modifiedEndEquivalentLineNumber = modifiedEquivalentLineNumber;\r\n }\r\n // Each step produces view zones, and after producing them, we try to cancel them out, to avoid empty-empty view zone cases\r\n let stepOriginal = [];\r\n let stepModified = [];\r\n // ---------------------------- PRODUCE VIEW ZONES\r\n // [PRODUCE] View zones due to line mapping differences (equal lines but wrapped differently)\r\n if (hasWrapping) {\r\n let count;\r\n if (lineChange) {\r\n if (lineChange.originalEndLineNumber > 0) {\r\n count = lineChange.originalStartLineNumber - lastOriginalLineNumber;\r\n }\r\n else {\r\n count = lineChange.modifiedStartLineNumber - lastModifiedLineNumber;\r\n }\r\n }\r\n else {\r\n count = originalModel.getLineCount() - lastOriginalLineNumber;\r\n }\r\n for (let i = 0; i < count; i++) {\r\n const originalLineNumber = lastOriginalLineNumber + i;\r\n const modifiedLineNumber = lastModifiedLineNumber + i;\r\n const originalViewLineCount = originalCoordinatesConverter.getModelLineViewLineCount(originalLineNumber);\r\n const modifiedViewLineCount = modifiedCoordinatesConverter.getModelLineViewLineCount(modifiedLineNumber);\r\n if (originalViewLineCount < modifiedViewLineCount) {\r\n stepOriginal.push({\r\n afterLineNumber: originalLineNumber,\r\n heightInLines: modifiedViewLineCount - originalViewLineCount,\r\n domNode: null,\r\n marginDomNode: null\r\n });\r\n }\r\n else if (originalViewLineCount > modifiedViewLineCount) {\r\n stepModified.push({\r\n afterLineNumber: modifiedLineNumber,\r\n heightInLines: originalViewLineCount - modifiedViewLineCount,\r\n domNode: null,\r\n marginDomNode: null\r\n });\r\n }\r\n }\r\n if (lineChange) {\r\n lastOriginalLineNumber = (lineChange.originalEndLineNumber > 0 ? lineChange.originalEndLineNumber : lineChange.originalStartLineNumber) + 1;\r\n lastModifiedLineNumber = (lineChange.modifiedEndLineNumber > 0 ? lineChange.modifiedEndLineNumber : lineChange.modifiedStartLineNumber) + 1;\r\n }\r\n }\r\n // [PRODUCE] View zone(s) in original-side due to foreign view zone(s) in modified-side\r\n while (modifiedForeignVZ.current && modifiedForeignVZ.current.afterLineNumber <= modifiedEndEquivalentLineNumber) {\r\n let viewZoneLineNumber;\r\n if (modifiedForeignVZ.current.afterLineNumber <= modifiedEquivalentLineNumber) {\r\n viewZoneLineNumber = originalEquivalentLineNumber - modifiedEquivalentLineNumber + modifiedForeignVZ.current.afterLineNumber;\r\n }\r\n else {\r\n viewZoneLineNumber = originalEndEquivalentLineNumber;\r\n }\r\n let marginDomNode = null;\r\n if (lineChange && lineChange.modifiedStartLineNumber <= modifiedForeignVZ.current.afterLineNumber && modifiedForeignVZ.current.afterLineNumber <= lineChange.modifiedEndLineNumber) {\r\n marginDomNode = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion();\r\n }\r\n stepOriginal.push({\r\n afterLineNumber: viewZoneLineNumber,\r\n heightInLines: modifiedForeignVZ.current.height / modifiedLineHeight,\r\n domNode: null,\r\n marginDomNode: marginDomNode\r\n });\r\n modifiedForeignVZ.advance();\r\n }\r\n // [PRODUCE] View zone(s) in modified-side due to foreign view zone(s) in original-side\r\n while (originalForeignVZ.current && originalForeignVZ.current.afterLineNumber <= originalEndEquivalentLineNumber) {\r\n let viewZoneLineNumber;\r\n if (originalForeignVZ.current.afterLineNumber <= originalEquivalentLineNumber) {\r\n viewZoneLineNumber = modifiedEquivalentLineNumber - originalEquivalentLineNumber + originalForeignVZ.current.afterLineNumber;\r\n }\r\n else {\r\n viewZoneLineNumber = modifiedEndEquivalentLineNumber;\r\n }\r\n stepModified.push({\r\n afterLineNumber: viewZoneLineNumber,\r\n heightInLines: originalForeignVZ.current.height / originalLineHeight,\r\n domNode: null\r\n });\r\n originalForeignVZ.advance();\r\n }\r\n if (lineChange !== null && isChangeOrInsert(lineChange)) {\r\n const r = this._produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\r\n if (r) {\r\n stepOriginal.push(r);\r\n }\r\n }\r\n if (lineChange !== null && isChangeOrDelete(lineChange)) {\r\n const r = this._produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\r\n if (r) {\r\n stepModified.push(r);\r\n }\r\n }\r\n // ---------------------------- END PRODUCE VIEW ZONES\r\n // ---------------------------- EMIT MINIMAL VIEW ZONES\r\n // [CANCEL & EMIT] Try to cancel view zones out\r\n let stepOriginalIndex = 0;\r\n let stepModifiedIndex = 0;\r\n stepOriginal = stepOriginal.sort(sortMyViewZones);\r\n stepModified = stepModified.sort(sortMyViewZones);\r\n while (stepOriginalIndex < stepOriginal.length && stepModifiedIndex < stepModified.length) {\r\n const original = stepOriginal[stepOriginalIndex];\r\n const modified = stepModified[stepModifiedIndex];\r\n const originalDelta = original.afterLineNumber - originalEquivalentLineNumber;\r\n const modifiedDelta = modified.afterLineNumber - modifiedEquivalentLineNumber;\r\n if (originalDelta < modifiedDelta) {\r\n addAndCombineIfPossible(result.original, original);\r\n stepOriginalIndex++;\r\n }\r\n else if (modifiedDelta < originalDelta) {\r\n addAndCombineIfPossible(result.modified, modified);\r\n stepModifiedIndex++;\r\n }\r\n else if (original.shouldNotShrink) {\r\n addAndCombineIfPossible(result.original, original);\r\n stepOriginalIndex++;\r\n }\r\n else if (modified.shouldNotShrink) {\r\n addAndCombineIfPossible(result.modified, modified);\r\n stepModifiedIndex++;\r\n }\r\n else {\r\n if (original.heightInLines >= modified.heightInLines) {\r\n // modified view zone gets removed\r\n original.heightInLines -= modified.heightInLines;\r\n stepModifiedIndex++;\r\n }\r\n else {\r\n // original view zone gets removed\r\n modified.heightInLines -= original.heightInLines;\r\n stepOriginalIndex++;\r\n }\r\n }\r\n }\r\n // [EMIT] Remaining original view zones\r\n while (stepOriginalIndex < stepOriginal.length) {\r\n addAndCombineIfPossible(result.original, stepOriginal[stepOriginalIndex]);\r\n stepOriginalIndex++;\r\n }\r\n // [EMIT] Remaining modified view zones\r\n while (stepModifiedIndex < stepModified.length) {\r\n addAndCombineIfPossible(result.modified, stepModified[stepModifiedIndex]);\r\n stepModifiedIndex++;\r\n }\r\n // ---------------------------- END EMIT MINIMAL VIEW ZONES\r\n }\r\n return {\r\n original: ViewZonesComputer._ensureDomNodes(result.original),\r\n modified: ViewZonesComputer._ensureDomNodes(result.modified),\r\n };\r\n }\r\n static _ensureDomNodes(zones) {\r\n return zones.map((z) => {\r\n if (!z.domNode) {\r\n z.domNode = createFakeLinesDiv();\r\n }\r\n return z;\r\n });\r\n }\r\n}\r\nfunction createDecoration(startLineNumber, startColumn, endLineNumber, endColumn, options) {\r\n return {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(startLineNumber, startColumn, endLineNumber, endColumn),\r\n options: options\r\n };\r\n}\r\nconst DECORATIONS = {\r\n charDelete: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'char-delete'\r\n }),\r\n charDeleteWholeLine: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'char-delete',\r\n isWholeLine: true\r\n }),\r\n charInsert: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'char-insert'\r\n }),\r\n charInsertWholeLine: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'char-insert',\r\n isWholeLine: true\r\n }),\r\n lineInsert: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'line-insert',\r\n marginClassName: 'line-insert',\r\n isWholeLine: true\r\n }),\r\n lineInsertWithSign: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'line-insert',\r\n linesDecorationsClassName: 'insert-sign ' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.ThemeIcon.asClassName(diffInsertIcon),\r\n marginClassName: 'line-insert',\r\n isWholeLine: true\r\n }),\r\n lineDelete: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'line-delete',\r\n marginClassName: 'line-delete',\r\n isWholeLine: true\r\n }),\r\n lineDeleteWithSign: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n className: 'line-delete',\r\n linesDecorationsClassName: 'delete-sign ' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.ThemeIcon.asClassName(diffRemoveIcon),\r\n marginClassName: 'line-delete',\r\n isWholeLine: true\r\n }),\r\n lineDeleteMargin: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_17__.ModelDecorationOptions.register({\r\n marginClassName: 'line-delete',\r\n })\r\n};\r\nclass DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle {\r\n constructor(dataSource, enableSplitViewResizing) {\r\n super(dataSource);\r\n this._disableSash = (enableSplitViewResizing === false);\r\n this._sashRatio = null;\r\n this._sashPosition = null;\r\n this._startSashPosition = null;\r\n this._sash = this._register(new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_4__.Sash(this._dataSource.getContainerDomNode(), this, { orientation: 0 /* VERTICAL */ }));\r\n if (this._disableSash) {\r\n this._sash.state = 0 /* Disabled */;\r\n }\r\n this._sash.onDidStart(() => this._onSashDragStart());\r\n this._sash.onDidChange((e) => this._onSashDrag(e));\r\n this._sash.onDidEnd(() => this._onSashDragEnd());\r\n this._sash.onDidReset(() => this._onSashReset());\r\n }\r\n setEnableSplitViewResizing(enableSplitViewResizing) {\r\n const newDisableSash = (enableSplitViewResizing === false);\r\n if (this._disableSash !== newDisableSash) {\r\n this._disableSash = newDisableSash;\r\n this._sash.state = this._disableSash ? 0 /* Disabled */ : 3 /* Enabled */;\r\n }\r\n }\r\n layout(sashRatio = this._sashRatio) {\r\n const w = this._dataSource.getWidth();\r\n const contentWidth = w - (this._dataSource.getOptions().renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0);\r\n let sashPosition = Math.floor((sashRatio || 0.5) * contentWidth);\r\n const midPoint = Math.floor(0.5 * contentWidth);\r\n sashPosition = this._disableSash ? midPoint : sashPosition || midPoint;\r\n if (contentWidth > DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH * 2) {\r\n if (sashPosition < DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\r\n sashPosition = DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\r\n }\r\n if (sashPosition > contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\r\n sashPosition = contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\r\n }\r\n }\r\n else {\r\n sashPosition = midPoint;\r\n }\r\n if (this._sashPosition !== sashPosition) {\r\n this._sashPosition = sashPosition;\r\n this._sash.layout();\r\n }\r\n return this._sashPosition;\r\n }\r\n _onSashDragStart() {\r\n this._startSashPosition = this._sashPosition;\r\n }\r\n _onSashDrag(e) {\r\n const w = this._dataSource.getWidth();\r\n const contentWidth = w - (this._dataSource.getOptions().renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0);\r\n const sashPosition = this.layout((this._startSashPosition + (e.currentX - e.startX)) / contentWidth);\r\n this._sashRatio = sashPosition / contentWidth;\r\n this._dataSource.relayoutEditors();\r\n }\r\n _onSashDragEnd() {\r\n this._sash.layout();\r\n }\r\n _onSashReset() {\r\n this._sashRatio = 0.5;\r\n this._dataSource.relayoutEditors();\r\n this._sash.layout();\r\n }\r\n getVerticalSashTop(sash) {\r\n return 0;\r\n }\r\n getVerticalSashLeft(sash) {\r\n return this._sashPosition;\r\n }\r\n getVerticalSashHeight(sash) {\r\n return this._dataSource.getHeight();\r\n }\r\n _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const c = new SideBySideViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n return c.getViewZones();\r\n }\r\n _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const overviewZoneColor = String(this._removeColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const originalModel = originalEditor.getModel();\r\n const originalViewModel = originalEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n if (isChangeOrDelete(lineChange)) {\r\n result.decorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete)\r\n });\r\n if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) {\r\n result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charDeleteWholeLine));\r\n }\r\n const viewRange = getViewRange(originalModel, originalViewModel, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_19__.OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrDelete(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.originalStartLineNumber; lineNumber <= charChange.originalEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.originalStartLineNumber) {\r\n startColumn = charChange.originalStartColumn;\r\n }\r\n else {\r\n startColumn = originalModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.originalEndLineNumber) {\r\n endColumn = charChange.originalEndColumn;\r\n }\r\n else {\r\n endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const overviewZoneColor = String(this._insertColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const modifiedModel = modifiedEditor.getModel();\r\n const modifiedViewModel = modifiedEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n if (isChangeOrInsert(lineChange)) {\r\n result.decorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\r\n });\r\n if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) {\r\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine));\r\n }\r\n const viewRange = getViewRange(modifiedModel, modifiedViewModel, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_19__.OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrInsert(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.modifiedStartLineNumber) {\r\n startColumn = charChange.modifiedStartColumn;\r\n }\r\n else {\r\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.modifiedEndLineNumber) {\r\n endColumn = charChange.modifiedEndColumn;\r\n }\r\n else {\r\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\nDiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH = 100;\r\nclass SideBySideViewZonesComputer extends ViewZonesComputer {\r\n constructor(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor) {\r\n super(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n }\r\n _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() {\r\n return null;\r\n }\r\n _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n if (lineChangeModifiedLength > lineChangeOriginalLength) {\r\n return {\r\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\r\n heightInLines: (lineChangeModifiedLength - lineChangeOriginalLength),\r\n domNode: null\r\n };\r\n }\r\n return null;\r\n }\r\n _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n if (lineChangeOriginalLength > lineChangeModifiedLength) {\r\n return {\r\n afterLineNumber: Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber),\r\n heightInLines: (lineChangeOriginalLength - lineChangeModifiedLength),\r\n domNode: null\r\n };\r\n }\r\n return null;\r\n }\r\n}\r\nclass DiffEditorWidgetInline extends DiffEditorWidgetStyle {\r\n constructor(dataSource, enableSplitViewResizing) {\r\n super(dataSource);\r\n this._decorationsLeft = dataSource.getOriginalEditor().getLayoutInfo().decorationsLeft;\r\n this._register(dataSource.getOriginalEditor().onDidLayoutChange((layoutInfo) => {\r\n if (this._decorationsLeft !== layoutInfo.decorationsLeft) {\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n dataSource.relayoutEditors();\r\n }\r\n }));\r\n }\r\n setEnableSplitViewResizing(enableSplitViewResizing) {\r\n // Nothing to do..\r\n }\r\n _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ, renderIndicators) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const computer = new InlineViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators);\r\n return computer.getViewZones();\r\n }\r\n _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const overviewZoneColor = String(this._removeColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const originalModel = originalEditor.getModel();\r\n const originalViewModel = originalEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n // Add overview zones in the overview ruler\r\n if (isChangeOrDelete(lineChange)) {\r\n result.decorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: DECORATIONS.lineDeleteMargin\r\n });\r\n const viewRange = getViewRange(originalModel, originalViewModel, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_19__.OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n }\r\n }\r\n return result;\r\n }\r\n _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const overviewZoneColor = String(this._insertColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const modifiedModel = modifiedEditor.getModel();\r\n const modifiedViewModel = modifiedEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n // Add decorations & overview zones\r\n if (isChangeOrInsert(lineChange)) {\r\n result.decorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\r\n });\r\n const viewRange = getViewRange(modifiedModel, modifiedViewModel, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_19__.OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrInsert(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.modifiedStartLineNumber) {\r\n startColumn = charChange.modifiedStartColumn;\r\n }\r\n else {\r\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.modifiedEndLineNumber) {\r\n endColumn = charChange.modifiedEndColumn;\r\n }\r\n else {\r\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine));\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n layout() {\r\n // An editor should not be smaller than 5px\r\n return Math.max(5, this._decorationsLeft);\r\n }\r\n}\r\nclass InlineViewZonesComputer extends ViewZonesComputer {\r\n constructor(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) {\r\n super(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n this._originalModel = originalEditor.getModel();\r\n this._renderIndicators = renderIndicators;\r\n this._pendingLineChange = [];\r\n this._pendingViewZones = [];\r\n this._lineBreaksComputer = this._modifiedEditor._getViewModel().createLineBreaksComputer();\r\n }\r\n getViewZones() {\r\n const result = super.getViewZones();\r\n this._finalize(result);\r\n return result;\r\n }\r\n _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() {\r\n const result = document.createElement('div');\r\n result.className = 'inline-added-margin-view-zone';\r\n return result;\r\n }\r\n _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n const marginDomNode = document.createElement('div');\r\n marginDomNode.className = 'inline-added-margin-view-zone';\r\n return {\r\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\r\n heightInLines: lineChangeModifiedLength,\r\n domNode: document.createElement('div'),\r\n marginDomNode: marginDomNode\r\n };\r\n }\r\n _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n const domNode = document.createElement('div');\r\n domNode.className = `view-lines line-delete ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_37__.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;\r\n const marginDomNode = document.createElement('div');\r\n marginDomNode.className = 'inline-deleted-margin-view-zone';\r\n const viewZone = {\r\n shouldNotShrink: true,\r\n afterLineNumber: (lineChange.modifiedEndLineNumber === 0 ? lineChange.modifiedStartLineNumber : lineChange.modifiedStartLineNumber - 1),\r\n heightInLines: lineChangeOriginalLength,\r\n minWidthInPx: 0,\r\n domNode: domNode,\r\n marginDomNode: marginDomNode,\r\n diff: {\r\n originalStartLineNumber: lineChange.originalStartLineNumber,\r\n originalEndLineNumber: lineChange.originalEndLineNumber,\r\n modifiedStartLineNumber: lineChange.modifiedStartLineNumber,\r\n modifiedEndLineNumber: lineChange.modifiedEndLineNumber,\r\n originalModel: this._originalModel,\r\n viewLineCounts: null,\r\n }\r\n };\r\n for (let lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) {\r\n this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(lineNumber), null);\r\n }\r\n this._pendingLineChange.push(lineChange);\r\n this._pendingViewZones.push(viewZone);\r\n return viewZone;\r\n }\r\n _finalize(result) {\r\n const modifiedEditorOptions = this._modifiedEditor.getOptions();\r\n const tabSize = this._modifiedEditor.getModel().getOptions().tabSize;\r\n const fontInfo = modifiedEditorOptions.get(38 /* fontInfo */);\r\n const disableMonospaceOptimizations = modifiedEditorOptions.get(26 /* disableMonospaceOptimizations */);\r\n const typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n const scrollBeyondLastColumn = modifiedEditorOptions.get(88 /* scrollBeyondLastColumn */);\r\n const mightContainNonBasicASCII = this._originalModel.mightContainNonBasicASCII();\r\n const mightContainRTL = this._originalModel.mightContainRTL();\r\n const lineHeight = modifiedEditorOptions.get(53 /* lineHeight */);\r\n const layoutInfo = modifiedEditorOptions.get(124 /* layoutInfo */);\r\n const lineDecorationsWidth = layoutInfo.decorationsWidth;\r\n const stopRenderingLineAfter = modifiedEditorOptions.get(100 /* stopRenderingLineAfter */);\r\n const renderWhitespace = modifiedEditorOptions.get(83 /* renderWhitespace */);\r\n const renderControlCharacters = modifiedEditorOptions.get(77 /* renderControlCharacters */);\r\n const fontLigatures = modifiedEditorOptions.get(39 /* fontLigatures */);\r\n const lineBreaks = this._lineBreaksComputer.finalize();\r\n let lineBreakIndex = 0;\r\n for (let i = 0; i < this._pendingLineChange.length; i++) {\r\n const lineChange = this._pendingLineChange[i];\r\n const viewZone = this._pendingViewZones[i];\r\n const domNode = viewZone.domNode;\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__.Configuration.applyFontInfoSlow(domNode, fontInfo);\r\n const marginDomNode = viewZone.marginDomNode;\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__.Configuration.applyFontInfoSlow(marginDomNode, fontInfo);\r\n const decorations = [];\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrDelete(charChange)) {\r\n decorations.push(new _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_22__.InlineDecoration(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn), 'char-delete', 0 /* Regular */));\r\n }\r\n }\r\n }\r\n const hasCharChanges = (decorations.length > 0);\r\n const sb = (0,_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_15__.createStringBuilder)(10000);\r\n let maxCharsPerLine = 0;\r\n let renderedLineCount = 0;\r\n let viewLineCounts = null;\r\n for (let lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - lineChange.originalStartLineNumber;\r\n const lineTokens = this._originalModel.getLineTokens(lineNumber);\r\n const lineContent = lineTokens.getLineContent();\r\n const lineBreakData = lineBreaks[lineBreakIndex++];\r\n const actualDecorations = _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_20__.LineDecoration.filter(decorations, lineNumber, 1, lineContent.length + 1);\r\n if (lineBreakData) {\r\n let lastBreakOffset = 0;\r\n for (const breakOffset of lineBreakData.breakOffsets) {\r\n const viewLineTokens = lineTokens.sliceAndInflate(lastBreakOffset, breakOffset, 0);\r\n const viewLineContent = lineContent.substring(lastBreakOffset, breakOffset);\r\n maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(renderedLineCount++, viewLineContent, viewLineTokens, _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_20__.LineDecoration.extractWrapped(actualDecorations, lastBreakOffset, breakOffset), hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode));\r\n lastBreakOffset = breakOffset;\r\n }\r\n if (!viewLineCounts) {\r\n viewLineCounts = [];\r\n }\r\n // make sure all lines before this one have an entry in `viewLineCounts`\r\n while (viewLineCounts.length < lineIndex) {\r\n viewLineCounts[viewLineCounts.length] = 1;\r\n }\r\n viewLineCounts[lineIndex] = lineBreakData.breakOffsets.length;\r\n viewZone.heightInLines += (lineBreakData.breakOffsets.length - 1);\r\n const marginDomNode2 = document.createElement('div');\r\n marginDomNode2.className = 'line-delete';\r\n result.original.push({\r\n afterLineNumber: lineNumber,\r\n afterColumn: 0,\r\n heightInLines: lineBreakData.breakOffsets.length - 1,\r\n domNode: createFakeLinesDiv(),\r\n marginDomNode: marginDomNode2\r\n });\r\n }\r\n else {\r\n maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(renderedLineCount++, lineContent, lineTokens, actualDecorations, hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode));\r\n }\r\n }\r\n maxCharsPerLine += scrollBeyondLastColumn;\r\n const html = sb.build();\r\n const trustedhtml = ttPolicy ? ttPolicy.createHTML(html) : html;\r\n domNode.innerHTML = trustedhtml;\r\n viewZone.minWidthInPx = (maxCharsPerLine * typicalHalfwidthCharacterWidth);\r\n if (viewLineCounts) {\r\n // make sure all lines have an entry in `viewLineCounts`\r\n const cnt = lineChange.originalEndLineNumber - lineChange.originalStartLineNumber;\r\n while (viewLineCounts.length <= cnt) {\r\n viewLineCounts[viewLineCounts.length] = 1;\r\n }\r\n }\r\n viewZone.diff.viewLineCounts = viewLineCounts;\r\n }\r\n result.original.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n }\r\n _renderOriginalLine(renderedLineCount, lineContent, lineTokens, decorations, hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode) {\r\n sb.appendASCIIString('<div class=\"view-line');\r\n if (!hasCharChanges) {\r\n // No char changes\r\n sb.appendASCIIString(' char-delete');\r\n }\r\n sb.appendASCIIString('\" style=\"top:');\r\n sb.appendASCIIString(String(renderedLineCount * lineHeight));\r\n sb.appendASCIIString('px;width:1000000px;\">');\r\n const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_22__.ViewLineRenderingData.isBasicASCII(lineContent, mightContainNonBasicASCII);\r\n const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_22__.ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, mightContainRTL);\r\n const output = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_21__.renderViewLine)(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_21__.RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, decorations, tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.EditorFontLigatures.OFF, null // Send no selections, original line cannot be selected\r\n ), sb);\r\n sb.appendASCIIString('</div>');\r\n if (this._renderIndicators) {\r\n const marginElement = document.createElement('div');\r\n marginElement.className = `delete-sign ${_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.ThemeIcon.asClassName(diffRemoveIcon)}`;\r\n marginElement.setAttribute('style', `position:absolute;top:${renderedLineCount * lineHeight}px;width:${lineDecorationsWidth}px;height:${lineHeight}px;right:0;`);\r\n marginDomNode.appendChild(marginElement);\r\n }\r\n const absoluteOffsets = output.characterMapping.getAbsoluteOffsets();\r\n return absoluteOffsets.length > 0 ? absoluteOffsets[absoluteOffsets.length - 1] : 0;\r\n }\r\n}\r\nfunction validateDiffWordWrap(value, defaultValue) {\r\n return (0,_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_13__.stringSet)(value, defaultValue, ['off', 'on', 'inherit']);\r\n}\r\nfunction isChangeOrInsert(lineChange) {\r\n return lineChange.modifiedEndLineNumber > 0;\r\n}\r\nfunction isChangeOrDelete(lineChange) {\r\n return lineChange.originalEndLineNumber > 0;\r\n}\r\nfunction createFakeLinesDiv() {\r\n const r = document.createElement('div');\r\n r.className = 'diagonal-fill';\r\n return r;\r\n}\r\nfunction getViewRange(model, viewModel, startLineNumber, endLineNumber) {\r\n const lineCount = model.getLineCount();\r\n startLineNumber = Math.min(lineCount, Math.max(1, startLineNumber));\r\n endLineNumber = Math.min(lineCount, Math.max(1, endLineNumber));\r\n return viewModel.coordinatesConverter.convertModelRangeToViewRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range(startLineNumber, model.getLineMinColumn(startLineNumber), endLineNumber, model.getLineMaxColumn(endLineNumber)));\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_28__.registerThemingParticipant)((theme, collector) => {\r\n const added = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffInserted);\r\n if (added) {\r\n collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${added}; }`);\r\n collector.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${added}; }`);\r\n collector.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${added}; }`);\r\n }\r\n const removed = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffRemoved);\r\n if (removed) {\r\n collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${removed}; }`);\r\n collector.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${removed}; }`);\r\n collector.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${removed}; }`);\r\n }\r\n const addedOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffInsertedOutline);\r\n if (addedOutline) {\r\n collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${addedOutline}; }`);\r\n }\r\n const removedOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffRemovedOutline);\r\n if (removedOutline) {\r\n collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${removedOutline}; }`);\r\n }\r\n const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`);\r\n }\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${border}; }`);\r\n }\r\n const scrollbarSliderBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.scrollbarSliderBackground);\r\n if (scrollbarSliderBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${scrollbarSliderBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const scrollbarSliderHoverBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.scrollbarSliderHoverBackground);\r\n if (scrollbarSliderHoverBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${scrollbarSliderHoverBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const scrollbarSliderActiveBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.scrollbarSliderActiveBackground);\r\n if (scrollbarSliderActiveBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${scrollbarSliderActiveBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const diffDiagonalFillColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_27__.diffDiagonalFill);\r\n collector.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${diffDiagonalFillColor} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`);\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiffNavigator\": () => (/* binding */ DiffNavigator)\n/* harmony export */ });\n/* harmony import */ var _base_common_assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/assert.js */ \"./node_modules/monaco-editor/esm/vs/base/common/assert.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst defaultOptions = {\r\n followsCaret: true,\r\n ignoreCharChanges: true,\r\n alwaysRevealFirst: true\r\n};\r\n/**\r\n * Create a new diff navigator for the provided diff editor.\r\n */\r\nclass DiffNavigator extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(editor, options = {}) {\r\n super();\r\n this._onDidUpdate = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this._editor = editor;\r\n this._options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.mixin(options, defaultOptions, false);\r\n this.disposed = false;\r\n this.nextIdx = -1;\r\n this.ranges = [];\r\n this.ignoreSelectionChange = false;\r\n this.revealFirst = Boolean(this._options.alwaysRevealFirst);\r\n // hook up to diff editor for diff, disposal, and caret move\r\n this._register(this._editor.onDidDispose(() => this.dispose()));\r\n this._register(this._editor.onDidUpdateDiff(() => this._onDiffUpdated()));\r\n if (this._options.followsCaret) {\r\n this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e) => {\r\n if (this.ignoreSelectionChange) {\r\n return;\r\n }\r\n this.nextIdx = -1;\r\n }));\r\n }\r\n if (this._options.alwaysRevealFirst) {\r\n this._register(this._editor.getModifiedEditor().onDidChangeModel((e) => {\r\n this.revealFirst = true;\r\n }));\r\n }\r\n // init things\r\n this._init();\r\n }\r\n _init() {\r\n let changes = this._editor.getLineChanges();\r\n if (!changes) {\r\n return;\r\n }\r\n }\r\n _onDiffUpdated() {\r\n this._init();\r\n this._compute(this._editor.getLineChanges());\r\n if (this.revealFirst) {\r\n // Only reveal first on first non-null changes\r\n if (this._editor.getLineChanges() !== null) {\r\n this.revealFirst = false;\r\n this.nextIdx = -1;\r\n this.next(1 /* Immediate */);\r\n }\r\n }\r\n }\r\n _compute(lineChanges) {\r\n // new ranges\r\n this.ranges = [];\r\n if (lineChanges) {\r\n // create ranges from changes\r\n lineChanges.forEach((lineChange) => {\r\n if (!this._options.ignoreCharChanges && lineChange.charChanges) {\r\n lineChange.charChanges.forEach((charChange) => {\r\n this.ranges.push({\r\n rhs: true,\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn)\r\n });\r\n });\r\n }\r\n else {\r\n this.ranges.push({\r\n rhs: true,\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedStartLineNumber, 1)\r\n });\r\n }\r\n });\r\n }\r\n // sort\r\n this.ranges.sort((left, right) => {\r\n if (left.range.getStartPosition().isBeforeOrEqual(right.range.getStartPosition())) {\r\n return -1;\r\n }\r\n else if (right.range.getStartPosition().isBeforeOrEqual(left.range.getStartPosition())) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n this._onDidUpdate.fire(this);\r\n }\r\n _initIdx(fwd) {\r\n let found = false;\r\n let position = this._editor.getPosition();\r\n if (!position) {\r\n this.nextIdx = 0;\r\n return;\r\n }\r\n for (let i = 0, len = this.ranges.length; i < len && !found; i++) {\r\n let range = this.ranges[i].range;\r\n if (position.isBeforeOrEqual(range.getStartPosition())) {\r\n this.nextIdx = i + (fwd ? 0 : -1);\r\n found = true;\r\n }\r\n }\r\n if (!found) {\r\n // after the last change\r\n this.nextIdx = fwd ? 0 : this.ranges.length - 1;\r\n }\r\n if (this.nextIdx < 0) {\r\n this.nextIdx = this.ranges.length - 1;\r\n }\r\n }\r\n _move(fwd, scrollType) {\r\n _base_common_assert_js__WEBPACK_IMPORTED_MODULE_0__.ok(!this.disposed, 'Illegal State - diff navigator has been disposed');\r\n if (!this.canNavigate()) {\r\n return;\r\n }\r\n if (this.nextIdx === -1) {\r\n this._initIdx(fwd);\r\n }\r\n else if (fwd) {\r\n this.nextIdx += 1;\r\n if (this.nextIdx >= this.ranges.length) {\r\n this.nextIdx = 0;\r\n }\r\n }\r\n else {\r\n this.nextIdx -= 1;\r\n if (this.nextIdx < 0) {\r\n this.nextIdx = this.ranges.length - 1;\r\n }\r\n }\r\n let info = this.ranges[this.nextIdx];\r\n this.ignoreSelectionChange = true;\r\n try {\r\n let pos = info.range.getStartPosition();\r\n this._editor.setPosition(pos);\r\n this._editor.revealPositionInCenter(pos, scrollType);\r\n }\r\n finally {\r\n this.ignoreSelectionChange = false;\r\n }\r\n }\r\n canNavigate() {\r\n return this.ranges && this.ranges.length > 0;\r\n }\r\n next(scrollType = 0 /* Smooth */) {\r\n this._move(true, scrollType);\r\n }\r\n previous(scrollType = 0 /* Smooth */) {\r\n this._move(false, scrollType);\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.ranges = [];\r\n this.disposed = true;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiffReview\": () => (/* binding */ DiffReview)\n/* harmony export */ });\n/* harmony import */ var _media_diffReview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/diffReview.css */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/lineTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js\");\n/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst DIFF_LINES_PADDING = 3;\r\nclass DiffEntry {\r\n constructor(originalLineStart, originalLineEnd, modifiedLineStart, modifiedLineEnd) {\r\n this.originalLineStart = originalLineStart;\r\n this.originalLineEnd = originalLineEnd;\r\n this.modifiedLineStart = modifiedLineStart;\r\n this.modifiedLineEnd = modifiedLineEnd;\r\n }\r\n getType() {\r\n if (this.originalLineStart === 0) {\r\n return 1 /* Insert */;\r\n }\r\n if (this.modifiedLineStart === 0) {\r\n return 2 /* Delete */;\r\n }\r\n return 0 /* Equal */;\r\n }\r\n}\r\nclass Diff {\r\n constructor(entries) {\r\n this.entries = entries;\r\n }\r\n}\r\nconst diffReviewInsertIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_21__.registerIcon)('diff-review-insert', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__.Codicon.add, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('diffReviewInsertIcon', 'Icon for \\'Insert\\' in diff review.'));\r\nconst diffReviewRemoveIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_21__.registerIcon)('diff-review-remove', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__.Codicon.remove, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('diffReviewRemoveIcon', 'Icon for \\'Remove\\' in diff review.'));\r\nconst diffReviewCloseIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_21__.registerIcon)('diff-review-close', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__.Codicon.close, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('diffReviewCloseIcon', 'Icon for \\'Close\\' in diff review.'));\r\nclass DiffReview extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(diffEditor) {\r\n super();\r\n this._width = 0;\r\n this._diffEditor = diffEditor;\r\n this._isVisible = false;\r\n this.shadow = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this.shadow.setClassName('diff-review-shadow');\r\n this.actionBarContainer = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this.actionBarContainer.setClassName('diff-review-actions');\r\n this._actionBar = this._register(new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_4__.ActionBar(this.actionBarContainer.domNode));\r\n this._actionBar.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.Action('diffreview.close', _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.close', \"Close\"), 'close-diff-review ' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.ThemeIcon.asClassName(diffReviewCloseIcon), true, () => {\r\n this.hide();\r\n return Promise.resolve(null);\r\n }), { label: false, icon: true });\r\n this.domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this.domNode.setClassName('diff-review monaco-editor-background');\r\n this._content = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__.createFastDomNode)(document.createElement('div'));\r\n this._content.setClassName('diff-review-content');\r\n this._content.setAttribute('role', 'code');\r\n this.scrollbar = this._register(new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__.DomScrollableElement(this._content.domNode, {}));\r\n this.domNode.domNode.appendChild(this.scrollbar.getDomNode());\r\n this._register(diffEditor.onDidUpdateDiff(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._diffs = this._compute();\r\n this._render();\r\n }));\r\n this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._render();\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addStandardDisposableListener(this.domNode.domNode, 'click', (e) => {\r\n e.preventDefault();\r\n let row = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.findParentWithClass(e.target, 'diff-review-row');\r\n if (row) {\r\n this._goToRow(row);\r\n }\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addStandardDisposableListener(this.domNode.domNode, 'keydown', (e) => {\r\n if (e.equals(18 /* DownArrow */)\r\n || e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)\r\n || e.equals(512 /* Alt */ | 18 /* DownArrow */)) {\r\n e.preventDefault();\r\n this._goToRow(this._getNextRow());\r\n }\r\n if (e.equals(16 /* UpArrow */)\r\n || e.equals(2048 /* CtrlCmd */ | 16 /* UpArrow */)\r\n || e.equals(512 /* Alt */ | 16 /* UpArrow */)) {\r\n e.preventDefault();\r\n this._goToRow(this._getPrevRow());\r\n }\r\n if (e.equals(9 /* Escape */)\r\n || e.equals(2048 /* CtrlCmd */ | 9 /* Escape */)\r\n || e.equals(512 /* Alt */ | 9 /* Escape */)\r\n || e.equals(1024 /* Shift */ | 9 /* Escape */)) {\r\n e.preventDefault();\r\n this.hide();\r\n }\r\n if (e.equals(10 /* Space */)\r\n || e.equals(3 /* Enter */)) {\r\n e.preventDefault();\r\n this.accept();\r\n }\r\n }));\r\n this._diffs = [];\r\n this._currentDiff = null;\r\n }\r\n prev() {\r\n let index = 0;\r\n if (!this._isVisible) {\r\n this._diffs = this._compute();\r\n }\r\n if (this._isVisible) {\r\n let currentIndex = -1;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n if (this._diffs[i] === this._currentDiff) {\r\n currentIndex = i;\r\n break;\r\n }\r\n }\r\n index = (this._diffs.length + currentIndex - 1);\r\n }\r\n else {\r\n index = this._findDiffIndex(this._diffEditor.getPosition());\r\n }\r\n if (this._diffs.length === 0) {\r\n // Nothing to do\r\n return;\r\n }\r\n index = index % this._diffs.length;\r\n const entries = this._diffs[index].entries;\r\n this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__.Position(entries[0].modifiedLineStart, 1));\r\n this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });\r\n this._isVisible = true;\r\n this._diffEditor.doLayout();\r\n this._render();\r\n this._goToRow(this._getNextRow());\r\n }\r\n next() {\r\n let index = 0;\r\n if (!this._isVisible) {\r\n this._diffs = this._compute();\r\n }\r\n if (this._isVisible) {\r\n let currentIndex = -1;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n if (this._diffs[i] === this._currentDiff) {\r\n currentIndex = i;\r\n break;\r\n }\r\n }\r\n index = (currentIndex + 1);\r\n }\r\n else {\r\n index = this._findDiffIndex(this._diffEditor.getPosition());\r\n }\r\n if (this._diffs.length === 0) {\r\n // Nothing to do\r\n return;\r\n }\r\n index = index % this._diffs.length;\r\n const entries = this._diffs[index].entries;\r\n this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__.Position(entries[0].modifiedLineStart, 1));\r\n this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });\r\n this._isVisible = true;\r\n this._diffEditor.doLayout();\r\n this._render();\r\n this._goToRow(this._getNextRow());\r\n }\r\n accept() {\r\n let jumpToLineNumber = -1;\r\n let current = this._getCurrentFocusedRow();\r\n if (current) {\r\n let lineNumber = parseInt(current.getAttribute('data-line'), 10);\r\n if (!isNaN(lineNumber)) {\r\n jumpToLineNumber = lineNumber;\r\n }\r\n }\r\n this.hide();\r\n if (jumpToLineNumber !== -1) {\r\n this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__.Position(jumpToLineNumber, 1));\r\n this._diffEditor.revealPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__.Position(jumpToLineNumber, 1), 1 /* Immediate */);\r\n }\r\n }\r\n hide() {\r\n this._isVisible = false;\r\n this._diffEditor.updateOptions({ readOnly: false });\r\n this._diffEditor.focus();\r\n this._diffEditor.doLayout();\r\n this._render();\r\n }\r\n _getPrevRow() {\r\n let current = this._getCurrentFocusedRow();\r\n if (!current) {\r\n return this._getFirstRow();\r\n }\r\n if (current.previousElementSibling) {\r\n return current.previousElementSibling;\r\n }\r\n return current;\r\n }\r\n _getNextRow() {\r\n let current = this._getCurrentFocusedRow();\r\n if (!current) {\r\n return this._getFirstRow();\r\n }\r\n if (current.nextElementSibling) {\r\n return current.nextElementSibling;\r\n }\r\n return current;\r\n }\r\n _getFirstRow() {\r\n return this.domNode.domNode.querySelector('.diff-review-row');\r\n }\r\n _getCurrentFocusedRow() {\r\n let result = document.activeElement;\r\n if (result && /diff-review-row/.test(result.className)) {\r\n return result;\r\n }\r\n return null;\r\n }\r\n _goToRow(row) {\r\n let prev = this._getCurrentFocusedRow();\r\n row.tabIndex = 0;\r\n row.focus();\r\n if (prev && prev !== row) {\r\n prev.tabIndex = -1;\r\n }\r\n this.scrollbar.scanDomNode();\r\n }\r\n isVisible() {\r\n return this._isVisible;\r\n }\r\n layout(top, width, height) {\r\n this._width = width;\r\n this.shadow.setTop(top - 6);\r\n this.shadow.setWidth(width);\r\n this.shadow.setHeight(this._isVisible ? 6 : 0);\r\n this.domNode.setTop(top);\r\n this.domNode.setWidth(width);\r\n this.domNode.setHeight(height);\r\n this._content.setHeight(height);\r\n this._content.setWidth(width);\r\n if (this._isVisible) {\r\n this.actionBarContainer.setAttribute('aria-hidden', 'false');\r\n this.actionBarContainer.setDisplay('block');\r\n }\r\n else {\r\n this.actionBarContainer.setAttribute('aria-hidden', 'true');\r\n this.actionBarContainer.setDisplay('none');\r\n }\r\n }\r\n _compute() {\r\n const lineChanges = this._diffEditor.getLineChanges();\r\n if (!lineChanges || lineChanges.length === 0) {\r\n return [];\r\n }\r\n const originalModel = this._diffEditor.getOriginalEditor().getModel();\r\n const modifiedModel = this._diffEditor.getModifiedEditor().getModel();\r\n if (!originalModel || !modifiedModel) {\r\n return [];\r\n }\r\n return DiffReview._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount());\r\n }\r\n static _mergeAdjacent(lineChanges, originalLineCount, modifiedLineCount) {\r\n if (!lineChanges || lineChanges.length === 0) {\r\n return [];\r\n }\r\n let diffs = [], diffsLength = 0;\r\n for (let i = 0, len = lineChanges.length; i < len; i++) {\r\n const lineChange = lineChanges[i];\r\n const originalStart = lineChange.originalStartLineNumber;\r\n const originalEnd = lineChange.originalEndLineNumber;\r\n const modifiedStart = lineChange.modifiedStartLineNumber;\r\n const modifiedEnd = lineChange.modifiedEndLineNumber;\r\n let r = [], rLength = 0;\r\n // Emit before anchors\r\n {\r\n const originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1);\r\n const modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1);\r\n // Make sure we don't step into the previous diff\r\n let minOriginal = 1;\r\n let minModified = 1;\r\n if (i > 0) {\r\n const prevLineChange = lineChanges[i - 1];\r\n if (prevLineChange.originalEndLineNumber === 0) {\r\n minOriginal = prevLineChange.originalStartLineNumber + 1;\r\n }\r\n else {\r\n minOriginal = prevLineChange.originalEndLineNumber + 1;\r\n }\r\n if (prevLineChange.modifiedEndLineNumber === 0) {\r\n minModified = prevLineChange.modifiedStartLineNumber + 1;\r\n }\r\n else {\r\n minModified = prevLineChange.modifiedEndLineNumber + 1;\r\n }\r\n }\r\n let fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1;\r\n let fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1;\r\n if (fromOriginal < minOriginal) {\r\n const delta = minOriginal - fromOriginal;\r\n fromOriginal = fromOriginal + delta;\r\n fromModified = fromModified + delta;\r\n }\r\n if (fromModified < minModified) {\r\n const delta = minModified - fromModified;\r\n fromOriginal = fromOriginal + delta;\r\n fromModified = fromModified + delta;\r\n }\r\n r[rLength++] = new DiffEntry(fromOriginal, originalEqualAbove, fromModified, modifiedEqualAbove);\r\n }\r\n // Emit deleted lines\r\n {\r\n if (originalEnd !== 0) {\r\n r[rLength++] = new DiffEntry(originalStart, originalEnd, 0, 0);\r\n }\r\n }\r\n // Emit inserted lines\r\n {\r\n if (modifiedEnd !== 0) {\r\n r[rLength++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd);\r\n }\r\n }\r\n // Emit after anchors\r\n {\r\n const originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1);\r\n const modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1);\r\n // Make sure we don't step into the next diff\r\n let maxOriginal = originalLineCount;\r\n let maxModified = modifiedLineCount;\r\n if (i + 1 < len) {\r\n const nextLineChange = lineChanges[i + 1];\r\n if (nextLineChange.originalEndLineNumber === 0) {\r\n maxOriginal = nextLineChange.originalStartLineNumber;\r\n }\r\n else {\r\n maxOriginal = nextLineChange.originalStartLineNumber - 1;\r\n }\r\n if (nextLineChange.modifiedEndLineNumber === 0) {\r\n maxModified = nextLineChange.modifiedStartLineNumber;\r\n }\r\n else {\r\n maxModified = nextLineChange.modifiedStartLineNumber - 1;\r\n }\r\n }\r\n let toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1;\r\n let toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1;\r\n if (toOriginal > maxOriginal) {\r\n const delta = maxOriginal - toOriginal;\r\n toOriginal = toOriginal + delta;\r\n toModified = toModified + delta;\r\n }\r\n if (toModified > maxModified) {\r\n const delta = maxModified - toModified;\r\n toOriginal = toOriginal + delta;\r\n toModified = toModified + delta;\r\n }\r\n r[rLength++] = new DiffEntry(originalEqualBelow, toOriginal, modifiedEqualBelow, toModified);\r\n }\r\n diffs[diffsLength++] = new Diff(r);\r\n }\r\n // Merge adjacent diffs\r\n let curr = diffs[0].entries;\r\n let r = [], rLength = 0;\r\n for (let i = 1, len = diffs.length; i < len; i++) {\r\n const thisDiff = diffs[i].entries;\r\n const currLast = curr[curr.length - 1];\r\n const thisFirst = thisDiff[0];\r\n if (currLast.getType() === 0 /* Equal */\r\n && thisFirst.getType() === 0 /* Equal */\r\n && thisFirst.originalLineStart <= currLast.originalLineEnd) {\r\n // We are dealing with equal lines that overlap\r\n curr[curr.length - 1] = new DiffEntry(currLast.originalLineStart, thisFirst.originalLineEnd, currLast.modifiedLineStart, thisFirst.modifiedLineEnd);\r\n curr = curr.concat(thisDiff.slice(1));\r\n continue;\r\n }\r\n r[rLength++] = new Diff(curr);\r\n curr = thisDiff;\r\n }\r\n r[rLength++] = new Diff(curr);\r\n return r;\r\n }\r\n _findDiffIndex(pos) {\r\n const lineNumber = pos.lineNumber;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n const diff = this._diffs[i].entries;\r\n const lastModifiedLine = diff[diff.length - 1].modifiedLineEnd;\r\n if (lineNumber <= lastModifiedLine) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n }\r\n _render() {\r\n const originalOptions = this._diffEditor.getOriginalEditor().getOptions();\r\n const modifiedOptions = this._diffEditor.getModifiedEditor().getOptions();\r\n const originalModel = this._diffEditor.getOriginalEditor().getModel();\r\n const modifiedModel = this._diffEditor.getModifiedEditor().getModel();\r\n const originalModelOpts = originalModel.getOptions();\r\n const modifiedModelOpts = modifiedModel.getOptions();\r\n if (!this._isVisible || !originalModel || !modifiedModel) {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._content.domNode);\r\n this._currentDiff = null;\r\n this.scrollbar.scanDomNode();\r\n return;\r\n }\r\n this._diffEditor.updateOptions({ readOnly: true });\r\n const diffIndex = this._findDiffIndex(this._diffEditor.getPosition());\r\n if (this._diffs[diffIndex] === this._currentDiff) {\r\n return;\r\n }\r\n this._currentDiff = this._diffs[diffIndex];\r\n const diffs = this._diffs[diffIndex].entries;\r\n let container = document.createElement('div');\r\n container.className = 'diff-review-table';\r\n container.setAttribute('role', 'list');\r\n container.setAttribute('aria-label', 'Difference review. Use \"Stage | Unstage | Revert Selected Ranges\" commands');\r\n _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__.Configuration.applyFontInfoSlow(container, modifiedOptions.get(38 /* fontInfo */));\r\n let minOriginalLine = 0;\r\n let maxOriginalLine = 0;\r\n let minModifiedLine = 0;\r\n let maxModifiedLine = 0;\r\n for (let i = 0, len = diffs.length; i < len; i++) {\r\n const diffEntry = diffs[i];\r\n const originalLineStart = diffEntry.originalLineStart;\r\n const originalLineEnd = diffEntry.originalLineEnd;\r\n const modifiedLineStart = diffEntry.modifiedLineStart;\r\n const modifiedLineEnd = diffEntry.modifiedLineEnd;\r\n if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) {\r\n minOriginalLine = originalLineStart;\r\n }\r\n if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) {\r\n maxOriginalLine = originalLineEnd;\r\n }\r\n if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) {\r\n minModifiedLine = modifiedLineStart;\r\n }\r\n if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) {\r\n maxModifiedLine = modifiedLineEnd;\r\n }\r\n }\r\n let header = document.createElement('div');\r\n header.className = 'diff-review-row';\r\n let cell = document.createElement('div');\r\n cell.className = 'diff-review-cell diff-review-summary';\r\n const originalChangedLinesCnt = maxOriginalLine - minOriginalLine + 1;\r\n const modifiedChangedLinesCnt = maxModifiedLine - minModifiedLine + 1;\r\n cell.appendChild(document.createTextNode(`${diffIndex + 1}/${this._diffs.length}: @@ -${minOriginalLine},${originalChangedLinesCnt} +${minModifiedLine},${modifiedChangedLinesCnt} @@`));\r\n header.setAttribute('data-line', String(minModifiedLine));\r\n const getAriaLines = (lines) => {\r\n if (lines === 0) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('no_lines_changed', \"no lines changed\");\r\n }\r\n else if (lines === 1) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('one_line_changed', \"1 line changed\");\r\n }\r\n else {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('more_lines_changed', \"{0} lines changed\", lines);\r\n }\r\n };\r\n const originalChangedLinesCntAria = getAriaLines(originalChangedLinesCnt);\r\n const modifiedChangedLinesCntAria = getAriaLines(modifiedChangedLinesCnt);\r\n header.setAttribute('aria-label', _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize({\r\n key: 'header',\r\n comment: [\r\n 'This is the ARIA label for a git diff header.',\r\n 'A git diff header looks like this: @@ -154,12 +159,39 @@.',\r\n 'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.',\r\n 'Variables 0 and 1 refer to the diff index out of total number of diffs.',\r\n 'Variables 2 and 4 will be numbers (a line number).',\r\n 'Variables 3 and 5 will be \"no lines changed\", \"1 line changed\" or \"X lines changed\", localized separately.'\r\n ]\r\n }, \"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}\", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria));\r\n header.appendChild(cell);\r\n // @@ -504,7 +517,7 @@\r\n header.setAttribute('role', 'listitem');\r\n container.appendChild(header);\r\n const lineHeight = modifiedOptions.get(53 /* lineHeight */);\r\n let modLine = minModifiedLine;\r\n for (let i = 0, len = diffs.length; i < len; i++) {\r\n const diffEntry = diffs[i];\r\n DiffReview._renderSection(container, diffEntry, modLine, lineHeight, this._width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts);\r\n if (diffEntry.modifiedLineStart !== 0) {\r\n modLine = diffEntry.modifiedLineEnd;\r\n }\r\n }\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._content.domNode);\r\n this._content.domNode.appendChild(container);\r\n this.scrollbar.scanDomNode();\r\n }\r\n static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts) {\r\n const type = diffEntry.getType();\r\n let rowClassName = 'diff-review-row';\r\n let lineNumbersExtraClassName = '';\r\n const spacerClassName = 'diff-review-spacer';\r\n let spacerIcon = null;\r\n switch (type) {\r\n case 1 /* Insert */:\r\n rowClassName = 'diff-review-row line-insert';\r\n lineNumbersExtraClassName = ' char-insert';\r\n spacerIcon = diffReviewInsertIcon;\r\n break;\r\n case 2 /* Delete */:\r\n rowClassName = 'diff-review-row line-delete';\r\n lineNumbersExtraClassName = ' char-delete';\r\n spacerIcon = diffReviewRemoveIcon;\r\n break;\r\n }\r\n const originalLineStart = diffEntry.originalLineStart;\r\n const originalLineEnd = diffEntry.originalLineEnd;\r\n const modifiedLineStart = diffEntry.modifiedLineStart;\r\n const modifiedLineEnd = diffEntry.modifiedLineEnd;\r\n const cnt = Math.max(modifiedLineEnd - modifiedLineStart, originalLineEnd - originalLineStart);\r\n const originalLayoutInfo = originalOptions.get(124 /* layoutInfo */);\r\n const originalLineNumbersWidth = originalLayoutInfo.glyphMarginWidth + originalLayoutInfo.lineNumbersWidth;\r\n const modifiedLayoutInfo = modifiedOptions.get(124 /* layoutInfo */);\r\n const modifiedLineNumbersWidth = 10 + modifiedLayoutInfo.glyphMarginWidth + modifiedLayoutInfo.lineNumbersWidth;\r\n for (let i = 0; i <= cnt; i++) {\r\n const originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i);\r\n const modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i);\r\n const row = document.createElement('div');\r\n row.style.minWidth = width + 'px';\r\n row.className = rowClassName;\r\n row.setAttribute('role', 'listitem');\r\n if (modifiedLine !== 0) {\r\n modLine = modifiedLine;\r\n }\r\n row.setAttribute('data-line', String(modLine));\r\n let cell = document.createElement('div');\r\n cell.className = 'diff-review-cell';\r\n cell.style.height = `${lineHeight}px`;\r\n row.appendChild(cell);\r\n const originalLineNumber = document.createElement('span');\r\n originalLineNumber.style.width = (originalLineNumbersWidth + 'px');\r\n originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px');\r\n originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\r\n if (originalLine !== 0) {\r\n originalLineNumber.appendChild(document.createTextNode(String(originalLine)));\r\n }\r\n else {\r\n originalLineNumber.innerText = '\\u00a0';\r\n }\r\n cell.appendChild(originalLineNumber);\r\n const modifiedLineNumber = document.createElement('span');\r\n modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px');\r\n modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px');\r\n modifiedLineNumber.style.paddingRight = '10px';\r\n modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\r\n if (modifiedLine !== 0) {\r\n modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine)));\r\n }\r\n else {\r\n modifiedLineNumber.innerText = '\\u00a0';\r\n }\r\n cell.appendChild(modifiedLineNumber);\r\n const spacer = document.createElement('span');\r\n spacer.className = spacerClassName;\r\n if (spacerIcon) {\r\n const spacerCodicon = document.createElement('span');\r\n spacerCodicon.className = _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.ThemeIcon.asClassName(spacerIcon);\r\n spacerCodicon.innerText = '\\u00a0\\u00a0';\r\n spacer.appendChild(spacerCodicon);\r\n }\r\n else {\r\n spacer.innerText = '\\u00a0\\u00a0';\r\n }\r\n cell.appendChild(spacer);\r\n let lineContent;\r\n if (modifiedLine !== 0) {\r\n let html = this._renderLine(modifiedModel, modifiedOptions, modifiedModelOpts.tabSize, modifiedLine);\r\n if (DiffReview._ttPolicy) {\r\n html = DiffReview._ttPolicy.createHTML(html);\r\n }\r\n cell.insertAdjacentHTML('beforeend', html);\r\n lineContent = modifiedModel.getLineContent(modifiedLine);\r\n }\r\n else {\r\n let html = this._renderLine(originalModel, originalOptions, originalModelOpts.tabSize, originalLine);\r\n if (DiffReview._ttPolicy) {\r\n html = DiffReview._ttPolicy.createHTML(html);\r\n }\r\n cell.insertAdjacentHTML('beforeend', html);\r\n lineContent = originalModel.getLineContent(originalLine);\r\n }\r\n if (lineContent.length === 0) {\r\n lineContent = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('blankLine', \"blank\");\r\n }\r\n let ariaLabel = '';\r\n switch (type) {\r\n case 0 /* Equal */:\r\n if (originalLine === modifiedLine) {\r\n ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize({ key: 'unchangedLine', comment: ['The placeholders are contents of the line and should not be translated.'] }, \"{0} unchanged line {1}\", lineContent, originalLine);\r\n }\r\n else {\r\n ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('equalLine', \"{0} original line {1} modified line {2}\", lineContent, originalLine, modifiedLine);\r\n }\r\n break;\r\n case 1 /* Insert */:\r\n ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('insertLine', \"+ {0} modified line {1}\", lineContent, modifiedLine);\r\n break;\r\n case 2 /* Delete */:\r\n ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('deleteLine', \"- {0} original line {1}\", lineContent, originalLine);\r\n break;\r\n }\r\n row.setAttribute('aria-label', ariaLabel);\r\n dest.appendChild(row);\r\n }\r\n }\r\n static _renderLine(model, options, tabSize, lineNumber) {\r\n const lineContent = model.getLineContent(lineNumber);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\r\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\r\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n const tokens = new Uint32Array(2);\r\n tokens[0] = lineContent.length;\r\n tokens[1] = defaultMetadata;\r\n const lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_12__.LineTokens(tokens, lineContent);\r\n const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__.ViewLineRenderingData.isBasicASCII(lineContent, model.mightContainNonBasicASCII());\r\n const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__.ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, model.mightContainRTL());\r\n const r = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__.renderViewLine2)(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__.RenderLineInput((fontInfo.isMonospace && !options.get(26 /* disableMonospaceOptimizations */)), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, options.get(100 /* stopRenderingLineAfter */), options.get(83 /* renderWhitespace */), options.get(77 /* renderControlCharacters */), options.get(39 /* fontLigatures */) !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__.EditorFontLigatures.OFF, null));\r\n return r.html;\r\n }\r\n}\r\nDiffReview._ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('diffReview', { createHTML: value => value });\r\n// theming\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.registerThemingParticipant)((theme, collector) => {\r\n const lineNumbers = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorLineNumbers);\r\n if (lineNumbers) {\r\n collector.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${lineNumbers}; }`);\r\n }\r\n const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_18__.scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${shadow} 0 -6px 6px -6px inset; }`);\r\n }\r\n});\r\nclass DiffReviewNext extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.diffReview.next',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editor.action.diffReview.next', \"Go to Next Difference\"),\r\n alias: 'Go to Next Difference',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.has('isInDiffEditor'),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const diffEditor = findFocusedDiffEditor(accessor);\r\n if (diffEditor) {\r\n diffEditor.diffReviewNext();\r\n }\r\n }\r\n}\r\nclass DiffReviewPrev extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.diffReview.prev',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editor.action.diffReview.prev', \"Go to Previous Difference\"),\r\n alias: 'Go to Previous Difference',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.has('isInDiffEditor'),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 1024 /* Shift */ | 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const diffEditor = findFocusedDiffEditor(accessor);\r\n if (diffEditor) {\r\n diffEditor.diffReviewPrev();\r\n }\r\n }\r\n}\r\nfunction findFocusedDiffEditor(accessor) {\r\n const codeEditorService = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__.ICodeEditorService);\r\n const diffEditors = codeEditorService.listDiffEditors();\r\n const activeCodeEditor = codeEditorService.getActiveCodeEditor();\r\n if (!activeCodeEditor) {\r\n return null;\r\n }\r\n for (let i = 0, len = diffEditors.length; i < len; i++) {\r\n const diffEditor = diffEditors[i];\r\n if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) {\r\n return diffEditor;\r\n }\r\n }\r\n return null;\r\n}\r\n(0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.registerEditorAction)(DiffReviewNext);\r\n(0,_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.registerEditorAction)(DiffReviewPrev);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EmbeddedCodeEditorWidget\": () => (/* binding */ EmbeddedCodeEditorWidget)\n/* harmony export */ });\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet EmbeddedCodeEditorWidget = class EmbeddedCodeEditorWidget extends _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__.CodeEditorWidget {\r\n constructor(domElement, options, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) {\r\n super(domElement, Object.assign(Object.assign({}, parentEditor.getRawOptions()), { overflowWidgetsDomNode: parentEditor.getOverflowWidgetsDomNode() }), {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService);\r\n this._parentEditor = parentEditor;\r\n this._overwriteOptions = options;\r\n // Overwrite parent's options\r\n super.updateOptions(this._overwriteOptions);\r\n this._register(parentEditor.onDidChangeConfiguration((e) => this._onParentConfigurationChanged(e)));\r\n }\r\n getParentEditor() {\r\n return this._parentEditor;\r\n }\r\n _onParentConfigurationChanged(e) {\r\n super.updateOptions(this._parentEditor.getRawOptions());\r\n super.updateOptions(this._overwriteOptions);\r\n }\r\n updateOptions(newOptions) {\r\n _base_common_objects_js__WEBPACK_IMPORTED_MODULE_0__.mixin(this._overwriteOptions, newOptions, true);\r\n super.updateOptions(this._overwriteOptions);\r\n }\r\n};\r\nEmbeddedCodeEditorWidget = __decorate([\r\n __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__.IInstantiationService),\r\n __param(4, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__.ICodeEditorService),\r\n __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__.ICommandService),\r\n __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.IContextKeyService),\r\n __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__.IThemeService),\r\n __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__.INotificationService),\r\n __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_8__.IAccessibilityService)\r\n], EmbeddedCodeEditorWidget);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InlineDiffMargin\": () => (/* binding */ InlineDiffMargin)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass InlineDiffMargin extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(_viewZoneId, _marginDomNode, editor, diff, _contextMenuService, _clipboardService) {\r\n super();\r\n this._viewZoneId = _viewZoneId;\r\n this._marginDomNode = _marginDomNode;\r\n this.editor = editor;\r\n this.diff = diff;\r\n this._contextMenuService = _contextMenuService;\r\n this._clipboardService = _clipboardService;\r\n this._visibility = false;\r\n // make sure the diff margin shows above overlay.\r\n this._marginDomNode.style.zIndex = '10';\r\n this._diffActions = document.createElement('div');\r\n this._diffActions.className = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.Codicon.lightBulb.classNames + ' lightbulb-glyph';\r\n this._diffActions.style.position = 'absolute';\r\n const lineHeight = editor.getOption(53 /* lineHeight */);\r\n const lineFeed = editor.getModel().getEOL();\r\n this._diffActions.style.right = '0px';\r\n this._diffActions.style.visibility = 'hidden';\r\n this._diffActions.style.height = `${lineHeight}px`;\r\n this._diffActions.style.lineHeight = `${lineHeight}px`;\r\n this._marginDomNode.appendChild(this._diffActions);\r\n const actions = [];\r\n // default action\r\n actions.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Action('diff.clipboard.copyDeletedContent', diff.originalEndLineNumber > diff.modifiedStartLineNumber\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('diff.clipboard.copyDeletedLinesContent.label', \"Copy deleted lines\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('diff.clipboard.copyDeletedLinesContent.single.label', \"Copy deleted line\"), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(diff.originalStartLineNumber, 1, diff.originalEndLineNumber + 1, 1);\r\n const deletedText = diff.originalModel.getValueInRange(range);\r\n yield this._clipboardService.writeText(deletedText);\r\n })));\r\n let currentLineNumberOffset = 0;\r\n let copyLineAction = undefined;\r\n if (diff.originalEndLineNumber > diff.modifiedStartLineNumber) {\r\n copyLineAction = new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Action('diff.clipboard.copyDeletedLineContent', _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('diff.clipboard.copyDeletedLineContent.label', \"Copy deleted line ({0})\", diff.originalStartLineNumber), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const lineContent = diff.originalModel.getLineContent(diff.originalStartLineNumber + currentLineNumberOffset);\r\n yield this._clipboardService.writeText(lineContent);\r\n }));\r\n actions.push(copyLineAction);\r\n }\r\n const readOnly = editor.getOption(75 /* readOnly */);\r\n if (!readOnly) {\r\n actions.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Action('diff.inline.revertChange', _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('diff.inline.revertChange.label', \"Revert this change\"), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(diff.originalStartLineNumber, 1, diff.originalEndLineNumber, diff.originalModel.getLineMaxColumn(diff.originalEndLineNumber));\r\n const deletedText = diff.originalModel.getValueInRange(range);\r\n if (diff.modifiedEndLineNumber === 0) {\r\n // deletion only\r\n const column = editor.getModel().getLineMaxColumn(diff.modifiedStartLineNumber);\r\n editor.executeEdits('diffEditor', [\r\n {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(diff.modifiedStartLineNumber, column, diff.modifiedStartLineNumber, column),\r\n text: lineFeed + deletedText\r\n }\r\n ]);\r\n }\r\n else {\r\n const column = editor.getModel().getLineMaxColumn(diff.modifiedEndLineNumber);\r\n editor.executeEdits('diffEditor', [\r\n {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(diff.modifiedStartLineNumber, 1, diff.modifiedEndLineNumber, column),\r\n text: deletedText\r\n }\r\n ]);\r\n }\r\n })));\r\n }\r\n const showContextMenu = (x, y) => {\r\n this._contextMenuService.showContextMenu({\r\n getAnchor: () => {\r\n return {\r\n x,\r\n y\r\n };\r\n },\r\n getActions: () => {\r\n if (copyLineAction) {\r\n copyLineAction.label = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('diff.clipboard.copyDeletedLineContent.label', \"Copy deleted line ({0})\", diff.originalStartLineNumber + currentLineNumberOffset);\r\n }\r\n return actions;\r\n },\r\n autoSelectFirstItem: true\r\n });\r\n };\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._diffActions, 'mousedown', e => {\r\n const { top, height } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this._diffActions);\r\n let pad = Math.floor(lineHeight / 3);\r\n e.preventDefault();\r\n showContextMenu(e.posx, top + height + pad);\r\n }));\r\n this._register(editor.onMouseMove((e) => {\r\n if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const viewZoneId = e.target.detail.viewZoneId;\r\n if (viewZoneId === this._viewZoneId) {\r\n this.visibility = true;\r\n currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight);\r\n }\r\n else {\r\n this.visibility = false;\r\n }\r\n }\r\n else {\r\n this.visibility = false;\r\n }\r\n }));\r\n this._register(editor.onMouseDown((e) => {\r\n if (!e.event.rightButton) {\r\n return;\r\n }\r\n if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const viewZoneId = e.target.detail.viewZoneId;\r\n if (viewZoneId === this._viewZoneId) {\r\n e.event.preventDefault();\r\n currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight);\r\n showContextMenu(e.event.posx, e.event.posy + lineHeight);\r\n }\r\n }\r\n }));\r\n }\r\n get visibility() {\r\n return this._visibility;\r\n }\r\n set visibility(_visibility) {\r\n if (this._visibility !== _visibility) {\r\n this._visibility = _visibility;\r\n if (_visibility) {\r\n this._diffActions.style.visibility = 'visible';\r\n }\r\n else {\r\n this._diffActions.style.visibility = 'hidden';\r\n }\r\n }\r\n }\r\n _updateLightBulbPosition(marginDomNode, y, lineHeight) {\r\n const { top } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(marginDomNode);\r\n const offset = y - top;\r\n const lineNumberOffset = Math.floor(offset / lineHeight);\r\n const newTop = lineNumberOffset * lineHeight;\r\n this._diffActions.style.top = `${newTop}px`;\r\n if (this.diff.viewLineCounts) {\r\n let acc = 0;\r\n for (let i = 0; i < this.diff.viewLineCounts.length; i++) {\r\n acc += this.diff.viewLineCounts[i];\r\n if (lineNumberOffset < acc) {\r\n return i;\r\n }\r\n }\r\n }\r\n return lineNumberOffset;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ReplaceCommand\": () => (/* binding */ ReplaceCommand),\n/* harmony export */ \"ReplaceCommandThatSelectsText\": () => (/* binding */ ReplaceCommandThatSelectsText),\n/* harmony export */ \"ReplaceCommandWithoutChangingPosition\": () => (/* binding */ ReplaceCommandWithoutChangingPosition),\n/* harmony export */ \"ReplaceCommandWithOffsetCursorState\": () => (/* binding */ ReplaceCommandWithOffsetCursorState),\n/* harmony export */ \"ReplaceCommandThatPreservesSelection\": () => (/* binding */ ReplaceCommandThatPreservesSelection)\n/* harmony export */ });\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ReplaceCommand {\r\n constructor(range, text, insertsAutoWhitespace = false) {\r\n this._range = range;\r\n this._text = text;\r\n this.insertsAutoWhitespace = insertsAutoWhitespace;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._range, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n let inverseEditOperations = helper.getInverseEditOperations();\r\n let srcRange = inverseEditOperations[0].range;\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.endLineNumber, srcRange.endColumn, srcRange.endLineNumber, srcRange.endColumn);\r\n }\r\n}\r\nclass ReplaceCommandThatSelectsText {\r\n constructor(range, text) {\r\n this._range = range;\r\n this._text = text;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._range, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n const inverseEditOperations = helper.getInverseEditOperations();\r\n const srcRange = inverseEditOperations[0].range;\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.startLineNumber, srcRange.startColumn, srcRange.endLineNumber, srcRange.endColumn);\r\n }\r\n}\r\nclass ReplaceCommandWithoutChangingPosition {\r\n constructor(range, text, insertsAutoWhitespace = false) {\r\n this._range = range;\r\n this._text = text;\r\n this.insertsAutoWhitespace = insertsAutoWhitespace;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._range, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n let inverseEditOperations = helper.getInverseEditOperations();\r\n let srcRange = inverseEditOperations[0].range;\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.startLineNumber, srcRange.startColumn, srcRange.startLineNumber, srcRange.startColumn);\r\n }\r\n}\r\nclass ReplaceCommandWithOffsetCursorState {\r\n constructor(range, text, lineNumberDeltaOffset, columnDeltaOffset, insertsAutoWhitespace = false) {\r\n this._range = range;\r\n this._text = text;\r\n this._columnDeltaOffset = columnDeltaOffset;\r\n this._lineNumberDeltaOffset = lineNumberDeltaOffset;\r\n this.insertsAutoWhitespace = insertsAutoWhitespace;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._range, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n let inverseEditOperations = helper.getInverseEditOperations();\r\n let srcRange = inverseEditOperations[0].range;\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset, srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset);\r\n }\r\n}\r\nclass ReplaceCommandThatPreservesSelection {\r\n constructor(editRange, text, initialSelection, forceMoveMarkers = false) {\r\n this._range = editRange;\r\n this._text = text;\r\n this._initialSelection = initialSelection;\r\n this._forceMoveMarkers = forceMoveMarkers;\r\n this._selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._range, this._text, this._forceMoveMarkers);\r\n this._selectionId = builder.trackSelection(this._initialSelection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._selectionId);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cachedStringRepeat\": () => (/* binding */ cachedStringRepeat),\n/* harmony export */ \"ShiftCommand\": () => (/* binding */ ShiftCommand)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst repeatCache = Object.create(null);\r\nfunction cachedStringRepeat(str, count) {\r\n if (!repeatCache[str]) {\r\n repeatCache[str] = ['', str];\r\n }\r\n const cache = repeatCache[str];\r\n for (let i = cache.length; i <= count; i++) {\r\n cache[i] = cache[i - 1] + str;\r\n }\r\n return cache[count];\r\n}\r\nclass ShiftCommand {\r\n constructor(range, opts) {\r\n this._opts = opts;\r\n this._selection = range;\r\n this._selectionId = null;\r\n this._useLastEditRangeForCursorEndPosition = false;\r\n this._selectionStartColumnStaysPut = false;\r\n }\r\n static unshiftIndent(line, column, tabSize, indentSize, insertSpaces) {\r\n // Determine the visible column where the content starts\r\n const contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.visibleColumnFromColumn(line, column, tabSize);\r\n if (insertSpaces) {\r\n const indent = cachedStringRepeat(' ', indentSize);\r\n const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.prevIndentTabStop(contentStartVisibleColumn, indentSize);\r\n const indentCount = desiredTabStop / indentSize; // will be an integer\r\n return cachedStringRepeat(indent, indentCount);\r\n }\r\n else {\r\n const indent = '\\t';\r\n const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.prevRenderTabStop(contentStartVisibleColumn, tabSize);\r\n const indentCount = desiredTabStop / tabSize; // will be an integer\r\n return cachedStringRepeat(indent, indentCount);\r\n }\r\n }\r\n static shiftIndent(line, column, tabSize, indentSize, insertSpaces) {\r\n // Determine the visible column where the content starts\r\n const contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.visibleColumnFromColumn(line, column, tabSize);\r\n if (insertSpaces) {\r\n const indent = cachedStringRepeat(' ', indentSize);\r\n const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.nextIndentTabStop(contentStartVisibleColumn, indentSize);\r\n const indentCount = desiredTabStop / indentSize; // will be an integer\r\n return cachedStringRepeat(indent, indentCount);\r\n }\r\n else {\r\n const indent = '\\t';\r\n const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.nextRenderTabStop(contentStartVisibleColumn, tabSize);\r\n const indentCount = desiredTabStop / tabSize; // will be an integer\r\n return cachedStringRepeat(indent, indentCount);\r\n }\r\n }\r\n _addEditOperation(builder, range, text) {\r\n if (this._useLastEditRangeForCursorEndPosition) {\r\n builder.addTrackedEditOperation(range, text);\r\n }\r\n else {\r\n builder.addEditOperation(range, text);\r\n }\r\n }\r\n getEditOperations(model, builder) {\r\n const startLine = this._selection.startLineNumber;\r\n let endLine = this._selection.endLineNumber;\r\n if (this._selection.endColumn === 1 && startLine !== endLine) {\r\n endLine = endLine - 1;\r\n }\r\n const { tabSize, indentSize, insertSpaces } = this._opts;\r\n const shouldIndentEmptyLines = (startLine === endLine);\r\n if (this._opts.useTabStops) {\r\n // if indenting or outdenting on a whitespace only line\r\n if (this._selection.isEmpty()) {\r\n if (/^\\s*$/.test(model.getLineContent(startLine))) {\r\n this._useLastEditRangeForCursorEndPosition = true;\r\n }\r\n }\r\n // keep track of previous line's \"miss-alignment\"\r\n let previousLineExtraSpaces = 0, extraSpaces = 0;\r\n for (let lineNumber = startLine; lineNumber <= endLine; lineNumber++, previousLineExtraSpaces = extraSpaces) {\r\n extraSpaces = 0;\r\n let lineText = model.getLineContent(lineNumber);\r\n let indentationEndIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineText);\r\n if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) {\r\n // empty line or line with no leading whitespace => nothing to do\r\n continue;\r\n }\r\n if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) {\r\n // do not indent empty lines => nothing to do\r\n continue;\r\n }\r\n if (indentationEndIndex === -1) {\r\n // the entire line is whitespace\r\n indentationEndIndex = lineText.length;\r\n }\r\n if (lineNumber > 1) {\r\n let contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorColumns.visibleColumnFromColumn(lineText, indentationEndIndex + 1, tabSize);\r\n if (contentStartVisibleColumn % indentSize !== 0) {\r\n // The current line is \"miss-aligned\", so let's see if this is expected...\r\n // This can only happen when it has trailing commas in the indent\r\n if (model.isCheapToTokenize(lineNumber - 1)) {\r\n let enterAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent, model, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber - 1, model.getLineMaxColumn(lineNumber - 1), lineNumber - 1, model.getLineMaxColumn(lineNumber - 1)));\r\n if (enterAction) {\r\n extraSpaces = previousLineExtraSpaces;\r\n if (enterAction.appendText) {\r\n for (let j = 0, lenJ = enterAction.appendText.length; j < lenJ && extraSpaces < indentSize; j++) {\r\n if (enterAction.appendText.charCodeAt(j) === 32 /* Space */) {\r\n extraSpaces++;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n if (enterAction.removeText) {\r\n extraSpaces = Math.max(0, extraSpaces - enterAction.removeText);\r\n }\r\n // Act as if `prefixSpaces` is not part of the indentation\r\n for (let j = 0; j < extraSpaces; j++) {\r\n if (indentationEndIndex === 0 || lineText.charCodeAt(indentationEndIndex - 1) !== 32 /* Space */) {\r\n break;\r\n }\r\n indentationEndIndex--;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this._opts.isUnshift && indentationEndIndex === 0) {\r\n // line with no leading whitespace => nothing to do\r\n continue;\r\n }\r\n let desiredIndent;\r\n if (this._opts.isUnshift) {\r\n desiredIndent = ShiftCommand.unshiftIndent(lineText, indentationEndIndex + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n else {\r\n desiredIndent = ShiftCommand.shiftIndent(lineText, indentationEndIndex + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), desiredIndent);\r\n if (lineNumber === startLine && !this._selection.isEmpty()) {\r\n // Force the startColumn to stay put because we're inserting after it\r\n this._selectionStartColumnStaysPut = (this._selection.startColumn <= indentationEndIndex + 1);\r\n }\r\n }\r\n }\r\n else {\r\n // if indenting or outdenting on a whitespace only line\r\n if (!this._opts.isUnshift && this._selection.isEmpty() && model.getLineLength(startLine) === 0) {\r\n this._useLastEditRangeForCursorEndPosition = true;\r\n }\r\n const oneIndent = (insertSpaces ? cachedStringRepeat(' ', indentSize) : '\\t');\r\n for (let lineNumber = startLine; lineNumber <= endLine; lineNumber++) {\r\n const lineText = model.getLineContent(lineNumber);\r\n let indentationEndIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineText);\r\n if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) {\r\n // empty line or line with no leading whitespace => nothing to do\r\n continue;\r\n }\r\n if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) {\r\n // do not indent empty lines => nothing to do\r\n continue;\r\n }\r\n if (indentationEndIndex === -1) {\r\n // the entire line is whitespace\r\n indentationEndIndex = lineText.length;\r\n }\r\n if (this._opts.isUnshift && indentationEndIndex === 0) {\r\n // line with no leading whitespace => nothing to do\r\n continue;\r\n }\r\n if (this._opts.isUnshift) {\r\n indentationEndIndex = Math.min(indentationEndIndex, indentSize);\r\n for (let i = 0; i < indentationEndIndex; i++) {\r\n const chr = lineText.charCodeAt(i);\r\n if (chr === 9 /* Tab */) {\r\n indentationEndIndex = i + 1;\r\n break;\r\n }\r\n }\r\n this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), '');\r\n }\r\n else {\r\n this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, 1, lineNumber, 1), oneIndent);\r\n if (lineNumber === startLine && !this._selection.isEmpty()) {\r\n // Force the startColumn to stay put because we're inserting after it\r\n this._selectionStartColumnStaysPut = (this._selection.startColumn === 1);\r\n }\r\n }\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(this._selection);\r\n }\r\n computeCursorState(model, helper) {\r\n if (this._useLastEditRangeForCursorEndPosition) {\r\n let lastOp = helper.getInverseEditOperations()[0];\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(lastOp.range.endLineNumber, lastOp.range.endColumn, lastOp.range.endLineNumber, lastOp.range.endColumn);\r\n }\r\n const result = helper.getTrackedSelection(this._selectionId);\r\n if (this._selectionStartColumnStaysPut) {\r\n // The selection start should not move\r\n let initialStartColumn = this._selection.startColumn;\r\n let resultStartColumn = result.startColumn;\r\n if (resultStartColumn <= initialStartColumn) {\r\n return result;\r\n }\r\n if (result.getDirection() === 0 /* LTR */) {\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(result.startLineNumber, initialStartColumn, result.endLineNumber, result.endColumn);\r\n }\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(result.endLineNumber, result.endColumn, result.startLineNumber, initialStartColumn);\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SurroundSelectionCommand\": () => (/* binding */ SurroundSelectionCommand)\n/* harmony export */ });\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass SurroundSelectionCommand {\r\n constructor(range, charBeforeSelection, charAfterSelection) {\r\n this._range = range;\r\n this._charBeforeSelection = charBeforeSelection;\r\n this._charAfterSelection = charAfterSelection;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(new _core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection);\r\n builder.addTrackedEditOperation(new _core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection);\r\n }\r\n computeCursorState(model, helper) {\r\n let inverseEditOperations = helper.getInverseEditOperations();\r\n let firstOperationRange = inverseEditOperations[0].range;\r\n let secondOperationRange = inverseEditOperations[1].range;\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_1__.Selection(firstOperationRange.endLineNumber, firstOperationRange.endColumn, secondOperationRange.endLineNumber, secondOperationRange.endColumn - this._charAfterSelection.length);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TrimTrailingWhitespaceCommand\": () => (/* binding */ TrimTrailingWhitespaceCommand),\n/* harmony export */ \"trimTrailingWhitespace\": () => (/* binding */ trimTrailingWhitespace)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass TrimTrailingWhitespaceCommand {\r\n constructor(selection, cursors) {\r\n this._selection = selection;\r\n this._cursors = cursors;\r\n this._selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n let ops = trimTrailingWhitespace(model, this._cursors);\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n let op = ops[i];\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n this._selectionId = builder.trackSelection(this._selection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._selectionId);\r\n }\r\n}\r\n/**\r\n * Generate commands for trimming trailing whitespace on a model and ignore lines on which cursors are sitting.\r\n */\r\nfunction trimTrailingWhitespace(model, cursors) {\r\n // Sort cursors ascending\r\n cursors.sort((a, b) => {\r\n if (a.lineNumber === b.lineNumber) {\r\n return a.column - b.column;\r\n }\r\n return a.lineNumber - b.lineNumber;\r\n });\r\n // Reduce multiple cursors on the same line and only keep the last one on the line\r\n for (let i = cursors.length - 2; i >= 0; i--) {\r\n if (cursors[i].lineNumber === cursors[i + 1].lineNumber) {\r\n // Remove cursor at `i`\r\n cursors.splice(i, 1);\r\n }\r\n }\r\n let r = [];\r\n let rLen = 0;\r\n let cursorIndex = 0;\r\n let cursorLen = cursors.length;\r\n for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {\r\n let lineContent = model.getLineContent(lineNumber);\r\n let maxLineColumn = lineContent.length + 1;\r\n let minEditColumn = 0;\r\n if (cursorIndex < cursorLen && cursors[cursorIndex].lineNumber === lineNumber) {\r\n minEditColumn = cursors[cursorIndex].column;\r\n cursorIndex++;\r\n if (minEditColumn === maxLineColumn) {\r\n // The cursor is at the end of the line => no edits for sure on this line\r\n continue;\r\n }\r\n }\r\n if (lineContent.length === 0) {\r\n continue;\r\n }\r\n let lastNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(lineContent);\r\n let fromColumn = 0;\r\n if (lastNonWhitespaceIndex === -1) {\r\n // Entire line is whitespace\r\n fromColumn = 1;\r\n }\r\n else if (lastNonWhitespaceIndex !== lineContent.length - 1) {\r\n // There is trailing whitespace\r\n fromColumn = lastNonWhitespaceIndex + 2;\r\n }\r\n else {\r\n // There is no trailing whitespace\r\n continue;\r\n }\r\n fromColumn = Math.max(minEditColumn, fromColumn);\r\n r[rLen++] = _core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__.EditOperation.delete(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, fromColumn, lineNumber, maxLineColumn));\r\n }\r\n return r;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TabFocus\": () => (/* binding */ TabFocus),\n/* harmony export */ \"ComputedEditorOptions\": () => (/* binding */ ComputedEditorOptions),\n/* harmony export */ \"CommonEditorConfiguration\": () => (/* binding */ CommonEditorConfiguration),\n/* harmony export */ \"editorConfigurationBaseNode\": () => (/* binding */ editorConfigurationBaseNode),\n/* harmony export */ \"isEditorConfigurationKey\": () => (/* binding */ isEditorConfigurationKey),\n/* harmony export */ \"isDiffEditorConfigurationKey\": () => (/* binding */ isDiffEditorConfigurationKey)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _editorZoom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editorZoom.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js\");\n/* harmony import */ var _fontInfo_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fontInfo.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js\");\n/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_collections_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/collections.js */ \"./node_modules/monaco-editor/esm/vs/base/common/collections.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst TabFocus = new class {\r\n constructor() {\r\n this._tabFocus = false;\r\n this._onDidChangeTabFocus = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.onDidChangeTabFocus = this._onDidChangeTabFocus.event;\r\n }\r\n getTabFocusMode() {\r\n return this._tabFocus;\r\n }\r\n setTabFocusMode(tabFocusMode) {\r\n if (this._tabFocus === tabFocusMode) {\r\n return;\r\n }\r\n this._tabFocus = tabFocusMode;\r\n this._onDidChangeTabFocus.fire(this._tabFocus);\r\n }\r\n};\r\nconst hasOwnProperty = Object.hasOwnProperty;\r\nclass ComputedEditorOptions {\r\n constructor() {\r\n this._values = [];\r\n }\r\n _read(id) {\r\n return this._values[id];\r\n }\r\n get(id) {\r\n return this._values[id];\r\n }\r\n _write(id, value) {\r\n this._values[id] = value;\r\n }\r\n}\r\nclass RawEditorOptions {\r\n constructor() {\r\n this._values = [];\r\n }\r\n _read(id) {\r\n return this._values[id];\r\n }\r\n _write(id, value) {\r\n this._values[id] = value;\r\n }\r\n}\r\nclass EditorConfiguration2 {\r\n static readOptions(_options) {\r\n const options = _options;\r\n const result = new RawEditorOptions();\r\n for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.editorOptionsRegistry) {\r\n const value = (editorOption.name === '_never_' ? undefined : options[editorOption.name]);\r\n result._write(editorOption.id, value);\r\n }\r\n return result;\r\n }\r\n static validateOptions(options) {\r\n const result = new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.ValidatedEditorOptions();\r\n for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.editorOptionsRegistry) {\r\n result._write(editorOption.id, editorOption.validate(options._read(editorOption.id)));\r\n }\r\n return result;\r\n }\r\n static computeOptions(options, env) {\r\n const result = new ComputedEditorOptions();\r\n for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.editorOptionsRegistry) {\r\n result._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\r\n }\r\n return result;\r\n }\r\n static _deepEquals(a, b) {\r\n if (typeof a !== 'object' || typeof b !== 'object') {\r\n return (a === b);\r\n }\r\n if (Array.isArray(a) || Array.isArray(b)) {\r\n return (Array.isArray(a) && Array.isArray(b) ? _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__.equals(a, b) : false);\r\n }\r\n for (let key in a) {\r\n if (!EditorConfiguration2._deepEquals(a[key], b[key])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static checkEquals(a, b) {\r\n const result = [];\r\n let somethingChanged = false;\r\n for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.editorOptionsRegistry) {\r\n const changed = !EditorConfiguration2._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\r\n result[editorOption.id] = changed;\r\n if (changed) {\r\n somethingChanged = true;\r\n }\r\n }\r\n return (somethingChanged ? new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.ConfigurationChangedEvent(result) : null);\r\n }\r\n}\r\n/**\r\n * Compatibility with old options\r\n */\r\nfunction migrateOptions(options) {\r\n const wordWrap = options.wordWrap;\r\n if (wordWrap === true) {\r\n options.wordWrap = 'on';\r\n }\r\n else if (wordWrap === false) {\r\n options.wordWrap = 'off';\r\n }\r\n const lineNumbers = options.lineNumbers;\r\n if (lineNumbers === true) {\r\n options.lineNumbers = 'on';\r\n }\r\n else if (lineNumbers === false) {\r\n options.lineNumbers = 'off';\r\n }\r\n const autoClosingBrackets = options.autoClosingBrackets;\r\n if (autoClosingBrackets === false) {\r\n options.autoClosingBrackets = 'never';\r\n options.autoClosingQuotes = 'never';\r\n options.autoSurround = 'never';\r\n }\r\n const cursorBlinking = options.cursorBlinking;\r\n if (cursorBlinking === 'visible') {\r\n options.cursorBlinking = 'solid';\r\n }\r\n const renderWhitespace = options.renderWhitespace;\r\n if (renderWhitespace === true) {\r\n options.renderWhitespace = 'boundary';\r\n }\r\n else if (renderWhitespace === false) {\r\n options.renderWhitespace = 'none';\r\n }\r\n const renderLineHighlight = options.renderLineHighlight;\r\n if (renderLineHighlight === true) {\r\n options.renderLineHighlight = 'line';\r\n }\r\n else if (renderLineHighlight === false) {\r\n options.renderLineHighlight = 'none';\r\n }\r\n const acceptSuggestionOnEnter = options.acceptSuggestionOnEnter;\r\n if (acceptSuggestionOnEnter === true) {\r\n options.acceptSuggestionOnEnter = 'on';\r\n }\r\n else if (acceptSuggestionOnEnter === false) {\r\n options.acceptSuggestionOnEnter = 'off';\r\n }\r\n const tabCompletion = options.tabCompletion;\r\n if (tabCompletion === false) {\r\n options.tabCompletion = 'off';\r\n }\r\n else if (tabCompletion === true) {\r\n options.tabCompletion = 'onlySnippets';\r\n }\r\n const suggest = options.suggest;\r\n if (suggest && typeof suggest.filteredTypes === 'object' && suggest.filteredTypes) {\r\n const mapping = {};\r\n mapping['method'] = 'showMethods';\r\n mapping['function'] = 'showFunctions';\r\n mapping['constructor'] = 'showConstructors';\r\n mapping['field'] = 'showFields';\r\n mapping['variable'] = 'showVariables';\r\n mapping['class'] = 'showClasses';\r\n mapping['struct'] = 'showStructs';\r\n mapping['interface'] = 'showInterfaces';\r\n mapping['module'] = 'showModules';\r\n mapping['property'] = 'showProperties';\r\n mapping['event'] = 'showEvents';\r\n mapping['operator'] = 'showOperators';\r\n mapping['unit'] = 'showUnits';\r\n mapping['value'] = 'showValues';\r\n mapping['constant'] = 'showConstants';\r\n mapping['enum'] = 'showEnums';\r\n mapping['enumMember'] = 'showEnumMembers';\r\n mapping['keyword'] = 'showKeywords';\r\n mapping['text'] = 'showWords';\r\n mapping['color'] = 'showColors';\r\n mapping['file'] = 'showFiles';\r\n mapping['reference'] = 'showReferences';\r\n mapping['folder'] = 'showFolders';\r\n mapping['typeParameter'] = 'showTypeParameters';\r\n mapping['snippet'] = 'showSnippets';\r\n (0,_base_common_collections_js__WEBPACK_IMPORTED_MODULE_10__.forEach)(mapping, entry => {\r\n const value = suggest.filteredTypes[entry.key];\r\n if (value === false) {\r\n suggest[entry.value] = value;\r\n }\r\n });\r\n // delete (<any>suggest).filteredTypes;\r\n }\r\n const hover = options.hover;\r\n if (hover === true) {\r\n options.hover = {\r\n enabled: true\r\n };\r\n }\r\n else if (hover === false) {\r\n options.hover = {\r\n enabled: false\r\n };\r\n }\r\n const parameterHints = options.parameterHints;\r\n if (parameterHints === true) {\r\n options.parameterHints = {\r\n enabled: true\r\n };\r\n }\r\n else if (parameterHints === false) {\r\n options.parameterHints = {\r\n enabled: false\r\n };\r\n }\r\n const autoIndent = options.autoIndent;\r\n if (autoIndent === true) {\r\n options.autoIndent = 'full';\r\n }\r\n else if (autoIndent === false) {\r\n options.autoIndent = 'advanced';\r\n }\r\n const matchBrackets = options.matchBrackets;\r\n if (matchBrackets === true) {\r\n options.matchBrackets = 'always';\r\n }\r\n else if (matchBrackets === false) {\r\n options.matchBrackets = 'never';\r\n }\r\n}\r\nfunction deepCloneAndMigrateOptions(_options) {\r\n const options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(_options);\r\n migrateOptions(options);\r\n return options;\r\n}\r\nclass CommonEditorConfiguration extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(isSimpleWidget, _options) {\r\n super();\r\n this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._onDidChangeFast = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeFast = this._onDidChangeFast.event;\r\n this.isSimpleWidget = isSimpleWidget;\r\n this._isDominatedByLongLines = false;\r\n this._computeOptionsMemory = new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.ComputeOptionsMemory();\r\n this._viewLineCount = 1;\r\n this._lineNumbersDigitCount = 1;\r\n this._rawOptions = deepCloneAndMigrateOptions(_options);\r\n this._readOptions = EditorConfiguration2.readOptions(this._rawOptions);\r\n this._validatedOptions = EditorConfiguration2.validateOptions(this._readOptions);\r\n this._register(_editorZoom_js__WEBPACK_IMPORTED_MODULE_6__.EditorZoom.onDidChangeZoomLevel(_ => this._recomputeOptions()));\r\n this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions()));\r\n }\r\n observeReferenceElement(dimension) {\r\n }\r\n updatePixelRatio() {\r\n }\r\n _recomputeOptions() {\r\n const oldOptions = this.options;\r\n const newOptions = this._computeInternalOptions();\r\n if (!oldOptions) {\r\n this.options = newOptions;\r\n }\r\n else {\r\n const changeEvent = EditorConfiguration2.checkEquals(oldOptions, newOptions);\r\n if (changeEvent === null) {\r\n // nothing changed!\r\n return;\r\n }\r\n this.options = newOptions;\r\n this._onDidChangeFast.fire(changeEvent);\r\n this._onDidChange.fire(changeEvent);\r\n }\r\n }\r\n getRawOptions() {\r\n return this._rawOptions;\r\n }\r\n _computeInternalOptions() {\r\n const partialEnv = this._getEnvConfiguration();\r\n const bareFontInfo = _fontInfo_js__WEBPACK_IMPORTED_MODULE_7__.BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.zoomLevel, partialEnv.pixelRatio, this.isSimpleWidget);\r\n const env = {\r\n memory: this._computeOptionsMemory,\r\n outerWidth: partialEnv.outerWidth,\r\n outerHeight: partialEnv.outerHeight,\r\n fontInfo: this.readConfiguration(bareFontInfo),\r\n extraEditorClassName: partialEnv.extraEditorClassName,\r\n isDominatedByLongLines: this._isDominatedByLongLines,\r\n viewLineCount: this._viewLineCount,\r\n lineNumbersDigitCount: this._lineNumbersDigitCount,\r\n emptySelectionClipboard: partialEnv.emptySelectionClipboard,\r\n pixelRatio: partialEnv.pixelRatio,\r\n tabFocusMode: TabFocus.getTabFocusMode(),\r\n accessibilitySupport: partialEnv.accessibilitySupport\r\n };\r\n return EditorConfiguration2.computeOptions(this._validatedOptions, env);\r\n }\r\n static _subsetEquals(base, subset) {\r\n for (const key in subset) {\r\n if (hasOwnProperty.call(subset, key)) {\r\n const subsetValue = subset[key];\r\n const baseValue = base[key];\r\n if (baseValue === subsetValue) {\r\n continue;\r\n }\r\n if (Array.isArray(baseValue) && Array.isArray(subsetValue)) {\r\n if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__.equals(baseValue, subsetValue)) {\r\n return false;\r\n }\r\n continue;\r\n }\r\n if (baseValue && typeof baseValue === 'object' && subsetValue && typeof subsetValue === 'object') {\r\n if (!this._subsetEquals(baseValue, subsetValue)) {\r\n return false;\r\n }\r\n continue;\r\n }\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n updateOptions(_newOptions) {\r\n if (typeof _newOptions === 'undefined') {\r\n return;\r\n }\r\n const newOptions = deepCloneAndMigrateOptions(_newOptions);\r\n if (CommonEditorConfiguration._subsetEquals(this._rawOptions, newOptions)) {\r\n return;\r\n }\r\n this._rawOptions = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.mixin(this._rawOptions, newOptions || {});\r\n this._readOptions = EditorConfiguration2.readOptions(this._rawOptions);\r\n this._validatedOptions = EditorConfiguration2.validateOptions(this._readOptions);\r\n this._recomputeOptions();\r\n }\r\n setIsDominatedByLongLines(isDominatedByLongLines) {\r\n this._isDominatedByLongLines = isDominatedByLongLines;\r\n this._recomputeOptions();\r\n }\r\n setMaxLineNumber(maxLineNumber) {\r\n const lineNumbersDigitCount = CommonEditorConfiguration._digitCount(maxLineNumber);\r\n if (this._lineNumbersDigitCount === lineNumbersDigitCount) {\r\n return;\r\n }\r\n this._lineNumbersDigitCount = lineNumbersDigitCount;\r\n this._recomputeOptions();\r\n }\r\n setViewLineCount(viewLineCount) {\r\n if (this._viewLineCount === viewLineCount) {\r\n return;\r\n }\r\n this._viewLineCount = viewLineCount;\r\n this._recomputeOptions();\r\n }\r\n static _digitCount(n) {\r\n let r = 0;\r\n while (n) {\r\n n = Math.floor(n / 10);\r\n r++;\r\n }\r\n return r ? r : 1;\r\n }\r\n}\r\nconst editorConfigurationBaseNode = Object.freeze({\r\n id: 'editor',\r\n order: 5,\r\n type: 'object',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorConfigurationTitle', \"Editor\"),\r\n scope: 5 /* LANGUAGE_OVERRIDABLE */,\r\n});\r\nconst configurationRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__.Registry.as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__.Extensions.Configuration);\r\nconst editorConfiguration = Object.assign(Object.assign({}, editorConfigurationBaseNode), { properties: {\r\n 'editor.tabSize': {\r\n type: 'number',\r\n default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.tabSize,\r\n minimum: 1,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('tabSize', \"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\")\r\n },\r\n // 'editor.indentSize': {\r\n // \t'anyOf': [\r\n // \t\t{\r\n // \t\t\ttype: 'string',\r\n // \t\t\tenum: ['tabSize']\r\n // \t\t},\r\n // \t\t{\r\n // \t\t\ttype: 'number',\r\n // \t\t\tminimum: 1\r\n // \t\t}\r\n // \t],\r\n // \tdefault: 'tabSize',\r\n // \tmarkdownDescription: nls.localize('indentSize', \"The number of spaces used for indentation or 'tabSize' to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\")\r\n // },\r\n 'editor.insertSpaces': {\r\n type: 'boolean',\r\n default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.insertSpaces,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('insertSpaces', \"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.\")\r\n },\r\n 'editor.detectIndentation': {\r\n type: 'boolean',\r\n default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.detectIndentation,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('detectIndentation', \"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.\")\r\n },\r\n 'editor.trimAutoWhitespace': {\r\n type: 'boolean',\r\n default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('trimAutoWhitespace', \"Remove trailing auto inserted whitespace.\")\r\n },\r\n 'editor.largeFileOptimizations': {\r\n type: 'boolean',\r\n default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('largeFileOptimizations', \"Special handling for large files to disable certain memory intensive features.\")\r\n },\r\n 'editor.wordBasedSuggestions': {\r\n type: 'boolean',\r\n default: true,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordBasedSuggestions', \"Controls whether completions should be computed based on words in the document.\")\r\n },\r\n 'editor.wordBasedSuggestionsMode': {\r\n enum: ['currentDocument', 'matchingDocuments', 'allDocuments'],\r\n default: 'matchingDocuments',\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordBasedSuggestionsMode.currentDocument', 'Only suggest words from the active document.'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordBasedSuggestionsMode.matchingDocuments', 'Suggest words from all open documents of the same language.'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordBasedSuggestionsMode.allDocuments', 'Suggest words from all open documents.')\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordBasedSuggestionsMode', \"Controls from what documents word based completions are computed.\")\r\n },\r\n 'editor.semanticHighlighting.enabled': {\r\n enum: [true, false, 'configuredByTheme'],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('semanticHighlighting.true', 'Semantic highlighting enabled for all color themes.'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('semanticHighlighting.false', 'Semantic highlighting disabled for all color themes.'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('semanticHighlighting.configuredByTheme', 'Semantic highlighting is configured by the current color theme\\'s `semanticHighlighting` setting.')\r\n ],\r\n default: 'configuredByTheme',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('semanticHighlighting.enabled', \"Controls whether the semanticHighlighting is shown for the languages that support it.\")\r\n },\r\n 'editor.stablePeek': {\r\n type: 'boolean',\r\n default: false,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('stablePeek', \"Keep peek editors open even when double clicking their content or when hitting `Escape`.\")\r\n },\r\n 'editor.maxTokenizationLineLength': {\r\n type: 'integer',\r\n default: 20000,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('maxTokenizationLineLength', \"Lines above this length will not be tokenized for performance reasons\")\r\n },\r\n 'diffEditor.maxComputationTime': {\r\n type: 'number',\r\n default: 5000,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('maxComputationTime', \"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.\")\r\n },\r\n 'diffEditor.renderSideBySide': {\r\n type: 'boolean',\r\n default: true,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('sideBySide', \"Controls whether the diff editor shows the diff side by side or inline.\")\r\n },\r\n 'diffEditor.ignoreTrimWhitespace': {\r\n type: 'boolean',\r\n default: true,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('ignoreTrimWhitespace', \"When enabled, the diff editor ignores changes in leading or trailing whitespace.\")\r\n },\r\n 'diffEditor.renderIndicators': {\r\n type: 'boolean',\r\n default: true,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderIndicators', \"Controls whether the diff editor shows +/- indicators for added/removed changes.\")\r\n },\r\n 'diffEditor.codeLens': {\r\n type: 'boolean',\r\n default: false,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('codeLens', \"Controls whether the editor shows CodeLens.\")\r\n },\r\n 'diffEditor.wordWrap': {\r\n type: 'string',\r\n enum: ['off', 'on', 'inherit'],\r\n default: 'inherit',\r\n markdownEnumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordWrap.off', \"Lines will never wrap.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordWrap.on', \"Lines will wrap at the viewport width.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordWrap.inherit', \"Lines will wrap according to the `#editor.wordWrap#` setting.\"),\r\n ]\r\n }\r\n } });\r\nfunction isConfigurationPropertySchema(x) {\r\n return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined');\r\n}\r\n// Add properties from the Editor Option Registry\r\nfor (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.editorOptionsRegistry) {\r\n const schema = editorOption.schema;\r\n if (typeof schema !== 'undefined') {\r\n if (isConfigurationPropertySchema(schema)) {\r\n // This is a single schema contribution\r\n editorConfiguration.properties[`editor.${editorOption.name}`] = schema;\r\n }\r\n else {\r\n for (let key in schema) {\r\n if (hasOwnProperty.call(schema, key)) {\r\n editorConfiguration.properties[key] = schema[key];\r\n }\r\n }\r\n }\r\n }\r\n}\r\nlet cachedEditorConfigurationKeys = null;\r\nfunction getEditorConfigurationKeys() {\r\n if (cachedEditorConfigurationKeys === null) {\r\n cachedEditorConfigurationKeys = Object.create(null);\r\n Object.keys(editorConfiguration.properties).forEach((prop) => {\r\n cachedEditorConfigurationKeys[prop] = true;\r\n });\r\n }\r\n return cachedEditorConfigurationKeys;\r\n}\r\nfunction isEditorConfigurationKey(key) {\r\n const editorConfigurationKeys = getEditorConfigurationKeys();\r\n return (editorConfigurationKeys[`editor.${key}`] || false);\r\n}\r\nfunction isDiffEditorConfigurationKey(key) {\r\n const editorConfigurationKeys = getEditorConfigurationKeys();\r\n return (editorConfigurationKeys[`diffEditor.${key}`] || false);\r\n}\r\nconfigurationRegistry.registerConfiguration(editorConfiguration);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MINIMAP_GUTTER_WIDTH\": () => (/* binding */ MINIMAP_GUTTER_WIDTH),\n/* harmony export */ \"ConfigurationChangedEvent\": () => (/* binding */ ConfigurationChangedEvent),\n/* harmony export */ \"ValidatedEditorOptions\": () => (/* binding */ ValidatedEditorOptions),\n/* harmony export */ \"ComputeOptionsMemory\": () => (/* binding */ ComputeOptionsMemory),\n/* harmony export */ \"boolean\": () => (/* binding */ boolean),\n/* harmony export */ \"stringSet\": () => (/* binding */ stringSet),\n/* harmony export */ \"TextEditorCursorStyle\": () => (/* binding */ TextEditorCursorStyle),\n/* harmony export */ \"EditorFontLigatures\": () => (/* binding */ EditorFontLigatures),\n/* harmony export */ \"EditorLayoutInfoComputer\": () => (/* binding */ EditorLayoutInfoComputer),\n/* harmony export */ \"filterValidationDecorations\": () => (/* binding */ filterValidationDecorations),\n/* harmony export */ \"EDITOR_FONT_DEFAULTS\": () => (/* binding */ EDITOR_FONT_DEFAULTS),\n/* harmony export */ \"EDITOR_MODEL_DEFAULTS\": () => (/* binding */ EDITOR_MODEL_DEFAULTS),\n/* harmony export */ \"editorOptionsRegistry\": () => (/* binding */ editorOptionsRegistry),\n/* harmony export */ \"EditorOptions\": () => (/* binding */ EditorOptions)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/wordHelper.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n/**\r\n * @internal\r\n * The width of the minimap gutter, in pixels.\r\n */\r\nconst MINIMAP_GUTTER_WIDTH = 8;\r\n//#endregion\r\n/**\r\n * An event describing that the configuration of the editor has changed.\r\n */\r\nclass ConfigurationChangedEvent {\r\n /**\r\n * @internal\r\n */\r\n constructor(values) {\r\n this._values = values;\r\n }\r\n hasChanged(id) {\r\n return this._values[id];\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass ValidatedEditorOptions {\r\n constructor() {\r\n this._values = [];\r\n }\r\n _read(option) {\r\n return this._values[option];\r\n }\r\n get(id) {\r\n return this._values[id];\r\n }\r\n _write(option, value) {\r\n this._values[option] = value;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass ComputeOptionsMemory {\r\n constructor() {\r\n this.stableMinimapLayoutInput = null;\r\n this.stableFitMaxMinimapScale = 0;\r\n this.stableFitRemainingWidth = 0;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass BaseEditorOption {\r\n constructor(id, name, defaultValue, schema) {\r\n this.id = id;\r\n this.name = name;\r\n this.defaultValue = defaultValue;\r\n this.schema = schema;\r\n }\r\n compute(env, options, value) {\r\n return value;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass ComputedEditorOption {\r\n constructor(id, deps = null) {\r\n this.schema = undefined;\r\n this.id = id;\r\n this.name = '_never_';\r\n this.defaultValue = undefined;\r\n this.deps = deps;\r\n }\r\n validate(input) {\r\n return this.defaultValue;\r\n }\r\n}\r\nclass SimpleEditorOption {\r\n constructor(id, name, defaultValue, schema) {\r\n this.id = id;\r\n this.name = name;\r\n this.defaultValue = defaultValue;\r\n this.schema = schema;\r\n }\r\n validate(input) {\r\n if (typeof input === 'undefined') {\r\n return this.defaultValue;\r\n }\r\n return input;\r\n }\r\n compute(env, options, value) {\r\n return value;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction boolean(value, defaultValue) {\r\n if (typeof value === 'undefined') {\r\n return defaultValue;\r\n }\r\n if (value === 'false') {\r\n // treat the string 'false' as false\r\n return false;\r\n }\r\n return Boolean(value);\r\n}\r\nclass EditorBooleanOption extends SimpleEditorOption {\r\n constructor(id, name, defaultValue, schema = undefined) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'boolean';\r\n schema.default = defaultValue;\r\n }\r\n super(id, name, defaultValue, schema);\r\n }\r\n validate(input) {\r\n return boolean(input, this.defaultValue);\r\n }\r\n}\r\nclass EditorIntOption extends SimpleEditorOption {\r\n constructor(id, name, defaultValue, minimum, maximum, schema = undefined) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'integer';\r\n schema.default = defaultValue;\r\n schema.minimum = minimum;\r\n schema.maximum = maximum;\r\n }\r\n super(id, name, defaultValue, schema);\r\n this.minimum = minimum;\r\n this.maximum = maximum;\r\n }\r\n static clampedInt(value, defaultValue, minimum, maximum) {\r\n if (typeof value === 'undefined') {\r\n return defaultValue;\r\n }\r\n let r = parseInt(value, 10);\r\n if (isNaN(r)) {\r\n return defaultValue;\r\n }\r\n r = Math.max(minimum, r);\r\n r = Math.min(maximum, r);\r\n return r | 0;\r\n }\r\n validate(input) {\r\n return EditorIntOption.clampedInt(input, this.defaultValue, this.minimum, this.maximum);\r\n }\r\n}\r\nclass EditorFloatOption extends SimpleEditorOption {\r\n constructor(id, name, defaultValue, validationFn, schema) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'number';\r\n schema.default = defaultValue;\r\n }\r\n super(id, name, defaultValue, schema);\r\n this.validationFn = validationFn;\r\n }\r\n static clamp(n, min, max) {\r\n if (n < min) {\r\n return min;\r\n }\r\n if (n > max) {\r\n return max;\r\n }\r\n return n;\r\n }\r\n static float(value, defaultValue) {\r\n if (typeof value === 'number') {\r\n return value;\r\n }\r\n if (typeof value === 'undefined') {\r\n return defaultValue;\r\n }\r\n const r = parseFloat(value);\r\n return (isNaN(r) ? defaultValue : r);\r\n }\r\n validate(input) {\r\n return this.validationFn(EditorFloatOption.float(input, this.defaultValue));\r\n }\r\n}\r\nclass EditorStringOption extends SimpleEditorOption {\r\n static string(value, defaultValue) {\r\n if (typeof value !== 'string') {\r\n return defaultValue;\r\n }\r\n return value;\r\n }\r\n constructor(id, name, defaultValue, schema = undefined) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'string';\r\n schema.default = defaultValue;\r\n }\r\n super(id, name, defaultValue, schema);\r\n }\r\n validate(input) {\r\n return EditorStringOption.string(input, this.defaultValue);\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction stringSet(value, defaultValue, allowedValues) {\r\n if (typeof value !== 'string') {\r\n return defaultValue;\r\n }\r\n if (allowedValues.indexOf(value) === -1) {\r\n return defaultValue;\r\n }\r\n return value;\r\n}\r\nclass EditorStringEnumOption extends SimpleEditorOption {\r\n constructor(id, name, defaultValue, allowedValues, schema = undefined) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'string';\r\n schema.enum = allowedValues;\r\n schema.default = defaultValue;\r\n }\r\n super(id, name, defaultValue, schema);\r\n this._allowedValues = allowedValues;\r\n }\r\n validate(input) {\r\n return stringSet(input, this.defaultValue, this._allowedValues);\r\n }\r\n}\r\nclass EditorEnumOption extends BaseEditorOption {\r\n constructor(id, name, defaultValue, defaultStringValue, allowedValues, convert, schema = undefined) {\r\n if (typeof schema !== 'undefined') {\r\n schema.type = 'string';\r\n schema.enum = allowedValues;\r\n schema.default = defaultStringValue;\r\n }\r\n super(id, name, defaultValue, schema);\r\n this._allowedValues = allowedValues;\r\n this._convert = convert;\r\n }\r\n validate(input) {\r\n if (typeof input !== 'string') {\r\n return this.defaultValue;\r\n }\r\n if (this._allowedValues.indexOf(input) === -1) {\r\n return this.defaultValue;\r\n }\r\n return this._convert(input);\r\n }\r\n}\r\n//#endregion\r\n//#region autoIndent\r\nfunction _autoIndentFromString(autoIndent) {\r\n switch (autoIndent) {\r\n case 'none': return 0 /* None */;\r\n case 'keep': return 1 /* Keep */;\r\n case 'brackets': return 2 /* Brackets */;\r\n case 'advanced': return 3 /* Advanced */;\r\n case 'full': return 4 /* Full */;\r\n }\r\n}\r\n//#endregion\r\n//#region accessibilitySupport\r\nclass EditorAccessibilitySupport extends BaseEditorOption {\r\n constructor() {\r\n super(2 /* accessibilitySupport */, 'accessibilitySupport', 0 /* Unknown */, {\r\n type: 'string',\r\n enum: ['auto', 'on', 'off'],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilitySupport.auto', \"The editor will use platform APIs to detect when a Screen Reader is attached.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilitySupport.on', \"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilitySupport.off', \"The editor will never be optimized for usage with a Screen Reader.\"),\r\n ],\r\n default: 'auto',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilitySupport', \"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.\")\r\n });\r\n }\r\n validate(input) {\r\n switch (input) {\r\n case 'auto': return 0 /* Unknown */;\r\n case 'off': return 1 /* Disabled */;\r\n case 'on': return 2 /* Enabled */;\r\n }\r\n return this.defaultValue;\r\n }\r\n compute(env, options, value) {\r\n if (value === 0 /* Unknown */) {\r\n // The editor reads the `accessibilitySupport` from the environment\r\n return env.accessibilitySupport;\r\n }\r\n return value;\r\n }\r\n}\r\nclass EditorComments extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n insertSpace: true,\r\n ignoreEmptyLines: true,\r\n };\r\n super(16 /* comments */, 'comments', defaults, {\r\n 'editor.comments.insertSpace': {\r\n type: 'boolean',\r\n default: defaults.insertSpace,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comments.insertSpace', \"Controls whether a space character is inserted when commenting.\")\r\n },\r\n 'editor.comments.ignoreEmptyLines': {\r\n type: 'boolean',\r\n default: defaults.ignoreEmptyLines,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comments.ignoreEmptyLines', 'Controls if empty lines should be ignored with toggle, add or remove actions for line comments.')\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n insertSpace: boolean(input.insertSpace, this.defaultValue.insertSpace),\r\n ignoreEmptyLines: boolean(input.ignoreEmptyLines, this.defaultValue.ignoreEmptyLines),\r\n };\r\n }\r\n}\r\nfunction _cursorBlinkingStyleFromString(cursorBlinkingStyle) {\r\n switch (cursorBlinkingStyle) {\r\n case 'blink': return 1 /* Blink */;\r\n case 'smooth': return 2 /* Smooth */;\r\n case 'phase': return 3 /* Phase */;\r\n case 'expand': return 4 /* Expand */;\r\n case 'solid': return 5 /* Solid */;\r\n }\r\n}\r\n//#endregion\r\n//#region cursorStyle\r\n/**\r\n * The style in which the editor's cursor should be rendered.\r\n */\r\nvar TextEditorCursorStyle;\r\n(function (TextEditorCursorStyle) {\r\n /**\r\n * As a vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\r\n /**\r\n * As a block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\r\n /**\r\n * As a horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\r\n /**\r\n * As a thin vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\r\n /**\r\n * As an outlined block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\r\n /**\r\n * As a thin horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\r\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\r\nfunction _cursorStyleFromString(cursorStyle) {\r\n switch (cursorStyle) {\r\n case 'line': return TextEditorCursorStyle.Line;\r\n case 'block': return TextEditorCursorStyle.Block;\r\n case 'underline': return TextEditorCursorStyle.Underline;\r\n case 'line-thin': return TextEditorCursorStyle.LineThin;\r\n case 'block-outline': return TextEditorCursorStyle.BlockOutline;\r\n case 'underline-thin': return TextEditorCursorStyle.UnderlineThin;\r\n }\r\n}\r\n//#endregion\r\n//#region editorClassName\r\nclass EditorClassName extends ComputedEditorOption {\r\n constructor() {\r\n super(121 /* editorClassName */, [60 /* mouseStyle */, 29 /* extraEditorClassName */]);\r\n }\r\n compute(env, options, _) {\r\n const classNames = ['monaco-editor'];\r\n if (options.get(29 /* extraEditorClassName */)) {\r\n classNames.push(options.get(29 /* extraEditorClassName */));\r\n }\r\n if (env.extraEditorClassName) {\r\n classNames.push(env.extraEditorClassName);\r\n }\r\n if (options.get(60 /* mouseStyle */) === 'default') {\r\n classNames.push('mouse-default');\r\n }\r\n else if (options.get(60 /* mouseStyle */) === 'copy') {\r\n classNames.push('mouse-copy');\r\n }\r\n if (options.get(95 /* showUnused */)) {\r\n classNames.push('showUnused');\r\n }\r\n if (options.get(119 /* showDeprecated */)) {\r\n classNames.push('showDeprecated');\r\n }\r\n return classNames.join(' ');\r\n }\r\n}\r\n//#endregion\r\n//#region emptySelectionClipboard\r\nclass EditorEmptySelectionClipboard extends EditorBooleanOption {\r\n constructor() {\r\n super(28 /* emptySelectionClipboard */, 'emptySelectionClipboard', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('emptySelectionClipboard', \"Controls whether copying without a selection copies the current line.\") });\r\n }\r\n compute(env, options, value) {\r\n return value && env.emptySelectionClipboard;\r\n }\r\n}\r\nclass EditorFind extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n cursorMoveOnType: true,\r\n seedSearchStringFromSelection: true,\r\n autoFindInSelection: 'never',\r\n globalFindClipboard: false,\r\n addExtraSpaceOnTop: true,\r\n loop: true\r\n };\r\n super(31 /* find */, 'find', defaults, {\r\n 'editor.find.cursorMoveOnType': {\r\n type: 'boolean',\r\n default: defaults.cursorMoveOnType,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.cursorMoveOnType', \"Controls whether the cursor should jump to find matches while typing.\")\r\n },\r\n 'editor.find.seedSearchStringFromSelection': {\r\n type: 'boolean',\r\n default: defaults.seedSearchStringFromSelection,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.seedSearchStringFromSelection', \"Controls whether the search string in the Find Widget is seeded from the editor selection.\")\r\n },\r\n 'editor.find.autoFindInSelection': {\r\n type: 'string',\r\n enum: ['never', 'always', 'multiline'],\r\n default: defaults.autoFindInSelection,\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.find.autoFindInSelection.never', 'Never turn on Find in selection automatically (default)'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.find.autoFindInSelection.always', 'Always turn on Find in selection automatically'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.find.autoFindInSelection.multiline', 'Turn on Find in selection automatically when multiple lines of content are selected.')\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.autoFindInSelection', \"Controls the condition for turning on find in selection automatically.\")\r\n },\r\n 'editor.find.globalFindClipboard': {\r\n type: 'boolean',\r\n default: defaults.globalFindClipboard,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.globalFindClipboard', \"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.\"),\r\n included: _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh\r\n },\r\n 'editor.find.addExtraSpaceOnTop': {\r\n type: 'boolean',\r\n default: defaults.addExtraSpaceOnTop,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.addExtraSpaceOnTop', \"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.\")\r\n },\r\n 'editor.find.loop': {\r\n type: 'boolean',\r\n default: defaults.loop,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('find.loop', \"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n cursorMoveOnType: boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType),\r\n seedSearchStringFromSelection: boolean(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection),\r\n autoFindInSelection: typeof _input.autoFindInSelection === 'boolean'\r\n ? (_input.autoFindInSelection ? 'always' : 'never')\r\n : stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),\r\n globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),\r\n addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),\r\n loop: boolean(input.loop, this.defaultValue.loop),\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region fontLigatures\r\n/**\r\n * @internal\r\n */\r\nclass EditorFontLigatures extends BaseEditorOption {\r\n constructor() {\r\n super(39 /* fontLigatures */, 'fontLigatures', EditorFontLigatures.OFF, {\r\n anyOf: [\r\n {\r\n type: 'boolean',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontLigatures', \"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.\"),\r\n },\r\n {\r\n type: 'string',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontFeatureSettings', \"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.\")\r\n }\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontLigaturesGeneral', \"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property.\"),\r\n default: false\r\n });\r\n }\r\n validate(input) {\r\n if (typeof input === 'undefined') {\r\n return this.defaultValue;\r\n }\r\n if (typeof input === 'string') {\r\n if (input === 'false') {\r\n return EditorFontLigatures.OFF;\r\n }\r\n if (input === 'true') {\r\n return EditorFontLigatures.ON;\r\n }\r\n return input;\r\n }\r\n if (Boolean(input)) {\r\n return EditorFontLigatures.ON;\r\n }\r\n return EditorFontLigatures.OFF;\r\n }\r\n}\r\nEditorFontLigatures.OFF = '\"liga\" off, \"calt\" off';\r\nEditorFontLigatures.ON = '\"liga\" on, \"calt\" on';\r\n//#endregion\r\n//#region fontInfo\r\nclass EditorFontInfo extends ComputedEditorOption {\r\n constructor() {\r\n super(38 /* fontInfo */);\r\n }\r\n compute(env, options, _) {\r\n return env.fontInfo;\r\n }\r\n}\r\n//#endregion\r\n//#region fontSize\r\nclass EditorFontSize extends SimpleEditorOption {\r\n constructor() {\r\n super(40 /* fontSize */, 'fontSize', EDITOR_FONT_DEFAULTS.fontSize, {\r\n type: 'number',\r\n minimum: 6,\r\n maximum: 100,\r\n default: EDITOR_FONT_DEFAULTS.fontSize,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontSize', \"Controls the font size in pixels.\")\r\n });\r\n }\r\n validate(input) {\r\n let r = EditorFloatOption.float(input, this.defaultValue);\r\n if (r === 0) {\r\n return EDITOR_FONT_DEFAULTS.fontSize;\r\n }\r\n return EditorFloatOption.clamp(r, 6, 100);\r\n }\r\n compute(env, options, value) {\r\n // The final fontSize respects the editor zoom level.\r\n // So take the result from env.fontInfo\r\n return env.fontInfo.fontSize;\r\n }\r\n}\r\n//#endregion\r\n//#region fontWeight\r\nclass EditorFontWeight extends BaseEditorOption {\r\n constructor() {\r\n super(41 /* fontWeight */, 'fontWeight', EDITOR_FONT_DEFAULTS.fontWeight, {\r\n anyOf: [\r\n {\r\n type: 'number',\r\n minimum: EditorFontWeight.MINIMUM_VALUE,\r\n maximum: EditorFontWeight.MAXIMUM_VALUE,\r\n errorMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontWeightErrorMessage', \"Only \\\"normal\\\" and \\\"bold\\\" keywords or numbers between 1 and 1000 are allowed.\")\r\n },\r\n {\r\n type: 'string',\r\n pattern: '^(normal|bold|1000|[1-9][0-9]{0,2})$'\r\n },\r\n {\r\n enum: EditorFontWeight.SUGGESTION_VALUES\r\n }\r\n ],\r\n default: EDITOR_FONT_DEFAULTS.fontWeight,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontWeight', \"Controls the font weight. Accepts \\\"normal\\\" and \\\"bold\\\" keywords or numbers between 1 and 1000.\")\r\n });\r\n }\r\n validate(input) {\r\n if (input === 'normal' || input === 'bold') {\r\n return input;\r\n }\r\n return String(EditorIntOption.clampedInt(input, EDITOR_FONT_DEFAULTS.fontWeight, EditorFontWeight.MINIMUM_VALUE, EditorFontWeight.MAXIMUM_VALUE));\r\n }\r\n}\r\nEditorFontWeight.SUGGESTION_VALUES = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'];\r\nEditorFontWeight.MINIMUM_VALUE = 1;\r\nEditorFontWeight.MAXIMUM_VALUE = 1000;\r\nclass EditorGoToLocation extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n multiple: 'peek',\r\n multipleDefinitions: 'peek',\r\n multipleTypeDefinitions: 'peek',\r\n multipleDeclarations: 'peek',\r\n multipleImplementations: 'peek',\r\n multipleReferences: 'peek',\r\n alternativeDefinitionCommand: 'editor.action.goToReferences',\r\n alternativeTypeDefinitionCommand: 'editor.action.goToReferences',\r\n alternativeDeclarationCommand: 'editor.action.goToReferences',\r\n alternativeImplementationCommand: '',\r\n alternativeReferenceCommand: '',\r\n };\r\n const jsonSubset = {\r\n type: 'string',\r\n enum: ['peek', 'gotoAndPeek', 'goto'],\r\n default: defaults.multiple,\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.gotoLocation.multiple.peek', 'Show peek view of the results (default)'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.gotoLocation.multiple.gotoAndPeek', 'Go to the primary result and show a peek view'),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.gotoLocation.multiple.goto', 'Go to the primary result and enable peek-less navigation to others')\r\n ]\r\n };\r\n super(45 /* gotoLocation */, 'gotoLocation', defaults, {\r\n 'editor.gotoLocation.multiple': {\r\n deprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.gotoLocation.multiple.deprecated', \"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.\"),\r\n },\r\n 'editor.gotoLocation.multipleDefinitions': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.editor.gotoLocation.multipleDefinitions', \"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.\") }, jsonSubset),\r\n 'editor.gotoLocation.multipleTypeDefinitions': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.editor.gotoLocation.multipleTypeDefinitions', \"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.\") }, jsonSubset),\r\n 'editor.gotoLocation.multipleDeclarations': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.editor.gotoLocation.multipleDeclarations', \"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.\") }, jsonSubset),\r\n 'editor.gotoLocation.multipleImplementations': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.editor.gotoLocation.multipleImplemenattions', \"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.\") }, jsonSubset),\r\n 'editor.gotoLocation.multipleReferences': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.editor.gotoLocation.multipleReferences', \"Controls the behavior the 'Go to References'-command when multiple target locations exist.\") }, jsonSubset),\r\n 'editor.gotoLocation.alternativeDefinitionCommand': {\r\n type: 'string',\r\n default: defaults.alternativeDefinitionCommand,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('alternativeDefinitionCommand', \"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.\")\r\n },\r\n 'editor.gotoLocation.alternativeTypeDefinitionCommand': {\r\n type: 'string',\r\n default: defaults.alternativeTypeDefinitionCommand,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('alternativeTypeDefinitionCommand', \"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.\")\r\n },\r\n 'editor.gotoLocation.alternativeDeclarationCommand': {\r\n type: 'string',\r\n default: defaults.alternativeDeclarationCommand,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('alternativeDeclarationCommand', \"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.\")\r\n },\r\n 'editor.gotoLocation.alternativeImplementationCommand': {\r\n type: 'string',\r\n default: defaults.alternativeImplementationCommand,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('alternativeImplementationCommand', \"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.\")\r\n },\r\n 'editor.gotoLocation.alternativeReferenceCommand': {\r\n type: 'string',\r\n default: defaults.alternativeReferenceCommand,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('alternativeReferenceCommand', \"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n var _a, _b, _c, _d, _e;\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n multiple: stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']),\r\n multipleDefinitions: (_a = input.multipleDefinitions) !== null && _a !== void 0 ? _a : stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),\r\n multipleTypeDefinitions: (_b = input.multipleTypeDefinitions) !== null && _b !== void 0 ? _b : stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),\r\n multipleDeclarations: (_c = input.multipleDeclarations) !== null && _c !== void 0 ? _c : stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),\r\n multipleImplementations: (_d = input.multipleImplementations) !== null && _d !== void 0 ? _d : stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),\r\n multipleReferences: (_e = input.multipleReferences) !== null && _e !== void 0 ? _e : stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),\r\n alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),\r\n alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),\r\n alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),\r\n alternativeImplementationCommand: EditorStringOption.string(input.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand),\r\n alternativeReferenceCommand: EditorStringOption.string(input.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand),\r\n };\r\n }\r\n}\r\nclass EditorHover extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n enabled: true,\r\n delay: 300,\r\n sticky: true\r\n };\r\n super(48 /* hover */, 'hover', defaults, {\r\n 'editor.hover.enabled': {\r\n type: 'boolean',\r\n default: defaults.enabled,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('hover.enabled', \"Controls whether the hover is shown.\")\r\n },\r\n 'editor.hover.delay': {\r\n type: 'number',\r\n default: defaults.delay,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('hover.delay', \"Controls the delay in milliseconds after which the hover is shown.\")\r\n },\r\n 'editor.hover.sticky': {\r\n type: 'boolean',\r\n default: defaults.sticky,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('hover.sticky', \"Controls whether the hover should remain visible when mouse is moved over it.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n enabled: boolean(input.enabled, this.defaultValue.enabled),\r\n delay: EditorIntOption.clampedInt(input.delay, this.defaultValue.delay, 0, 10000),\r\n sticky: boolean(input.sticky, this.defaultValue.sticky)\r\n };\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass EditorLayoutInfoComputer extends ComputedEditorOption {\r\n constructor() {\r\n super(124 /* layoutInfo */, [\r\n 44 /* glyphMargin */, 52 /* lineDecorationsWidth */, 33 /* folding */,\r\n 59 /* minimap */, 87 /* scrollbar */, 54 /* lineNumbers */,\r\n 55 /* lineNumbersMinChars */, 89 /* scrollBeyondLastLine */,\r\n 111 /* wordWrap */, 114 /* wordWrapColumn */, 115 /* wordWrapOverride1 */, 116 /* wordWrapOverride2 */,\r\n 2 /* accessibilitySupport */\r\n ]);\r\n }\r\n compute(env, options, _) {\r\n return EditorLayoutInfoComputer.computeLayout(options, {\r\n memory: env.memory,\r\n outerWidth: env.outerWidth,\r\n outerHeight: env.outerHeight,\r\n isDominatedByLongLines: env.isDominatedByLongLines,\r\n lineHeight: env.fontInfo.lineHeight,\r\n viewLineCount: env.viewLineCount,\r\n lineNumbersDigitCount: env.lineNumbersDigitCount,\r\n typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth,\r\n maxDigitWidth: env.fontInfo.maxDigitWidth,\r\n pixelRatio: env.pixelRatio\r\n });\r\n }\r\n static computeContainedMinimapLineCount(input) {\r\n const typicalViewportLineCount = input.height / input.lineHeight;\r\n const extraLinesBeyondLastLine = input.scrollBeyondLastLine ? (typicalViewportLineCount - 1) : 0;\r\n const desiredRatio = (input.viewLineCount + extraLinesBeyondLastLine) / (input.pixelRatio * input.height);\r\n const minimapLineCount = Math.floor(input.viewLineCount / desiredRatio);\r\n return { typicalViewportLineCount, extraLinesBeyondLastLine, desiredRatio, minimapLineCount };\r\n }\r\n static _computeMinimapLayout(input, memory) {\r\n const outerWidth = input.outerWidth;\r\n const outerHeight = input.outerHeight;\r\n const pixelRatio = input.pixelRatio;\r\n if (!input.minimap.enabled) {\r\n return {\r\n renderMinimap: 0 /* None */,\r\n minimapLeft: 0,\r\n minimapWidth: 0,\r\n minimapHeightIsEditorHeight: false,\r\n minimapIsSampling: false,\r\n minimapScale: 1,\r\n minimapLineHeight: 1,\r\n minimapCanvasInnerWidth: 0,\r\n minimapCanvasInnerHeight: Math.floor(pixelRatio * outerHeight),\r\n minimapCanvasOuterWidth: 0,\r\n minimapCanvasOuterHeight: outerHeight,\r\n };\r\n }\r\n // Can use memory if only the `viewLineCount` and `remainingWidth` have changed\r\n const stableMinimapLayoutInput = memory.stableMinimapLayoutInput;\r\n const couldUseMemory = (stableMinimapLayoutInput\r\n // && input.outerWidth === lastMinimapLayoutInput.outerWidth !!! INTENTIONAL OMITTED\r\n && input.outerHeight === stableMinimapLayoutInput.outerHeight\r\n && input.lineHeight === stableMinimapLayoutInput.lineHeight\r\n && input.typicalHalfwidthCharacterWidth === stableMinimapLayoutInput.typicalHalfwidthCharacterWidth\r\n && input.pixelRatio === stableMinimapLayoutInput.pixelRatio\r\n && input.scrollBeyondLastLine === stableMinimapLayoutInput.scrollBeyondLastLine\r\n && input.minimap.enabled === stableMinimapLayoutInput.minimap.enabled\r\n && input.minimap.side === stableMinimapLayoutInput.minimap.side\r\n && input.minimap.size === stableMinimapLayoutInput.minimap.size\r\n && input.minimap.showSlider === stableMinimapLayoutInput.minimap.showSlider\r\n && input.minimap.renderCharacters === stableMinimapLayoutInput.minimap.renderCharacters\r\n && input.minimap.maxColumn === stableMinimapLayoutInput.minimap.maxColumn\r\n && input.minimap.scale === stableMinimapLayoutInput.minimap.scale\r\n && input.verticalScrollbarWidth === stableMinimapLayoutInput.verticalScrollbarWidth\r\n // && input.viewLineCount === lastMinimapLayoutInput.viewLineCount !!! INTENTIONAL OMITTED\r\n // && input.remainingWidth === lastMinimapLayoutInput.remainingWidth !!! INTENTIONAL OMITTED\r\n && input.isViewportWrapping === stableMinimapLayoutInput.isViewportWrapping);\r\n const lineHeight = input.lineHeight;\r\n const typicalHalfwidthCharacterWidth = input.typicalHalfwidthCharacterWidth;\r\n const scrollBeyondLastLine = input.scrollBeyondLastLine;\r\n const minimapRenderCharacters = input.minimap.renderCharacters;\r\n let minimapScale = (pixelRatio >= 2 ? Math.round(input.minimap.scale * 2) : input.minimap.scale);\r\n const minimapMaxColumn = input.minimap.maxColumn;\r\n const minimapSize = input.minimap.size;\r\n const minimapSide = input.minimap.side;\r\n const verticalScrollbarWidth = input.verticalScrollbarWidth;\r\n const viewLineCount = input.viewLineCount;\r\n const remainingWidth = input.remainingWidth;\r\n const isViewportWrapping = input.isViewportWrapping;\r\n const baseCharHeight = minimapRenderCharacters ? 2 : 3;\r\n let minimapCanvasInnerHeight = Math.floor(pixelRatio * outerHeight);\r\n const minimapCanvasOuterHeight = minimapCanvasInnerHeight / pixelRatio;\r\n let minimapHeightIsEditorHeight = false;\r\n let minimapIsSampling = false;\r\n let minimapLineHeight = baseCharHeight * minimapScale;\r\n let minimapCharWidth = minimapScale / pixelRatio;\r\n let minimapWidthMultiplier = 1;\r\n if (minimapSize === 'fill' || minimapSize === 'fit') {\r\n const { typicalViewportLineCount, extraLinesBeyondLastLine, desiredRatio, minimapLineCount } = EditorLayoutInfoComputer.computeContainedMinimapLineCount({\r\n viewLineCount: viewLineCount,\r\n scrollBeyondLastLine: scrollBeyondLastLine,\r\n height: outerHeight,\r\n lineHeight: lineHeight,\r\n pixelRatio: pixelRatio\r\n });\r\n // ratio is intentionally not part of the layout to avoid the layout changing all the time\r\n // when doing sampling\r\n const ratio = viewLineCount / minimapLineCount;\r\n if (ratio > 1) {\r\n minimapHeightIsEditorHeight = true;\r\n minimapIsSampling = true;\r\n minimapScale = 1;\r\n minimapLineHeight = 1;\r\n minimapCharWidth = minimapScale / pixelRatio;\r\n }\r\n else {\r\n let fitBecomesFill = false;\r\n let maxMinimapScale = minimapScale + 1;\r\n if (minimapSize === 'fit') {\r\n const effectiveMinimapHeight = Math.ceil((viewLineCount + extraLinesBeyondLastLine) * minimapLineHeight);\r\n if (isViewportWrapping && couldUseMemory && remainingWidth <= memory.stableFitRemainingWidth) {\r\n // There is a loop when using `fit` and viewport wrapping:\r\n // - view line count impacts minimap layout\r\n // - minimap layout impacts viewport width\r\n // - viewport width impacts view line count\r\n // To break the loop, once we go to a smaller minimap scale, we try to stick with it.\r\n fitBecomesFill = true;\r\n maxMinimapScale = memory.stableFitMaxMinimapScale;\r\n }\r\n else {\r\n fitBecomesFill = (effectiveMinimapHeight > minimapCanvasInnerHeight);\r\n if (isViewportWrapping && fitBecomesFill) {\r\n // remember for next time\r\n memory.stableMinimapLayoutInput = input;\r\n memory.stableFitRemainingWidth = remainingWidth;\r\n }\r\n else {\r\n memory.stableMinimapLayoutInput = null;\r\n memory.stableFitRemainingWidth = 0;\r\n }\r\n }\r\n }\r\n if (minimapSize === 'fill' || fitBecomesFill) {\r\n minimapHeightIsEditorHeight = true;\r\n const configuredMinimapScale = minimapScale;\r\n minimapLineHeight = Math.min(lineHeight * pixelRatio, Math.max(1, Math.floor(1 / desiredRatio)));\r\n minimapScale = Math.min(maxMinimapScale, Math.max(1, Math.floor(minimapLineHeight / baseCharHeight)));\r\n if (minimapScale > configuredMinimapScale) {\r\n minimapWidthMultiplier = Math.min(2, minimapScale / configuredMinimapScale);\r\n }\r\n minimapCharWidth = minimapScale / pixelRatio / minimapWidthMultiplier;\r\n minimapCanvasInnerHeight = Math.ceil((Math.max(typicalViewportLineCount, viewLineCount + extraLinesBeyondLastLine)) * minimapLineHeight);\r\n if (isViewportWrapping && fitBecomesFill) {\r\n memory.stableFitMaxMinimapScale = minimapScale;\r\n }\r\n }\r\n }\r\n }\r\n // Given:\r\n // (leaving 2px for the cursor to have space after the last character)\r\n // viewportColumn = (contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth\r\n // minimapWidth = viewportColumn * minimapCharWidth\r\n // contentWidth = remainingWidth - minimapWidth\r\n // What are good values for contentWidth and minimapWidth ?\r\n // minimapWidth = ((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth) * minimapCharWidth\r\n // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth - 2) * minimapCharWidth\r\n // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth - 2) * minimapCharWidth\r\n // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth\r\n // minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)\r\n const minimapMaxWidth = Math.floor(minimapMaxColumn * minimapCharWidth);\r\n const minimapWidth = Math.min(minimapMaxWidth, Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))) + MINIMAP_GUTTER_WIDTH);\r\n let minimapCanvasInnerWidth = Math.floor(pixelRatio * minimapWidth);\r\n const minimapCanvasOuterWidth = minimapCanvasInnerWidth / pixelRatio;\r\n minimapCanvasInnerWidth = Math.floor(minimapCanvasInnerWidth * minimapWidthMultiplier);\r\n const renderMinimap = (minimapRenderCharacters ? 1 /* Text */ : 2 /* Blocks */);\r\n const minimapLeft = (minimapSide === 'left' ? 0 : (outerWidth - minimapWidth - verticalScrollbarWidth));\r\n return {\r\n renderMinimap,\r\n minimapLeft,\r\n minimapWidth,\r\n minimapHeightIsEditorHeight,\r\n minimapIsSampling,\r\n minimapScale,\r\n minimapLineHeight,\r\n minimapCanvasInnerWidth,\r\n minimapCanvasInnerHeight,\r\n minimapCanvasOuterWidth,\r\n minimapCanvasOuterHeight,\r\n };\r\n }\r\n static computeLayout(options, env) {\r\n const outerWidth = env.outerWidth | 0;\r\n const outerHeight = env.outerHeight | 0;\r\n const lineHeight = env.lineHeight | 0;\r\n const lineNumbersDigitCount = env.lineNumbersDigitCount | 0;\r\n const typicalHalfwidthCharacterWidth = env.typicalHalfwidthCharacterWidth;\r\n const maxDigitWidth = env.maxDigitWidth;\r\n const pixelRatio = env.pixelRatio;\r\n const viewLineCount = env.viewLineCount;\r\n const wordWrapOverride2 = options.get(116 /* wordWrapOverride2 */);\r\n const wordWrapOverride1 = (wordWrapOverride2 === 'inherit' ? options.get(115 /* wordWrapOverride1 */) : wordWrapOverride2);\r\n const wordWrap = (wordWrapOverride1 === 'inherit' ? options.get(111 /* wordWrap */) : wordWrapOverride1);\r\n const wordWrapColumn = options.get(114 /* wordWrapColumn */);\r\n const accessibilitySupport = options.get(2 /* accessibilitySupport */);\r\n const isDominatedByLongLines = env.isDominatedByLongLines;\r\n const showGlyphMargin = options.get(44 /* glyphMargin */);\r\n const showLineNumbers = (options.get(54 /* lineNumbers */).renderType !== 0 /* Off */);\r\n const lineNumbersMinChars = options.get(55 /* lineNumbersMinChars */);\r\n const scrollBeyondLastLine = options.get(89 /* scrollBeyondLastLine */);\r\n const minimap = options.get(59 /* minimap */);\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n const verticalScrollbarWidth = scrollbar.verticalScrollbarSize;\r\n const verticalScrollbarHasArrows = scrollbar.verticalHasArrows;\r\n const scrollbarArrowSize = scrollbar.arrowSize;\r\n const horizontalScrollbarHeight = scrollbar.horizontalScrollbarSize;\r\n const rawLineDecorationsWidth = options.get(52 /* lineDecorationsWidth */);\r\n const folding = options.get(33 /* folding */);\r\n let lineDecorationsWidth;\r\n if (typeof rawLineDecorationsWidth === 'string' && /^\\d+(\\.\\d+)?ch$/.test(rawLineDecorationsWidth)) {\r\n const multiple = parseFloat(rawLineDecorationsWidth.substr(0, rawLineDecorationsWidth.length - 2));\r\n lineDecorationsWidth = EditorIntOption.clampedInt(multiple * typicalHalfwidthCharacterWidth, 0, 0, 1000);\r\n }\r\n else {\r\n lineDecorationsWidth = EditorIntOption.clampedInt(rawLineDecorationsWidth, 0, 0, 1000);\r\n }\r\n if (folding) {\r\n lineDecorationsWidth += 16;\r\n }\r\n let lineNumbersWidth = 0;\r\n if (showLineNumbers) {\r\n const digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars);\r\n lineNumbersWidth = Math.round(digitCount * maxDigitWidth);\r\n }\r\n let glyphMarginWidth = 0;\r\n if (showGlyphMargin) {\r\n glyphMarginWidth = lineHeight;\r\n }\r\n let glyphMarginLeft = 0;\r\n let lineNumbersLeft = glyphMarginLeft + glyphMarginWidth;\r\n let decorationsLeft = lineNumbersLeft + lineNumbersWidth;\r\n let contentLeft = decorationsLeft + lineDecorationsWidth;\r\n const remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth;\r\n let isWordWrapMinified = false;\r\n let isViewportWrapping = false;\r\n let wrappingColumn = -1;\r\n if (accessibilitySupport !== 2 /* Enabled */) {\r\n // See https://github.com/microsoft/vscode/issues/27766\r\n // Never enable wrapping when a screen reader is attached\r\n // because arrow down etc. will not move the cursor in the way\r\n // a screen reader expects.\r\n if (wordWrapOverride1 === 'inherit' && isDominatedByLongLines) {\r\n // Force viewport width wrapping if model is dominated by long lines\r\n isWordWrapMinified = true;\r\n isViewportWrapping = true;\r\n }\r\n else if (wordWrap === 'on' || wordWrap === 'bounded') {\r\n isViewportWrapping = true;\r\n }\r\n else if (wordWrap === 'wordWrapColumn') {\r\n wrappingColumn = wordWrapColumn;\r\n }\r\n }\r\n const minimapLayout = EditorLayoutInfoComputer._computeMinimapLayout({\r\n outerWidth: outerWidth,\r\n outerHeight: outerHeight,\r\n lineHeight: lineHeight,\r\n typicalHalfwidthCharacterWidth: typicalHalfwidthCharacterWidth,\r\n pixelRatio: pixelRatio,\r\n scrollBeyondLastLine: scrollBeyondLastLine,\r\n minimap: minimap,\r\n verticalScrollbarWidth: verticalScrollbarWidth,\r\n viewLineCount: viewLineCount,\r\n remainingWidth: remainingWidth,\r\n isViewportWrapping: isViewportWrapping,\r\n }, env.memory || new ComputeOptionsMemory());\r\n if (minimapLayout.renderMinimap !== 0 /* None */ && minimapLayout.minimapLeft === 0) {\r\n // the minimap is rendered to the left, so move everything to the right\r\n glyphMarginLeft += minimapLayout.minimapWidth;\r\n lineNumbersLeft += minimapLayout.minimapWidth;\r\n decorationsLeft += minimapLayout.minimapWidth;\r\n contentLeft += minimapLayout.minimapWidth;\r\n }\r\n const contentWidth = remainingWidth - minimapLayout.minimapWidth;\r\n // (leaving 2px for the cursor to have space after the last character)\r\n const viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth));\r\n const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0);\r\n if (isViewportWrapping) {\r\n // compute the actual wrappingColumn\r\n wrappingColumn = Math.max(1, viewportColumn);\r\n if (wordWrap === 'bounded') {\r\n wrappingColumn = Math.min(wrappingColumn, wordWrapColumn);\r\n }\r\n }\r\n return {\r\n width: outerWidth,\r\n height: outerHeight,\r\n glyphMarginLeft: glyphMarginLeft,\r\n glyphMarginWidth: glyphMarginWidth,\r\n lineNumbersLeft: lineNumbersLeft,\r\n lineNumbersWidth: lineNumbersWidth,\r\n decorationsLeft: decorationsLeft,\r\n decorationsWidth: lineDecorationsWidth,\r\n contentLeft: contentLeft,\r\n contentWidth: contentWidth,\r\n minimap: minimapLayout,\r\n viewportColumn: viewportColumn,\r\n isWordWrapMinified: isWordWrapMinified,\r\n isViewportWrapping: isViewportWrapping,\r\n wrappingColumn: wrappingColumn,\r\n verticalScrollbarWidth: verticalScrollbarWidth,\r\n horizontalScrollbarHeight: horizontalScrollbarHeight,\r\n overviewRuler: {\r\n top: verticalArrowSize,\r\n width: verticalScrollbarWidth,\r\n height: (outerHeight - 2 * verticalArrowSize),\r\n right: 0\r\n }\r\n };\r\n }\r\n}\r\nclass EditorLightbulb extends BaseEditorOption {\r\n constructor() {\r\n const defaults = { enabled: true };\r\n super(51 /* lightbulb */, 'lightbulb', defaults, {\r\n 'editor.lightbulb.enabled': {\r\n type: 'boolean',\r\n default: defaults.enabled,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('codeActions', \"Enables the code action lightbulb in the editor.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n enabled: boolean(input.enabled, this.defaultValue.enabled)\r\n };\r\n }\r\n}\r\nclass EditorInlineHints extends BaseEditorOption {\r\n constructor() {\r\n const defaults = { enabled: true, fontSize: 0, fontFamily: EDITOR_FONT_DEFAULTS.fontFamily };\r\n super(120 /* inlineHints */, 'inlineHints', defaults, {\r\n 'editor.inlineHints.enabled': {\r\n type: 'boolean',\r\n default: defaults.enabled,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inlineHints.enable', \"Enables the inline hints in the editor.\")\r\n },\r\n 'editor.inlineHints.fontSize': {\r\n type: 'number',\r\n default: defaults.fontSize,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inlineHints.fontSize', \"Controls font size of inline hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.\")\r\n },\r\n 'editor.inlineHints.fontFamily': {\r\n type: 'string',\r\n default: defaults.fontFamily,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inlineHints.fontFamily', \"Controls font family of inline hints in the editor.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n enabled: boolean(input.enabled, this.defaultValue.enabled),\r\n fontSize: EditorIntOption.clampedInt(input.fontSize, this.defaultValue.fontSize, 0, 100),\r\n fontFamily: EditorStringOption.string(input.fontFamily, this.defaultValue.fontFamily)\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region lineHeight\r\nclass EditorLineHeight extends EditorIntOption {\r\n constructor() {\r\n super(53 /* lineHeight */, 'lineHeight', EDITOR_FONT_DEFAULTS.lineHeight, 0, 150, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineHeight', \"Controls the line height. Use 0 to compute the line height from the font size.\") });\r\n }\r\n compute(env, options, value) {\r\n // The lineHeight is computed from the fontSize if it is 0.\r\n // Moreover, the final lineHeight respects the editor zoom level.\r\n // So take the result from env.fontInfo\r\n return env.fontInfo.lineHeight;\r\n }\r\n}\r\nclass EditorMinimap extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n enabled: true,\r\n size: 'proportional',\r\n side: 'right',\r\n showSlider: 'mouseover',\r\n renderCharacters: true,\r\n maxColumn: 120,\r\n scale: 1,\r\n };\r\n super(59 /* minimap */, 'minimap', defaults, {\r\n 'editor.minimap.enabled': {\r\n type: 'boolean',\r\n default: defaults.enabled,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.enabled', \"Controls whether the minimap is shown.\")\r\n },\r\n 'editor.minimap.size': {\r\n type: 'string',\r\n enum: ['proportional', 'fill', 'fit'],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.size.proportional', \"The minimap has the same size as the editor contents (and might scroll).\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.size.fill', \"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.size.fit', \"The minimap will shrink as necessary to never be larger than the editor (no scrolling).\"),\r\n ],\r\n default: defaults.size,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.size', \"Controls the size of the minimap.\")\r\n },\r\n 'editor.minimap.side': {\r\n type: 'string',\r\n enum: ['left', 'right'],\r\n default: defaults.side,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.side', \"Controls the side where to render the minimap.\")\r\n },\r\n 'editor.minimap.showSlider': {\r\n type: 'string',\r\n enum: ['always', 'mouseover'],\r\n default: defaults.showSlider,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.showSlider', \"Controls when the minimap slider is shown.\")\r\n },\r\n 'editor.minimap.scale': {\r\n type: 'number',\r\n default: defaults.scale,\r\n minimum: 1,\r\n maximum: 3,\r\n enum: [1, 2, 3],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.scale', \"Scale of content drawn in the minimap: 1, 2 or 3.\")\r\n },\r\n 'editor.minimap.renderCharacters': {\r\n type: 'boolean',\r\n default: defaults.renderCharacters,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.renderCharacters', \"Render the actual characters on a line as opposed to color blocks.\")\r\n },\r\n 'editor.minimap.maxColumn': {\r\n type: 'number',\r\n default: defaults.maxColumn,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('minimap.maxColumn', \"Limit the width of the minimap to render at most a certain number of columns.\")\r\n }\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n enabled: boolean(input.enabled, this.defaultValue.enabled),\r\n size: stringSet(input.size, this.defaultValue.size, ['proportional', 'fill', 'fit']),\r\n side: stringSet(input.side, this.defaultValue.side, ['right', 'left']),\r\n showSlider: stringSet(input.showSlider, this.defaultValue.showSlider, ['always', 'mouseover']),\r\n renderCharacters: boolean(input.renderCharacters, this.defaultValue.renderCharacters),\r\n scale: EditorIntOption.clampedInt(input.scale, 1, 1, 3),\r\n maxColumn: EditorIntOption.clampedInt(input.maxColumn, this.defaultValue.maxColumn, 1, 10000),\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region multiCursorModifier\r\nfunction _multiCursorModifierFromString(multiCursorModifier) {\r\n if (multiCursorModifier === 'ctrlCmd') {\r\n return (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh ? 'metaKey' : 'ctrlKey');\r\n }\r\n return 'altKey';\r\n}\r\nclass EditorPadding extends BaseEditorOption {\r\n constructor() {\r\n super(69 /* padding */, 'padding', { top: 0, bottom: 0 }, {\r\n 'editor.padding.top': {\r\n type: 'number',\r\n default: 0,\r\n minimum: 0,\r\n maximum: 1000,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('padding.top', \"Controls the amount of space between the top edge of the editor and the first line.\")\r\n },\r\n 'editor.padding.bottom': {\r\n type: 'number',\r\n default: 0,\r\n minimum: 0,\r\n maximum: 1000,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('padding.bottom', \"Controls the amount of space between the bottom edge of the editor and the last line.\")\r\n }\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n top: EditorIntOption.clampedInt(input.top, 0, 0, 1000),\r\n bottom: EditorIntOption.clampedInt(input.bottom, 0, 0, 1000)\r\n };\r\n }\r\n}\r\nclass EditorParameterHints extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n enabled: true,\r\n cycle: false\r\n };\r\n super(70 /* parameterHints */, 'parameterHints', defaults, {\r\n 'editor.parameterHints.enabled': {\r\n type: 'boolean',\r\n default: defaults.enabled,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('parameterHints.enabled', \"Enables a pop-up that shows parameter documentation and type information as you type.\")\r\n },\r\n 'editor.parameterHints.cycle': {\r\n type: 'boolean',\r\n default: defaults.cycle,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('parameterHints.cycle', \"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.\")\r\n },\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n enabled: boolean(input.enabled, this.defaultValue.enabled),\r\n cycle: boolean(input.cycle, this.defaultValue.cycle)\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region pixelRatio\r\nclass EditorPixelRatio extends ComputedEditorOption {\r\n constructor() {\r\n super(122 /* pixelRatio */);\r\n }\r\n compute(env, options, _) {\r\n return env.pixelRatio;\r\n }\r\n}\r\nclass EditorQuickSuggestions extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n other: true,\r\n comments: false,\r\n strings: false\r\n };\r\n super(73 /* quickSuggestions */, 'quickSuggestions', defaults, {\r\n anyOf: [\r\n {\r\n type: 'boolean',\r\n },\r\n {\r\n type: 'object',\r\n properties: {\r\n strings: {\r\n type: 'boolean',\r\n default: defaults.strings,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickSuggestions.strings', \"Enable quick suggestions inside strings.\")\r\n },\r\n comments: {\r\n type: 'boolean',\r\n default: defaults.comments,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickSuggestions.comments', \"Enable quick suggestions inside comments.\")\r\n },\r\n other: {\r\n type: 'boolean',\r\n default: defaults.other,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickSuggestions.other', \"Enable quick suggestions outside of strings and comments.\")\r\n },\r\n }\r\n }\r\n ],\r\n default: defaults,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickSuggestions', \"Controls whether suggestions should automatically show up while typing.\")\r\n });\r\n this.defaultValue = defaults;\r\n }\r\n validate(_input) {\r\n if (typeof _input === 'boolean') {\r\n return _input;\r\n }\r\n if (_input && typeof _input === 'object') {\r\n const input = _input;\r\n const opts = {\r\n other: boolean(input.other, this.defaultValue.other),\r\n comments: boolean(input.comments, this.defaultValue.comments),\r\n strings: boolean(input.strings, this.defaultValue.strings),\r\n };\r\n if (opts.other && opts.comments && opts.strings) {\r\n return true; // all on\r\n }\r\n else if (!opts.other && !opts.comments && !opts.strings) {\r\n return false; // all off\r\n }\r\n else {\r\n return opts;\r\n }\r\n }\r\n return this.defaultValue;\r\n }\r\n}\r\nclass EditorRenderLineNumbersOption extends BaseEditorOption {\r\n constructor() {\r\n super(54 /* lineNumbers */, 'lineNumbers', { renderType: 1 /* On */, renderFn: null }, {\r\n type: 'string',\r\n enum: ['off', 'on', 'relative', 'interval'],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineNumbers.off', \"Line numbers are not rendered.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineNumbers.on', \"Line numbers are rendered as absolute number.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineNumbers.relative', \"Line numbers are rendered as distance in lines to cursor position.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineNumbers.interval', \"Line numbers are rendered every 10 lines.\")\r\n ],\r\n default: 'on',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineNumbers', \"Controls the display of line numbers.\")\r\n });\r\n }\r\n validate(lineNumbers) {\r\n let renderType = this.defaultValue.renderType;\r\n let renderFn = this.defaultValue.renderFn;\r\n if (typeof lineNumbers !== 'undefined') {\r\n if (typeof lineNumbers === 'function') {\r\n renderType = 4 /* Custom */;\r\n renderFn = lineNumbers;\r\n }\r\n else if (lineNumbers === 'interval') {\r\n renderType = 3 /* Interval */;\r\n }\r\n else if (lineNumbers === 'relative') {\r\n renderType = 2 /* Relative */;\r\n }\r\n else if (lineNumbers === 'on') {\r\n renderType = 1 /* On */;\r\n }\r\n else {\r\n renderType = 0 /* Off */;\r\n }\r\n }\r\n return {\r\n renderType,\r\n renderFn\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region renderValidationDecorations\r\n/**\r\n * @internal\r\n */\r\nfunction filterValidationDecorations(options) {\r\n const renderValidationDecorations = options.get(82 /* renderValidationDecorations */);\r\n if (renderValidationDecorations === 'editable') {\r\n return options.get(75 /* readOnly */);\r\n }\r\n return renderValidationDecorations === 'on' ? false : true;\r\n}\r\nclass EditorRulers extends BaseEditorOption {\r\n constructor() {\r\n const defaults = [];\r\n const columnSchema = { type: 'number', description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rulers.size', \"Number of monospace characters at which this editor ruler will render.\") };\r\n super(86 /* rulers */, 'rulers', defaults, {\r\n type: 'array',\r\n items: {\r\n anyOf: [\r\n columnSchema,\r\n {\r\n type: [\r\n 'object'\r\n ],\r\n properties: {\r\n column: columnSchema,\r\n color: {\r\n type: 'string',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rulers.color', \"Color of this editor ruler.\"),\r\n format: 'color-hex'\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n default: defaults,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rulers', \"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.\")\r\n });\r\n }\r\n validate(input) {\r\n if (Array.isArray(input)) {\r\n let rulers = [];\r\n for (let _element of input) {\r\n if (typeof _element === 'number') {\r\n rulers.push({\r\n column: EditorIntOption.clampedInt(_element, 0, 0, 10000),\r\n color: null\r\n });\r\n }\r\n else if (_element && typeof _element === 'object') {\r\n const element = _element;\r\n rulers.push({\r\n column: EditorIntOption.clampedInt(element.column, 0, 0, 10000),\r\n color: element.color\r\n });\r\n }\r\n }\r\n rulers.sort((a, b) => a.column - b.column);\r\n return rulers;\r\n }\r\n return this.defaultValue;\r\n }\r\n}\r\nfunction _scrollbarVisibilityFromString(visibility, defaultValue) {\r\n if (typeof visibility !== 'string') {\r\n return defaultValue;\r\n }\r\n switch (visibility) {\r\n case 'hidden': return 2 /* Hidden */;\r\n case 'visible': return 3 /* Visible */;\r\n default: return 1 /* Auto */;\r\n }\r\n}\r\nclass EditorScrollbar extends BaseEditorOption {\r\n constructor() {\r\n super(87 /* scrollbar */, 'scrollbar', {\r\n vertical: 1 /* Auto */,\r\n horizontal: 1 /* Auto */,\r\n arrowSize: 11,\r\n useShadows: true,\r\n verticalHasArrows: false,\r\n horizontalHasArrows: false,\r\n horizontalScrollbarSize: 12,\r\n horizontalSliderSize: 12,\r\n verticalScrollbarSize: 14,\r\n verticalSliderSize: 14,\r\n handleMouseWheel: true,\r\n alwaysConsumeMouseWheel: true,\r\n scrollByPage: false\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n const horizontalScrollbarSize = EditorIntOption.clampedInt(input.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1000);\r\n const verticalScrollbarSize = EditorIntOption.clampedInt(input.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1000);\r\n return {\r\n arrowSize: EditorIntOption.clampedInt(input.arrowSize, this.defaultValue.arrowSize, 0, 1000),\r\n vertical: _scrollbarVisibilityFromString(input.vertical, this.defaultValue.vertical),\r\n horizontal: _scrollbarVisibilityFromString(input.horizontal, this.defaultValue.horizontal),\r\n useShadows: boolean(input.useShadows, this.defaultValue.useShadows),\r\n verticalHasArrows: boolean(input.verticalHasArrows, this.defaultValue.verticalHasArrows),\r\n horizontalHasArrows: boolean(input.horizontalHasArrows, this.defaultValue.horizontalHasArrows),\r\n handleMouseWheel: boolean(input.handleMouseWheel, this.defaultValue.handleMouseWheel),\r\n alwaysConsumeMouseWheel: boolean(input.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel),\r\n horizontalScrollbarSize: horizontalScrollbarSize,\r\n horizontalSliderSize: EditorIntOption.clampedInt(input.horizontalSliderSize, horizontalScrollbarSize, 0, 1000),\r\n verticalScrollbarSize: verticalScrollbarSize,\r\n verticalSliderSize: EditorIntOption.clampedInt(input.verticalSliderSize, verticalScrollbarSize, 0, 1000),\r\n scrollByPage: boolean(input.scrollByPage, this.defaultValue.scrollByPage),\r\n };\r\n }\r\n}\r\nclass EditorSuggest extends BaseEditorOption {\r\n constructor() {\r\n const defaults = {\r\n insertMode: 'insert',\r\n filterGraceful: true,\r\n snippetsPreventQuickSuggestions: true,\r\n localityBonus: false,\r\n shareSuggestSelections: false,\r\n showIcons: true,\r\n showStatusBar: false,\r\n showInlineDetails: true,\r\n showMethods: true,\r\n showFunctions: true,\r\n showConstructors: true,\r\n showFields: true,\r\n showVariables: true,\r\n showClasses: true,\r\n showStructs: true,\r\n showInterfaces: true,\r\n showModules: true,\r\n showProperties: true,\r\n showEvents: true,\r\n showOperators: true,\r\n showUnits: true,\r\n showValues: true,\r\n showConstants: true,\r\n showEnums: true,\r\n showEnumMembers: true,\r\n showKeywords: true,\r\n showWords: true,\r\n showColors: true,\r\n showFiles: true,\r\n showReferences: true,\r\n showFolders: true,\r\n showTypeParameters: true,\r\n showSnippets: true,\r\n showUsers: true,\r\n showIssues: true,\r\n };\r\n super(101 /* suggest */, 'suggest', defaults, {\r\n 'editor.suggest.insertMode': {\r\n type: 'string',\r\n enum: ['insert', 'replace'],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.insertMode.insert', \"Insert suggestion without overwriting text right of the cursor.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.insertMode.replace', \"Insert suggestion and overwrite text right of the cursor.\"),\r\n ],\r\n default: defaults.insertMode,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.insertMode', \"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.\")\r\n },\r\n 'editor.suggest.filterGraceful': {\r\n type: 'boolean',\r\n default: defaults.filterGraceful,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.filterGraceful', \"Controls whether filtering and sorting suggestions accounts for small typos.\")\r\n },\r\n 'editor.suggest.localityBonus': {\r\n type: 'boolean',\r\n default: defaults.localityBonus,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.localityBonus', \"Controls whether sorting favours words that appear close to the cursor.\")\r\n },\r\n 'editor.suggest.shareSuggestSelections': {\r\n type: 'boolean',\r\n default: defaults.shareSuggestSelections,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.shareSuggestSelections', \"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).\")\r\n },\r\n 'editor.suggest.snippetsPreventQuickSuggestions': {\r\n type: 'boolean',\r\n default: defaults.snippetsPreventQuickSuggestions,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.snippetsPreventQuickSuggestions', \"Controls whether an active snippet prevents quick suggestions.\")\r\n },\r\n 'editor.suggest.showIcons': {\r\n type: 'boolean',\r\n default: defaults.showIcons,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.showIcons', \"Controls whether to show or hide icons in suggestions.\")\r\n },\r\n 'editor.suggest.showStatusBar': {\r\n type: 'boolean',\r\n default: defaults.showStatusBar,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.showStatusBar', \"Controls the visibility of the status bar at the bottom of the suggest widget.\")\r\n },\r\n 'editor.suggest.showInlineDetails': {\r\n type: 'boolean',\r\n default: defaults.showInlineDetails,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.showInlineDetails', \"Controls whether suggest details show inline with the label or only in the details widget\")\r\n },\r\n 'editor.suggest.maxVisibleSuggestions': {\r\n type: 'number',\r\n deprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggest.maxVisibleSuggestions.dep', \"This setting is deprecated. The suggest widget can now be resized.\"),\r\n },\r\n 'editor.suggest.filteredTypes': {\r\n type: 'object',\r\n deprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('deprecated', \"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.\")\r\n },\r\n 'editor.suggest.showMethods': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showMethods', \"When enabled IntelliSense shows `method`-suggestions.\")\r\n },\r\n 'editor.suggest.showFunctions': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showFunctions', \"When enabled IntelliSense shows `function`-suggestions.\")\r\n },\r\n 'editor.suggest.showConstructors': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showConstructors', \"When enabled IntelliSense shows `constructor`-suggestions.\")\r\n },\r\n 'editor.suggest.showFields': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showFields', \"When enabled IntelliSense shows `field`-suggestions.\")\r\n },\r\n 'editor.suggest.showVariables': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showVariables', \"When enabled IntelliSense shows `variable`-suggestions.\")\r\n },\r\n 'editor.suggest.showClasses': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showClasss', \"When enabled IntelliSense shows `class`-suggestions.\")\r\n },\r\n 'editor.suggest.showStructs': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showStructs', \"When enabled IntelliSense shows `struct`-suggestions.\")\r\n },\r\n 'editor.suggest.showInterfaces': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showInterfaces', \"When enabled IntelliSense shows `interface`-suggestions.\")\r\n },\r\n 'editor.suggest.showModules': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showModules', \"When enabled IntelliSense shows `module`-suggestions.\")\r\n },\r\n 'editor.suggest.showProperties': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showPropertys', \"When enabled IntelliSense shows `property`-suggestions.\")\r\n },\r\n 'editor.suggest.showEvents': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showEvents', \"When enabled IntelliSense shows `event`-suggestions.\")\r\n },\r\n 'editor.suggest.showOperators': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showOperators', \"When enabled IntelliSense shows `operator`-suggestions.\")\r\n },\r\n 'editor.suggest.showUnits': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showUnits', \"When enabled IntelliSense shows `unit`-suggestions.\")\r\n },\r\n 'editor.suggest.showValues': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showValues', \"When enabled IntelliSense shows `value`-suggestions.\")\r\n },\r\n 'editor.suggest.showConstants': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showConstants', \"When enabled IntelliSense shows `constant`-suggestions.\")\r\n },\r\n 'editor.suggest.showEnums': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showEnums', \"When enabled IntelliSense shows `enum`-suggestions.\")\r\n },\r\n 'editor.suggest.showEnumMembers': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showEnumMembers', \"When enabled IntelliSense shows `enumMember`-suggestions.\")\r\n },\r\n 'editor.suggest.showKeywords': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showKeywords', \"When enabled IntelliSense shows `keyword`-suggestions.\")\r\n },\r\n 'editor.suggest.showWords': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showTexts', \"When enabled IntelliSense shows `text`-suggestions.\")\r\n },\r\n 'editor.suggest.showColors': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showColors', \"When enabled IntelliSense shows `color`-suggestions.\")\r\n },\r\n 'editor.suggest.showFiles': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showFiles', \"When enabled IntelliSense shows `file`-suggestions.\")\r\n },\r\n 'editor.suggest.showReferences': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showReferences', \"When enabled IntelliSense shows `reference`-suggestions.\")\r\n },\r\n 'editor.suggest.showCustomcolors': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showCustomcolors', \"When enabled IntelliSense shows `customcolor`-suggestions.\")\r\n },\r\n 'editor.suggest.showFolders': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showFolders', \"When enabled IntelliSense shows `folder`-suggestions.\")\r\n },\r\n 'editor.suggest.showTypeParameters': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showTypeParameters', \"When enabled IntelliSense shows `typeParameter`-suggestions.\")\r\n },\r\n 'editor.suggest.showSnippets': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showSnippets', \"When enabled IntelliSense shows `snippet`-suggestions.\")\r\n },\r\n 'editor.suggest.showUsers': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showUsers', \"When enabled IntelliSense shows `user`-suggestions.\")\r\n },\r\n 'editor.suggest.showIssues': {\r\n type: 'boolean',\r\n default: true,\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.suggest.showIssues', \"When enabled IntelliSense shows `issues`-suggestions.\")\r\n }\r\n });\r\n }\r\n validate(_input) {\r\n if (!_input || typeof _input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n const input = _input;\r\n return {\r\n insertMode: stringSet(input.insertMode, this.defaultValue.insertMode, ['insert', 'replace']),\r\n filterGraceful: boolean(input.filterGraceful, this.defaultValue.filterGraceful),\r\n snippetsPreventQuickSuggestions: boolean(input.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful),\r\n localityBonus: boolean(input.localityBonus, this.defaultValue.localityBonus),\r\n shareSuggestSelections: boolean(input.shareSuggestSelections, this.defaultValue.shareSuggestSelections),\r\n showIcons: boolean(input.showIcons, this.defaultValue.showIcons),\r\n showStatusBar: boolean(input.showStatusBar, this.defaultValue.showStatusBar),\r\n showInlineDetails: boolean(input.showInlineDetails, this.defaultValue.showInlineDetails),\r\n showMethods: boolean(input.showMethods, this.defaultValue.showMethods),\r\n showFunctions: boolean(input.showFunctions, this.defaultValue.showFunctions),\r\n showConstructors: boolean(input.showConstructors, this.defaultValue.showConstructors),\r\n showFields: boolean(input.showFields, this.defaultValue.showFields),\r\n showVariables: boolean(input.showVariables, this.defaultValue.showVariables),\r\n showClasses: boolean(input.showClasses, this.defaultValue.showClasses),\r\n showStructs: boolean(input.showStructs, this.defaultValue.showStructs),\r\n showInterfaces: boolean(input.showInterfaces, this.defaultValue.showInterfaces),\r\n showModules: boolean(input.showModules, this.defaultValue.showModules),\r\n showProperties: boolean(input.showProperties, this.defaultValue.showProperties),\r\n showEvents: boolean(input.showEvents, this.defaultValue.showEvents),\r\n showOperators: boolean(input.showOperators, this.defaultValue.showOperators),\r\n showUnits: boolean(input.showUnits, this.defaultValue.showUnits),\r\n showValues: boolean(input.showValues, this.defaultValue.showValues),\r\n showConstants: boolean(input.showConstants, this.defaultValue.showConstants),\r\n showEnums: boolean(input.showEnums, this.defaultValue.showEnums),\r\n showEnumMembers: boolean(input.showEnumMembers, this.defaultValue.showEnumMembers),\r\n showKeywords: boolean(input.showKeywords, this.defaultValue.showKeywords),\r\n showWords: boolean(input.showWords, this.defaultValue.showWords),\r\n showColors: boolean(input.showColors, this.defaultValue.showColors),\r\n showFiles: boolean(input.showFiles, this.defaultValue.showFiles),\r\n showReferences: boolean(input.showReferences, this.defaultValue.showReferences),\r\n showFolders: boolean(input.showFolders, this.defaultValue.showFolders),\r\n showTypeParameters: boolean(input.showTypeParameters, this.defaultValue.showTypeParameters),\r\n showSnippets: boolean(input.showSnippets, this.defaultValue.showSnippets),\r\n showUsers: boolean(input.showUsers, this.defaultValue.showUsers),\r\n showIssues: boolean(input.showIssues, this.defaultValue.showIssues),\r\n };\r\n }\r\n}\r\nclass SmartSelect extends BaseEditorOption {\r\n constructor() {\r\n super(97 /* smartSelect */, 'smartSelect', {\r\n selectLeadingAndTrailingWhitespace: true\r\n }, {\r\n 'editor.smartSelect.selectLeadingAndTrailingWhitespace': {\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('selectLeadingAndTrailingWhitespace', \"Whether leading and trailing whitespace should always be selected.\"),\r\n default: true,\r\n type: 'boolean'\r\n }\r\n });\r\n }\r\n validate(input) {\r\n if (!input || typeof input !== 'object') {\r\n return this.defaultValue;\r\n }\r\n return {\r\n selectLeadingAndTrailingWhitespace: boolean(input.selectLeadingAndTrailingWhitespace, this.defaultValue.selectLeadingAndTrailingWhitespace)\r\n };\r\n }\r\n}\r\n//#endregion\r\n//#region tabFocusMode\r\nclass EditorTabFocusMode extends ComputedEditorOption {\r\n constructor() {\r\n super(123 /* tabFocusMode */, [75 /* readOnly */]);\r\n }\r\n compute(env, options, _) {\r\n const readOnly = options.get(75 /* readOnly */);\r\n return (readOnly ? true : env.tabFocusMode);\r\n }\r\n}\r\nfunction _wrappingIndentFromString(wrappingIndent) {\r\n switch (wrappingIndent) {\r\n case 'none': return 0 /* None */;\r\n case 'same': return 1 /* Same */;\r\n case 'indent': return 2 /* Indent */;\r\n case 'deepIndent': return 3 /* DeepIndent */;\r\n }\r\n}\r\nclass EditorWrappingInfoComputer extends ComputedEditorOption {\r\n constructor() {\r\n super(125 /* wrappingInfo */, [124 /* layoutInfo */]);\r\n }\r\n compute(env, options, _) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n return {\r\n isDominatedByLongLines: env.isDominatedByLongLines,\r\n isWordWrapMinified: layoutInfo.isWordWrapMinified,\r\n isViewportWrapping: layoutInfo.isViewportWrapping,\r\n wrappingColumn: layoutInfo.wrappingColumn,\r\n };\r\n }\r\n}\r\n//#endregion\r\nconst DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \\'Courier New\\', monospace';\r\nconst DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \\'Courier New\\', monospace';\r\nconst DEFAULT_LINUX_FONT_FAMILY = '\\'Droid Sans Mono\\', \\'monospace\\', monospace, \\'Droid Sans Fallback\\'';\r\n/**\r\n * @internal\r\n */\r\nconst EDITOR_FONT_DEFAULTS = {\r\n fontFamily: (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)),\r\n fontWeight: 'normal',\r\n fontSize: (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isMacintosh ? 12 : 14),\r\n lineHeight: 0,\r\n letterSpacing: 0,\r\n};\r\n/**\r\n * @internal\r\n */\r\nconst EDITOR_MODEL_DEFAULTS = {\r\n tabSize: 4,\r\n indentSize: 4,\r\n insertSpaces: true,\r\n detectIndentation: true,\r\n trimAutoWhitespace: true,\r\n largeFileOptimizations: true\r\n};\r\n/**\r\n * @internal\r\n */\r\nconst editorOptionsRegistry = [];\r\nfunction register(option) {\r\n editorOptionsRegistry[option.id] = option;\r\n return option;\r\n}\r\n/**\r\n * WORKAROUND: TS emits \"any\" for complex editor options values (anything except string, bool, enum, etc. ends up being \"any\")\r\n * @monacodtsreplace\r\n * /accessibilitySupport, any/accessibilitySupport, AccessibilitySupport/\r\n * /comments, any/comments, EditorCommentsOptions/\r\n * /find, any/find, EditorFindOptions/\r\n * /fontInfo, any/fontInfo, FontInfo/\r\n * /gotoLocation, any/gotoLocation, GoToLocationOptions/\r\n * /hover, any/hover, EditorHoverOptions/\r\n * /lightbulb, any/lightbulb, EditorLightbulbOptions/\r\n * /minimap, any/minimap, EditorMinimapOptions/\r\n * /parameterHints, any/parameterHints, InternalParameterHintOptions/\r\n * /quickSuggestions, any/quickSuggestions, ValidQuickSuggestionsOptions/\r\n * /suggest, any/suggest, InternalSuggestOptions/\r\n */\r\nconst EditorOptions = {\r\n acceptSuggestionOnCommitCharacter: register(new EditorBooleanOption(0 /* acceptSuggestionOnCommitCharacter */, 'acceptSuggestionOnCommitCharacter', true, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('acceptSuggestionOnCommitCharacter', \"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.\") })),\r\n acceptSuggestionOnEnter: register(new EditorStringEnumOption(1 /* acceptSuggestionOnEnter */, 'acceptSuggestionOnEnter', 'on', ['on', 'smart', 'off'], {\r\n markdownEnumDescriptions: [\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('acceptSuggestionOnEnterSmart', \"Only accept a suggestion with `Enter` when it makes a textual change.\"),\r\n ''\r\n ],\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('acceptSuggestionOnEnter', \"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.\")\r\n })),\r\n accessibilitySupport: register(new EditorAccessibilitySupport()),\r\n accessibilityPageSize: register(new EditorIntOption(3 /* accessibilityPageSize */, 'accessibilityPageSize', 10, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilityPageSize', \"Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.\") })),\r\n ariaLabel: register(new EditorStringOption(4 /* ariaLabel */, 'ariaLabel', _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorViewAccessibleLabel', \"Editor content\"))),\r\n autoClosingBrackets: register(new EditorStringEnumOption(5 /* autoClosingBrackets */, 'autoClosingBrackets', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], {\r\n enumDescriptions: [\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoClosingBrackets.languageDefined', \"Use language configurations to determine when to autoclose brackets.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoClosingBrackets.beforeWhitespace', \"Autoclose brackets only when the cursor is to the left of whitespace.\"),\r\n '',\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('autoClosingBrackets', \"Controls whether the editor should automatically close brackets after the user adds an opening bracket.\")\r\n })),\r\n autoClosingOvertype: register(new EditorStringEnumOption(6 /* autoClosingOvertype */, 'autoClosingOvertype', 'auto', ['always', 'auto', 'never'], {\r\n enumDescriptions: [\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoClosingOvertype.auto', \"Type over closing quotes or brackets only if they were automatically inserted.\"),\r\n '',\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('autoClosingOvertype', \"Controls whether the editor should type over closing quotes or brackets.\")\r\n })),\r\n autoClosingQuotes: register(new EditorStringEnumOption(7 /* autoClosingQuotes */, 'autoClosingQuotes', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], {\r\n enumDescriptions: [\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoClosingQuotes.languageDefined', \"Use language configurations to determine when to autoclose quotes.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoClosingQuotes.beforeWhitespace', \"Autoclose quotes only when the cursor is to the left of whitespace.\"),\r\n '',\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('autoClosingQuotes', \"Controls whether the editor should automatically close quotes after the user adds an opening quote.\")\r\n })),\r\n autoIndent: register(new EditorEnumOption(8 /* autoIndent */, 'autoIndent', 4 /* Full */, 'full', ['none', 'keep', 'brackets', 'advanced', 'full'], _autoIndentFromString, {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoIndent.none', \"The editor will not insert indentation automatically.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoIndent.keep', \"The editor will keep the current line's indentation.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoIndent.brackets', \"The editor will keep the current line's indentation and honor language defined brackets.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoIndent.advanced', \"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoIndent.full', \"The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('autoIndent', \"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.\")\r\n })),\r\n automaticLayout: register(new EditorBooleanOption(9 /* automaticLayout */, 'automaticLayout', false)),\r\n autoSurround: register(new EditorStringEnumOption(10 /* autoSurround */, 'autoSurround', 'languageDefined', ['languageDefined', 'quotes', 'brackets', 'never'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoSurround.languageDefined', \"Use language configurations to determine when to automatically surround selections.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoSurround.quotes', \"Surround with quotes but not brackets.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.autoSurround.brackets', \"Surround with brackets but not quotes.\"),\r\n ''\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('autoSurround', \"Controls whether the editor should automatically surround selections when typing quotes or brackets.\")\r\n })),\r\n stickyTabStops: register(new EditorBooleanOption(99 /* stickyTabStops */, 'stickyTabStops', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('stickyTabStops', \"Emulate selection behaviour of tab characters when using spaces for indentation. Selection will stick to tab stops.\") })),\r\n codeLens: register(new EditorBooleanOption(11 /* codeLens */, 'codeLens', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('codeLens', \"Controls whether the editor shows CodeLens.\") })),\r\n codeLensFontFamily: register(new EditorStringOption(12 /* codeLensFontFamily */, 'codeLensFontFamily', '', { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('codeLensFontFamily', \"Controls the font family for CodeLens.\") })),\r\n codeLensFontSize: register(new EditorIntOption(13 /* codeLensFontSize */, 'codeLensFontSize', 0, 0, 100, {\r\n type: 'number',\r\n default: 0,\r\n minimum: 0,\r\n maximum: 100,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('codeLensFontSize', \"Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.\")\r\n })),\r\n colorDecorators: register(new EditorBooleanOption(14 /* colorDecorators */, 'colorDecorators', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('colorDecorators', \"Controls whether the editor should render the inline color decorators and color picker.\") })),\r\n columnSelection: register(new EditorBooleanOption(15 /* columnSelection */, 'columnSelection', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('columnSelection', \"Enable that the selection with the mouse and keys is doing column selection.\") })),\r\n comments: register(new EditorComments()),\r\n contextmenu: register(new EditorBooleanOption(17 /* contextmenu */, 'contextmenu', true)),\r\n copyWithSyntaxHighlighting: register(new EditorBooleanOption(18 /* copyWithSyntaxHighlighting */, 'copyWithSyntaxHighlighting', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('copyWithSyntaxHighlighting', \"Controls whether syntax highlighting should be copied into the clipboard.\") })),\r\n cursorBlinking: register(new EditorEnumOption(19 /* cursorBlinking */, 'cursorBlinking', 1 /* Blink */, 'blink', ['blink', 'smooth', 'phase', 'expand', 'solid'], _cursorBlinkingStyleFromString, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorBlinking', \"Control the cursor animation style.\") })),\r\n cursorSmoothCaretAnimation: register(new EditorBooleanOption(20 /* cursorSmoothCaretAnimation */, 'cursorSmoothCaretAnimation', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorSmoothCaretAnimation', \"Controls whether the smooth caret animation should be enabled.\") })),\r\n cursorStyle: register(new EditorEnumOption(21 /* cursorStyle */, 'cursorStyle', TextEditorCursorStyle.Line, 'line', ['line', 'block', 'underline', 'line-thin', 'block-outline', 'underline-thin'], _cursorStyleFromString, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorStyle', \"Controls the cursor style.\") })),\r\n cursorSurroundingLines: register(new EditorIntOption(22 /* cursorSurroundingLines */, 'cursorSurroundingLines', 0, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorSurroundingLines', \"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.\") })),\r\n cursorSurroundingLinesStyle: register(new EditorStringEnumOption(23 /* cursorSurroundingLinesStyle */, 'cursorSurroundingLinesStyle', 'default', ['default', 'all'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorSurroundingLinesStyle.default', \"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorSurroundingLinesStyle.all', \"`cursorSurroundingLines` is enforced always.\")\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorSurroundingLinesStyle', \"Controls when `cursorSurroundingLines` should be enforced.\")\r\n })),\r\n cursorWidth: register(new EditorIntOption(24 /* cursorWidth */, 'cursorWidth', 0, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursorWidth', \"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.\") })),\r\n disableLayerHinting: register(new EditorBooleanOption(25 /* disableLayerHinting */, 'disableLayerHinting', false)),\r\n disableMonospaceOptimizations: register(new EditorBooleanOption(26 /* disableMonospaceOptimizations */, 'disableMonospaceOptimizations', false)),\r\n dragAndDrop: register(new EditorBooleanOption(27 /* dragAndDrop */, 'dragAndDrop', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('dragAndDrop', \"Controls whether the editor should allow moving selections via drag and drop.\") })),\r\n emptySelectionClipboard: register(new EditorEmptySelectionClipboard()),\r\n extraEditorClassName: register(new EditorStringOption(29 /* extraEditorClassName */, 'extraEditorClassName', '')),\r\n fastScrollSensitivity: register(new EditorFloatOption(30 /* fastScrollSensitivity */, 'fastScrollSensitivity', 5, x => (x <= 0 ? 5 : x), { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fastScrollSensitivity', \"Scrolling speed multiplier when pressing `Alt`.\") })),\r\n find: register(new EditorFind()),\r\n fixedOverflowWidgets: register(new EditorBooleanOption(32 /* fixedOverflowWidgets */, 'fixedOverflowWidgets', false)),\r\n folding: register(new EditorBooleanOption(33 /* folding */, 'folding', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('folding', \"Controls whether the editor has code folding enabled.\") })),\r\n foldingStrategy: register(new EditorStringEnumOption(34 /* foldingStrategy */, 'foldingStrategy', 'auto', ['auto', 'indentation'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('foldingStrategy.auto', \"Use a language-specific folding strategy if available, else the indentation-based one.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('foldingStrategy.indentation', \"Use the indentation-based folding strategy.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('foldingStrategy', \"Controls the strategy for computing folding ranges.\")\r\n })),\r\n foldingHighlight: register(new EditorBooleanOption(35 /* foldingHighlight */, 'foldingHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('foldingHighlight', \"Controls whether the editor should highlight folded ranges.\") })),\r\n unfoldOnClickAfterEndOfLine: register(new EditorBooleanOption(36 /* unfoldOnClickAfterEndOfLine */, 'unfoldOnClickAfterEndOfLine', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unfoldOnClickAfterEndOfLine', \"Controls whether clicking on the empty content after a folded line will unfold the line.\") })),\r\n fontFamily: register(new EditorStringOption(37 /* fontFamily */, 'fontFamily', EDITOR_FONT_DEFAULTS.fontFamily, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('fontFamily', \"Controls the font family.\") })),\r\n fontInfo: register(new EditorFontInfo()),\r\n fontLigatures2: register(new EditorFontLigatures()),\r\n fontSize: register(new EditorFontSize()),\r\n fontWeight: register(new EditorFontWeight()),\r\n formatOnPaste: register(new EditorBooleanOption(42 /* formatOnPaste */, 'formatOnPaste', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('formatOnPaste', \"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.\") })),\r\n formatOnType: register(new EditorBooleanOption(43 /* formatOnType */, 'formatOnType', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('formatOnType', \"Controls whether the editor should automatically format the line after typing.\") })),\r\n glyphMargin: register(new EditorBooleanOption(44 /* glyphMargin */, 'glyphMargin', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('glyphMargin', \"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.\") })),\r\n gotoLocation: register(new EditorGoToLocation()),\r\n hideCursorInOverviewRuler: register(new EditorBooleanOption(46 /* hideCursorInOverviewRuler */, 'hideCursorInOverviewRuler', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('hideCursorInOverviewRuler', \"Controls whether the cursor should be hidden in the overview ruler.\") })),\r\n highlightActiveIndentGuide: register(new EditorBooleanOption(47 /* highlightActiveIndentGuide */, 'highlightActiveIndentGuide', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('highlightActiveIndentGuide', \"Controls whether the editor should highlight the active indent guide.\") })),\r\n hover: register(new EditorHover()),\r\n inDiffEditor: register(new EditorBooleanOption(49 /* inDiffEditor */, 'inDiffEditor', false)),\r\n letterSpacing: register(new EditorFloatOption(50 /* letterSpacing */, 'letterSpacing', EDITOR_FONT_DEFAULTS.letterSpacing, x => EditorFloatOption.clamp(x, -5, 20), { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('letterSpacing', \"Controls the letter spacing in pixels.\") })),\r\n lightbulb: register(new EditorLightbulb()),\r\n lineDecorationsWidth: register(new SimpleEditorOption(52 /* lineDecorationsWidth */, 'lineDecorationsWidth', 10)),\r\n lineHeight: register(new EditorLineHeight()),\r\n lineNumbers: register(new EditorRenderLineNumbersOption()),\r\n lineNumbersMinChars: register(new EditorIntOption(55 /* lineNumbersMinChars */, 'lineNumbersMinChars', 5, 1, 300)),\r\n linkedEditing: register(new EditorBooleanOption(56 /* linkedEditing */, 'linkedEditing', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('linkedEditing', \"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.\") })),\r\n links: register(new EditorBooleanOption(57 /* links */, 'links', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('links', \"Controls whether the editor should detect links and make them clickable.\") })),\r\n matchBrackets: register(new EditorStringEnumOption(58 /* matchBrackets */, 'matchBrackets', 'always', ['always', 'near', 'never'], { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('matchBrackets', \"Highlight matching brackets.\") })),\r\n minimap: register(new EditorMinimap()),\r\n mouseStyle: register(new EditorStringEnumOption(60 /* mouseStyle */, 'mouseStyle', 'text', ['text', 'default', 'copy'])),\r\n mouseWheelScrollSensitivity: register(new EditorFloatOption(61 /* mouseWheelScrollSensitivity */, 'mouseWheelScrollSensitivity', 1, x => (x === 0 ? 1 : x), { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mouseWheelScrollSensitivity', \"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.\") })),\r\n mouseWheelZoom: register(new EditorBooleanOption(62 /* mouseWheelZoom */, 'mouseWheelZoom', false, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mouseWheelZoom', \"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.\") })),\r\n multiCursorMergeOverlapping: register(new EditorBooleanOption(63 /* multiCursorMergeOverlapping */, 'multiCursorMergeOverlapping', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorMergeOverlapping', \"Merge multiple cursors when they are overlapping.\") })),\r\n multiCursorModifier: register(new EditorEnumOption(64 /* multiCursorModifier */, 'multiCursorModifier', 'altKey', 'alt', ['ctrlCmd', 'alt'], _multiCursorModifierFromString, {\r\n markdownEnumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorModifier.ctrlCmd', \"Maps to `Control` on Windows and Linux and to `Command` on macOS.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorModifier.alt', \"Maps to `Alt` on Windows and Linux and to `Option` on macOS.\")\r\n ],\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'multiCursorModifier',\r\n comment: [\r\n '- `ctrlCmd` refers to a value the setting can take and should not be localized.',\r\n '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.'\r\n ]\r\n }, \"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).\")\r\n })),\r\n multiCursorPaste: register(new EditorStringEnumOption(65 /* multiCursorPaste */, 'multiCursorPaste', 'spread', ['spread', 'full'], {\r\n markdownEnumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorPaste.spread', \"Each cursor pastes a single line of the text.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorPaste.full', \"Each cursor pastes the full text.\")\r\n ],\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('multiCursorPaste', \"Controls pasting when the line count of the pasted text matches the cursor count.\")\r\n })),\r\n occurrencesHighlight: register(new EditorBooleanOption(66 /* occurrencesHighlight */, 'occurrencesHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('occurrencesHighlight', \"Controls whether the editor should highlight semantic symbol occurrences.\") })),\r\n overviewRulerBorder: register(new EditorBooleanOption(67 /* overviewRulerBorder */, 'overviewRulerBorder', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRulerBorder', \"Controls whether a border should be drawn around the overview ruler.\") })),\r\n overviewRulerLanes: register(new EditorIntOption(68 /* overviewRulerLanes */, 'overviewRulerLanes', 3, 0, 3)),\r\n padding: register(new EditorPadding()),\r\n parameterHints: register(new EditorParameterHints()),\r\n peekWidgetDefaultFocus: register(new EditorStringEnumOption(71 /* peekWidgetDefaultFocus */, 'peekWidgetDefaultFocus', 'tree', ['tree', 'editor'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('peekWidgetDefaultFocus.tree', \"Focus the tree when opening peek\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('peekWidgetDefaultFocus.editor', \"Focus the editor when opening peek\")\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('peekWidgetDefaultFocus', \"Controls whether to focus the inline editor or the tree in the peek widget.\")\r\n })),\r\n definitionLinkOpensInPeek: register(new EditorBooleanOption(72 /* definitionLinkOpensInPeek */, 'definitionLinkOpensInPeek', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('definitionLinkOpensInPeek', \"Controls whether the Go to Definition mouse gesture always opens the peek widget.\") })),\r\n quickSuggestions: register(new EditorQuickSuggestions()),\r\n quickSuggestionsDelay: register(new EditorIntOption(74 /* quickSuggestionsDelay */, 'quickSuggestionsDelay', 10, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickSuggestionsDelay', \"Controls the delay in milliseconds after which quick suggestions will show up.\") })),\r\n readOnly: register(new EditorBooleanOption(75 /* readOnly */, 'readOnly', false)),\r\n renameOnType: register(new EditorBooleanOption(76 /* renameOnType */, 'renameOnType', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renameOnType', \"Controls whether the editor auto renames on type.\"), markdownDeprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renameOnTypeDeprecate', \"Deprecated, use `editor.linkedEditing` instead.\") })),\r\n renderControlCharacters: register(new EditorBooleanOption(77 /* renderControlCharacters */, 'renderControlCharacters', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderControlCharacters', \"Controls whether the editor should render control characters.\") })),\r\n renderIndentGuides: register(new EditorBooleanOption(78 /* renderIndentGuides */, 'renderIndentGuides', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderIndentGuides', \"Controls whether the editor should render indent guides.\") })),\r\n renderFinalNewline: register(new EditorBooleanOption(79 /* renderFinalNewline */, 'renderFinalNewline', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderFinalNewline', \"Render last line number when the file ends with a newline.\") })),\r\n renderLineHighlight: register(new EditorStringEnumOption(80 /* renderLineHighlight */, 'renderLineHighlight', 'line', ['none', 'gutter', 'line', 'all'], {\r\n enumDescriptions: [\r\n '',\r\n '',\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderLineHighlight.all', \"Highlights both the gutter and the current line.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderLineHighlight', \"Controls how the editor should render the current line highlight.\")\r\n })),\r\n renderLineHighlightOnlyWhenFocus: register(new EditorBooleanOption(81 /* renderLineHighlightOnlyWhenFocus */, 'renderLineHighlightOnlyWhenFocus', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderLineHighlightOnlyWhenFocus', \"Controls if the editor should render the current line highlight only when the editor is focused\") })),\r\n renderValidationDecorations: register(new EditorStringEnumOption(82 /* renderValidationDecorations */, 'renderValidationDecorations', 'editable', ['editable', 'on', 'off'])),\r\n renderWhitespace: register(new EditorStringEnumOption(83 /* renderWhitespace */, 'renderWhitespace', 'selection', ['none', 'boundary', 'selection', 'trailing', 'all'], {\r\n enumDescriptions: [\r\n '',\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderWhitespace.boundary', \"Render whitespace characters except for single spaces between words.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderWhitespace.selection', \"Render whitespace characters only on selected text.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderWhitespace.trailing', \"Render only trailing whitespace characters\"),\r\n ''\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('renderWhitespace', \"Controls how the editor should render whitespace characters.\")\r\n })),\r\n revealHorizontalRightPadding: register(new EditorIntOption(84 /* revealHorizontalRightPadding */, 'revealHorizontalRightPadding', 30, 0, 1000)),\r\n roundedSelection: register(new EditorBooleanOption(85 /* roundedSelection */, 'roundedSelection', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('roundedSelection', \"Controls whether selections should have rounded corners.\") })),\r\n rulers: register(new EditorRulers()),\r\n scrollbar: register(new EditorScrollbar()),\r\n scrollBeyondLastColumn: register(new EditorIntOption(88 /* scrollBeyondLastColumn */, 'scrollBeyondLastColumn', 5, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('scrollBeyondLastColumn', \"Controls the number of extra characters beyond which the editor will scroll horizontally.\") })),\r\n scrollBeyondLastLine: register(new EditorBooleanOption(89 /* scrollBeyondLastLine */, 'scrollBeyondLastLine', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('scrollBeyondLastLine', \"Controls whether the editor will scroll beyond the last line.\") })),\r\n scrollPredominantAxis: register(new EditorBooleanOption(90 /* scrollPredominantAxis */, 'scrollPredominantAxis', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('scrollPredominantAxis', \"Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.\") })),\r\n selectionClipboard: register(new EditorBooleanOption(91 /* selectionClipboard */, 'selectionClipboard', true, {\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('selectionClipboard', \"Controls whether the Linux primary clipboard should be supported.\"),\r\n included: _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLinux\r\n })),\r\n selectionHighlight: register(new EditorBooleanOption(92 /* selectionHighlight */, 'selectionHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('selectionHighlight', \"Controls whether the editor should highlight matches similar to the selection.\") })),\r\n selectOnLineNumbers: register(new EditorBooleanOption(93 /* selectOnLineNumbers */, 'selectOnLineNumbers', true)),\r\n showFoldingControls: register(new EditorStringEnumOption(94 /* showFoldingControls */, 'showFoldingControls', 'mouseover', ['always', 'mouseover'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('showFoldingControls.always', \"Always show the folding controls.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('showFoldingControls.mouseover', \"Only show the folding controls when the mouse is over the gutter.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('showFoldingControls', \"Controls when the folding controls on the gutter are shown.\")\r\n })),\r\n showUnused: register(new EditorBooleanOption(95 /* showUnused */, 'showUnused', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('showUnused', \"Controls fading out of unused code.\") })),\r\n showDeprecated: register(new EditorBooleanOption(119 /* showDeprecated */, 'showDeprecated', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('showDeprecated', \"Controls strikethrough deprecated variables.\") })),\r\n inlineHints: register(new EditorInlineHints()),\r\n snippetSuggestions: register(new EditorStringEnumOption(96 /* snippetSuggestions */, 'snippetSuggestions', 'inline', ['top', 'bottom', 'inline', 'none'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('snippetSuggestions.top', \"Show snippet suggestions on top of other suggestions.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('snippetSuggestions.bottom', \"Show snippet suggestions below other suggestions.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('snippetSuggestions.inline', \"Show snippets suggestions with other suggestions.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('snippetSuggestions.none', \"Do not show snippet suggestions.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('snippetSuggestions', \"Controls whether snippets are shown with other suggestions and how they are sorted.\")\r\n })),\r\n smartSelect: register(new SmartSelect()),\r\n smoothScrolling: register(new EditorBooleanOption(98 /* smoothScrolling */, 'smoothScrolling', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('smoothScrolling', \"Controls whether the editor will scroll using an animation.\") })),\r\n stopRenderingLineAfter: register(new EditorIntOption(100 /* stopRenderingLineAfter */, 'stopRenderingLineAfter', 10000, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */)),\r\n suggest: register(new EditorSuggest()),\r\n suggestFontSize: register(new EditorIntOption(102 /* suggestFontSize */, 'suggestFontSize', 0, 0, 1000, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestFontSize', \"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.\") })),\r\n suggestLineHeight: register(new EditorIntOption(103 /* suggestLineHeight */, 'suggestLineHeight', 0, 0, 1000, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestLineHeight', \"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.\") })),\r\n suggestOnTriggerCharacters: register(new EditorBooleanOption(104 /* suggestOnTriggerCharacters */, 'suggestOnTriggerCharacters', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestOnTriggerCharacters', \"Controls whether suggestions should automatically show up when typing trigger characters.\") })),\r\n suggestSelection: register(new EditorStringEnumOption(105 /* suggestSelection */, 'suggestSelection', 'recentlyUsed', ['first', 'recentlyUsed', 'recentlyUsedByPrefix'], {\r\n markdownEnumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestSelection.first', \"Always select the first suggestion.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestSelection.recentlyUsed', \"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestSelection.recentlyUsedByPrefix', \"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestSelection', \"Controls how suggestions are pre-selected when showing the suggest list.\")\r\n })),\r\n tabCompletion: register(new EditorStringEnumOption(106 /* tabCompletion */, 'tabCompletion', 'off', ['on', 'off', 'onlySnippets'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('tabCompletion.on', \"Tab complete will insert the best matching suggestion when pressing tab.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('tabCompletion.off', \"Disable tab completions.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('tabCompletion.onlySnippets', \"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('tabCompletion', \"Enables tab completions.\")\r\n })),\r\n tabIndex: register(new EditorIntOption(107 /* tabIndex */, 'tabIndex', 0, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */)),\r\n unusualLineTerminators: register(new EditorStringEnumOption(108 /* unusualLineTerminators */, 'unusualLineTerminators', 'prompt', ['auto', 'off', 'prompt'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.auto', \"Unusual line terminators are automatically removed.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.off', \"Unusual line terminators are ignored.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.prompt', \"Unusual line terminators prompt to be removed.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators', \"Remove unusual line terminators that might cause problems.\")\r\n })),\r\n useTabStops: register(new EditorBooleanOption(109 /* useTabStops */, 'useTabStops', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('useTabStops', \"Inserting and deleting whitespace follows tab stops.\") })),\r\n wordSeparators: register(new EditorStringOption(110 /* wordSeparators */, 'wordSeparators', _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_2__.USUAL_WORD_SEPARATORS, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordSeparators', \"Characters that will be used as word separators when doing word related navigations or operations.\") })),\r\n wordWrap: register(new EditorStringEnumOption(111 /* wordWrap */, 'wordWrap', 'off', ['off', 'on', 'wordWrapColumn', 'bounded'], {\r\n markdownEnumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordWrap.off', \"Lines will never wrap.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordWrap.on', \"Lines will wrap at the viewport width.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'wordWrap.wordWrapColumn',\r\n comment: [\r\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\r\n ]\r\n }, \"Lines will wrap at `#editor.wordWrapColumn#`.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'wordWrap.bounded',\r\n comment: [\r\n '- viewport means the edge of the visible window size.',\r\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\r\n ]\r\n }, \"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'wordWrap',\r\n comment: [\r\n '- \\'off\\', \\'on\\', \\'wordWrapColumn\\' and \\'bounded\\' refer to values the setting can take and should not be localized.',\r\n '- `editor.wordWrapColumn` refers to a different setting and should not be localized.'\r\n ]\r\n }, \"Controls how lines should wrap.\")\r\n })),\r\n wordWrapBreakAfterCharacters: register(new EditorStringOption(112 /* wordWrapBreakAfterCharacters */, 'wordWrapBreakAfterCharacters', ' \\t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」')),\r\n wordWrapBreakBeforeCharacters: register(new EditorStringOption(113 /* wordWrapBreakBeforeCharacters */, 'wordWrapBreakBeforeCharacters', '([{‘“〈《「『【〔([{「£¥$£¥++')),\r\n wordWrapColumn: register(new EditorIntOption(114 /* wordWrapColumn */, 'wordWrapColumn', 80, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, {\r\n markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'wordWrapColumn',\r\n comment: [\r\n '- `editor.wordWrap` refers to a different setting and should not be localized.',\r\n '- \\'wordWrapColumn\\' and \\'bounded\\' refer to values the different setting can take and should not be localized.'\r\n ]\r\n }, \"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.\")\r\n })),\r\n wordWrapOverride1: register(new EditorStringEnumOption(115 /* wordWrapOverride1 */, 'wordWrapOverride1', 'inherit', ['off', 'on', 'inherit'])),\r\n wordWrapOverride2: register(new EditorStringEnumOption(116 /* wordWrapOverride2 */, 'wordWrapOverride2', 'inherit', ['off', 'on', 'inherit'])),\r\n wrappingIndent: register(new EditorEnumOption(117 /* wrappingIndent */, 'wrappingIndent', 1 /* Same */, 'same', ['none', 'same', 'indent', 'deepIndent'], _wrappingIndentFromString, {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingIndent.none', \"No indentation. Wrapped lines begin at column 1.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingIndent.same', \"Wrapped lines get the same indentation as the parent.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingIndent.indent', \"Wrapped lines get +1 indentation toward the parent.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingIndent.deepIndent', \"Wrapped lines get +2 indentation toward the parent.\"),\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingIndent', \"Controls the indentation of wrapped lines.\"),\r\n })),\r\n wrappingStrategy: register(new EditorStringEnumOption(118 /* wrappingStrategy */, 'wrappingStrategy', 'simple', ['simple', 'advanced'], {\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingStrategy.simple', \"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingStrategy.advanced', \"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.\")\r\n ],\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wrappingStrategy', \"Controls the algorithm that computes wrapping points.\")\r\n })),\r\n // Leave these at the end (because they have dependencies!)\r\n editorClassName: register(new EditorClassName()),\r\n pixelRatio: register(new EditorPixelRatio()),\r\n tabFocusMode: register(new EditorTabFocusMode()),\r\n layoutInfo: register(new EditorLayoutInfoComputer()),\r\n wrappingInfo: register(new EditorWrappingInfoComputer())\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorZoom\": () => (/* binding */ EditorZoom)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst EditorZoom = new class {\r\n constructor() {\r\n this._zoomLevel = 0;\r\n this._onDidChangeZoomLevel = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event;\r\n }\r\n getZoomLevel() {\r\n return this._zoomLevel;\r\n }\r\n setZoomLevel(zoomLevel) {\r\n zoomLevel = Math.min(Math.max(-5, zoomLevel), 20);\r\n if (this._zoomLevel === zoomLevel) {\r\n return;\r\n }\r\n this._zoomLevel = zoomLevel;\r\n this._onDidChangeZoomLevel.fire(this._zoomLevel);\r\n }\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BareFontInfo\": () => (/* binding */ BareFontInfo),\n/* harmony export */ \"SERIALIZED_FONT_INFO_VERSION\": () => (/* binding */ SERIALIZED_FONT_INFO_VERSION),\n/* harmony export */ \"FontInfo\": () => (/* binding */ FontInfo)\n/* harmony export */ });\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _editorZoom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editorZoom.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/**\r\n * Determined from empirical observations.\r\n * @internal\r\n */\r\nconst GOLDEN_LINE_HEIGHT_RATIO = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.isMacintosh ? 1.5 : 1.35;\r\n/**\r\n * @internal\r\n */\r\nconst MINIMUM_LINE_HEIGHT = 8;\r\nclass BareFontInfo {\r\n /**\r\n * @internal\r\n */\r\n constructor(opts) {\r\n this.zoomLevel = opts.zoomLevel;\r\n this.pixelRatio = opts.pixelRatio;\r\n this.fontFamily = String(opts.fontFamily);\r\n this.fontWeight = String(opts.fontWeight);\r\n this.fontSize = opts.fontSize;\r\n this.fontFeatureSettings = opts.fontFeatureSettings;\r\n this.lineHeight = opts.lineHeight | 0;\r\n this.letterSpacing = opts.letterSpacing;\r\n }\r\n /**\r\n * @internal\r\n */\r\n static createFromValidatedSettings(options, zoomLevel, pixelRatio, ignoreEditorZoom) {\r\n const fontFamily = options.get(37 /* fontFamily */);\r\n const fontWeight = options.get(41 /* fontWeight */);\r\n const fontSize = options.get(40 /* fontSize */);\r\n const fontFeatureSettings = options.get(39 /* fontLigatures */);\r\n const lineHeight = options.get(53 /* lineHeight */);\r\n const letterSpacing = options.get(50 /* letterSpacing */);\r\n return BareFontInfo._create(fontFamily, fontWeight, fontSize, fontFeatureSettings, lineHeight, letterSpacing, zoomLevel, pixelRatio, ignoreEditorZoom);\r\n }\r\n /**\r\n * @internal\r\n */\r\n static _create(fontFamily, fontWeight, fontSize, fontFeatureSettings, lineHeight, letterSpacing, zoomLevel, pixelRatio, ignoreEditorZoom) {\r\n if (lineHeight === 0) {\r\n lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize);\r\n }\r\n else if (lineHeight < MINIMUM_LINE_HEIGHT) {\r\n lineHeight = MINIMUM_LINE_HEIGHT;\r\n }\r\n const editorZoomLevelMultiplier = 1 + (ignoreEditorZoom ? 0 : _editorZoom_js__WEBPACK_IMPORTED_MODULE_1__.EditorZoom.getZoomLevel() * 0.1);\r\n fontSize *= editorZoomLevelMultiplier;\r\n lineHeight *= editorZoomLevelMultiplier;\r\n return new BareFontInfo({\r\n zoomLevel: zoomLevel,\r\n pixelRatio: pixelRatio,\r\n fontFamily: fontFamily,\r\n fontWeight: fontWeight,\r\n fontSize: fontSize,\r\n fontFeatureSettings: fontFeatureSettings,\r\n lineHeight: lineHeight,\r\n letterSpacing: letterSpacing\r\n });\r\n }\r\n /**\r\n * @internal\r\n */\r\n getId() {\r\n return this.zoomLevel + '-' + this.pixelRatio + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.fontFeatureSettings + '-' + this.lineHeight + '-' + this.letterSpacing;\r\n }\r\n /**\r\n * @internal\r\n */\r\n getMassagedFontFamily() {\r\n if (/[,\"']/.test(this.fontFamily)) {\r\n // Looks like the font family might be already escaped\r\n return this.fontFamily;\r\n }\r\n if (/[+ ]/.test(this.fontFamily)) {\r\n // Wrap a font family using + or <space> with quotes\r\n return `\"${this.fontFamily}\"`;\r\n }\r\n return this.fontFamily;\r\n }\r\n}\r\n// change this whenever `FontInfo` members are changed\r\nconst SERIALIZED_FONT_INFO_VERSION = 1;\r\nclass FontInfo extends BareFontInfo {\r\n /**\r\n * @internal\r\n */\r\n constructor(opts, isTrusted) {\r\n super(opts);\r\n this.version = SERIALIZED_FONT_INFO_VERSION;\r\n this.isTrusted = isTrusted;\r\n this.isMonospace = opts.isMonospace;\r\n this.typicalHalfwidthCharacterWidth = opts.typicalHalfwidthCharacterWidth;\r\n this.typicalFullwidthCharacterWidth = opts.typicalFullwidthCharacterWidth;\r\n this.canUseHalfwidthRightwardsArrow = opts.canUseHalfwidthRightwardsArrow;\r\n this.spaceWidth = opts.spaceWidth;\r\n this.middotWidth = opts.middotWidth;\r\n this.wsmiddotWidth = opts.wsmiddotWidth;\r\n this.maxDigitWidth = opts.maxDigitWidth;\r\n }\r\n /**\r\n * @internal\r\n */\r\n equals(other) {\r\n return (this.fontFamily === other.fontFamily\r\n && this.fontWeight === other.fontWeight\r\n && this.fontSize === other.fontSize\r\n && this.fontFeatureSettings === other.fontFeatureSettings\r\n && this.lineHeight === other.lineHeight\r\n && this.letterSpacing === other.letterSpacing\r\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\r\n && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth\r\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\r\n && this.spaceWidth === other.spaceWidth\r\n && this.middotWidth === other.middotWidth\r\n && this.wsmiddotWidth === other.wsmiddotWidth\r\n && this.maxDigitWidth === other.maxDigitWidth);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorModelState\": () => (/* binding */ CursorModelState),\n/* harmony export */ \"Cursor\": () => (/* binding */ Cursor)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorCollection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js\");\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cursorDeleteOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js\");\n/* harmony import */ var _cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cursorTypeOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../view/viewEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewModel/viewModelEventDispatcher.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * A snapshot of the cursor and the model state\r\n */\r\nclass CursorModelState {\r\n constructor(model, cursor) {\r\n this.modelVersionId = model.getVersionId();\r\n this.cursorState = cursor.getCursorStates();\r\n }\r\n equals(other) {\r\n if (!other) {\r\n return false;\r\n }\r\n if (this.modelVersionId !== other.modelVersionId) {\r\n return false;\r\n }\r\n if (this.cursorState.length !== other.cursorState.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = this.cursorState.length; i < len; i++) {\r\n if (!this.cursorState[i].equals(other.cursorState[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nclass AutoClosedAction {\r\n constructor(model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations) {\r\n this._model = model;\r\n this._autoClosedCharactersDecorations = autoClosedCharactersDecorations;\r\n this._autoClosedEnclosingDecorations = autoClosedEnclosingDecorations;\r\n }\r\n static getAllAutoClosedCharacters(autoClosedActions) {\r\n let autoClosedCharacters = [];\r\n for (const autoClosedAction of autoClosedActions) {\r\n autoClosedCharacters = autoClosedCharacters.concat(autoClosedAction.getAutoClosedCharactersRanges());\r\n }\r\n return autoClosedCharacters;\r\n }\r\n dispose() {\r\n this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []);\r\n this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, []);\r\n }\r\n getAutoClosedCharactersRanges() {\r\n let result = [];\r\n for (let i = 0; i < this._autoClosedCharactersDecorations.length; i++) {\r\n const decorationRange = this._model.getDecorationRange(this._autoClosedCharactersDecorations[i]);\r\n if (decorationRange) {\r\n result.push(decorationRange);\r\n }\r\n }\r\n return result;\r\n }\r\n isValid(selections) {\r\n let enclosingRanges = [];\r\n for (let i = 0; i < this._autoClosedEnclosingDecorations.length; i++) {\r\n const decorationRange = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);\r\n if (decorationRange) {\r\n enclosingRanges.push(decorationRange);\r\n if (decorationRange.startLineNumber !== decorationRange.endLineNumber) {\r\n // Stop tracking if the range becomes multiline...\r\n return false;\r\n }\r\n }\r\n }\r\n enclosingRanges.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts);\r\n selections.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts);\r\n for (let i = 0; i < selections.length; i++) {\r\n if (i >= enclosingRanges.length) {\r\n return false;\r\n }\r\n if (!enclosingRanges[i].strictContainsRange(selections[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nclass Cursor extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.Disposable {\r\n constructor(model, viewModel, coordinatesConverter, cursorConfig) {\r\n super();\r\n this._model = model;\r\n this._knownModelVersionId = this._model.getVersionId();\r\n this._viewModel = viewModel;\r\n this._coordinatesConverter = coordinatesConverter;\r\n this.context = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorContext(this._model, this._coordinatesConverter, cursorConfig);\r\n this._cursors = new _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__.CursorCollection(this.context);\r\n this._hasFocus = false;\r\n this._isHandling = false;\r\n this._isDoingComposition = false;\r\n this._selectionsWhenCompositionStarted = null;\r\n this._columnSelectData = null;\r\n this._autoClosedActions = [];\r\n this._prevEditOperationType = 0 /* Other */;\r\n }\r\n dispose() {\r\n this._cursors.dispose();\r\n this._autoClosedActions = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.dispose)(this._autoClosedActions);\r\n super.dispose();\r\n }\r\n updateConfiguration(cursorConfig) {\r\n this.context = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorContext(this._model, this._coordinatesConverter, cursorConfig);\r\n this._cursors.updateContext(this.context);\r\n }\r\n onLineMappingChanged(eventsCollector) {\r\n if (this._knownModelVersionId !== this._model.getVersionId()) {\r\n // There are model change events that I didn't yet receive.\r\n //\r\n // This can happen when editing the model, and the view model receives the change events first,\r\n // and the view model emits line mapping changed events, all before the cursor gets a chance to\r\n // recover from markers.\r\n //\r\n // The model change listener above will be called soon and we'll ensure a valid cursor state there.\r\n return;\r\n }\r\n // Ensure valid state\r\n this.setStates(eventsCollector, 'viewModel', 0 /* NotSet */, this.getCursorStates());\r\n }\r\n setHasFocus(hasFocus) {\r\n this._hasFocus = hasFocus;\r\n }\r\n _validateAutoClosedActions() {\r\n if (this._autoClosedActions.length > 0) {\r\n let selections = this._cursors.getSelections();\r\n for (let i = 0; i < this._autoClosedActions.length; i++) {\r\n const autoClosedAction = this._autoClosedActions[i];\r\n if (!autoClosedAction.isValid(selections)) {\r\n autoClosedAction.dispose();\r\n this._autoClosedActions.splice(i, 1);\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n // ------ some getters/setters\r\n getPrimaryCursorState() {\r\n return this._cursors.getPrimaryCursor();\r\n }\r\n getLastAddedCursorIndex() {\r\n return this._cursors.getLastAddedCursorIndex();\r\n }\r\n getCursorStates() {\r\n return this._cursors.getAll();\r\n }\r\n setStates(eventsCollector, source, reason, states) {\r\n let reachedMaxCursorCount = false;\r\n if (states !== null && states.length > Cursor.MAX_CURSOR_COUNT) {\r\n states = states.slice(0, Cursor.MAX_CURSOR_COUNT);\r\n reachedMaxCursorCount = true;\r\n }\r\n const oldState = new CursorModelState(this._model, this);\r\n this._cursors.setStates(states);\r\n this._cursors.normalize();\r\n this._columnSelectData = null;\r\n this._validateAutoClosedActions();\r\n return this._emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount);\r\n }\r\n setCursorColumnSelectData(columnSelectData) {\r\n this._columnSelectData = columnSelectData;\r\n }\r\n revealPrimary(eventsCollector, source, revealHorizontal, scrollType) {\r\n const viewPositions = this._cursors.getViewPositions();\r\n if (viewPositions.length > 1) {\r\n this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), 0 /* Simple */, revealHorizontal, scrollType);\r\n return;\r\n }\r\n else {\r\n const viewPosition = viewPositions[0];\r\n const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._emitCursorRevealRange(eventsCollector, source, viewRange, null, 0 /* Simple */, revealHorizontal, scrollType);\r\n }\r\n }\r\n _revealPrimaryCursor(eventsCollector, source, verticalType, revealHorizontal, scrollType) {\r\n const viewPositions = this._cursors.getViewPositions();\r\n if (viewPositions.length > 1) {\r\n this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), verticalType, revealHorizontal, scrollType);\r\n }\r\n else {\r\n const viewPosition = viewPositions[0];\r\n const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._emitCursorRevealRange(eventsCollector, source, viewRange, null, verticalType, revealHorizontal, scrollType);\r\n }\r\n }\r\n _emitCursorRevealRange(eventsCollector, source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType) {\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__.ViewRevealRangeRequestEvent(source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType));\r\n }\r\n saveState() {\r\n let result = [];\r\n const selections = this._cursors.getSelections();\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n result.push({\r\n inSelectionMode: !selection.isEmpty(),\r\n selectionStart: {\r\n lineNumber: selection.selectionStartLineNumber,\r\n column: selection.selectionStartColumn,\r\n },\r\n position: {\r\n lineNumber: selection.positionLineNumber,\r\n column: selection.positionColumn,\r\n }\r\n });\r\n }\r\n return result;\r\n }\r\n restoreState(eventsCollector, states) {\r\n let desiredSelections = [];\r\n for (let i = 0, len = states.length; i < len; i++) {\r\n const state = states[i];\r\n let positionLineNumber = 1;\r\n let positionColumn = 1;\r\n // Avoid missing properties on the literal\r\n if (state.position && state.position.lineNumber) {\r\n positionLineNumber = state.position.lineNumber;\r\n }\r\n if (state.position && state.position.column) {\r\n positionColumn = state.position.column;\r\n }\r\n let selectionStartLineNumber = positionLineNumber;\r\n let selectionStartColumn = positionColumn;\r\n // Avoid missing properties on the literal\r\n if (state.selectionStart && state.selectionStart.lineNumber) {\r\n selectionStartLineNumber = state.selectionStart.lineNumber;\r\n }\r\n if (state.selectionStart && state.selectionStart.column) {\r\n selectionStartColumn = state.selectionStart.column;\r\n }\r\n desiredSelections.push({\r\n selectionStartLineNumber: selectionStartLineNumber,\r\n selectionStartColumn: selectionStartColumn,\r\n positionLineNumber: positionLineNumber,\r\n positionColumn: positionColumn\r\n });\r\n }\r\n this.setStates(eventsCollector, 'restoreState', 0 /* NotSet */, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorState.fromModelSelections(desiredSelections));\r\n this.revealPrimary(eventsCollector, 'restoreState', true, 1 /* Immediate */);\r\n }\r\n onModelContentChanged(eventsCollector, e) {\r\n this._knownModelVersionId = e.versionId;\r\n if (this._isHandling) {\r\n return;\r\n }\r\n const hadFlushEvent = e.containsEvent(1 /* Flush */);\r\n this._prevEditOperationType = 0 /* Other */;\r\n if (hadFlushEvent) {\r\n // a model.setValue() was called\r\n this._cursors.dispose();\r\n this._cursors = new _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__.CursorCollection(this.context);\r\n this._validateAutoClosedActions();\r\n this._emitStateChangedIfNecessary(eventsCollector, 'model', 1 /* ContentFlush */, null, false);\r\n }\r\n else {\r\n if (this._hasFocus && e.resultingSelection && e.resultingSelection.length > 0) {\r\n const cursorState = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorState.fromModelSelections(e.resultingSelection);\r\n if (this.setStates(eventsCollector, 'modelChange', e.isUndoing ? 5 /* Undo */ : e.isRedoing ? 6 /* Redo */ : 2 /* RecoverFromMarkers */, cursorState)) {\r\n this._revealPrimaryCursor(eventsCollector, 'modelChange', 0 /* Simple */, true, 0 /* Smooth */);\r\n }\r\n }\r\n else {\r\n const selectionsFromMarkers = this._cursors.readSelectionFromMarkers();\r\n this.setStates(eventsCollector, 'modelChange', 2 /* RecoverFromMarkers */, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorState.fromModelSelections(selectionsFromMarkers));\r\n }\r\n }\r\n }\r\n getSelection() {\r\n return this._cursors.getPrimaryCursor().modelState.selection;\r\n }\r\n getTopMostViewPosition() {\r\n return this._cursors.getTopMostViewPosition();\r\n }\r\n getBottomMostViewPosition() {\r\n return this._cursors.getBottomMostViewPosition();\r\n }\r\n getCursorColumnSelectData() {\r\n if (this._columnSelectData) {\r\n return this._columnSelectData;\r\n }\r\n const primaryCursor = this._cursors.getPrimaryCursor();\r\n const viewSelectionStart = primaryCursor.viewState.selectionStart.getStartPosition();\r\n const viewPosition = primaryCursor.viewState.position;\r\n return {\r\n isReal: false,\r\n fromViewLineNumber: viewSelectionStart.lineNumber,\r\n fromViewVisualColumn: _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewSelectionStart),\r\n toViewLineNumber: viewPosition.lineNumber,\r\n toViewVisualColumn: _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewPosition),\r\n };\r\n }\r\n getSelections() {\r\n return this._cursors.getSelections();\r\n }\r\n setSelections(eventsCollector, source, selections, reason) {\r\n this.setStates(eventsCollector, source, reason, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorState.fromModelSelections(selections));\r\n }\r\n getPrevEditOperationType() {\r\n return this._prevEditOperationType;\r\n }\r\n setPrevEditOperationType(type) {\r\n this._prevEditOperationType = type;\r\n }\r\n // ------ auxiliary handling logic\r\n _pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges) {\r\n let autoClosedCharactersDeltaDecorations = [];\r\n let autoClosedEnclosingDeltaDecorations = [];\r\n for (let i = 0, len = autoClosedCharactersRanges.length; i < len; i++) {\r\n autoClosedCharactersDeltaDecorations.push({\r\n range: autoClosedCharactersRanges[i],\r\n options: {\r\n inlineClassName: 'auto-closed-character',\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n });\r\n autoClosedEnclosingDeltaDecorations.push({\r\n range: autoClosedEnclosingRanges[i],\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n });\r\n }\r\n const autoClosedCharactersDecorations = this._model.deltaDecorations([], autoClosedCharactersDeltaDecorations);\r\n const autoClosedEnclosingDecorations = this._model.deltaDecorations([], autoClosedEnclosingDeltaDecorations);\r\n this._autoClosedActions.push(new AutoClosedAction(this._model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations));\r\n }\r\n _executeEditOperation(opResult) {\r\n if (!opResult) {\r\n // Nothing to execute\r\n return;\r\n }\r\n if (opResult.shouldPushStackElementBefore) {\r\n this._model.pushStackElement();\r\n }\r\n const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands);\r\n if (result) {\r\n // The commands were applied correctly\r\n this._interpretCommandResult(result);\r\n // Check for auto-closing closed characters\r\n let autoClosedCharactersRanges = [];\r\n let autoClosedEnclosingRanges = [];\r\n for (let i = 0; i < opResult.commands.length; i++) {\r\n const command = opResult.commands[i];\r\n if (command instanceof _cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeWithAutoClosingCommand && command.enclosingRange && command.closeCharacterRange) {\r\n autoClosedCharactersRanges.push(command.closeCharacterRange);\r\n autoClosedEnclosingRanges.push(command.enclosingRange);\r\n }\r\n }\r\n if (autoClosedCharactersRanges.length > 0) {\r\n this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges);\r\n }\r\n this._prevEditOperationType = opResult.type;\r\n }\r\n if (opResult.shouldPushStackElementAfter) {\r\n this._model.pushStackElement();\r\n }\r\n }\r\n _interpretCommandResult(cursorState) {\r\n if (!cursorState || cursorState.length === 0) {\r\n cursorState = this._cursors.readSelectionFromMarkers();\r\n }\r\n this._columnSelectData = null;\r\n this._cursors.setSelections(cursorState);\r\n this._cursors.normalize();\r\n }\r\n // -----------------------------------------------------------------------------------------------------------\r\n // ----- emitting events\r\n _emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount) {\r\n const newState = new CursorModelState(this._model, this);\r\n if (newState.equals(oldState)) {\r\n return false;\r\n }\r\n const selections = this._cursors.getSelections();\r\n const viewSelections = this._cursors.getViewSelections();\r\n // Let the view get the event first.\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__.ViewCursorStateChangedEvent(viewSelections, selections));\r\n // Only after the view has been notified, let the rest of the world know...\r\n if (!oldState\r\n || oldState.cursorState.length !== newState.cursorState.length\r\n || newState.cursorState.some((newCursorState, i) => !newCursorState.modelState.equals(oldState.cursorState[i].modelState))) {\r\n const oldSelections = oldState ? oldState.cursorState.map(s => s.modelState.selection) : null;\r\n const oldModelVersionId = oldState ? oldState.modelVersionId : 0;\r\n eventsCollector.emitOutgoingEvent(new _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_10__.CursorStateChangedEvent(oldSelections, selections, oldModelVersionId, newState.modelVersionId, source || 'keyboard', reason, reachedMaxCursorCount));\r\n }\r\n return true;\r\n }\r\n // -----------------------------------------------------------------------------------------------------------\r\n // ----- handlers beyond this point\r\n _findAutoClosingPairs(edits) {\r\n if (!edits.length) {\r\n return null;\r\n }\r\n let indices = [];\r\n for (let i = 0, len = edits.length; i < len; i++) {\r\n const edit = edits[i];\r\n if (!edit.text || edit.text.indexOf('\\n') >= 0) {\r\n return null;\r\n }\r\n const m = edit.text.match(/([)\\]}>'\"`])([^)\\]}>'\"`]*)$/);\r\n if (!m) {\r\n return null;\r\n }\r\n const closeChar = m[1];\r\n const autoClosingPairsCandidates = this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(closeChar);\r\n if (!autoClosingPairsCandidates || autoClosingPairsCandidates.length !== 1) {\r\n return null;\r\n }\r\n const openChar = autoClosingPairsCandidates[0].open;\r\n const closeCharIndex = edit.text.length - m[2].length - 1;\r\n const openCharIndex = edit.text.lastIndexOf(openChar, closeCharIndex - 1);\r\n if (openCharIndex === -1) {\r\n return null;\r\n }\r\n indices.push([openCharIndex, closeCharIndex]);\r\n }\r\n return indices;\r\n }\r\n executeEdits(eventsCollector, source, edits, cursorStateComputer) {\r\n let autoClosingIndices = null;\r\n if (source === 'snippet') {\r\n autoClosingIndices = this._findAutoClosingPairs(edits);\r\n }\r\n if (autoClosingIndices) {\r\n edits[0]._isTracked = true;\r\n }\r\n let autoClosedCharactersRanges = [];\r\n let autoClosedEnclosingRanges = [];\r\n const selections = this._model.pushEditOperations(this.getSelections(), edits, (undoEdits) => {\r\n if (autoClosingIndices) {\r\n for (let i = 0, len = autoClosingIndices.length; i < len; i++) {\r\n const [openCharInnerIndex, closeCharInnerIndex] = autoClosingIndices[i];\r\n const undoEdit = undoEdits[i];\r\n const lineNumber = undoEdit.range.startLineNumber;\r\n const openCharIndex = undoEdit.range.startColumn - 1 + openCharInnerIndex;\r\n const closeCharIndex = undoEdit.range.startColumn - 1 + closeCharInnerIndex;\r\n autoClosedCharactersRanges.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(lineNumber, closeCharIndex + 1, lineNumber, closeCharIndex + 2));\r\n autoClosedEnclosingRanges.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(lineNumber, openCharIndex + 1, lineNumber, closeCharIndex + 2));\r\n }\r\n }\r\n const selections = cursorStateComputer(undoEdits);\r\n if (selections) {\r\n // Don't recover the selection from markers because\r\n // we know what it should be.\r\n this._isHandling = true;\r\n }\r\n return selections;\r\n });\r\n if (selections) {\r\n this._isHandling = false;\r\n this.setSelections(eventsCollector, source, selections, 0 /* NotSet */);\r\n }\r\n if (autoClosedCharactersRanges.length > 0) {\r\n this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges);\r\n }\r\n }\r\n _executeEdit(callback, eventsCollector, source, cursorChangeReason = 0 /* NotSet */) {\r\n if (this.context.cursorConfig.readOnly) {\r\n // we cannot edit when read only...\r\n return;\r\n }\r\n const oldState = new CursorModelState(this._model, this);\r\n this._cursors.stopTrackingSelections();\r\n this._isHandling = true;\r\n try {\r\n this._cursors.ensureValidState();\r\n callback();\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(err);\r\n }\r\n this._isHandling = false;\r\n this._cursors.startTrackingSelections();\r\n this._validateAutoClosedActions();\r\n if (this._emitStateChangedIfNecessary(eventsCollector, source, cursorChangeReason, oldState, false)) {\r\n this._revealPrimaryCursor(eventsCollector, source, 0 /* Simple */, true, 0 /* Smooth */);\r\n }\r\n }\r\n setIsDoingComposition(isDoingComposition) {\r\n this._isDoingComposition = isDoingComposition;\r\n }\r\n startComposition(eventsCollector) {\r\n this._selectionsWhenCompositionStarted = this.getSelections().slice(0);\r\n }\r\n endComposition(eventsCollector, source) {\r\n this._executeEdit(() => {\r\n if (source === 'keyboard') {\r\n // composition finishes, let's check if we need to auto complete if necessary.\r\n const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions);\r\n this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this._selectionsWhenCompositionStarted, this.getSelections(), autoClosedCharacters));\r\n this._selectionsWhenCompositionStarted = null;\r\n }\r\n }, eventsCollector, source);\r\n }\r\n type(eventsCollector, text, source) {\r\n this._executeEdit(() => {\r\n if (source === 'keyboard') {\r\n // If this event is coming straight from the keyboard, look for electric characters and enter\r\n const len = text.length;\r\n let offset = 0;\r\n while (offset < len) {\r\n const charLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.nextCharLength(text, offset);\r\n const chr = text.substr(offset, charLength);\r\n // Here we must interpret each typed character individually\r\n const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions);\r\n this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeOperations.typeWithInterceptors(this._isDoingComposition, this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), autoClosedCharacters, chr));\r\n offset += charLength;\r\n }\r\n }\r\n else {\r\n this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text));\r\n }\r\n }, eventsCollector, source);\r\n }\r\n compositionType(eventsCollector, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source) {\r\n if (text.length === 0 && replacePrevCharCnt === 0 && replaceNextCharCnt === 0) {\r\n // this edit is a no-op\r\n if (positionDelta !== 0) {\r\n // but it still wants to move the cursor\r\n const newSelections = this.getSelections().map(selection => {\r\n const position = selection.getPosition();\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(position.lineNumber, position.column + positionDelta, position.lineNumber, position.column + positionDelta);\r\n });\r\n this.setSelections(eventsCollector, source, newSelections, 0 /* NotSet */);\r\n }\r\n return;\r\n }\r\n this._executeEdit(() => {\r\n this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeOperations.compositionType(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text, replacePrevCharCnt, replaceNextCharCnt, positionDelta));\r\n }, eventsCollector, source);\r\n }\r\n paste(eventsCollector, text, pasteOnNewLine, multicursorText, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__.TypeOperations.paste(this.context.cursorConfig, this._model, this.getSelections(), text, pasteOnNewLine, multicursorText || []));\r\n }, eventsCollector, source, 4 /* Paste */);\r\n }\r\n cut(eventsCollector, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_4__.DeleteOperations.cut(this.context.cursorConfig, this._model, this.getSelections()));\r\n }, eventsCollector, source);\r\n }\r\n executeCommand(eventsCollector, command, source) {\r\n this._executeEdit(() => {\r\n this._cursors.killSecondaryCursors();\r\n this._executeEditOperation(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.EditOperationResult(0 /* Other */, [command], {\r\n shouldPushStackElementBefore: false,\r\n shouldPushStackElementAfter: false\r\n }));\r\n }, eventsCollector, source);\r\n }\r\n executeCommands(eventsCollector, commands, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: false,\r\n shouldPushStackElementAfter: false\r\n }));\r\n }, eventsCollector, source);\r\n }\r\n}\r\nCursor.MAX_CURSOR_COUNT = 10000;\r\nclass CommandExecutor {\r\n static executeCommands(model, selectionsBefore, commands) {\r\n const ctx = {\r\n model: model,\r\n selectionsBefore: selectionsBefore,\r\n trackedRanges: [],\r\n trackedRangesDirection: []\r\n };\r\n const result = this._innerExecuteCommands(ctx, commands);\r\n for (let i = 0, len = ctx.trackedRanges.length; i < len; i++) {\r\n ctx.model._setTrackedRange(ctx.trackedRanges[i], null, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n return result;\r\n }\r\n static _innerExecuteCommands(ctx, commands) {\r\n if (this._arrayIsEmpty(commands)) {\r\n return null;\r\n }\r\n const commandsData = this._getEditOperations(ctx, commands);\r\n if (commandsData.operations.length === 0) {\r\n return null;\r\n }\r\n const rawOperations = commandsData.operations;\r\n const loserCursorsMap = this._getLoserCursorMap(rawOperations);\r\n if (loserCursorsMap.hasOwnProperty('0')) {\r\n // These commands are very messed up\r\n console.warn('Ignoring commands');\r\n return null;\r\n }\r\n // Remove operations belonging to losing cursors\r\n let filteredOperations = [];\r\n for (let i = 0, len = rawOperations.length; i < len; i++) {\r\n if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) {\r\n filteredOperations.push(rawOperations[i]);\r\n }\r\n }\r\n // TODO@Alex: find a better way to do this.\r\n // give the hint that edit operations are tracked to the model\r\n if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) {\r\n filteredOperations[0]._isTracked = true;\r\n }\r\n let selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, (inverseEditOperations) => {\r\n let groupedInverseEditOperations = [];\r\n for (let i = 0; i < ctx.selectionsBefore.length; i++) {\r\n groupedInverseEditOperations[i] = [];\r\n }\r\n for (const op of inverseEditOperations) {\r\n if (!op.identifier) {\r\n // perhaps auto whitespace trim edits\r\n continue;\r\n }\r\n groupedInverseEditOperations[op.identifier.major].push(op);\r\n }\r\n const minorBasedSorter = (a, b) => {\r\n return a.identifier.minor - b.identifier.minor;\r\n };\r\n let cursorSelections = [];\r\n for (let i = 0; i < ctx.selectionsBefore.length; i++) {\r\n if (groupedInverseEditOperations[i].length > 0) {\r\n groupedInverseEditOperations[i].sort(minorBasedSorter);\r\n cursorSelections[i] = commands[i].computeCursorState(ctx.model, {\r\n getInverseEditOperations: () => {\r\n return groupedInverseEditOperations[i];\r\n },\r\n getTrackedSelection: (id) => {\r\n const idx = parseInt(id, 10);\r\n const range = ctx.model._getTrackedRange(ctx.trackedRanges[idx]);\r\n if (ctx.trackedRangesDirection[idx] === 0 /* LTR */) {\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\r\n }\r\n });\r\n }\r\n else {\r\n cursorSelections[i] = ctx.selectionsBefore[i];\r\n }\r\n }\r\n return cursorSelections;\r\n });\r\n if (!selectionsAfter) {\r\n selectionsAfter = ctx.selectionsBefore;\r\n }\r\n // Extract losing cursors\r\n let losingCursors = [];\r\n for (let losingCursorIndex in loserCursorsMap) {\r\n if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) {\r\n losingCursors.push(parseInt(losingCursorIndex, 10));\r\n }\r\n }\r\n // Sort losing cursors descending\r\n losingCursors.sort((a, b) => {\r\n return b - a;\r\n });\r\n // Remove losing cursors\r\n for (const losingCursor of losingCursors) {\r\n selectionsAfter.splice(losingCursor, 1);\r\n }\r\n return selectionsAfter;\r\n }\r\n static _arrayIsEmpty(commands) {\r\n for (let i = 0, len = commands.length; i < len; i++) {\r\n if (commands[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _getEditOperations(ctx, commands) {\r\n let operations = [];\r\n let hadTrackedEditOperation = false;\r\n for (let i = 0, len = commands.length; i < len; i++) {\r\n const command = commands[i];\r\n if (command) {\r\n const r = this._getEditOperationsFromCommand(ctx, i, command);\r\n operations = operations.concat(r.operations);\r\n hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation;\r\n }\r\n }\r\n return {\r\n operations: operations,\r\n hadTrackedEditOperation: hadTrackedEditOperation\r\n };\r\n }\r\n static _getEditOperationsFromCommand(ctx, majorIdentifier, command) {\r\n // This method acts as a transaction, if the command fails\r\n // everything it has done is ignored\r\n let operations = [];\r\n let operationMinor = 0;\r\n const addEditOperation = (range, text, forceMoveMarkers = false) => {\r\n if (_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.isEmpty(range) && text === '') {\r\n // This command wants to add a no-op => no thank you\r\n return;\r\n }\r\n operations.push({\r\n identifier: {\r\n major: majorIdentifier,\r\n minor: operationMinor++\r\n },\r\n range: range,\r\n text: text,\r\n forceMoveMarkers: forceMoveMarkers,\r\n isAutoWhitespaceEdit: command.insertsAutoWhitespace\r\n });\r\n };\r\n let hadTrackedEditOperation = false;\r\n const addTrackedEditOperation = (selection, text, forceMoveMarkers) => {\r\n hadTrackedEditOperation = true;\r\n addEditOperation(selection, text, forceMoveMarkers);\r\n };\r\n const trackSelection = (_selection, trackPreviousOnEmpty) => {\r\n const selection = _core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection.liftSelection(_selection);\r\n let stickiness;\r\n if (selection.isEmpty()) {\r\n if (typeof trackPreviousOnEmpty === 'boolean') {\r\n if (trackPreviousOnEmpty) {\r\n stickiness = 2 /* GrowsOnlyWhenTypingBefore */;\r\n }\r\n else {\r\n stickiness = 3 /* GrowsOnlyWhenTypingAfter */;\r\n }\r\n }\r\n else {\r\n // Try to lock it with surrounding text\r\n const maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber);\r\n if (selection.startColumn === maxLineColumn) {\r\n stickiness = 2 /* GrowsOnlyWhenTypingBefore */;\r\n }\r\n else {\r\n stickiness = 3 /* GrowsOnlyWhenTypingAfter */;\r\n }\r\n }\r\n }\r\n else {\r\n stickiness = 1 /* NeverGrowsWhenTypingAtEdges */;\r\n }\r\n const l = ctx.trackedRanges.length;\r\n const id = ctx.model._setTrackedRange(null, selection, stickiness);\r\n ctx.trackedRanges[l] = id;\r\n ctx.trackedRangesDirection[l] = selection.getDirection();\r\n return l.toString();\r\n };\r\n const editOperationBuilder = {\r\n addEditOperation: addEditOperation,\r\n addTrackedEditOperation: addTrackedEditOperation,\r\n trackSelection: trackSelection\r\n };\r\n try {\r\n command.getEditOperations(ctx.model, editOperationBuilder);\r\n }\r\n catch (e) {\r\n // TODO@Alex use notification service if this should be user facing\r\n // e.friendlyMessage = nls.localize('corrupt.commands', \"Unexpected exception while executing command.\");\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return {\r\n operations: [],\r\n hadTrackedEditOperation: false\r\n };\r\n }\r\n return {\r\n operations: operations,\r\n hadTrackedEditOperation: hadTrackedEditOperation\r\n };\r\n }\r\n static _getLoserCursorMap(operations) {\r\n // This is destructive on the array\r\n operations = operations.slice(0);\r\n // Sort operations with last one first\r\n operations.sort((a, b) => {\r\n // Note the minus!\r\n return -(_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingEnds(a.range, b.range));\r\n });\r\n // Operations can not overlap!\r\n let loserCursorsMap = {};\r\n for (let i = 1; i < operations.length; i++) {\r\n const previousOp = operations[i - 1];\r\n const currentOp = operations[i];\r\n if (_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.getStartPosition(previousOp.range).isBefore(_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.getEndPosition(currentOp.range))) {\r\n let loserMajor;\r\n if (previousOp.identifier.major > currentOp.identifier.major) {\r\n // previousOp loses the battle\r\n loserMajor = previousOp.identifier.major;\r\n }\r\n else {\r\n loserMajor = currentOp.identifier.major;\r\n }\r\n loserCursorsMap[loserMajor.toString()] = true;\r\n for (let j = 0; j < operations.length; j++) {\r\n if (operations[j].identifier.major === loserMajor) {\r\n operations.splice(j, 1);\r\n if (j < i) {\r\n i--;\r\n }\r\n j--;\r\n }\r\n }\r\n if (i > 0) {\r\n i--;\r\n }\r\n }\r\n }\r\n return loserCursorsMap;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorAtomicMoveOperations.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorAtomicMoveOperations.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AtomicTabMoveOperations\": () => (/* binding */ AtomicTabMoveOperations)\n/* harmony export */ });\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass AtomicTabMoveOperations {\r\n /**\r\n * Get the visible column at the position. If we get to a non-whitespace character first\r\n * or past the end of string then return -1.\r\n *\r\n * **Note** `position` and the return value are 0-based.\r\n */\r\n static whitespaceVisibleColumn(lineContent, position, tabSize) {\r\n const lineLength = lineContent.length;\r\n let visibleColumn = 0;\r\n let prevTabStopPosition = -1;\r\n let prevTabStopVisibleColumn = -1;\r\n for (let i = 0; i < lineLength; i++) {\r\n if (i === position) {\r\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\r\n }\r\n if (visibleColumn % tabSize === 0) {\r\n prevTabStopPosition = i;\r\n prevTabStopVisibleColumn = visibleColumn;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n visibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n // Skip to the next multiple of tabSize.\r\n visibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\r\n break;\r\n default:\r\n return [-1, -1, -1];\r\n }\r\n }\r\n if (position === lineLength) {\r\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\r\n }\r\n return [-1, -1, -1];\r\n }\r\n /**\r\n * Return the position that should result from a move left, right or to the\r\n * nearest tab, if atomic tabs are enabled. Left and right are used for the\r\n * arrow key movements, nearest is used for mouse selection. It returns\r\n * -1 if atomic tabs are not relevant and you should fall back to normal\r\n * behaviour.\r\n *\r\n * **Note**: `position` and the return value are 0-based.\r\n */\r\n static atomicPosition(lineContent, position, tabSize, direction) {\r\n const lineLength = lineContent.length;\r\n // Get the 0-based visible column corresponding to the position, or return\r\n // -1 if it is not in the initial whitespace.\r\n const [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn] = AtomicTabMoveOperations.whitespaceVisibleColumn(lineContent, position, tabSize);\r\n if (visibleColumn === -1) {\r\n return -1;\r\n }\r\n // Is the output left or right of the current position. The case for nearest\r\n // where it is the same as the current position is handled in the switch.\r\n let left;\r\n switch (direction) {\r\n case 0 /* Left */:\r\n left = true;\r\n break;\r\n case 1 /* Right */:\r\n left = false;\r\n break;\r\n case 2 /* Nearest */:\r\n // The code below assumes the output position is either left or right\r\n // of the input position. If it is the same, return immediately.\r\n if (visibleColumn % tabSize === 0) {\r\n return position;\r\n }\r\n // Go to the nearest indentation.\r\n left = visibleColumn % tabSize <= (tabSize / 2);\r\n break;\r\n }\r\n // If going left, we can just use the info about the last tab stop position and\r\n // last tab stop visible column that we computed in the first walk over the whitespace.\r\n if (left) {\r\n if (prevTabStopPosition === -1) {\r\n return -1;\r\n }\r\n // If the direction is left, we need to keep scanning right to ensure\r\n // that targetVisibleColumn + tabSize is before non-whitespace.\r\n // This is so that when we press left at the end of a partial\r\n // indentation it only goes one character. For example ' foo' with\r\n // tabSize 4, should jump from position 6 to position 5, not 4.\r\n let currentVisibleColumn = prevTabStopVisibleColumn;\r\n for (let i = prevTabStopPosition; i < lineLength; ++i) {\r\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\r\n // It is a full indentation.\r\n return prevTabStopPosition;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n currentVisibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\r\n break;\r\n default:\r\n return -1;\r\n }\r\n }\r\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\r\n return prevTabStopPosition;\r\n }\r\n // It must have been a partial indentation.\r\n return -1;\r\n }\r\n // We are going right.\r\n const targetVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\r\n // We can just continue from where whitespaceVisibleColumn got to.\r\n let currentVisibleColumn = visibleColumn;\r\n for (let i = position; i < lineLength; i++) {\r\n if (currentVisibleColumn === targetVisibleColumn) {\r\n return i;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n currentVisibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\r\n break;\r\n default:\r\n return -1;\r\n }\r\n }\r\n // This condition handles when the target column is at the end of the line.\r\n if (currentVisibleColumn === targetVisibleColumn) {\r\n return lineLength;\r\n }\r\n return -1;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorAtomicMoveOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorCollection\": () => (/* binding */ CursorCollection)\n/* harmony export */ });\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./oneCursor.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass CursorCollection {\r\n constructor(context) {\r\n this.context = context;\r\n this.primaryCursor = new _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__.OneCursor(context);\r\n this.secondaryCursors = [];\r\n this.lastAddedCursorIndex = 0;\r\n }\r\n dispose() {\r\n this.primaryCursor.dispose(this.context);\r\n this.killSecondaryCursors();\r\n }\r\n startTrackingSelections() {\r\n this.primaryCursor.startTrackingSelection(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].startTrackingSelection(this.context);\r\n }\r\n }\r\n stopTrackingSelections() {\r\n this.primaryCursor.stopTrackingSelection(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].stopTrackingSelection(this.context);\r\n }\r\n }\r\n updateContext(context) {\r\n this.context = context;\r\n }\r\n ensureValidState() {\r\n this.primaryCursor.ensureValidState(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].ensureValidState(this.context);\r\n }\r\n }\r\n readSelectionFromMarkers() {\r\n let result = [];\r\n result[0] = this.primaryCursor.readSelectionFromMarkers(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].readSelectionFromMarkers(this.context);\r\n }\r\n return result;\r\n }\r\n getAll() {\r\n let result = [];\r\n result[0] = this.primaryCursor.asCursorState();\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].asCursorState();\r\n }\r\n return result;\r\n }\r\n getViewPositions() {\r\n let result = [];\r\n result[0] = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].viewState.position;\r\n }\r\n return result;\r\n }\r\n getTopMostViewPosition() {\r\n let result = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n const viewPosition = this.secondaryCursors[i].viewState.position;\r\n if (viewPosition.isBefore(result)) {\r\n result = viewPosition;\r\n }\r\n }\r\n return result;\r\n }\r\n getBottomMostViewPosition() {\r\n let result = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n const viewPosition = this.secondaryCursors[i].viewState.position;\r\n if (result.isBeforeOrEqual(viewPosition)) {\r\n result = viewPosition;\r\n }\r\n }\r\n return result;\r\n }\r\n getSelections() {\r\n let result = [];\r\n result[0] = this.primaryCursor.modelState.selection;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].modelState.selection;\r\n }\r\n return result;\r\n }\r\n getViewSelections() {\r\n let result = [];\r\n result[0] = this.primaryCursor.viewState.selection;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].viewState.selection;\r\n }\r\n return result;\r\n }\r\n setSelections(selections) {\r\n this.setStates(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorState.fromModelSelections(selections));\r\n }\r\n getPrimaryCursor() {\r\n return this.primaryCursor.asCursorState();\r\n }\r\n setStates(states) {\r\n if (states === null) {\r\n return;\r\n }\r\n this.primaryCursor.setState(this.context, states[0].modelState, states[0].viewState);\r\n this._setSecondaryStates(states.slice(1));\r\n }\r\n /**\r\n * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`.\r\n */\r\n _setSecondaryStates(secondaryStates) {\r\n const secondaryCursorsLength = this.secondaryCursors.length;\r\n const secondaryStatesLength = secondaryStates.length;\r\n if (secondaryCursorsLength < secondaryStatesLength) {\r\n let createCnt = secondaryStatesLength - secondaryCursorsLength;\r\n for (let i = 0; i < createCnt; i++) {\r\n this._addSecondaryCursor();\r\n }\r\n }\r\n else if (secondaryCursorsLength > secondaryStatesLength) {\r\n let removeCnt = secondaryCursorsLength - secondaryStatesLength;\r\n for (let i = 0; i < removeCnt; i++) {\r\n this._removeSecondaryCursor(this.secondaryCursors.length - 1);\r\n }\r\n }\r\n for (let i = 0; i < secondaryStatesLength; i++) {\r\n this.secondaryCursors[i].setState(this.context, secondaryStates[i].modelState, secondaryStates[i].viewState);\r\n }\r\n }\r\n killSecondaryCursors() {\r\n this._setSecondaryStates([]);\r\n }\r\n _addSecondaryCursor() {\r\n this.secondaryCursors.push(new _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__.OneCursor(this.context));\r\n this.lastAddedCursorIndex = this.secondaryCursors.length;\r\n }\r\n getLastAddedCursorIndex() {\r\n if (this.secondaryCursors.length === 0 || this.lastAddedCursorIndex === 0) {\r\n return 0;\r\n }\r\n return this.lastAddedCursorIndex;\r\n }\r\n _removeSecondaryCursor(removeIndex) {\r\n if (this.lastAddedCursorIndex >= removeIndex + 1) {\r\n this.lastAddedCursorIndex--;\r\n }\r\n this.secondaryCursors[removeIndex].dispose(this.context);\r\n this.secondaryCursors.splice(removeIndex, 1);\r\n }\r\n _getAll() {\r\n let result = [];\r\n result[0] = this.primaryCursor;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i];\r\n }\r\n return result;\r\n }\r\n normalize() {\r\n if (this.secondaryCursors.length === 0) {\r\n return;\r\n }\r\n let cursors = this._getAll();\r\n let sortedCursors = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n sortedCursors.push({\r\n index: i,\r\n selection: cursors[i].modelState.selection,\r\n });\r\n }\r\n sortedCursors.sort((a, b) => {\r\n if (a.selection.startLineNumber === b.selection.startLineNumber) {\r\n return a.selection.startColumn - b.selection.startColumn;\r\n }\r\n return a.selection.startLineNumber - b.selection.startLineNumber;\r\n });\r\n for (let sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) {\r\n const current = sortedCursors[sortedCursorIndex];\r\n const next = sortedCursors[sortedCursorIndex + 1];\r\n const currentSelection = current.selection;\r\n const nextSelection = next.selection;\r\n if (!this.context.cursorConfig.multiCursorMergeOverlapping) {\r\n continue;\r\n }\r\n let shouldMergeCursors;\r\n if (nextSelection.isEmpty() || currentSelection.isEmpty()) {\r\n // Merge touching cursors if one of them is collapsed\r\n shouldMergeCursors = nextSelection.getStartPosition().isBeforeOrEqual(currentSelection.getEndPosition());\r\n }\r\n else {\r\n // Merge only overlapping cursors (i.e. allow touching ranges)\r\n shouldMergeCursors = nextSelection.getStartPosition().isBefore(currentSelection.getEndPosition());\r\n }\r\n if (shouldMergeCursors) {\r\n const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1;\r\n const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex;\r\n const looserIndex = sortedCursors[looserSortedCursorIndex].index;\r\n const winnerIndex = sortedCursors[winnerSortedCursorIndex].index;\r\n const looserSelection = sortedCursors[looserSortedCursorIndex].selection;\r\n const winnerSelection = sortedCursors[winnerSortedCursorIndex].selection;\r\n if (!looserSelection.equalsSelection(winnerSelection)) {\r\n const resultingRange = looserSelection.plusRange(winnerSelection);\r\n const looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn);\r\n const winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn);\r\n // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor)\r\n let resultingSelectionIsLTR;\r\n if (looserIndex === this.lastAddedCursorIndex) {\r\n resultingSelectionIsLTR = looserSelectionIsLTR;\r\n this.lastAddedCursorIndex = winnerIndex;\r\n }\r\n else {\r\n // Winner takes it all\r\n resultingSelectionIsLTR = winnerSelectionIsLTR;\r\n }\r\n let resultingSelection;\r\n if (resultingSelectionIsLTR) {\r\n resultingSelection = new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__.Selection(resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn);\r\n }\r\n else {\r\n resultingSelection = new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__.Selection(resultingRange.endLineNumber, resultingRange.endColumn, resultingRange.startLineNumber, resultingRange.startColumn);\r\n }\r\n sortedCursors[winnerSortedCursorIndex].selection = resultingSelection;\r\n const resultingState = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorState.fromModelSelection(resultingSelection);\r\n cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState);\r\n }\r\n for (const sortedCursor of sortedCursors) {\r\n if (sortedCursor.index > looserIndex) {\r\n sortedCursor.index--;\r\n }\r\n }\r\n cursors.splice(looserIndex, 1);\r\n sortedCursors.splice(looserSortedCursorIndex, 1);\r\n this._removeSecondaryCursor(looserIndex - 1);\r\n sortedCursorIndex--;\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColumnSelection\": () => (/* binding */ ColumnSelection)\n/* harmony export */ });\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass ColumnSelection {\r\n static columnSelect(config, model, fromLineNumber, fromVisibleColumn, toLineNumber, toVisibleColumn) {\r\n let lineCount = Math.abs(toLineNumber - fromLineNumber) + 1;\r\n let reversed = (fromLineNumber > toLineNumber);\r\n let isRTL = (fromVisibleColumn > toVisibleColumn);\r\n let isLTR = (fromVisibleColumn < toVisibleColumn);\r\n let result = [];\r\n // console.log(`fromVisibleColumn: ${fromVisibleColumn}, toVisibleColumn: ${toVisibleColumn}`);\r\n for (let i = 0; i < lineCount; i++) {\r\n let lineNumber = fromLineNumber + (reversed ? -i : i);\r\n let startColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, fromVisibleColumn);\r\n let endColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, toVisibleColumn);\r\n let visibleStartColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, startColumn));\r\n let visibleEndColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, endColumn));\r\n // console.log(`lineNumber: ${lineNumber}: visibleStartColumn: ${visibleStartColumn}, visibleEndColumn: ${visibleEndColumn}`);\r\n if (isLTR) {\r\n if (visibleStartColumn > toVisibleColumn) {\r\n continue;\r\n }\r\n if (visibleEndColumn < fromVisibleColumn) {\r\n continue;\r\n }\r\n }\r\n if (isRTL) {\r\n if (visibleEndColumn > fromVisibleColumn) {\r\n continue;\r\n }\r\n if (visibleStartColumn < toVisibleColumn) {\r\n continue;\r\n }\r\n }\r\n result.push(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, startColumn, lineNumber, startColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, endColumn), 0));\r\n }\r\n if (result.length === 0) {\r\n // We are after all the lines, so add cursor at the end of each line\r\n for (let i = 0; i < lineCount; i++) {\r\n const lineNumber = fromLineNumber + (reversed ? -i : i);\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n result.push(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, maxColumn, lineNumber, maxColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, maxColumn), 0));\r\n }\r\n }\r\n return {\r\n viewStates: result,\r\n reversed: reversed,\r\n fromLineNumber: fromLineNumber,\r\n fromVisualColumn: fromVisibleColumn,\r\n toLineNumber: toLineNumber,\r\n toVisualColumn: toVisibleColumn\r\n };\r\n }\r\n static columnSelectLeft(config, model, prevColumnSelectData) {\r\n let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn;\r\n if (toViewVisualColumn > 1) {\r\n toViewVisualColumn--;\r\n }\r\n return ColumnSelection.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn);\r\n }\r\n static columnSelectRight(config, model, prevColumnSelectData) {\r\n let maxVisualViewColumn = 0;\r\n const minViewLineNumber = Math.min(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber);\r\n const maxViewLineNumber = Math.max(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber);\r\n for (let lineNumber = minViewLineNumber; lineNumber <= maxViewLineNumber; lineNumber++) {\r\n const lineMaxViewColumn = model.getLineMaxColumn(lineNumber);\r\n const lineMaxVisualViewColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, lineMaxViewColumn));\r\n maxVisualViewColumn = Math.max(maxVisualViewColumn, lineMaxVisualViewColumn);\r\n }\r\n let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn;\r\n if (toViewVisualColumn < maxVisualViewColumn) {\r\n toViewVisualColumn++;\r\n }\r\n return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn);\r\n }\r\n static columnSelectUp(config, model, prevColumnSelectData, isPaged) {\r\n const linesCount = isPaged ? config.pageSize : 1;\r\n const toViewLineNumber = Math.max(1, prevColumnSelectData.toViewLineNumber - linesCount);\r\n return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\r\n }\r\n static columnSelectDown(config, model, prevColumnSelectData, isPaged) {\r\n const linesCount = isPaged ? config.pageSize : 1;\r\n const toViewLineNumber = Math.min(model.getLineCount(), prevColumnSelectData.toViewLineNumber + linesCount);\r\n return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorConfiguration\": () => (/* binding */ CursorConfiguration),\n/* harmony export */ \"SingleCursorState\": () => (/* binding */ SingleCursorState),\n/* harmony export */ \"CursorContext\": () => (/* binding */ CursorContext),\n/* harmony export */ \"PartialModelCursorState\": () => (/* binding */ PartialModelCursorState),\n/* harmony export */ \"PartialViewCursorState\": () => (/* binding */ PartialViewCursorState),\n/* harmony export */ \"CursorState\": () => (/* binding */ CursorState),\n/* harmony export */ \"EditOperationResult\": () => (/* binding */ EditOperationResult),\n/* harmony export */ \"CursorColumns\": () => (/* binding */ CursorColumns),\n/* harmony export */ \"isQuote\": () => (/* binding */ isQuote)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst autoCloseAlways = () => true;\r\nconst autoCloseNever = () => false;\r\nconst autoCloseBeforeWhitespace = (chr) => (chr === ' ' || chr === '\\t');\r\nclass CursorConfiguration {\r\n constructor(languageIdentifier, modelOptions, configuration) {\r\n this._languageIdentifier = languageIdentifier;\r\n const options = configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this.readOnly = options.get(75 /* readOnly */);\r\n this.tabSize = modelOptions.tabSize;\r\n this.indentSize = modelOptions.indentSize;\r\n this.insertSpaces = modelOptions.insertSpaces;\r\n this.stickyTabStops = options.get(99 /* stickyTabStops */);\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.pageSize = Math.max(1, Math.floor(layoutInfo.height / this.lineHeight) - 2);\r\n this.useTabStops = options.get(109 /* useTabStops */);\r\n this.wordSeparators = options.get(110 /* wordSeparators */);\r\n this.emptySelectionClipboard = options.get(28 /* emptySelectionClipboard */);\r\n this.copyWithSyntaxHighlighting = options.get(18 /* copyWithSyntaxHighlighting */);\r\n this.multiCursorMergeOverlapping = options.get(63 /* multiCursorMergeOverlapping */);\r\n this.multiCursorPaste = options.get(65 /* multiCursorPaste */);\r\n this.autoClosingBrackets = options.get(5 /* autoClosingBrackets */);\r\n this.autoClosingQuotes = options.get(7 /* autoClosingQuotes */);\r\n this.autoClosingOvertype = options.get(6 /* autoClosingOvertype */);\r\n this.autoSurround = options.get(10 /* autoSurround */);\r\n this.autoIndent = options.get(8 /* autoIndent */);\r\n this.surroundingPairs = {};\r\n this._electricChars = null;\r\n this.shouldAutoCloseBefore = {\r\n quote: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingQuotes),\r\n bracket: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingBrackets)\r\n };\r\n this.autoClosingPairs = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getAutoClosingPairs(languageIdentifier.id);\r\n let surroundingPairs = CursorConfiguration._getSurroundingPairs(languageIdentifier);\r\n if (surroundingPairs) {\r\n for (const pair of surroundingPairs) {\r\n this.surroundingPairs[pair.open] = pair.close;\r\n }\r\n }\r\n }\r\n static shouldRecreate(e) {\r\n return (e.hasChanged(124 /* layoutInfo */)\r\n || e.hasChanged(110 /* wordSeparators */)\r\n || e.hasChanged(28 /* emptySelectionClipboard */)\r\n || e.hasChanged(63 /* multiCursorMergeOverlapping */)\r\n || e.hasChanged(65 /* multiCursorPaste */)\r\n || e.hasChanged(5 /* autoClosingBrackets */)\r\n || e.hasChanged(7 /* autoClosingQuotes */)\r\n || e.hasChanged(6 /* autoClosingOvertype */)\r\n || e.hasChanged(10 /* autoSurround */)\r\n || e.hasChanged(109 /* useTabStops */)\r\n || e.hasChanged(53 /* lineHeight */)\r\n || e.hasChanged(75 /* readOnly */));\r\n }\r\n get electricChars() {\r\n if (!this._electricChars) {\r\n this._electricChars = {};\r\n let electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier);\r\n if (electricChars) {\r\n for (const char of electricChars) {\r\n this._electricChars[char] = true;\r\n }\r\n }\r\n }\r\n return this._electricChars;\r\n }\r\n normalizeIndentation(str) {\r\n return _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__.TextModel.normalizeIndentation(str, this.indentSize, this.insertSpaces);\r\n }\r\n static _getElectricCharacters(languageIdentifier) {\r\n try {\r\n return _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getElectricCharacters(languageIdentifier.id);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return null;\r\n }\r\n }\r\n static _getShouldAutoClose(languageIdentifier, autoCloseConfig) {\r\n switch (autoCloseConfig) {\r\n case 'beforeWhitespace':\r\n return autoCloseBeforeWhitespace;\r\n case 'languageDefined':\r\n return CursorConfiguration._getLanguageDefinedShouldAutoClose(languageIdentifier);\r\n case 'always':\r\n return autoCloseAlways;\r\n case 'never':\r\n return autoCloseNever;\r\n }\r\n }\r\n static _getLanguageDefinedShouldAutoClose(languageIdentifier) {\r\n try {\r\n const autoCloseBeforeSet = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getAutoCloseBeforeSet(languageIdentifier.id);\r\n return c => autoCloseBeforeSet.indexOf(c) !== -1;\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return autoCloseNever;\r\n }\r\n }\r\n static _getSurroundingPairs(languageIdentifier) {\r\n try {\r\n return _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getSurroundingPairs(languageIdentifier.id);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return null;\r\n }\r\n }\r\n}\r\n/**\r\n * Represents the cursor state on either the model or on the view model.\r\n */\r\nclass SingleCursorState {\r\n constructor(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns) {\r\n this.selectionStart = selectionStart;\r\n this.selectionStartLeftoverVisibleColumns = selectionStartLeftoverVisibleColumns;\r\n this.position = position;\r\n this.leftoverVisibleColumns = leftoverVisibleColumns;\r\n this.selection = SingleCursorState._computeSelection(this.selectionStart, this.position);\r\n }\r\n equals(other) {\r\n return (this.selectionStartLeftoverVisibleColumns === other.selectionStartLeftoverVisibleColumns\r\n && this.leftoverVisibleColumns === other.leftoverVisibleColumns\r\n && this.position.equals(other.position)\r\n && this.selectionStart.equalsRange(other.selectionStart));\r\n }\r\n hasSelection() {\r\n return (!this.selection.isEmpty() || !this.selectionStart.isEmpty());\r\n }\r\n move(inSelectionMode, lineNumber, column, leftoverVisibleColumns) {\r\n if (inSelectionMode) {\r\n // move just position\r\n return new SingleCursorState(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(lineNumber, column), leftoverVisibleColumns);\r\n }\r\n else {\r\n // move everything\r\n return new SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(lineNumber, column, lineNumber, column), leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(lineNumber, column), leftoverVisibleColumns);\r\n }\r\n }\r\n static _computeSelection(selectionStart, position) {\r\n let startLineNumber, startColumn, endLineNumber, endColumn;\r\n if (selectionStart.isEmpty()) {\r\n startLineNumber = selectionStart.startLineNumber;\r\n startColumn = selectionStart.startColumn;\r\n endLineNumber = position.lineNumber;\r\n endColumn = position.column;\r\n }\r\n else {\r\n if (position.isBeforeOrEqual(selectionStart.getStartPosition())) {\r\n startLineNumber = selectionStart.endLineNumber;\r\n startColumn = selectionStart.endColumn;\r\n endLineNumber = position.lineNumber;\r\n endColumn = position.column;\r\n }\r\n else {\r\n startLineNumber = selectionStart.startLineNumber;\r\n startColumn = selectionStart.startColumn;\r\n endLineNumber = position.lineNumber;\r\n endColumn = position.column;\r\n }\r\n }\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_4__.Selection(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n}\r\nclass CursorContext {\r\n constructor(model, coordinatesConverter, cursorConfig) {\r\n this.model = model;\r\n this.coordinatesConverter = coordinatesConverter;\r\n this.cursorConfig = cursorConfig;\r\n }\r\n}\r\nclass PartialModelCursorState {\r\n constructor(modelState) {\r\n this.modelState = modelState;\r\n this.viewState = null;\r\n }\r\n}\r\nclass PartialViewCursorState {\r\n constructor(viewState) {\r\n this.modelState = null;\r\n this.viewState = viewState;\r\n }\r\n}\r\nclass CursorState {\r\n constructor(modelState, viewState) {\r\n this.modelState = modelState;\r\n this.viewState = viewState;\r\n }\r\n static fromModelState(modelState) {\r\n return new PartialModelCursorState(modelState);\r\n }\r\n static fromViewState(viewState) {\r\n return new PartialViewCursorState(viewState);\r\n }\r\n static fromModelSelection(modelSelection) {\r\n const selectionStartLineNumber = modelSelection.selectionStartLineNumber;\r\n const selectionStartColumn = modelSelection.selectionStartColumn;\r\n const positionLineNumber = modelSelection.positionLineNumber;\r\n const positionColumn = modelSelection.positionColumn;\r\n const modelState = new SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(positionLineNumber, positionColumn), 0);\r\n return CursorState.fromModelState(modelState);\r\n }\r\n static fromModelSelections(modelSelections) {\r\n let states = [];\r\n for (let i = 0, len = modelSelections.length; i < len; i++) {\r\n states[i] = this.fromModelSelection(modelSelections[i]);\r\n }\r\n return states;\r\n }\r\n equals(other) {\r\n return (this.viewState.equals(other.viewState) && this.modelState.equals(other.modelState));\r\n }\r\n}\r\nclass EditOperationResult {\r\n constructor(type, commands, opts) {\r\n this.type = type;\r\n this.commands = commands;\r\n this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore;\r\n this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter;\r\n }\r\n}\r\n/**\r\n * Common operations that work and make sense both on the model and on the view model.\r\n */\r\nclass CursorColumns {\r\n static visibleColumnFromColumn(lineContent, column, tabSize) {\r\n const lineContentLength = lineContent.length;\r\n const endOffset = column - 1 < lineContentLength ? column - 1 : lineContentLength;\r\n let result = 0;\r\n let i = 0;\r\n while (i < endOffset) {\r\n const codePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getNextCodePoint(lineContent, endOffset, i);\r\n i += (codePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n if (codePoint === 9 /* Tab */) {\r\n result = CursorColumns.nextRenderTabStop(result, tabSize);\r\n }\r\n else {\r\n let graphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getGraphemeBreakType(codePoint);\r\n while (i < endOffset) {\r\n const nextCodePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getNextCodePoint(lineContent, endOffset, i);\r\n const nextGraphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getGraphemeBreakType(nextCodePoint);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {\r\n break;\r\n }\r\n i += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = nextGraphemeBreakType;\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isFullWidthCharacter(codePoint) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isEmojiImprecise(codePoint)) {\r\n result = result + 2;\r\n }\r\n else {\r\n result = result + 1;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n static visibleColumnFromColumn2(config, model, position) {\r\n return this.visibleColumnFromColumn(model.getLineContent(position.lineNumber), position.column, config.tabSize);\r\n }\r\n static columnFromVisibleColumn(lineContent, visibleColumn, tabSize) {\r\n if (visibleColumn <= 0) {\r\n return 1;\r\n }\r\n const lineLength = lineContent.length;\r\n let beforeVisibleColumn = 0;\r\n let beforeColumn = 1;\r\n let i = 0;\r\n while (i < lineLength) {\r\n const codePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getNextCodePoint(lineContent, lineLength, i);\r\n i += (codePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n let afterVisibleColumn;\r\n if (codePoint === 9 /* Tab */) {\r\n afterVisibleColumn = CursorColumns.nextRenderTabStop(beforeVisibleColumn, tabSize);\r\n }\r\n else {\r\n let graphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getGraphemeBreakType(codePoint);\r\n while (i < lineLength) {\r\n const nextCodePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getNextCodePoint(lineContent, lineLength, i);\r\n const nextGraphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getGraphemeBreakType(nextCodePoint);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {\r\n break;\r\n }\r\n i += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1);\r\n graphemeBreakType = nextGraphemeBreakType;\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isFullWidthCharacter(codePoint) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isEmojiImprecise(codePoint)) {\r\n afterVisibleColumn = beforeVisibleColumn + 2;\r\n }\r\n else {\r\n afterVisibleColumn = beforeVisibleColumn + 1;\r\n }\r\n }\r\n const afterColumn = i + 1;\r\n if (afterVisibleColumn >= visibleColumn) {\r\n const beforeDelta = visibleColumn - beforeVisibleColumn;\r\n const afterDelta = afterVisibleColumn - visibleColumn;\r\n if (afterDelta < beforeDelta) {\r\n return afterColumn;\r\n }\r\n else {\r\n return beforeColumn;\r\n }\r\n }\r\n beforeVisibleColumn = afterVisibleColumn;\r\n beforeColumn = afterColumn;\r\n }\r\n // walked the entire string\r\n return lineLength + 1;\r\n }\r\n static columnFromVisibleColumn2(config, model, lineNumber, visibleColumn) {\r\n let result = this.columnFromVisibleColumn(model.getLineContent(lineNumber), visibleColumn, config.tabSize);\r\n let minColumn = model.getLineMinColumn(lineNumber);\r\n if (result < minColumn) {\r\n return minColumn;\r\n }\r\n let maxColumn = model.getLineMaxColumn(lineNumber);\r\n if (result > maxColumn) {\r\n return maxColumn;\r\n }\r\n return result;\r\n }\r\n /**\r\n * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns)\r\n */\r\n static nextRenderTabStop(visibleColumn, tabSize) {\r\n return visibleColumn + tabSize - visibleColumn % tabSize;\r\n }\r\n /**\r\n * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns)\r\n */\r\n static nextIndentTabStop(visibleColumn, indentSize) {\r\n return visibleColumn + indentSize - visibleColumn % indentSize;\r\n }\r\n /**\r\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\r\n */\r\n static prevRenderTabStop(column, tabSize) {\r\n return column - 1 - (column - 1) % tabSize;\r\n }\r\n /**\r\n * ATTENTION: This works with 0-based columns (as opposed to the regular 1-based columns)\r\n */\r\n static prevIndentTabStop(column, indentSize) {\r\n return column - 1 - (column - 1) % indentSize;\r\n }\r\n}\r\nfunction isQuote(ch) {\r\n return (ch === '\\'' || ch === '\"' || ch === '`');\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DeleteOperations\": () => (/* binding */ DeleteOperations)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorMoveOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass DeleteOperations {\r\n static deleteRight(prevEditOperationType, config, model, selections) {\r\n let commands = [];\r\n let shouldPushStackElementBefore = (prevEditOperationType !== 3 /* DeletingRight */);\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n let deleteSelection = selection;\r\n if (deleteSelection.isEmpty()) {\r\n let position = selection.getPosition();\r\n let rightOfPosition = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__.MoveOperations.right(config, model, position.lineNumber, position.column);\r\n deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(rightOfPosition.lineNumber, rightOfPosition.column, position.lineNumber, position.column);\r\n }\r\n if (deleteSelection.isEmpty()) {\r\n // Probably at end of file => ignore\r\n commands[i] = null;\r\n continue;\r\n }\r\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\r\n shouldPushStackElementBefore = true;\r\n }\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__.ReplaceCommand(deleteSelection, '');\r\n }\r\n return [shouldPushStackElementBefore, commands];\r\n }\r\n static isAutoClosingPairDelete(autoClosingBrackets, autoClosingQuotes, autoClosingPairsOpen, model, selections) {\r\n if (autoClosingBrackets === 'never' && autoClosingQuotes === 'never') {\r\n return false;\r\n }\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n const position = selection.getPosition();\r\n if (!selection.isEmpty()) {\r\n return false;\r\n }\r\n const lineText = model.getLineContent(position.lineNumber);\r\n if (position.column < 2 || position.column >= lineText.length + 1) {\r\n return false;\r\n }\r\n const character = lineText.charAt(position.column - 2);\r\n const autoClosingPairCandidates = autoClosingPairsOpen.get(character);\r\n if (!autoClosingPairCandidates) {\r\n return false;\r\n }\r\n if ((0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__.isQuote)(character)) {\r\n if (autoClosingQuotes === 'never') {\r\n return false;\r\n }\r\n }\r\n else {\r\n if (autoClosingBrackets === 'never') {\r\n return false;\r\n }\r\n }\r\n const afterCharacter = lineText.charAt(position.column - 1);\r\n let foundAutoClosingPair = false;\r\n for (const autoClosingPairCandidate of autoClosingPairCandidates) {\r\n if (autoClosingPairCandidate.open === character && autoClosingPairCandidate.close === afterCharacter) {\r\n foundAutoClosingPair = true;\r\n }\r\n }\r\n if (!foundAutoClosingPair) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _runAutoClosingPairDelete(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const position = selections[i].getPosition();\r\n const deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, position.column - 1, position.lineNumber, position.column + 1);\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__.ReplaceCommand(deleteSelection, '');\r\n }\r\n return [true, commands];\r\n }\r\n static deleteLeft(prevEditOperationType, config, model, selections) {\r\n if (this.isAutoClosingPairDelete(config.autoClosingBrackets, config.autoClosingQuotes, config.autoClosingPairs.autoClosingPairsOpenByEnd, model, selections)) {\r\n return this._runAutoClosingPairDelete(config, model, selections);\r\n }\r\n let commands = [];\r\n let shouldPushStackElementBefore = (prevEditOperationType !== 2 /* DeletingLeft */);\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n let deleteSelection = selection;\r\n if (deleteSelection.isEmpty()) {\r\n let position = selection.getPosition();\r\n if (config.useTabStops && position.column > 1) {\r\n let lineContent = model.getLineContent(position.lineNumber);\r\n let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineContent);\r\n let lastIndentationColumn = (firstNonWhitespaceIndex === -1\r\n ? /* entire string is whitespace */ lineContent.length + 1\r\n : firstNonWhitespaceIndex + 1);\r\n if (position.column <= lastIndentationColumn) {\r\n let fromVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__.CursorColumns.visibleColumnFromColumn2(config, model, position);\r\n let toVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__.CursorColumns.prevIndentTabStop(fromVisibleColumn, config.indentSize);\r\n let toColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__.CursorColumns.columnFromVisibleColumn2(config, model, position.lineNumber, toVisibleColumn);\r\n deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, toColumn, position.lineNumber, position.column);\r\n }\r\n else {\r\n deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, position.column - 1, position.lineNumber, position.column);\r\n }\r\n }\r\n else {\r\n let leftOfPosition = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__.MoveOperations.left(config, model, position.lineNumber, position.column);\r\n deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(leftOfPosition.lineNumber, leftOfPosition.column, position.lineNumber, position.column);\r\n }\r\n }\r\n if (deleteSelection.isEmpty()) {\r\n // Probably at beginning of file => ignore\r\n commands[i] = null;\r\n continue;\r\n }\r\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\r\n shouldPushStackElementBefore = true;\r\n }\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__.ReplaceCommand(deleteSelection, '');\r\n }\r\n return [shouldPushStackElementBefore, commands];\r\n }\r\n static cut(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (selection.isEmpty()) {\r\n if (config.emptySelectionClipboard) {\r\n // This is a full line cut\r\n let position = selection.getPosition();\r\n let startLineNumber, startColumn, endLineNumber, endColumn;\r\n if (position.lineNumber < model.getLineCount()) {\r\n // Cutting a line in the middle of the model\r\n startLineNumber = position.lineNumber;\r\n startColumn = 1;\r\n endLineNumber = position.lineNumber + 1;\r\n endColumn = 1;\r\n }\r\n else if (position.lineNumber > 1) {\r\n // Cutting the last line & there are more than 1 lines in the model\r\n startLineNumber = position.lineNumber - 1;\r\n startColumn = model.getLineMaxColumn(position.lineNumber - 1);\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n else {\r\n // Cutting the single line that the model contains\r\n startLineNumber = position.lineNumber;\r\n startColumn = 1;\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n let deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n if (!deleteSelection.isEmpty()) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__.ReplaceCommand(deleteSelection, '');\r\n }\r\n else {\r\n commands[i] = null;\r\n }\r\n }\r\n else {\r\n // Cannot cut empty selection\r\n commands[i] = null;\r\n }\r\n }\r\n else {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__.ReplaceCommand(selection, '');\r\n }\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__.EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorMoveCommands\": () => (/* binding */ CursorMoveCommands),\n/* harmony export */ \"CursorMove\": () => (/* binding */ CursorMove)\n/* harmony export */ });\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorMoveOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js\");\n/* harmony import */ var _cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorWordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CursorMoveCommands {\r\n static addCursorDown(viewModel, cursors, useLogicalLine) {\r\n let result = [], resultLen = 0;\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[resultLen++] = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState(cursor.modelState, cursor.viewState);\r\n if (useLogicalLine) {\r\n result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState));\r\n }\r\n else {\r\n result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.translateDown(viewModel.cursorConfig, viewModel, cursor.viewState));\r\n }\r\n }\r\n return result;\r\n }\r\n static addCursorUp(viewModel, cursors, useLogicalLine) {\r\n let result = [], resultLen = 0;\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[resultLen++] = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState(cursor.modelState, cursor.viewState);\r\n if (useLogicalLine) {\r\n result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState));\r\n }\r\n else {\r\n result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.translateUp(viewModel.cursorConfig, viewModel, cursor.viewState));\r\n }\r\n }\r\n return result;\r\n }\r\n static moveToBeginningOfLine(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode);\r\n }\r\n return result;\r\n }\r\n static _moveToLineStart(viewModel, cursor, inSelectionMode) {\r\n const currentViewStateColumn = cursor.viewState.position.column;\r\n const currentModelStateColumn = cursor.modelState.position.column;\r\n const isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn;\r\n const currentViewStatelineNumber = cursor.viewState.position.lineNumber;\r\n const firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber);\r\n const isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn;\r\n if (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) {\r\n return this._moveToLineStartByView(viewModel, cursor, inSelectionMode);\r\n }\r\n else {\r\n return this._moveToLineStartByModel(viewModel, cursor, inSelectionMode);\r\n }\r\n }\r\n static _moveToLineStartByView(viewModel, cursor, inSelectionMode) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode));\r\n }\r\n static _moveToLineStartByModel(viewModel, cursor, inSelectionMode) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\r\n }\r\n static moveToEndOfLine(viewModel, cursors, inSelectionMode, sticky) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky);\r\n }\r\n return result;\r\n }\r\n static _moveToLineEnd(viewModel, cursor, inSelectionMode, sticky) {\r\n const viewStatePosition = cursor.viewState.position;\r\n const viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber);\r\n const isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn;\r\n const modelStatePosition = cursor.modelState.position;\r\n const modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber);\r\n const isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column;\r\n if (isEndOfViewLine || isEndLineOfWrappedLine) {\r\n return this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky);\r\n }\r\n else {\r\n return this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky);\r\n }\r\n }\r\n static _moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky));\r\n }\r\n static _moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky));\r\n }\r\n static expandLineSelection(viewModel, cursors) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const startLineNumber = cursor.modelState.selection.startLineNumber;\r\n const lineCount = viewModel.model.getLineCount();\r\n let endLineNumber = cursor.modelState.selection.endLineNumber;\r\n let endColumn;\r\n if (endLineNumber === lineCount) {\r\n endColumn = viewModel.model.getLineMaxColumn(lineCount);\r\n }\r\n else {\r\n endLineNumber++;\r\n endColumn = 1;\r\n }\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startLineNumber, 1, startLineNumber, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(endLineNumber, endColumn), 0));\r\n }\r\n return result;\r\n }\r\n static moveToBeginningOfBuffer(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\r\n }\r\n return result;\r\n }\r\n static moveToEndOfBuffer(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode));\r\n }\r\n return result;\r\n }\r\n static selectAll(viewModel, cursor) {\r\n const lineCount = viewModel.model.getLineCount();\r\n const maxColumn = viewModel.model.getLineMaxColumn(lineCount);\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineCount, maxColumn), 0));\r\n }\r\n static line(viewModel, cursor, inSelectionMode, _position, _viewPosition) {\r\n const position = viewModel.model.validatePosition(_position);\r\n const viewPosition = (_viewPosition\r\n ? viewModel.coordinatesConverter.validateViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(_viewPosition.lineNumber, _viewPosition.column), position)\r\n : viewModel.coordinatesConverter.convertModelPositionToViewPosition(position));\r\n if (!inSelectionMode || !cursor.modelState.hasSelection()) {\r\n // Entering line selection for the first time\r\n const lineCount = viewModel.model.getLineCount();\r\n let selectToLineNumber = position.lineNumber + 1;\r\n let selectToColumn = 1;\r\n if (selectToLineNumber > lineCount) {\r\n selectToLineNumber = lineCount;\r\n selectToColumn = viewModel.model.getLineMaxColumn(selectToLineNumber);\r\n }\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, 1, selectToLineNumber, selectToColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(selectToLineNumber, selectToColumn), 0));\r\n }\r\n // Continuing line selection\r\n const enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber;\r\n if (position.lineNumber < enteringLineNumber) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), viewPosition.lineNumber, 1, 0));\r\n }\r\n else if (position.lineNumber > enteringLineNumber) {\r\n const lineCount = viewModel.getLineCount();\r\n let selectToViewLineNumber = viewPosition.lineNumber + 1;\r\n let selectToViewColumn = 1;\r\n if (selectToViewLineNumber > lineCount) {\r\n selectToViewLineNumber = lineCount;\r\n selectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber);\r\n }\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), selectToViewLineNumber, selectToViewColumn, 0));\r\n }\r\n else {\r\n const endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition();\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(cursor.modelState.move(cursor.modelState.hasSelection(), endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0));\r\n }\r\n }\r\n static word(viewModel, cursor, inSelectionMode, _position) {\r\n const position = viewModel.model.validatePosition(_position);\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__.WordOperations.word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position));\r\n }\r\n static cancelSelection(viewModel, cursor) {\r\n if (!cursor.modelState.hasSelection()) {\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState(cursor.modelState, cursor.viewState);\r\n }\r\n const lineNumber = cursor.viewState.position.lineNumber;\r\n const column = cursor.viewState.position.column;\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(lineNumber, column, lineNumber, column), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column), 0));\r\n }\r\n static moveTo(viewModel, cursor, inSelectionMode, _position, _viewPosition) {\r\n const position = viewModel.model.validatePosition(_position);\r\n const viewPosition = (_viewPosition\r\n ? viewModel.coordinatesConverter.validateViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(_viewPosition.lineNumber, _viewPosition.column), position)\r\n : viewModel.coordinatesConverter.convertModelPositionToViewPosition(position));\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0));\r\n }\r\n static simpleMove(viewModel, cursors, direction, inSelectionMode, value, unit) {\r\n switch (direction) {\r\n case 0 /* Left */: {\r\n if (unit === 4 /* HalfLine */) {\r\n // Move left by half the current line length\r\n return this._moveHalfLineLeft(viewModel, cursors, inSelectionMode);\r\n }\r\n else {\r\n // Move left by `moveParams.value` columns\r\n return this._moveLeft(viewModel, cursors, inSelectionMode, value);\r\n }\r\n }\r\n case 1 /* Right */: {\r\n if (unit === 4 /* HalfLine */) {\r\n // Move right by half the current line length\r\n return this._moveHalfLineRight(viewModel, cursors, inSelectionMode);\r\n }\r\n else {\r\n // Move right by `moveParams.value` columns\r\n return this._moveRight(viewModel, cursors, inSelectionMode, value);\r\n }\r\n }\r\n case 2 /* Up */: {\r\n if (unit === 2 /* WrappedLine */) {\r\n // Move up by view lines\r\n return this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value);\r\n }\r\n else {\r\n // Move up by model lines\r\n return this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value);\r\n }\r\n }\r\n case 3 /* Down */: {\r\n if (unit === 2 /* WrappedLine */) {\r\n // Move down by view lines\r\n return this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value);\r\n }\r\n else {\r\n // Move down by model lines\r\n return this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value);\r\n }\r\n }\r\n case 4 /* PrevBlankLine */: {\r\n if (unit === 2 /* WrappedLine */) {\r\n return cursors.map(cursor => _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\r\n }\r\n else {\r\n return cursors.map(cursor => _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\r\n }\r\n }\r\n case 5 /* NextBlankLine */: {\r\n if (unit === 2 /* WrappedLine */) {\r\n return cursors.map(cursor => _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)));\r\n }\r\n else {\r\n return cursors.map(cursor => _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveToNextBlankLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)));\r\n }\r\n }\r\n case 6 /* WrappedLineStart */: {\r\n // Move to the beginning of the current view line\r\n return this._moveToViewMinColumn(viewModel, cursors, inSelectionMode);\r\n }\r\n case 7 /* WrappedLineFirstNonWhitespaceCharacter */: {\r\n // Move to the first non-whitespace column of the current view line\r\n return this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\r\n }\r\n case 8 /* WrappedLineColumnCenter */: {\r\n // Move to the \"center\" of the current view line\r\n return this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode);\r\n }\r\n case 9 /* WrappedLineEnd */: {\r\n // Move to the end of the current view line\r\n return this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode);\r\n }\r\n case 10 /* WrappedLineLastNonWhitespaceCharacter */: {\r\n // Move to the last non-whitespace column of the current view line\r\n return this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode);\r\n }\r\n default:\r\n return null;\r\n }\r\n }\r\n static viewportMove(viewModel, cursors, direction, inSelectionMode, value) {\r\n const visibleViewRange = viewModel.getCompletelyVisibleViewRange();\r\n const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\r\n switch (direction) {\r\n case 11 /* ViewPortTop */: {\r\n // Move to the nth line start in the viewport (from the top)\r\n const modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value);\r\n const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\r\n return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\r\n }\r\n case 13 /* ViewPortBottom */: {\r\n // Move to the nth line start in the viewport (from the bottom)\r\n const modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value);\r\n const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\r\n return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\r\n }\r\n case 12 /* ViewPortCenter */: {\r\n // Move to the line start in the viewport center\r\n const modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2);\r\n const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);\r\n return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)];\r\n }\r\n case 14 /* ViewPortIfOutside */: {\r\n // Move to a position inside the viewport\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode);\r\n }\r\n return result;\r\n }\r\n default:\r\n return null;\r\n }\r\n }\r\n static findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode) {\r\n let viewLineNumber = cursor.viewState.position.lineNumber;\r\n if (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) {\r\n // Nothing to do, cursor is in viewport\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState(cursor.modelState, cursor.viewState);\r\n }\r\n else {\r\n if (viewLineNumber > visibleViewRange.endLineNumber - 1) {\r\n viewLineNumber = visibleViewRange.endLineNumber - 1;\r\n }\r\n if (viewLineNumber < visibleViewRange.startLineNumber) {\r\n viewLineNumber = visibleViewRange.startLineNumber;\r\n }\r\n const viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\r\n return this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n }\r\n /**\r\n * Find the nth line start included in the range (from the start).\r\n */\r\n static _firstLineNumberInRange(model, range, count) {\r\n let startLineNumber = range.startLineNumber;\r\n if (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\r\n // Move on to the second line if the first line start is not included in the range\r\n startLineNumber++;\r\n }\r\n return Math.min(range.endLineNumber, startLineNumber + count - 1);\r\n }\r\n /**\r\n * Find the nth line start included in the range (from the end).\r\n */\r\n static _lastLineNumberInRange(model, range, count) {\r\n let startLineNumber = range.startLineNumber;\r\n if (range.startColumn !== model.getLineMinColumn(startLineNumber)) {\r\n // Move on to the second line if the first line start is not included in the range\r\n startLineNumber++;\r\n }\r\n return Math.max(startLineNumber, range.endLineNumber - count + 1);\r\n }\r\n static _moveLeft(viewModel, cursors, inSelectionMode, noOfColumns) {\r\n const hasMultipleCursors = (cursors.length > 1);\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const skipWrappingPointStop = hasMultipleCursors || !cursor.viewState.hasSelection();\r\n let newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns);\r\n if (skipWrappingPointStop\r\n && noOfColumns === 1\r\n && cursor.viewState.position.column === viewModel.getLineMinColumn(cursor.viewState.position.lineNumber)\r\n && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) {\r\n // moved over to the previous view line\r\n const newViewModelPosition = viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position);\r\n if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) {\r\n // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position\r\n newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, newViewState, inSelectionMode, 1);\r\n }\r\n }\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(newViewState);\r\n }\r\n return result;\r\n }\r\n static _moveHalfLineLeft(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const halfLine = Math.round(viewModel.getLineContent(viewLineNumber).length / 2);\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\r\n }\r\n return result;\r\n }\r\n static _moveRight(viewModel, cursors, inSelectionMode, noOfColumns) {\r\n const hasMultipleCursors = (cursors.length > 1);\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const skipWrappingPointStop = hasMultipleCursors || !cursor.viewState.hasSelection();\r\n let newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns);\r\n if (skipWrappingPointStop\r\n && noOfColumns === 1\r\n && cursor.viewState.position.column === viewModel.getLineMaxColumn(cursor.viewState.position.lineNumber)\r\n && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) {\r\n // moved over to the next view line\r\n const newViewModelPosition = viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position);\r\n if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) {\r\n // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position\r\n newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveRight(viewModel.cursorConfig, viewModel, newViewState, inSelectionMode, 1);\r\n }\r\n }\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(newViewState);\r\n }\r\n return result;\r\n }\r\n static _moveHalfLineRight(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const halfLine = Math.round(viewModel.getLineContent(viewLineNumber).length / 2);\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine));\r\n }\r\n return result;\r\n }\r\n static _moveDownByViewLines(viewModel, cursors, inSelectionMode, linesCount) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\r\n }\r\n return result;\r\n }\r\n static _moveDownByModelLines(viewModel, cursors, inSelectionMode, linesCount) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\r\n }\r\n return result;\r\n }\r\n static _moveUpByViewLines(viewModel, cursors, inSelectionMode, linesCount) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount));\r\n }\r\n return result;\r\n }\r\n static _moveUpByModelLines(viewModel, cursors, inSelectionMode, linesCount) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__.MoveOperations.moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount));\r\n }\r\n return result;\r\n }\r\n static _moveToViewPosition(viewModel, cursor, inSelectionMode, toViewLineNumber, toViewColumn) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0));\r\n }\r\n static _moveToModelPosition(viewModel, cursor, inSelectionMode, toModelLineNumber, toModelColumn) {\r\n return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.CursorState.fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0));\r\n }\r\n static _moveToViewMinColumn(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const viewColumn = viewModel.getLineMinColumn(viewLineNumber);\r\n result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n return result;\r\n }\r\n static _moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber);\r\n result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n return result;\r\n }\r\n static _moveToViewCenterColumn(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2);\r\n result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n return result;\r\n }\r\n static _moveToViewMaxColumn(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const viewColumn = viewModel.getLineMaxColumn(viewLineNumber);\r\n result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n return result;\r\n }\r\n static _moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode) {\r\n let result = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n const cursor = cursors[i];\r\n const viewLineNumber = cursor.viewState.position.lineNumber;\r\n const viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber);\r\n result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn);\r\n }\r\n return result;\r\n }\r\n}\r\nvar CursorMove;\r\n(function (CursorMove) {\r\n const isCursorMoveArgs = function (arg) {\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject(arg)) {\r\n return false;\r\n }\r\n let cursorMoveArg = arg;\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isString(cursorMoveArg.to)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isUndefined(cursorMoveArg.select) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isBoolean(cursorMoveArg.select)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isUndefined(cursorMoveArg.by) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isString(cursorMoveArg.by)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isUndefined(cursorMoveArg.value) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isNumber(cursorMoveArg.value)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n CursorMove.description = {\r\n description: 'Move cursor to a logical position in the view',\r\n args: [\r\n {\r\n name: 'Cursor move argument object',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t\\`\\`\\`\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t`,\r\n constraint: isCursorMoveArgs,\r\n schema: {\r\n 'type': 'object',\r\n 'required': ['to'],\r\n 'properties': {\r\n 'to': {\r\n 'type': 'string',\r\n 'enum': ['left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside']\r\n },\r\n 'by': {\r\n 'type': 'string',\r\n 'enum': ['line', 'wrappedLine', 'character', 'halfLine']\r\n },\r\n 'value': {\r\n 'type': 'number',\r\n 'default': 1\r\n },\r\n 'select': {\r\n 'type': 'boolean',\r\n 'default': false\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n /**\r\n * Positions in the view for cursor move command.\r\n */\r\n CursorMove.RawDirection = {\r\n Left: 'left',\r\n Right: 'right',\r\n Up: 'up',\r\n Down: 'down',\r\n PrevBlankLine: 'prevBlankLine',\r\n NextBlankLine: 'nextBlankLine',\r\n WrappedLineStart: 'wrappedLineStart',\r\n WrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter',\r\n WrappedLineColumnCenter: 'wrappedLineColumnCenter',\r\n WrappedLineEnd: 'wrappedLineEnd',\r\n WrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter',\r\n ViewPortTop: 'viewPortTop',\r\n ViewPortCenter: 'viewPortCenter',\r\n ViewPortBottom: 'viewPortBottom',\r\n ViewPortIfOutside: 'viewPortIfOutside'\r\n };\r\n /**\r\n * Units for Cursor move 'by' argument\r\n */\r\n CursorMove.RawUnit = {\r\n Line: 'line',\r\n WrappedLine: 'wrappedLine',\r\n Character: 'character',\r\n HalfLine: 'halfLine'\r\n };\r\n function parse(args) {\r\n if (!args.to) {\r\n // illegal arguments\r\n return null;\r\n }\r\n let direction;\r\n switch (args.to) {\r\n case CursorMove.RawDirection.Left:\r\n direction = 0 /* Left */;\r\n break;\r\n case CursorMove.RawDirection.Right:\r\n direction = 1 /* Right */;\r\n break;\r\n case CursorMove.RawDirection.Up:\r\n direction = 2 /* Up */;\r\n break;\r\n case CursorMove.RawDirection.Down:\r\n direction = 3 /* Down */;\r\n break;\r\n case CursorMove.RawDirection.PrevBlankLine:\r\n direction = 4 /* PrevBlankLine */;\r\n break;\r\n case CursorMove.RawDirection.NextBlankLine:\r\n direction = 5 /* NextBlankLine */;\r\n break;\r\n case CursorMove.RawDirection.WrappedLineStart:\r\n direction = 6 /* WrappedLineStart */;\r\n break;\r\n case CursorMove.RawDirection.WrappedLineFirstNonWhitespaceCharacter:\r\n direction = 7 /* WrappedLineFirstNonWhitespaceCharacter */;\r\n break;\r\n case CursorMove.RawDirection.WrappedLineColumnCenter:\r\n direction = 8 /* WrappedLineColumnCenter */;\r\n break;\r\n case CursorMove.RawDirection.WrappedLineEnd:\r\n direction = 9 /* WrappedLineEnd */;\r\n break;\r\n case CursorMove.RawDirection.WrappedLineLastNonWhitespaceCharacter:\r\n direction = 10 /* WrappedLineLastNonWhitespaceCharacter */;\r\n break;\r\n case CursorMove.RawDirection.ViewPortTop:\r\n direction = 11 /* ViewPortTop */;\r\n break;\r\n case CursorMove.RawDirection.ViewPortBottom:\r\n direction = 13 /* ViewPortBottom */;\r\n break;\r\n case CursorMove.RawDirection.ViewPortCenter:\r\n direction = 12 /* ViewPortCenter */;\r\n break;\r\n case CursorMove.RawDirection.ViewPortIfOutside:\r\n direction = 14 /* ViewPortIfOutside */;\r\n break;\r\n default:\r\n // illegal arguments\r\n return null;\r\n }\r\n let unit = 0 /* None */;\r\n switch (args.by) {\r\n case CursorMove.RawUnit.Line:\r\n unit = 1 /* Line */;\r\n break;\r\n case CursorMove.RawUnit.WrappedLine:\r\n unit = 2 /* WrappedLine */;\r\n break;\r\n case CursorMove.RawUnit.Character:\r\n unit = 3 /* Character */;\r\n break;\r\n case CursorMove.RawUnit.HalfLine:\r\n unit = 4 /* HalfLine */;\r\n break;\r\n }\r\n return {\r\n direction: direction,\r\n unit: unit,\r\n select: (!!args.select),\r\n value: (args.value || 1)\r\n };\r\n }\r\n CursorMove.parse = parse;\r\n})(CursorMove || (CursorMove = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorPosition\": () => (/* binding */ CursorPosition),\n/* harmony export */ \"MoveOperations\": () => (/* binding */ MoveOperations)\n/* harmony export */ });\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _cursorAtomicMoveOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cursorAtomicMoveOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorAtomicMoveOperations.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass CursorPosition {\r\n constructor(lineNumber, column, leftoverVisibleColumns) {\r\n this.lineNumber = lineNumber;\r\n this.column = column;\r\n this.leftoverVisibleColumns = leftoverVisibleColumns;\r\n }\r\n}\r\nclass MoveOperations {\r\n static leftPosition(model, lineNumber, column) {\r\n if (column > model.getLineMinColumn(lineNumber)) {\r\n column = column - _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.prevCharLength(model.getLineContent(lineNumber), column - 1);\r\n }\r\n else if (lineNumber > 1) {\r\n lineNumber = lineNumber - 1;\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, column);\r\n }\r\n static leftPositionAtomicSoftTabs(model, lineNumber, column, tabSize) {\r\n const minColumn = model.getLineMinColumn(lineNumber);\r\n const lineContent = model.getLineContent(lineNumber);\r\n const newPosition = _cursorAtomicMoveOperations_js__WEBPACK_IMPORTED_MODULE_4__.AtomicTabMoveOperations.atomicPosition(lineContent, column - 1, tabSize, 0 /* Left */);\r\n if (newPosition === -1 || newPosition + 1 < minColumn) {\r\n return this.leftPosition(model, lineNumber, column);\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, newPosition + 1);\r\n }\r\n static left(config, model, lineNumber, column) {\r\n const pos = config.stickyTabStops\r\n ? MoveOperations.leftPositionAtomicSoftTabs(model, lineNumber, column, config.tabSize)\r\n : MoveOperations.leftPosition(model, lineNumber, column);\r\n return new CursorPosition(pos.lineNumber, pos.column, 0);\r\n }\r\n static moveLeft(config, model, cursor, inSelectionMode, noOfColumns) {\r\n let lineNumber, column;\r\n if (cursor.hasSelection() && !inSelectionMode) {\r\n // If we are in selection mode, move left without selection cancels selection and puts cursor at the beginning of the selection\r\n lineNumber = cursor.selection.startLineNumber;\r\n column = cursor.selection.startColumn;\r\n }\r\n else {\r\n let r = MoveOperations.left(config, model, cursor.position.lineNumber, cursor.position.column - (noOfColumns - 1));\r\n lineNumber = r.lineNumber;\r\n column = r.column;\r\n }\r\n return cursor.move(inSelectionMode, lineNumber, column, 0);\r\n }\r\n static rightPosition(model, lineNumber, column) {\r\n if (column < model.getLineMaxColumn(lineNumber)) {\r\n column = column + _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.nextCharLength(model.getLineContent(lineNumber), column - 1);\r\n }\r\n else if (lineNumber < model.getLineCount()) {\r\n lineNumber = lineNumber + 1;\r\n column = model.getLineMinColumn(lineNumber);\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, column);\r\n }\r\n static rightPositionAtomicSoftTabs(model, lineNumber, column, tabSize, indentSize) {\r\n const lineContent = model.getLineContent(lineNumber);\r\n const newPosition = _cursorAtomicMoveOperations_js__WEBPACK_IMPORTED_MODULE_4__.AtomicTabMoveOperations.atomicPosition(lineContent, column - 1, tabSize, 1 /* Right */);\r\n if (newPosition === -1) {\r\n return this.rightPosition(model, lineNumber, column);\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineNumber, newPosition + 1);\r\n }\r\n static right(config, model, lineNumber, column) {\r\n const pos = config.stickyTabStops\r\n ? MoveOperations.rightPositionAtomicSoftTabs(model, lineNumber, column, config.tabSize, config.indentSize)\r\n : MoveOperations.rightPosition(model, lineNumber, column);\r\n return new CursorPosition(pos.lineNumber, pos.column, 0);\r\n }\r\n static moveRight(config, model, cursor, inSelectionMode, noOfColumns) {\r\n let lineNumber, column;\r\n if (cursor.hasSelection() && !inSelectionMode) {\r\n // If we are in selection mode, move right without selection cancels selection and puts cursor at the end of the selection\r\n lineNumber = cursor.selection.endLineNumber;\r\n column = cursor.selection.endColumn;\r\n }\r\n else {\r\n let r = MoveOperations.right(config, model, cursor.position.lineNumber, cursor.position.column + (noOfColumns - 1));\r\n lineNumber = r.lineNumber;\r\n column = r.column;\r\n }\r\n return cursor.move(inSelectionMode, lineNumber, column, 0);\r\n }\r\n static down(config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnLastLine) {\r\n const currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns;\r\n const lineCount = model.getLineCount();\r\n const wasOnLastPosition = (lineNumber === lineCount && column === model.getLineMaxColumn(lineNumber));\r\n lineNumber = lineNumber + count;\r\n if (lineNumber > lineCount) {\r\n lineNumber = lineCount;\r\n if (allowMoveOnLastLine) {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n else {\r\n column = Math.min(model.getLineMaxColumn(lineNumber), column);\r\n }\r\n }\r\n else {\r\n column = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn);\r\n }\r\n if (wasOnLastPosition) {\r\n leftoverVisibleColumns = 0;\r\n }\r\n else {\r\n leftoverVisibleColumns = currentVisibleColumn - _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize);\r\n }\r\n return new CursorPosition(lineNumber, column, leftoverVisibleColumns);\r\n }\r\n static moveDown(config, model, cursor, inSelectionMode, linesCount) {\r\n let lineNumber, column;\r\n if (cursor.hasSelection() && !inSelectionMode) {\r\n // If we are in selection mode, move down acts relative to the end of selection\r\n lineNumber = cursor.selection.endLineNumber;\r\n column = cursor.selection.endColumn;\r\n }\r\n else {\r\n lineNumber = cursor.position.lineNumber;\r\n column = cursor.position.column;\r\n }\r\n let r = MoveOperations.down(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true);\r\n return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns);\r\n }\r\n static translateDown(config, model, cursor) {\r\n let selection = cursor.selection;\r\n let selectionStart = MoveOperations.down(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false);\r\n let position = MoveOperations.down(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false);\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(position.lineNumber, position.column), position.leftoverVisibleColumns);\r\n }\r\n static up(config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnFirstLine) {\r\n const currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns;\r\n const wasOnFirstPosition = (lineNumber === 1 && column === 1);\r\n lineNumber = lineNumber - count;\r\n if (lineNumber < 1) {\r\n lineNumber = 1;\r\n if (allowMoveOnFirstLine) {\r\n column = model.getLineMinColumn(lineNumber);\r\n }\r\n else {\r\n column = Math.min(model.getLineMaxColumn(lineNumber), column);\r\n }\r\n }\r\n else {\r\n column = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn);\r\n }\r\n if (wasOnFirstPosition) {\r\n leftoverVisibleColumns = 0;\r\n }\r\n else {\r\n leftoverVisibleColumns = currentVisibleColumn - _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize);\r\n }\r\n return new CursorPosition(lineNumber, column, leftoverVisibleColumns);\r\n }\r\n static moveUp(config, model, cursor, inSelectionMode, linesCount) {\r\n let lineNumber, column;\r\n if (cursor.hasSelection() && !inSelectionMode) {\r\n // If we are in selection mode, move up acts relative to the beginning of selection\r\n lineNumber = cursor.selection.startLineNumber;\r\n column = cursor.selection.startColumn;\r\n }\r\n else {\r\n lineNumber = cursor.position.lineNumber;\r\n column = cursor.position.column;\r\n }\r\n let r = MoveOperations.up(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true);\r\n return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns);\r\n }\r\n static translateUp(config, model, cursor) {\r\n let selection = cursor.selection;\r\n let selectionStart = MoveOperations.up(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false);\r\n let position = MoveOperations.up(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false);\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(position.lineNumber, position.column), position.leftoverVisibleColumns);\r\n }\r\n static _isBlankLine(model, lineNumber) {\r\n if (model.getLineFirstNonWhitespaceColumn(lineNumber) === 0) {\r\n // empty or contains only whitespace\r\n return true;\r\n }\r\n return false;\r\n }\r\n static moveToPrevBlankLine(config, model, cursor, inSelectionMode) {\r\n let lineNumber = cursor.position.lineNumber;\r\n // If our current line is blank, move to the previous non-blank line\r\n while (lineNumber > 1 && this._isBlankLine(model, lineNumber)) {\r\n lineNumber--;\r\n }\r\n // Find the previous blank line\r\n while (lineNumber > 1 && !this._isBlankLine(model, lineNumber)) {\r\n lineNumber--;\r\n }\r\n return cursor.move(inSelectionMode, lineNumber, model.getLineMinColumn(lineNumber), 0);\r\n }\r\n static moveToNextBlankLine(config, model, cursor, inSelectionMode) {\r\n const lineCount = model.getLineCount();\r\n let lineNumber = cursor.position.lineNumber;\r\n // If our current line is blank, move to the next non-blank line\r\n while (lineNumber < lineCount && this._isBlankLine(model, lineNumber)) {\r\n lineNumber++;\r\n }\r\n // Find the next blank line\r\n while (lineNumber < lineCount && !this._isBlankLine(model, lineNumber)) {\r\n lineNumber++;\r\n }\r\n return cursor.move(inSelectionMode, lineNumber, model.getLineMinColumn(lineNumber), 0);\r\n }\r\n static moveToBeginningOfLine(config, model, cursor, inSelectionMode) {\r\n let lineNumber = cursor.position.lineNumber;\r\n let minColumn = model.getLineMinColumn(lineNumber);\r\n let firstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(lineNumber) || minColumn;\r\n let column;\r\n let relevantColumnNumber = cursor.position.column;\r\n if (relevantColumnNumber === firstNonBlankColumn) {\r\n column = minColumn;\r\n }\r\n else {\r\n column = firstNonBlankColumn;\r\n }\r\n return cursor.move(inSelectionMode, lineNumber, column, 0);\r\n }\r\n static moveToEndOfLine(config, model, cursor, inSelectionMode, sticky) {\r\n let lineNumber = cursor.position.lineNumber;\r\n let maxColumn = model.getLineMaxColumn(lineNumber);\r\n return cursor.move(inSelectionMode, lineNumber, maxColumn, sticky ? 1073741824 /* MAX_SAFE_SMALL_INTEGER */ - maxColumn : 0);\r\n }\r\n static moveToBeginningOfBuffer(config, model, cursor, inSelectionMode) {\r\n return cursor.move(inSelectionMode, 1, 1, 0);\r\n }\r\n static moveToEndOfBuffer(config, model, cursor, inSelectionMode) {\r\n let lastLineNumber = model.getLineCount();\r\n let lastColumn = model.getLineMaxColumn(lastLineNumber);\r\n return cursor.move(inSelectionMode, lastLineNumber, lastColumn, 0);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TypeOperations\": () => (/* binding */ TypeOperations),\n/* harmony export */ \"TypeWithAutoClosingCommand\": () => (/* binding */ TypeWithAutoClosingCommand)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../commands/shiftCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js\");\n/* harmony import */ var _commands_surroundSelectionCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../commands/surroundSelectionCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js\");\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./wordCharacterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modes/languageConfiguration.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js\");\n/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TypeOperations {\r\n static indent(config, model, selections) {\r\n if (model === null || selections === null) {\r\n return [];\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__.ShiftCommand(selections[i], {\r\n isUnshift: false,\r\n tabSize: config.tabSize,\r\n indentSize: config.indentSize,\r\n insertSpaces: config.insertSpaces,\r\n useTabStops: config.useTabStops,\r\n autoIndent: config.autoIndent\r\n });\r\n }\r\n return commands;\r\n }\r\n static outdent(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__.ShiftCommand(selections[i], {\r\n isUnshift: true,\r\n tabSize: config.tabSize,\r\n indentSize: config.indentSize,\r\n insertSpaces: config.insertSpaces,\r\n useTabStops: config.useTabStops,\r\n autoIndent: config.autoIndent\r\n });\r\n }\r\n return commands;\r\n }\r\n static shiftIndent(config, indentation, count) {\r\n count = count || 1;\r\n return _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__.ShiftCommand.shiftIndent(indentation, indentation.length + count, config.tabSize, config.indentSize, config.insertSpaces);\r\n }\r\n static unshiftIndent(config, indentation, count) {\r\n count = count || 1;\r\n return _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__.ShiftCommand.unshiftIndent(indentation, indentation.length + count, config.tabSize, config.indentSize, config.insertSpaces);\r\n }\r\n static _distributedPaste(config, model, selections, text) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selections[i], text[i]);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n static _simplePaste(config, model, selections, text, pasteOnNewLine) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n let position = selection.getPosition();\r\n if (pasteOnNewLine && !selection.isEmpty()) {\r\n pasteOnNewLine = false;\r\n }\r\n if (pasteOnNewLine && text.indexOf('\\n') !== text.length - 1) {\r\n pasteOnNewLine = false;\r\n }\r\n if (pasteOnNewLine) {\r\n // Paste entire line at the beginning of line\r\n let typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(position.lineNumber, 1, position.lineNumber, 1);\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandThatPreservesSelection(typeSelection, text, selection, true);\r\n }\r\n else {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selection, text);\r\n }\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n static _distributePasteToCursors(config, selections, text, pasteOnNewLine, multicursorText) {\r\n if (pasteOnNewLine) {\r\n return null;\r\n }\r\n if (selections.length === 1) {\r\n return null;\r\n }\r\n if (multicursorText && multicursorText.length === selections.length) {\r\n return multicursorText;\r\n }\r\n if (config.multiCursorPaste === 'spread') {\r\n // Try to spread the pasted text in case the line count matches the cursor count\r\n // Remove trailing \\n if present\r\n if (text.charCodeAt(text.length - 1) === 10 /* LineFeed */) {\r\n text = text.substr(0, text.length - 1);\r\n }\r\n // Remove trailing \\r if present\r\n if (text.charCodeAt(text.length - 1) === 13 /* CarriageReturn */) {\r\n text = text.substr(0, text.length - 1);\r\n }\r\n let lines = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.splitLines(text);\r\n if (lines.length === selections.length) {\r\n return lines;\r\n }\r\n }\r\n return null;\r\n }\r\n static paste(config, model, selections, text, pasteOnNewLine, multicursorText) {\r\n const distributedPaste = this._distributePasteToCursors(config, selections, text, pasteOnNewLine, multicursorText);\r\n if (distributedPaste) {\r\n selections = selections.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.compareRangesUsingStarts);\r\n return this._distributedPaste(config, model, selections, distributedPaste);\r\n }\r\n else {\r\n return this._simplePaste(config, model, selections, text, pasteOnNewLine);\r\n }\r\n }\r\n static _goodIndentForLine(config, model, lineNumber) {\r\n let action = null;\r\n let indentation = '';\r\n const expectedIndentAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getInheritIndentForLine(config.autoIndent, model, lineNumber, false);\r\n if (expectedIndentAction) {\r\n action = expectedIndentAction.action;\r\n indentation = expectedIndentAction.indentation;\r\n }\r\n else if (lineNumber > 1) {\r\n let lastLineNumber;\r\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\r\n const lineText = model.getLineContent(lastLineNumber);\r\n const nonWhitespaceIdx = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.lastNonWhitespaceIndex(lineText);\r\n if (nonWhitespaceIdx >= 0) {\r\n break;\r\n }\r\n }\r\n if (lastLineNumber < 1) {\r\n // No previous line with content found\r\n return null;\r\n }\r\n const maxColumn = model.getLineMaxColumn(lastLineNumber);\r\n const expectedEnterAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getEnterAction(config.autoIndent, model, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(lastLineNumber, maxColumn, lastLineNumber, maxColumn));\r\n if (expectedEnterAction) {\r\n indentation = expectedEnterAction.indentation + expectedEnterAction.appendText;\r\n }\r\n }\r\n if (action) {\r\n if (action === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.Indent) {\r\n indentation = TypeOperations.shiftIndent(config, indentation);\r\n }\r\n if (action === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.Outdent) {\r\n indentation = TypeOperations.unshiftIndent(config, indentation);\r\n }\r\n indentation = config.normalizeIndentation(indentation);\r\n }\r\n if (!indentation) {\r\n return null;\r\n }\r\n return indentation;\r\n }\r\n static _replaceJumpToNextIndent(config, model, selection, insertsAutoWhitespace) {\r\n let typeText = '';\r\n let position = selection.getStartPosition();\r\n if (config.insertSpaces) {\r\n let visibleColumnFromColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.CursorColumns.visibleColumnFromColumn2(config, model, position);\r\n let indentSize = config.indentSize;\r\n let spacesCnt = indentSize - (visibleColumnFromColumn % indentSize);\r\n for (let i = 0; i < spacesCnt; i++) {\r\n typeText += ' ';\r\n }\r\n }\r\n else {\r\n typeText = '\\t';\r\n }\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selection, typeText, insertsAutoWhitespace);\r\n }\r\n static tab(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (selection.isEmpty()) {\r\n let lineText = model.getLineContent(selection.startLineNumber);\r\n if (/^\\s*$/.test(lineText) && model.isCheapToTokenize(selection.startLineNumber)) {\r\n let goodIndent = this._goodIndentForLine(config, model, selection.startLineNumber);\r\n goodIndent = goodIndent || '\\t';\r\n let possibleTypeText = config.normalizeIndentation(goodIndent);\r\n if (!lineText.startsWith(possibleTypeText)) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText, true);\r\n continue;\r\n }\r\n }\r\n commands[i] = this._replaceJumpToNextIndent(config, model, selection, true);\r\n }\r\n else {\r\n if (selection.startLineNumber === selection.endLineNumber) {\r\n let lineMaxColumn = model.getLineMaxColumn(selection.startLineNumber);\r\n if (selection.startColumn !== 1 || selection.endColumn !== lineMaxColumn) {\r\n // This is a single line selection that is not the entire line\r\n commands[i] = this._replaceJumpToNextIndent(config, model, selection, false);\r\n continue;\r\n }\r\n }\r\n commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__.ShiftCommand(selection, {\r\n isUnshift: false,\r\n tabSize: config.tabSize,\r\n indentSize: config.indentSize,\r\n insertSpaces: config.insertSpaces,\r\n useTabStops: config.useTabStops,\r\n autoIndent: config.autoIndent\r\n });\r\n }\r\n }\r\n return commands;\r\n }\r\n static compositionType(prevEditOperationType, config, model, selections, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) {\r\n const commands = selections.map(selection => this._compositionType(model, selection, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta));\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n static _compositionType(model, selection, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta) {\r\n if (!selection.isEmpty()) {\r\n // looks like https://github.com/microsoft/vscode/issues/2773\r\n // where a cursor operation occurred before a canceled composition\r\n // => ignore composition\r\n return null;\r\n }\r\n const pos = selection.getPosition();\r\n const startColumn = Math.max(1, pos.column - replacePrevCharCnt);\r\n const endColumn = Math.min(model.getLineMaxColumn(pos.lineNumber), pos.column + replaceNextCharCnt);\r\n const range = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(pos.lineNumber, startColumn, pos.lineNumber, endColumn);\r\n const oldText = model.getValueInRange(range);\r\n if (oldText === text && positionDelta === 0) {\r\n // => ignore composition that doesn't do anything\r\n return null;\r\n }\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithOffsetCursorState(range, text, 0, positionDelta);\r\n }\r\n static _typeCommand(range, text, keepPosition) {\r\n if (keepPosition) {\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithoutChangingPosition(range, text, true);\r\n }\r\n else {\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(range, text, true);\r\n }\r\n }\r\n static _enter(config, model, keepPosition, range) {\r\n if (config.autoIndent === 0 /* None */) {\r\n return TypeOperations._typeCommand(range, '\\n', keepPosition);\r\n }\r\n if (!model.isCheapToTokenize(range.getStartPosition().lineNumber) || config.autoIndent === 1 /* Keep */) {\r\n let lineText = model.getLineContent(range.startLineNumber);\r\n let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getLeadingWhitespace(lineText).substring(0, range.startColumn - 1);\r\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation), keepPosition);\r\n }\r\n const r = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getEnterAction(config.autoIndent, model, range);\r\n if (r) {\r\n if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.None) {\r\n // Nothing special\r\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(r.indentation + r.appendText), keepPosition);\r\n }\r\n else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.Indent) {\r\n // Indent once\r\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(r.indentation + r.appendText), keepPosition);\r\n }\r\n else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.IndentOutdent) {\r\n // Ultra special\r\n const normalIndent = config.normalizeIndentation(r.indentation);\r\n const increasedIndent = config.normalizeIndentation(r.indentation + r.appendText);\r\n const typeText = '\\n' + increasedIndent + '\\n' + normalIndent;\r\n if (keepPosition) {\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithoutChangingPosition(range, typeText, true);\r\n }\r\n else {\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true);\r\n }\r\n }\r\n else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__.IndentAction.Outdent) {\r\n const actualIndentation = TypeOperations.unshiftIndent(config, r.indentation);\r\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(actualIndentation + r.appendText), keepPosition);\r\n }\r\n }\r\n const lineText = model.getLineContent(range.startLineNumber);\r\n const indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getLeadingWhitespace(lineText).substring(0, range.startColumn - 1);\r\n if (config.autoIndent >= 4 /* Full */) {\r\n const ir = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getIndentForEnter(config.autoIndent, model, range, {\r\n unshiftIndent: (indent) => {\r\n return TypeOperations.unshiftIndent(config, indent);\r\n },\r\n shiftIndent: (indent) => {\r\n return TypeOperations.shiftIndent(config, indent);\r\n },\r\n normalizeIndentation: (indent) => {\r\n return config.normalizeIndentation(indent);\r\n }\r\n });\r\n if (ir) {\r\n let oldEndViewColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.CursorColumns.visibleColumnFromColumn2(config, model, range.getEndPosition());\r\n const oldEndColumn = range.endColumn;\r\n const newLineContent = model.getLineContent(range.endLineNumber);\r\n const firstNonWhitespace = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(newLineContent);\r\n if (firstNonWhitespace >= 0) {\r\n range = range.setEndPosition(range.endLineNumber, Math.max(range.endColumn, firstNonWhitespace + 1));\r\n }\r\n else {\r\n range = range.setEndPosition(range.endLineNumber, model.getLineMaxColumn(range.endLineNumber));\r\n }\r\n if (keepPosition) {\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithoutChangingPosition(range, '\\n' + config.normalizeIndentation(ir.afterEnter), true);\r\n }\r\n else {\r\n let offset = 0;\r\n if (oldEndColumn <= firstNonWhitespace + 1) {\r\n if (!config.insertSpaces) {\r\n oldEndViewColumn = Math.ceil(oldEndViewColumn / config.indentSize);\r\n }\r\n offset = Math.min(oldEndViewColumn + 1 - config.normalizeIndentation(ir.afterEnter).length - 1, 0);\r\n }\r\n return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithOffsetCursorState(range, '\\n' + config.normalizeIndentation(ir.afterEnter), 0, offset, true);\r\n }\r\n }\r\n }\r\n return TypeOperations._typeCommand(range, '\\n' + config.normalizeIndentation(indentation), keepPosition);\r\n }\r\n static _isAutoIndentType(config, model, selections) {\r\n if (config.autoIndent < 4 /* Full */) {\r\n return false;\r\n }\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n if (!model.isCheapToTokenize(selections[i].getEndPosition().lineNumber)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _runAutoIndentType(config, model, range, ch) {\r\n const currentIndentation = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getIndentationAtPosition(model, range.startLineNumber, range.startColumn);\r\n const actualIndentation = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getIndentActionForType(config.autoIndent, model, range, ch, {\r\n shiftIndent: (indentation) => {\r\n return TypeOperations.shiftIndent(config, indentation);\r\n },\r\n unshiftIndent: (indentation) => {\r\n return TypeOperations.unshiftIndent(config, indentation);\r\n },\r\n });\r\n if (actualIndentation === null) {\r\n return null;\r\n }\r\n if (actualIndentation !== config.normalizeIndentation(currentIndentation)) {\r\n const firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(range.startLineNumber);\r\n if (firstNonWhitespace === 0) {\r\n return TypeOperations._typeCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) + ch, false);\r\n }\r\n else {\r\n return TypeOperations._typeCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) +\r\n model.getLineContent(range.startLineNumber).substring(firstNonWhitespace - 1, range.startColumn - 1) + ch, false);\r\n }\r\n }\r\n return null;\r\n }\r\n static _isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch) {\r\n if (config.autoClosingOvertype === 'never') {\r\n return false;\r\n }\r\n if (!config.autoClosingPairs.autoClosingPairsCloseSingleChar.has(ch)) {\r\n return false;\r\n }\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (!selection.isEmpty()) {\r\n return false;\r\n }\r\n const position = selection.getPosition();\r\n const lineText = model.getLineContent(position.lineNumber);\r\n const afterCharacter = lineText.charAt(position.column - 1);\r\n if (afterCharacter !== ch) {\r\n return false;\r\n }\r\n // Do not over-type quotes after a backslash\r\n const chIsQuote = (0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isQuote)(ch);\r\n const beforeCharacter = position.column > 2 ? lineText.charCodeAt(position.column - 2) : 0 /* Null */;\r\n if (beforeCharacter === 92 /* Backslash */ && chIsQuote) {\r\n return false;\r\n }\r\n // Must over-type a closing character typed by the editor\r\n if (config.autoClosingOvertype === 'auto') {\r\n let found = false;\r\n for (let j = 0, lenJ = autoClosedCharacters.length; j < lenJ; j++) {\r\n const autoClosedCharacter = autoClosedCharacters[j];\r\n if (position.lineNumber === autoClosedCharacter.startLineNumber && position.column === autoClosedCharacter.startColumn) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n static _runAutoClosingOvertype(prevEditOperationType, config, model, selections, ch) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n const position = selection.getPosition();\r\n const typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(position.lineNumber, position.column, position.lineNumber, position.column + 1);\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(typeSelection, ch);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n static _isBeforeClosingBrace(config, lineAfter) {\r\n // If the start of lineAfter can be interpretted as both a starting or ending brace, default to returning false\r\n const nextChar = lineAfter.charAt(0);\r\n const potentialStartingBraces = config.autoClosingPairs.autoClosingPairsOpenByStart.get(nextChar) || [];\r\n const potentialClosingBraces = config.autoClosingPairs.autoClosingPairsCloseByStart.get(nextChar) || [];\r\n const isBeforeStartingBrace = potentialStartingBraces.some(x => lineAfter.startsWith(x.open));\r\n const isBeforeClosingBrace = potentialClosingBraces.some(x => lineAfter.startsWith(x.close));\r\n return !isBeforeStartingBrace && isBeforeClosingBrace;\r\n }\r\n static _findAutoClosingPairOpen(config, model, positions, ch) {\r\n const autoClosingPairCandidates = config.autoClosingPairs.autoClosingPairsOpenByEnd.get(ch);\r\n if (!autoClosingPairCandidates) {\r\n return null;\r\n }\r\n // Determine which auto-closing pair it is\r\n let autoClosingPair = null;\r\n for (const autoClosingPairCandidate of autoClosingPairCandidates) {\r\n if (autoClosingPair === null || autoClosingPairCandidate.open.length > autoClosingPair.open.length) {\r\n let candidateIsMatch = true;\r\n for (const position of positions) {\r\n const relevantText = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(position.lineNumber, position.column - autoClosingPairCandidate.open.length + 1, position.lineNumber, position.column));\r\n if (relevantText + ch !== autoClosingPairCandidate.open) {\r\n candidateIsMatch = false;\r\n break;\r\n }\r\n }\r\n if (candidateIsMatch) {\r\n autoClosingPair = autoClosingPairCandidate;\r\n }\r\n }\r\n }\r\n return autoClosingPair;\r\n }\r\n static _findSubAutoClosingPairClose(config, autoClosingPair) {\r\n if (autoClosingPair.open.length <= 1) {\r\n return '';\r\n }\r\n const lastChar = autoClosingPair.close.charAt(autoClosingPair.close.length - 1);\r\n // get candidates with the same last character as close\r\n const subPairCandidates = config.autoClosingPairs.autoClosingPairsCloseByEnd.get(lastChar) || [];\r\n let subPairMatch = null;\r\n for (const x of subPairCandidates) {\r\n if (x.open !== autoClosingPair.open && autoClosingPair.open.includes(x.open) && autoClosingPair.close.endsWith(x.close)) {\r\n if (!subPairMatch || x.open.length > subPairMatch.open.length) {\r\n subPairMatch = x;\r\n }\r\n }\r\n }\r\n if (subPairMatch) {\r\n return subPairMatch.close;\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n static _getAutoClosingPairClose(config, model, selections, ch, insertOpenCharacter) {\r\n const chIsQuote = (0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isQuote)(ch);\r\n const autoCloseConfig = chIsQuote ? config.autoClosingQuotes : config.autoClosingBrackets;\r\n if (autoCloseConfig === 'never') {\r\n return null;\r\n }\r\n const autoClosingPair = this._findAutoClosingPairOpen(config, model, selections.map(s => s.getPosition()), ch);\r\n if (!autoClosingPair) {\r\n return null;\r\n }\r\n const subAutoClosingPairClose = this._findSubAutoClosingPairClose(config, autoClosingPair);\r\n let isSubAutoClosingPairPresent = true;\r\n const shouldAutoCloseBefore = chIsQuote ? config.shouldAutoCloseBefore.quote : config.shouldAutoCloseBefore.bracket;\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (!selection.isEmpty()) {\r\n return null;\r\n }\r\n const position = selection.getPosition();\r\n const lineText = model.getLineContent(position.lineNumber);\r\n const lineAfter = lineText.substring(position.column - 1);\r\n if (!lineAfter.startsWith(subAutoClosingPairClose)) {\r\n isSubAutoClosingPairPresent = false;\r\n }\r\n // Only consider auto closing the pair if an allowed character follows or if another autoclosed pair closing brace follows\r\n if (lineText.length > position.column - 1) {\r\n const characterAfter = lineText.charAt(position.column - 1);\r\n const isBeforeCloseBrace = TypeOperations._isBeforeClosingBrace(config, lineAfter);\r\n if (!isBeforeCloseBrace && !shouldAutoCloseBefore(characterAfter)) {\r\n return null;\r\n }\r\n }\r\n if (!model.isCheapToTokenize(position.lineNumber)) {\r\n // Do not force tokenization\r\n return null;\r\n }\r\n // Do not auto-close ' or \" after a word character\r\n if (autoClosingPair.open.length === 1 && chIsQuote && autoCloseConfig !== 'always') {\r\n const wordSeparators = (0,_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_6__.getMapForWordSeparators)(config.wordSeparators);\r\n if (insertOpenCharacter && position.column > 1 && wordSeparators.get(lineText.charCodeAt(position.column - 2)) === 0 /* Regular */) {\r\n return null;\r\n }\r\n if (!insertOpenCharacter && position.column > 2 && wordSeparators.get(lineText.charCodeAt(position.column - 3)) === 0 /* Regular */) {\r\n return null;\r\n }\r\n }\r\n model.forceTokenization(position.lineNumber);\r\n const lineTokens = model.getLineTokens(position.lineNumber);\r\n let shouldAutoClosePair = false;\r\n try {\r\n shouldAutoClosePair = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.shouldAutoClosePair(autoClosingPair, lineTokens, insertOpenCharacter ? position.column : position.column - 1);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n }\r\n if (!shouldAutoClosePair) {\r\n return null;\r\n }\r\n }\r\n if (isSubAutoClosingPairPresent) {\r\n return autoClosingPair.close.substring(0, autoClosingPair.close.length - subAutoClosingPairClose.length);\r\n }\r\n else {\r\n return autoClosingPair.close;\r\n }\r\n }\r\n static _runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, insertOpenCharacter, autoClosingPairClose) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n commands[i] = new TypeWithAutoClosingCommand(selection, ch, insertOpenCharacter, autoClosingPairClose);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n static _shouldSurroundChar(config, ch) {\r\n if ((0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isQuote)(ch)) {\r\n return (config.autoSurround === 'quotes' || config.autoSurround === 'languageDefined');\r\n }\r\n else {\r\n // Character is a bracket\r\n return (config.autoSurround === 'brackets' || config.autoSurround === 'languageDefined');\r\n }\r\n }\r\n static _isSurroundSelectionType(config, model, selections, ch) {\r\n if (!TypeOperations._shouldSurroundChar(config, ch) || !config.surroundingPairs.hasOwnProperty(ch)) {\r\n return false;\r\n }\r\n const isTypingAQuoteCharacter = (0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isQuote)(ch);\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (selection.isEmpty()) {\r\n return false;\r\n }\r\n let selectionContainsOnlyWhitespace = true;\r\n for (let lineNumber = selection.startLineNumber; lineNumber <= selection.endLineNumber; lineNumber++) {\r\n const lineText = model.getLineContent(lineNumber);\r\n const startIndex = (lineNumber === selection.startLineNumber ? selection.startColumn - 1 : 0);\r\n const endIndex = (lineNumber === selection.endLineNumber ? selection.endColumn - 1 : lineText.length);\r\n const selectedText = lineText.substring(startIndex, endIndex);\r\n if (/[^ \\t]/.test(selectedText)) {\r\n // this selected text contains something other than whitespace\r\n selectionContainsOnlyWhitespace = false;\r\n break;\r\n }\r\n }\r\n if (selectionContainsOnlyWhitespace) {\r\n return false;\r\n }\r\n if (isTypingAQuoteCharacter && selection.startLineNumber === selection.endLineNumber && selection.startColumn + 1 === selection.endColumn) {\r\n const selectionText = model.getValueInRange(selection);\r\n if ((0,_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.isQuote)(selectionText)) {\r\n // Typing a quote character on top of another quote character\r\n // => disable surround selection type\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n static _runSurroundSelectionType(prevEditOperationType, config, model, selections, ch) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n const closeCharacter = config.surroundingPairs[ch];\r\n commands[i] = new _commands_surroundSelectionCommand_js__WEBPACK_IMPORTED_MODULE_4__.SurroundSelectionCommand(selection, ch, closeCharacter);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n static _isTypeInterceptorElectricChar(config, model, selections) {\r\n if (selections.length === 1 && model.isCheapToTokenize(selections[0].getEndPosition().lineNumber)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n static _typeInterceptorElectricChar(prevEditOperationType, config, model, selection, ch) {\r\n if (!config.electricChars.hasOwnProperty(ch) || !selection.isEmpty()) {\r\n return null;\r\n }\r\n let position = selection.getPosition();\r\n model.forceTokenization(position.lineNumber);\r\n let lineTokens = model.getLineTokens(position.lineNumber);\r\n let electricAction;\r\n try {\r\n electricAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.onElectricCharacter(ch, lineTokens, position.column);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return null;\r\n }\r\n if (!electricAction) {\r\n return null;\r\n }\r\n if (electricAction.matchOpenBracket) {\r\n let endColumn = (lineTokens.getLineContent() + ch).lastIndexOf(electricAction.matchOpenBracket) + 1;\r\n let match = model.findMatchingBracketUp(electricAction.matchOpenBracket, {\r\n lineNumber: position.lineNumber,\r\n column: endColumn\r\n });\r\n if (match) {\r\n if (match.startLineNumber === position.lineNumber) {\r\n // matched something on the same line => no change in indentation\r\n return null;\r\n }\r\n let matchLine = model.getLineContent(match.startLineNumber);\r\n let matchLineIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.getLeadingWhitespace(matchLine);\r\n let newIndentation = config.normalizeIndentation(matchLineIndentation);\r\n let lineText = model.getLineContent(position.lineNumber);\r\n let lineFirstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(position.lineNumber) || position.column;\r\n let prefix = lineText.substring(lineFirstNonBlankColumn - 1, position.column - 1);\r\n let typeText = newIndentation + prefix + ch;\r\n let typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(position.lineNumber, 1, position.lineNumber, position.column);\r\n const command = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(typeSelection, typeText);\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, [command], {\r\n shouldPushStackElementBefore: false,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * This is very similar with typing, but the character is already in the text buffer!\r\n */\r\n static compositionEndWithInterceptors(prevEditOperationType, config, model, selectionsWhenCompositionStarted, selections, autoClosedCharacters) {\r\n if (!selectionsWhenCompositionStarted || _core_selection_js__WEBPACK_IMPORTED_MODULE_8__.Selection.selectionsArrEqual(selectionsWhenCompositionStarted, selections)) {\r\n // no content was typed\r\n return null;\r\n }\r\n let ch = null;\r\n // extract last typed character\r\n for (const selection of selections) {\r\n if (!selection.isEmpty()) {\r\n return null;\r\n }\r\n const position = selection.getPosition();\r\n const currentChar = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(position.lineNumber, position.column - 1, position.lineNumber, position.column));\r\n if (ch === null) {\r\n ch = currentChar;\r\n }\r\n else if (ch !== currentChar) {\r\n return null;\r\n }\r\n }\r\n if (!ch) {\r\n return null;\r\n }\r\n if (this._isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch)) {\r\n // Unfortunately, the close character is at this point \"doubled\", so we need to delete it...\r\n const commands = selections.map(s => new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(s.positionLineNumber, s.positionColumn, s.positionLineNumber, s.positionColumn + 1), '', false));\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n const autoClosingPairClose = this._getAutoClosingPairClose(config, model, selections, ch, false);\r\n if (autoClosingPairClose !== null) {\r\n return this._runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, false, autoClosingPairClose);\r\n }\r\n return null;\r\n }\r\n static typeWithInterceptors(isDoingComposition, prevEditOperationType, config, model, selections, autoClosedCharacters, ch) {\r\n if (!isDoingComposition && ch === '\\n') {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = TypeOperations._enter(config, model, false, selections[i]);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: false,\r\n });\r\n }\r\n if (!isDoingComposition && this._isAutoIndentType(config, model, selections)) {\r\n let commands = [];\r\n let autoIndentFails = false;\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = this._runAutoIndentType(config, model, selections[i], ch);\r\n if (!commands[i]) {\r\n autoIndentFails = true;\r\n break;\r\n }\r\n }\r\n if (!autoIndentFails) {\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: false,\r\n });\r\n }\r\n }\r\n if (!isDoingComposition && this._isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch)) {\r\n return this._runAutoClosingOvertype(prevEditOperationType, config, model, selections, ch);\r\n }\r\n if (!isDoingComposition) {\r\n const autoClosingPairClose = this._getAutoClosingPairClose(config, model, selections, ch, true);\r\n if (autoClosingPairClose) {\r\n return this._runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, true, autoClosingPairClose);\r\n }\r\n }\r\n if (this._isSurroundSelectionType(config, model, selections, ch)) {\r\n return this._runSurroundSelectionType(prevEditOperationType, config, model, selections, ch);\r\n }\r\n // Electric characters make sense only when dealing with a single cursor,\r\n // as multiple cursors typing brackets for example would interfer with bracket matching\r\n if (!isDoingComposition && this._isTypeInterceptorElectricChar(config, model, selections)) {\r\n const r = this._typeInterceptorElectricChar(prevEditOperationType, config, model, selections[0], ch);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n // A simple character type\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selections[i], ch);\r\n }\r\n let shouldPushStackElementBefore = (prevEditOperationType !== 1 /* Typing */);\r\n if (ch === ' ') {\r\n shouldPushStackElementBefore = true;\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: shouldPushStackElementBefore,\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n static typeWithoutInterceptors(prevEditOperationType, config, model, selections, str) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selections[i], str);\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__.EditOperationResult(1 /* Typing */, commands, {\r\n shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */),\r\n shouldPushStackElementAfter: false\r\n });\r\n }\r\n static lineInsertBefore(config, model, selections) {\r\n if (model === null || selections === null) {\r\n return [];\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let lineNumber = selections[i].positionLineNumber;\r\n if (lineNumber === 1) {\r\n commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithoutChangingPosition(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, 1, 1), '\\n');\r\n }\r\n else {\r\n lineNumber--;\r\n let column = model.getLineMaxColumn(lineNumber);\r\n commands[i] = this._enter(config, model, false, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(lineNumber, column, lineNumber, column));\r\n }\r\n }\r\n return commands;\r\n }\r\n static lineInsertAfter(config, model, selections) {\r\n if (model === null || selections === null) {\r\n return [];\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const lineNumber = selections[i].positionLineNumber;\r\n let column = model.getLineMaxColumn(lineNumber);\r\n commands[i] = this._enter(config, model, false, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(lineNumber, column, lineNumber, column));\r\n }\r\n return commands;\r\n }\r\n static lineBreakInsert(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = this._enter(config, model, true, selections[i]);\r\n }\r\n return commands;\r\n }\r\n}\r\nclass TypeWithAutoClosingCommand extends _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandWithOffsetCursorState {\r\n constructor(selection, openCharacter, insertOpenCharacter, closeCharacter) {\r\n super(selection, (insertOpenCharacter ? openCharacter : '') + closeCharacter, 0, -closeCharacter.length);\r\n this._openCharacter = openCharacter;\r\n this._closeCharacter = closeCharacter;\r\n this.closeCharacterRange = null;\r\n this.enclosingRange = null;\r\n }\r\n computeCursorState(model, helper) {\r\n let inverseEditOperations = helper.getInverseEditOperations();\r\n let range = inverseEditOperations[0].range;\r\n this.closeCharacterRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(range.startLineNumber, range.endColumn - this._closeCharacter.length, range.endLineNumber, range.endColumn);\r\n this.enclosingRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(range.startLineNumber, range.endColumn - this._openCharacter.length - this._closeCharacter.length, range.endLineNumber, range.endColumn);\r\n return super.computeCursorState(model, helper);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WordOperations\": () => (/* binding */ WordOperations),\n/* harmony export */ \"WordPartOperations\": () => (/* binding */ WordPartOperations)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorDeleteOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js\");\n/* harmony import */ var _wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./wordCharacterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass WordOperations {\r\n static _createWord(lineContent, wordType, nextCharClass, start, end) {\r\n // console.log('WORD ==> ' + start + ' => ' + end + ':::: <<<' + lineContent.substring(start, end) + '>>>');\r\n return { start: start, end: end, wordType: wordType, nextCharClass: nextCharClass };\r\n }\r\n static _findPreviousWordOnLine(wordSeparators, model, position) {\r\n let lineContent = model.getLineContent(position.lineNumber);\r\n return this._doFindPreviousWordOnLine(lineContent, wordSeparators, position);\r\n }\r\n static _doFindPreviousWordOnLine(lineContent, wordSeparators, position) {\r\n let wordType = 0 /* None */;\r\n for (let chIndex = position.column - 2; chIndex >= 0; chIndex--) {\r\n let chCode = lineContent.charCodeAt(chIndex);\r\n let chClass = wordSeparators.get(chCode);\r\n if (chClass === 0 /* Regular */) {\r\n if (wordType === 2 /* Separator */) {\r\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\r\n }\r\n wordType = 1 /* Regular */;\r\n }\r\n else if (chClass === 2 /* WordSeparator */) {\r\n if (wordType === 1 /* Regular */) {\r\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\r\n }\r\n wordType = 2 /* Separator */;\r\n }\r\n else if (chClass === 1 /* Whitespace */) {\r\n if (wordType !== 0 /* None */) {\r\n return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1));\r\n }\r\n }\r\n }\r\n if (wordType !== 0 /* None */) {\r\n return this._createWord(lineContent, wordType, 1 /* Whitespace */, 0, this._findEndOfWord(lineContent, wordSeparators, wordType, 0));\r\n }\r\n return null;\r\n }\r\n static _findEndOfWord(lineContent, wordSeparators, wordType, startIndex) {\r\n let len = lineContent.length;\r\n for (let chIndex = startIndex; chIndex < len; chIndex++) {\r\n let chCode = lineContent.charCodeAt(chIndex);\r\n let chClass = wordSeparators.get(chCode);\r\n if (chClass === 1 /* Whitespace */) {\r\n return chIndex;\r\n }\r\n if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) {\r\n return chIndex;\r\n }\r\n if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) {\r\n return chIndex;\r\n }\r\n }\r\n return len;\r\n }\r\n static _findNextWordOnLine(wordSeparators, model, position) {\r\n let lineContent = model.getLineContent(position.lineNumber);\r\n return this._doFindNextWordOnLine(lineContent, wordSeparators, position);\r\n }\r\n static _doFindNextWordOnLine(lineContent, wordSeparators, position) {\r\n let wordType = 0 /* None */;\r\n let len = lineContent.length;\r\n for (let chIndex = position.column - 1; chIndex < len; chIndex++) {\r\n let chCode = lineContent.charCodeAt(chIndex);\r\n let chClass = wordSeparators.get(chCode);\r\n if (chClass === 0 /* Regular */) {\r\n if (wordType === 2 /* Separator */) {\r\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\r\n }\r\n wordType = 1 /* Regular */;\r\n }\r\n else if (chClass === 2 /* WordSeparator */) {\r\n if (wordType === 1 /* Regular */) {\r\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\r\n }\r\n wordType = 2 /* Separator */;\r\n }\r\n else if (chClass === 1 /* Whitespace */) {\r\n if (wordType !== 0 /* None */) {\r\n return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex);\r\n }\r\n }\r\n }\r\n if (wordType !== 0 /* None */) {\r\n return this._createWord(lineContent, wordType, 1 /* Whitespace */, this._findStartOfWord(lineContent, wordSeparators, wordType, len - 1), len);\r\n }\r\n return null;\r\n }\r\n static _findStartOfWord(lineContent, wordSeparators, wordType, startIndex) {\r\n for (let chIndex = startIndex; chIndex >= 0; chIndex--) {\r\n let chCode = lineContent.charCodeAt(chIndex);\r\n let chClass = wordSeparators.get(chCode);\r\n if (chClass === 1 /* Whitespace */) {\r\n return chIndex + 1;\r\n }\r\n if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) {\r\n return chIndex + 1;\r\n }\r\n if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) {\r\n return chIndex + 1;\r\n }\r\n }\r\n return 0;\r\n }\r\n static moveWordLeft(wordSeparators, model, position, wordNavigationType) {\r\n let lineNumber = position.lineNumber;\r\n let column = position.column;\r\n if (column === 1) {\r\n if (lineNumber > 1) {\r\n lineNumber = lineNumber - 1;\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n let prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column));\r\n if (wordNavigationType === 0 /* WordStart */) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1);\r\n }\r\n if (wordNavigationType === 1 /* WordStartFast */) {\r\n if (prevWordOnLine\r\n && prevWordOnLine.wordType === 2 /* Separator */\r\n && prevWordOnLine.end - prevWordOnLine.start === 1\r\n && prevWordOnLine.nextCharClass === 0 /* Regular */) {\r\n // Skip over a word made up of one single separator and followed by a regular character\r\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine.start + 1));\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1);\r\n }\r\n if (wordNavigationType === 3 /* WordAccessibility */) {\r\n while (prevWordOnLine\r\n && prevWordOnLine.wordType === 2 /* Separator */) {\r\n // Skip over words made up of only separators\r\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine.start + 1));\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1);\r\n }\r\n // We are stopping at the ending of words\r\n if (prevWordOnLine && column <= prevWordOnLine.end + 1) {\r\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine.start + 1));\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine ? prevWordOnLine.end + 1 : 1);\r\n }\r\n static _moveWordPartLeft(model, position) {\r\n const lineNumber = position.lineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n if (position.column === 1) {\r\n return (lineNumber > 1 ? new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber - 1, model.getLineMaxColumn(lineNumber - 1)) : position);\r\n }\r\n const lineContent = model.getLineContent(lineNumber);\r\n for (let column = position.column - 1; column > 1; column--) {\r\n const left = lineContent.charCodeAt(column - 2);\r\n const right = lineContent.charCodeAt(column - 1);\r\n if (left === 95 /* Underline */ && right !== 95 /* Underline */) {\r\n // snake_case_variables\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowerAsciiLetter(left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(right)) {\r\n // camelCaseVariables\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(right)) {\r\n // thisIsACamelCaseWithOneLetterWords\r\n if (column + 1 < maxColumn) {\r\n const rightRight = lineContent.charCodeAt(column);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowerAsciiLetter(rightRight)) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n }\r\n }\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, 1);\r\n }\r\n static moveWordRight(wordSeparators, model, position, wordNavigationType) {\r\n let lineNumber = position.lineNumber;\r\n let column = position.column;\r\n let movedDown = false;\r\n if (column === model.getLineMaxColumn(lineNumber)) {\r\n if (lineNumber < model.getLineCount()) {\r\n movedDown = true;\r\n lineNumber = lineNumber + 1;\r\n column = 1;\r\n }\r\n }\r\n let nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column));\r\n if (wordNavigationType === 2 /* WordEnd */) {\r\n if (nextWordOnLine && nextWordOnLine.wordType === 2 /* Separator */) {\r\n if (nextWordOnLine.end - nextWordOnLine.start === 1 && nextWordOnLine.nextCharClass === 0 /* Regular */) {\r\n // Skip over a word made up of one single separator and followed by a regular character\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, nextWordOnLine.end + 1));\r\n }\r\n }\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.end + 1;\r\n }\r\n else {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n else if (wordNavigationType === 3 /* WordAccessibility */) {\r\n if (movedDown) {\r\n // If we move to the next line, pretend that the cursor is right before the first character.\r\n // This is needed when the first word starts right at the first character - and in order not to miss it,\r\n // we need to start before.\r\n column = 0;\r\n }\r\n while (nextWordOnLine\r\n && (nextWordOnLine.wordType === 2 /* Separator */\r\n || nextWordOnLine.start + 1 <= column)) {\r\n // Skip over a word made up of one single separator\r\n // Also skip over word if it begins before current cursor position to ascertain we're moving forward at least 1 character.\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, nextWordOnLine.end + 1));\r\n }\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.start + 1;\r\n }\r\n else {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n else {\r\n if (nextWordOnLine && !movedDown && column >= nextWordOnLine.start + 1) {\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, nextWordOnLine.end + 1));\r\n }\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.start + 1;\r\n }\r\n else {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n static _moveWordPartRight(model, position) {\r\n const lineNumber = position.lineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n if (position.column === maxColumn) {\r\n return (lineNumber < model.getLineCount() ? new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber + 1, 1) : position);\r\n }\r\n const lineContent = model.getLineContent(lineNumber);\r\n for (let column = position.column + 1; column < maxColumn; column++) {\r\n const left = lineContent.charCodeAt(column - 2);\r\n const right = lineContent.charCodeAt(column - 1);\r\n if (left !== 95 /* Underline */ && right === 95 /* Underline */) {\r\n // snake_case_variables\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowerAsciiLetter(left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(right)) {\r\n // camelCaseVariables\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isUpperAsciiLetter(right)) {\r\n // thisIsACamelCaseWithOneLetterWords\r\n if (column + 1 < maxColumn) {\r\n const rightRight = lineContent.charCodeAt(column);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowerAsciiLetter(rightRight)) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n }\r\n }\r\n }\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, maxColumn);\r\n }\r\n static _deleteWordLeftWhitespace(model, position) {\r\n const lineContent = model.getLineContent(position.lineNumber);\r\n const startIndex = position.column - 2;\r\n const lastNonWhitespace = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(lineContent, startIndex);\r\n if (lastNonWhitespace + 1 < startIndex) {\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, lastNonWhitespace + 2, position.lineNumber, position.column);\r\n }\r\n return null;\r\n }\r\n static deleteWordLeft(ctx, wordNavigationType) {\r\n const wordSeparators = ctx.wordSeparators;\r\n const model = ctx.model;\r\n const selection = ctx.selection;\r\n const whitespaceHeuristics = ctx.whitespaceHeuristics;\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n if (_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_2__.DeleteOperations.isAutoClosingPairDelete(ctx.autoClosingBrackets, ctx.autoClosingQuotes, ctx.autoClosingPairs.autoClosingPairsOpenByEnd, ctx.model, [ctx.selection])) {\r\n const position = ctx.selection.getPosition();\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, position.column - 1, position.lineNumber, position.column + 1);\r\n }\r\n const position = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(selection.positionLineNumber, selection.positionColumn);\r\n let lineNumber = position.lineNumber;\r\n let column = position.column;\r\n if (lineNumber === 1 && column === 1) {\r\n // Ignore deleting at beginning of file\r\n return null;\r\n }\r\n if (whitespaceHeuristics) {\r\n let r = this._deleteWordLeftWhitespace(model, position);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n let prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\r\n if (wordNavigationType === 0 /* WordStart */) {\r\n if (prevWordOnLine) {\r\n column = prevWordOnLine.start + 1;\r\n }\r\n else {\r\n if (column > 1) {\r\n column = 1;\r\n }\r\n else {\r\n lineNumber--;\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n }\r\n else {\r\n if (prevWordOnLine && column <= prevWordOnLine.end + 1) {\r\n prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, prevWordOnLine.start + 1));\r\n }\r\n if (prevWordOnLine) {\r\n column = prevWordOnLine.end + 1;\r\n }\r\n else {\r\n if (column > 1) {\r\n column = 1;\r\n }\r\n else {\r\n lineNumber--;\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(lineNumber, column, position.lineNumber, position.column);\r\n }\r\n static deleteInsideWord(wordSeparators, model, selection) {\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const position = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(selection.positionLineNumber, selection.positionColumn);\r\n let r = this._deleteInsideWordWhitespace(model, position);\r\n if (r) {\r\n return r;\r\n }\r\n return this._deleteInsideWordDetermineDeleteRange(wordSeparators, model, position);\r\n }\r\n static _charAtIsWhitespace(str, index) {\r\n const charCode = str.charCodeAt(index);\r\n return (charCode === 32 /* Space */ || charCode === 9 /* Tab */);\r\n }\r\n static _deleteInsideWordWhitespace(model, position) {\r\n const lineContent = model.getLineContent(position.lineNumber);\r\n const lineContentLength = lineContent.length;\r\n if (lineContentLength === 0) {\r\n // empty line\r\n return null;\r\n }\r\n let leftIndex = Math.max(position.column - 2, 0);\r\n if (!this._charAtIsWhitespace(lineContent, leftIndex)) {\r\n // touches a non-whitespace character to the left\r\n return null;\r\n }\r\n let rightIndex = Math.min(position.column - 1, lineContentLength - 1);\r\n if (!this._charAtIsWhitespace(lineContent, rightIndex)) {\r\n // touches a non-whitespace character to the right\r\n return null;\r\n }\r\n // walk over whitespace to the left\r\n while (leftIndex > 0 && this._charAtIsWhitespace(lineContent, leftIndex - 1)) {\r\n leftIndex--;\r\n }\r\n // walk over whitespace to the right\r\n while (rightIndex + 1 < lineContentLength && this._charAtIsWhitespace(lineContent, rightIndex + 1)) {\r\n rightIndex++;\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, leftIndex + 1, position.lineNumber, rightIndex + 2);\r\n }\r\n static _deleteInsideWordDetermineDeleteRange(wordSeparators, model, position) {\r\n const lineContent = model.getLineContent(position.lineNumber);\r\n const lineLength = lineContent.length;\r\n if (lineLength === 0) {\r\n // empty line\r\n if (position.lineNumber > 1) {\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber - 1, model.getLineMaxColumn(position.lineNumber - 1), position.lineNumber, 1);\r\n }\r\n else {\r\n if (position.lineNumber < model.getLineCount()) {\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, 1, position.lineNumber + 1, 1);\r\n }\r\n else {\r\n // empty model\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, 1, position.lineNumber, 1);\r\n }\r\n }\r\n }\r\n const touchesWord = (word) => {\r\n return (word.start + 1 <= position.column && position.column <= word.end + 1);\r\n };\r\n const createRangeWithPosition = (startColumn, endColumn) => {\r\n startColumn = Math.min(startColumn, position.column);\r\n endColumn = Math.max(endColumn, position.column);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, startColumn, position.lineNumber, endColumn);\r\n };\r\n const deleteWordAndAdjacentWhitespace = (word) => {\r\n let startColumn = word.start + 1;\r\n let endColumn = word.end + 1;\r\n let expandedToTheRight = false;\r\n while (endColumn - 1 < lineLength && this._charAtIsWhitespace(lineContent, endColumn - 1)) {\r\n expandedToTheRight = true;\r\n endColumn++;\r\n }\r\n if (!expandedToTheRight) {\r\n while (startColumn > 1 && this._charAtIsWhitespace(lineContent, startColumn - 2)) {\r\n startColumn--;\r\n }\r\n }\r\n return createRangeWithPosition(startColumn, endColumn);\r\n };\r\n const prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\r\n if (prevWordOnLine && touchesWord(prevWordOnLine)) {\r\n return deleteWordAndAdjacentWhitespace(prevWordOnLine);\r\n }\r\n const nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, position);\r\n if (nextWordOnLine && touchesWord(nextWordOnLine)) {\r\n return deleteWordAndAdjacentWhitespace(nextWordOnLine);\r\n }\r\n if (prevWordOnLine && nextWordOnLine) {\r\n return createRangeWithPosition(prevWordOnLine.end + 1, nextWordOnLine.start + 1);\r\n }\r\n if (prevWordOnLine) {\r\n return createRangeWithPosition(prevWordOnLine.start + 1, prevWordOnLine.end + 1);\r\n }\r\n if (nextWordOnLine) {\r\n return createRangeWithPosition(nextWordOnLine.start + 1, nextWordOnLine.end + 1);\r\n }\r\n return createRangeWithPosition(1, lineLength + 1);\r\n }\r\n static _deleteWordPartLeft(model, selection) {\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const pos = selection.getPosition();\r\n const toPosition = WordOperations._moveWordPartLeft(model, pos);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(pos.lineNumber, pos.column, toPosition.lineNumber, toPosition.column);\r\n }\r\n static _findFirstNonWhitespaceChar(str, startIndex) {\r\n let len = str.length;\r\n for (let chIndex = startIndex; chIndex < len; chIndex++) {\r\n let ch = str.charAt(chIndex);\r\n if (ch !== ' ' && ch !== '\\t') {\r\n return chIndex;\r\n }\r\n }\r\n return len;\r\n }\r\n static _deleteWordRightWhitespace(model, position) {\r\n const lineContent = model.getLineContent(position.lineNumber);\r\n const startIndex = position.column - 1;\r\n const firstNonWhitespace = this._findFirstNonWhitespaceChar(lineContent, startIndex);\r\n if (startIndex + 1 < firstNonWhitespace) {\r\n // bingo\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, position.column, position.lineNumber, firstNonWhitespace + 1);\r\n }\r\n return null;\r\n }\r\n static deleteWordRight(ctx, wordNavigationType) {\r\n const wordSeparators = ctx.wordSeparators;\r\n const model = ctx.model;\r\n const selection = ctx.selection;\r\n const whitespaceHeuristics = ctx.whitespaceHeuristics;\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const position = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(selection.positionLineNumber, selection.positionColumn);\r\n let lineNumber = position.lineNumber;\r\n let column = position.column;\r\n const lineCount = model.getLineCount();\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n if (lineNumber === lineCount && column === maxColumn) {\r\n // Ignore deleting at end of file\r\n return null;\r\n }\r\n if (whitespaceHeuristics) {\r\n let r = this._deleteWordRightWhitespace(model, position);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n let nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, position);\r\n if (wordNavigationType === 2 /* WordEnd */) {\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.end + 1;\r\n }\r\n else {\r\n if (column < maxColumn || lineNumber === lineCount) {\r\n column = maxColumn;\r\n }\r\n else {\r\n lineNumber++;\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, 1));\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.start + 1;\r\n }\r\n else {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (nextWordOnLine && column >= nextWordOnLine.start + 1) {\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, nextWordOnLine.end + 1));\r\n }\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.start + 1;\r\n }\r\n else {\r\n if (column < maxColumn || lineNumber === lineCount) {\r\n column = maxColumn;\r\n }\r\n else {\r\n lineNumber++;\r\n nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, 1));\r\n if (nextWordOnLine) {\r\n column = nextWordOnLine.start + 1;\r\n }\r\n else {\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n }\r\n }\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(lineNumber, column, position.lineNumber, position.column);\r\n }\r\n static _deleteWordPartRight(model, selection) {\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const pos = selection.getPosition();\r\n const toPosition = WordOperations._moveWordPartRight(model, pos);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(pos.lineNumber, pos.column, toPosition.lineNumber, toPosition.column);\r\n }\r\n static _createWordAtPosition(model, lineNumber, word) {\r\n const range = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(lineNumber, word.start + 1, lineNumber, word.end + 1);\r\n return {\r\n word: model.getValueInRange(range),\r\n startColumn: range.startColumn,\r\n endColumn: range.endColumn\r\n };\r\n }\r\n static getWordAtPosition(model, _wordSeparators, position) {\r\n const wordSeparators = (0,_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_3__.getMapForWordSeparators)(_wordSeparators);\r\n const prevWord = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\r\n if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start <= position.column - 1 && position.column - 1 <= prevWord.end) {\r\n return WordOperations._createWordAtPosition(model, position.lineNumber, prevWord);\r\n }\r\n const nextWord = WordOperations._findNextWordOnLine(wordSeparators, model, position);\r\n if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start <= position.column - 1 && position.column - 1 <= nextWord.end) {\r\n return WordOperations._createWordAtPosition(model, position.lineNumber, nextWord);\r\n }\r\n return null;\r\n }\r\n static word(config, model, cursor, inSelectionMode, position) {\r\n const wordSeparators = (0,_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_3__.getMapForWordSeparators)(config.wordSeparators);\r\n let prevWord = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);\r\n let nextWord = WordOperations._findNextWordOnLine(wordSeparators, model, position);\r\n if (!inSelectionMode) {\r\n // Entering word selection for the first time\r\n let startColumn;\r\n let endColumn;\r\n if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start <= position.column - 1 && position.column - 1 <= prevWord.end) {\r\n // isTouchingPrevWord\r\n startColumn = prevWord.start + 1;\r\n endColumn = prevWord.end + 1;\r\n }\r\n else if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start <= position.column - 1 && position.column - 1 <= nextWord.end) {\r\n // isTouchingNextWord\r\n startColumn = nextWord.start + 1;\r\n endColumn = nextWord.end + 1;\r\n }\r\n else {\r\n if (prevWord) {\r\n startColumn = prevWord.end + 1;\r\n }\r\n else {\r\n startColumn = 1;\r\n }\r\n if (nextWord) {\r\n endColumn = nextWord.start + 1;\r\n }\r\n else {\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n }\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, startColumn, position.lineNumber, endColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(position.lineNumber, endColumn), 0);\r\n }\r\n let startColumn;\r\n let endColumn;\r\n if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start < position.column - 1 && position.column - 1 < prevWord.end) {\r\n // isInsidePrevWord\r\n startColumn = prevWord.start + 1;\r\n endColumn = prevWord.end + 1;\r\n }\r\n else if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start < position.column - 1 && position.column - 1 < nextWord.end) {\r\n // isInsideNextWord\r\n startColumn = nextWord.start + 1;\r\n endColumn = nextWord.end + 1;\r\n }\r\n else {\r\n startColumn = position.column;\r\n endColumn = position.column;\r\n }\r\n let lineNumber = position.lineNumber;\r\n let column;\r\n if (cursor.selectionStart.containsPosition(position)) {\r\n column = cursor.selectionStart.endColumn;\r\n }\r\n else if (position.isBeforeOrEqual(cursor.selectionStart.getStartPosition())) {\r\n column = startColumn;\r\n let possiblePosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n if (cursor.selectionStart.containsPosition(possiblePosition)) {\r\n column = cursor.selectionStart.endColumn;\r\n }\r\n }\r\n else {\r\n column = endColumn;\r\n let possiblePosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(lineNumber, column);\r\n if (cursor.selectionStart.containsPosition(possiblePosition)) {\r\n column = cursor.selectionStart.startColumn;\r\n }\r\n }\r\n return cursor.move(true, lineNumber, column, 0);\r\n }\r\n}\r\nclass WordPartOperations extends WordOperations {\r\n static deleteWordPartLeft(ctx) {\r\n const candidates = enforceDefined([\r\n WordOperations.deleteWordLeft(ctx, 0 /* WordStart */),\r\n WordOperations.deleteWordLeft(ctx, 2 /* WordEnd */),\r\n WordOperations._deleteWordPartLeft(ctx.model, ctx.selection)\r\n ]);\r\n candidates.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingEnds);\r\n return candidates[2];\r\n }\r\n static deleteWordPartRight(ctx) {\r\n const candidates = enforceDefined([\r\n WordOperations.deleteWordRight(ctx, 0 /* WordStart */),\r\n WordOperations.deleteWordRight(ctx, 2 /* WordEnd */),\r\n WordOperations._deleteWordPartRight(ctx.model, ctx.selection)\r\n ]);\r\n candidates.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts);\r\n return candidates[0];\r\n }\r\n static moveWordPartLeft(wordSeparators, model, position) {\r\n const candidates = enforceDefined([\r\n WordOperations.moveWordLeft(wordSeparators, model, position, 0 /* WordStart */),\r\n WordOperations.moveWordLeft(wordSeparators, model, position, 2 /* WordEnd */),\r\n WordOperations._moveWordPartLeft(model, position)\r\n ]);\r\n candidates.sort(_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position.compare);\r\n return candidates[2];\r\n }\r\n static moveWordPartRight(wordSeparators, model, position) {\r\n const candidates = enforceDefined([\r\n WordOperations.moveWordRight(wordSeparators, model, position, 0 /* WordStart */),\r\n WordOperations.moveWordRight(wordSeparators, model, position, 2 /* WordEnd */),\r\n WordOperations._moveWordPartRight(model, position)\r\n ]);\r\n candidates.sort(_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position.compare);\r\n return candidates[0];\r\n }\r\n}\r\nfunction enforceDefined(arr) {\r\n return arr.filter(el => Boolean(el));\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OneCursor\": () => (/* binding */ OneCursor)\n/* harmony export */ });\n/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass OneCursor {\r\n constructor(context) {\r\n this._selTrackedRange = null;\r\n this._trackSelection = true;\r\n this._setState(context, new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(1, 1), 0), new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(1, 1), 0));\r\n }\r\n dispose(context) {\r\n this._removeTrackedRange(context);\r\n }\r\n startTrackingSelection(context) {\r\n this._trackSelection = true;\r\n this._updateTrackedRange(context);\r\n }\r\n stopTrackingSelection(context) {\r\n this._trackSelection = false;\r\n this._removeTrackedRange(context);\r\n }\r\n _updateTrackedRange(context) {\r\n if (!this._trackSelection) {\r\n // don't track the selection\r\n return;\r\n }\r\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n _removeTrackedRange(context) {\r\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, null, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n asCursorState() {\r\n return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.CursorState(this.modelState, this.viewState);\r\n }\r\n readSelectionFromMarkers(context) {\r\n const range = context.model._getTrackedRange(this._selTrackedRange);\r\n if (this.modelState.selection.getDirection() === 0 /* LTR */) {\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\r\n }\r\n ensureValidState(context) {\r\n this._setState(context, this.modelState, this.viewState);\r\n }\r\n setState(context, modelState, viewState) {\r\n this._setState(context, modelState, viewState);\r\n }\r\n _setState(context, modelState, viewState) {\r\n if (!modelState) {\r\n if (!viewState) {\r\n return;\r\n }\r\n // We only have the view state => compute the model state\r\n const selectionStart = context.model.validateRange(context.coordinatesConverter.convertViewRangeToModelRange(viewState.selectionStart));\r\n const position = context.model.validatePosition(context.coordinatesConverter.convertViewPositionToModelPosition(viewState.position));\r\n modelState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(selectionStart, viewState.selectionStartLeftoverVisibleColumns, position, viewState.leftoverVisibleColumns);\r\n }\r\n else {\r\n // Validate new model state\r\n const selectionStart = context.model.validateRange(modelState.selectionStart);\r\n const selectionStartLeftoverVisibleColumns = modelState.selectionStart.equalsRange(selectionStart) ? modelState.selectionStartLeftoverVisibleColumns : 0;\r\n const position = context.model.validatePosition(modelState.position);\r\n const leftoverVisibleColumns = modelState.position.equals(position) ? modelState.leftoverVisibleColumns : 0;\r\n modelState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns);\r\n }\r\n if (!viewState) {\r\n // We only have the model state => compute the view state\r\n const viewSelectionStart1 = context.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(modelState.selectionStart.startLineNumber, modelState.selectionStart.startColumn));\r\n const viewSelectionStart2 = context.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(modelState.selectionStart.endLineNumber, modelState.selectionStart.endColumn));\r\n const viewSelectionStart = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(viewSelectionStart1.lineNumber, viewSelectionStart1.column, viewSelectionStart2.lineNumber, viewSelectionStart2.column);\r\n const viewPosition = context.coordinatesConverter.convertModelPositionToViewPosition(modelState.position);\r\n viewState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\r\n }\r\n else {\r\n // Validate new view state\r\n const viewSelectionStart = context.coordinatesConverter.validateViewRange(viewState.selectionStart, modelState.selectionStart);\r\n const viewPosition = context.coordinatesConverter.validateViewPosition(viewState.position, modelState.position);\r\n viewState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__.SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\r\n }\r\n this.modelState = modelState;\r\n this.viewState = viewState;\r\n this._updateTrackedRange(context);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WordCharacterClassifier\": () => (/* binding */ WordCharacterClassifier),\n/* harmony export */ \"getMapForWordSeparators\": () => (/* binding */ getMapForWordSeparators)\n/* harmony export */ });\n/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass WordCharacterClassifier extends _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__.CharacterClassifier {\r\n constructor(wordSeparators) {\r\n super(0 /* Regular */);\r\n for (let i = 0, len = wordSeparators.length; i < len; i++) {\r\n this.set(wordSeparators.charCodeAt(i), 2 /* WordSeparator */);\r\n }\r\n this.set(32 /* Space */, 1 /* Whitespace */);\r\n this.set(9 /* Tab */, 1 /* Whitespace */);\r\n }\r\n}\r\nfunction once(computeFn) {\r\n let cache = {}; // TODO@Alex unbounded cache\r\n return (input) => {\r\n if (!cache.hasOwnProperty(input)) {\r\n cache[input] = computeFn(input);\r\n }\r\n return cache[input];\r\n };\r\n}\r\nconst getMapForWordSeparators = once((input) => new WordCharacterClassifier(input));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CharacterClassifier\": () => (/* binding */ CharacterClassifier),\n/* harmony export */ \"CharacterSet\": () => (/* binding */ CharacterSet)\n/* harmony export */ });\n/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uint.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uint.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * A fast character classifier that uses a compact array for ASCII values.\r\n */\r\nclass CharacterClassifier {\r\n constructor(_defaultValue) {\r\n let defaultValue = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(_defaultValue);\r\n this._defaultValue = defaultValue;\r\n this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue);\r\n this._map = new Map();\r\n }\r\n static _createAsciiMap(defaultValue) {\r\n let asciiMap = new Uint8Array(256);\r\n for (let i = 0; i < 256; i++) {\r\n asciiMap[i] = defaultValue;\r\n }\r\n return asciiMap;\r\n }\r\n set(charCode, _value) {\r\n let value = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint8)(_value);\r\n if (charCode >= 0 && charCode < 256) {\r\n this._asciiMap[charCode] = value;\r\n }\r\n else {\r\n this._map.set(charCode, value);\r\n }\r\n }\r\n get(charCode) {\r\n if (charCode >= 0 && charCode < 256) {\r\n return this._asciiMap[charCode];\r\n }\r\n else {\r\n return (this._map.get(charCode) || this._defaultValue);\r\n }\r\n }\r\n}\r\nclass CharacterSet {\r\n constructor() {\r\n this._actual = new CharacterClassifier(0 /* False */);\r\n }\r\n add(charCode) {\r\n this._actual.set(charCode, 1 /* True */);\r\n }\r\n has(charCode) {\r\n return (this._actual.get(charCode) === 1 /* True */);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditOperation\": () => (/* binding */ EditOperation)\n/* harmony export */ });\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass EditOperation {\r\n static insert(position, text) {\r\n return {\r\n range: new _range_js__WEBPACK_IMPORTED_MODULE_0__.Range(position.lineNumber, position.column, position.lineNumber, position.column),\r\n text: text,\r\n forceMoveMarkers: true\r\n };\r\n }\r\n static delete(range) {\r\n return {\r\n range: range,\r\n text: null\r\n };\r\n }\r\n static replace(range, text) {\r\n return {\r\n range: range,\r\n text: text\r\n };\r\n }\r\n static replaceMove(range, text) {\r\n return {\r\n range: range,\r\n text: text,\r\n forceMoveMarkers: true\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineTokens\": () => (/* binding */ LineTokens),\n/* harmony export */ \"SlicedLineTokens\": () => (/* binding */ SlicedLineTokens)\n/* harmony export */ });\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass LineTokens {\r\n constructor(tokens, text) {\r\n this._tokens = tokens;\r\n this._tokensCount = (this._tokens.length >>> 1);\r\n this._text = text;\r\n }\r\n equals(other) {\r\n if (other instanceof LineTokens) {\r\n return this.slicedEquals(other, 0, this._tokensCount);\r\n }\r\n return false;\r\n }\r\n slicedEquals(other, sliceFromTokenIndex, sliceTokenCount) {\r\n if (this._text !== other._text) {\r\n return false;\r\n }\r\n if (this._tokensCount !== other._tokensCount) {\r\n return false;\r\n }\r\n const from = (sliceFromTokenIndex << 1);\r\n const to = from + (sliceTokenCount << 1);\r\n for (let i = from; i < to; i++) {\r\n if (this._tokens[i] !== other._tokens[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n getLineContent() {\r\n return this._text;\r\n }\r\n getCount() {\r\n return this._tokensCount;\r\n }\r\n getStartOffset(tokenIndex) {\r\n if (tokenIndex > 0) {\r\n return this._tokens[(tokenIndex - 1) << 1];\r\n }\r\n return 0;\r\n }\r\n getMetadata(tokenIndex) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return metadata;\r\n }\r\n getLanguageId(tokenIndex) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return _modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getLanguageId(metadata);\r\n }\r\n getStandardTokenType(tokenIndex) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return _modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getTokenType(metadata);\r\n }\r\n getForeground(tokenIndex) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return _modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getForeground(metadata);\r\n }\r\n getClassName(tokenIndex) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return _modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getClassNameFromMetadata(metadata);\r\n }\r\n getInlineStyle(tokenIndex, colorMap) {\r\n const metadata = this._tokens[(tokenIndex << 1) + 1];\r\n return _modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getInlineStyleFromMetadata(metadata, colorMap);\r\n }\r\n getEndOffset(tokenIndex) {\r\n return this._tokens[tokenIndex << 1];\r\n }\r\n /**\r\n * Find the token containing offset `offset`.\r\n * @param offset The search offset\r\n * @return The index of the token containing the offset.\r\n */\r\n findTokenIndexAtOffset(offset) {\r\n return LineTokens.findIndexInTokensArray(this._tokens, offset);\r\n }\r\n inflate() {\r\n return this;\r\n }\r\n sliceAndInflate(startOffset, endOffset, deltaOffset) {\r\n return new SlicedLineTokens(this, startOffset, endOffset, deltaOffset);\r\n }\r\n static convertToEndOffset(tokens, lineTextLength) {\r\n const tokenCount = (tokens.length >>> 1);\r\n const lastTokenIndex = tokenCount - 1;\r\n for (let tokenIndex = 0; tokenIndex < lastTokenIndex; tokenIndex++) {\r\n tokens[tokenIndex << 1] = tokens[(tokenIndex + 1) << 1];\r\n }\r\n tokens[lastTokenIndex << 1] = lineTextLength;\r\n }\r\n static findIndexInTokensArray(tokens, desiredIndex) {\r\n if (tokens.length <= 2) {\r\n return 0;\r\n }\r\n let low = 0;\r\n let high = (tokens.length >>> 1) - 1;\r\n while (low < high) {\r\n const mid = low + Math.floor((high - low) / 2);\r\n const endOffset = tokens[(mid << 1)];\r\n if (endOffset === desiredIndex) {\r\n return mid + 1;\r\n }\r\n else if (endOffset < desiredIndex) {\r\n low = mid + 1;\r\n }\r\n else if (endOffset > desiredIndex) {\r\n high = mid;\r\n }\r\n }\r\n return low;\r\n }\r\n}\r\nclass SlicedLineTokens {\r\n constructor(source, startOffset, endOffset, deltaOffset) {\r\n this._source = source;\r\n this._startOffset = startOffset;\r\n this._endOffset = endOffset;\r\n this._deltaOffset = deltaOffset;\r\n this._firstTokenIndex = source.findTokenIndexAtOffset(startOffset);\r\n this._tokensCount = 0;\r\n for (let i = this._firstTokenIndex, len = source.getCount(); i < len; i++) {\r\n const tokenStartOffset = source.getStartOffset(i);\r\n if (tokenStartOffset >= endOffset) {\r\n break;\r\n }\r\n this._tokensCount++;\r\n }\r\n }\r\n equals(other) {\r\n if (other instanceof SlicedLineTokens) {\r\n return (this._startOffset === other._startOffset\r\n && this._endOffset === other._endOffset\r\n && this._deltaOffset === other._deltaOffset\r\n && this._source.slicedEquals(other._source, this._firstTokenIndex, this._tokensCount));\r\n }\r\n return false;\r\n }\r\n getCount() {\r\n return this._tokensCount;\r\n }\r\n getForeground(tokenIndex) {\r\n return this._source.getForeground(this._firstTokenIndex + tokenIndex);\r\n }\r\n getEndOffset(tokenIndex) {\r\n const tokenEndOffset = this._source.getEndOffset(this._firstTokenIndex + tokenIndex);\r\n return Math.min(this._endOffset, tokenEndOffset) - this._startOffset + this._deltaOffset;\r\n }\r\n getClassName(tokenIndex) {\r\n return this._source.getClassName(this._firstTokenIndex + tokenIndex);\r\n }\r\n getInlineStyle(tokenIndex, colorMap) {\r\n return this._source.getInlineStyle(this._firstTokenIndex + tokenIndex, colorMap);\r\n }\r\n findTokenIndexAtOffset(offset) {\r\n return this._source.findTokenIndexAtOffset(offset + this._startOffset - this._deltaOffset) - this._firstTokenIndex;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Position\": () => (/* binding */ Position)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * A position in the editor.\r\n */\r\nclass Position {\r\n constructor(lineNumber, column) {\r\n this.lineNumber = lineNumber;\r\n this.column = column;\r\n }\r\n /**\r\n * Create a new position from this position.\r\n *\r\n * @param newLineNumber new line number\r\n * @param newColumn new column\r\n */\r\n with(newLineNumber = this.lineNumber, newColumn = this.column) {\r\n if (newLineNumber === this.lineNumber && newColumn === this.column) {\r\n return this;\r\n }\r\n else {\r\n return new Position(newLineNumber, newColumn);\r\n }\r\n }\r\n /**\r\n * Derive a new position from this position.\r\n *\r\n * @param deltaLineNumber line number delta\r\n * @param deltaColumn column delta\r\n */\r\n delta(deltaLineNumber = 0, deltaColumn = 0) {\r\n return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn);\r\n }\r\n /**\r\n * Test if this position equals other position\r\n */\r\n equals(other) {\r\n return Position.equals(this, other);\r\n }\r\n /**\r\n * Test if position `a` equals position `b`\r\n */\r\n static equals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n return (!!a &&\r\n !!b &&\r\n a.lineNumber === b.lineNumber &&\r\n a.column === b.column);\r\n }\r\n /**\r\n * Test if this position is before other position.\r\n * If the two positions are equal, the result will be false.\r\n */\r\n isBefore(other) {\r\n return Position.isBefore(this, other);\r\n }\r\n /**\r\n * Test if position `a` is before position `b`.\r\n * If the two positions are equal, the result will be false.\r\n */\r\n static isBefore(a, b) {\r\n if (a.lineNumber < b.lineNumber) {\r\n return true;\r\n }\r\n if (b.lineNumber < a.lineNumber) {\r\n return false;\r\n }\r\n return a.column < b.column;\r\n }\r\n /**\r\n * Test if this position is before other position.\r\n * If the two positions are equal, the result will be true.\r\n */\r\n isBeforeOrEqual(other) {\r\n return Position.isBeforeOrEqual(this, other);\r\n }\r\n /**\r\n * Test if position `a` is before position `b`.\r\n * If the two positions are equal, the result will be true.\r\n */\r\n static isBeforeOrEqual(a, b) {\r\n if (a.lineNumber < b.lineNumber) {\r\n return true;\r\n }\r\n if (b.lineNumber < a.lineNumber) {\r\n return false;\r\n }\r\n return a.column <= b.column;\r\n }\r\n /**\r\n * A function that compares positions, useful for sorting\r\n */\r\n static compare(a, b) {\r\n let aLineNumber = a.lineNumber | 0;\r\n let bLineNumber = b.lineNumber | 0;\r\n if (aLineNumber === bLineNumber) {\r\n let aColumn = a.column | 0;\r\n let bColumn = b.column | 0;\r\n return aColumn - bColumn;\r\n }\r\n return aLineNumber - bLineNumber;\r\n }\r\n /**\r\n * Clone this position.\r\n */\r\n clone() {\r\n return new Position(this.lineNumber, this.column);\r\n }\r\n /**\r\n * Convert to a human-readable representation.\r\n */\r\n toString() {\r\n return '(' + this.lineNumber + ',' + this.column + ')';\r\n }\r\n // ---\r\n /**\r\n * Create a `Position` from an `IPosition`.\r\n */\r\n static lift(pos) {\r\n return new Position(pos.lineNumber, pos.column);\r\n }\r\n /**\r\n * Test if `obj` is an `IPosition`.\r\n */\r\n static isIPosition(obj) {\r\n return (obj\r\n && (typeof obj.lineNumber === 'number')\r\n && (typeof obj.column === 'number'));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/position.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Range\": () => (/* binding */ Range)\n/* harmony export */ });\n/* harmony import */ var _position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)\r\n */\r\nclass Range {\r\n constructor(startLineNumber, startColumn, endLineNumber, endColumn) {\r\n if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) {\r\n this.startLineNumber = endLineNumber;\r\n this.startColumn = endColumn;\r\n this.endLineNumber = startLineNumber;\r\n this.endColumn = startColumn;\r\n }\r\n else {\r\n this.startLineNumber = startLineNumber;\r\n this.startColumn = startColumn;\r\n this.endLineNumber = endLineNumber;\r\n this.endColumn = endColumn;\r\n }\r\n }\r\n /**\r\n * Test if this range is empty.\r\n */\r\n isEmpty() {\r\n return Range.isEmpty(this);\r\n }\r\n /**\r\n * Test if `range` is empty.\r\n */\r\n static isEmpty(range) {\r\n return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn);\r\n }\r\n /**\r\n * Test if position is in this range. If the position is at the edges, will return true.\r\n */\r\n containsPosition(position) {\r\n return Range.containsPosition(this, position);\r\n }\r\n /**\r\n * Test if `position` is in `range`. If the position is at the edges, will return true.\r\n */\r\n static containsPosition(range, position) {\r\n if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {\r\n return false;\r\n }\r\n if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if range is in this range. If the range is equal to this range, will return true.\r\n */\r\n containsRange(range) {\r\n return Range.containsRange(this, range);\r\n }\r\n /**\r\n * Test if `otherRange` is in `range`. If the ranges are equal, will return true.\r\n */\r\n static containsRange(range, otherRange) {\r\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) {\r\n return false;\r\n }\r\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.\r\n */\r\n strictContainsRange(range) {\r\n return Range.strictContainsRange(this, range);\r\n }\r\n /**\r\n * Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false.\r\n */\r\n static strictContainsRange(range, otherRange) {\r\n if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {\r\n return false;\r\n }\r\n if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) {\r\n return false;\r\n }\r\n if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * A reunion of the two ranges.\r\n * The smallest position will be used as the start point, and the largest one as the end point.\r\n */\r\n plusRange(range) {\r\n return Range.plusRange(this, range);\r\n }\r\n /**\r\n * A reunion of the two ranges.\r\n * The smallest position will be used as the start point, and the largest one as the end point.\r\n */\r\n static plusRange(a, b) {\r\n let startLineNumber;\r\n let startColumn;\r\n let endLineNumber;\r\n let endColumn;\r\n if (b.startLineNumber < a.startLineNumber) {\r\n startLineNumber = b.startLineNumber;\r\n startColumn = b.startColumn;\r\n }\r\n else if (b.startLineNumber === a.startLineNumber) {\r\n startLineNumber = b.startLineNumber;\r\n startColumn = Math.min(b.startColumn, a.startColumn);\r\n }\r\n else {\r\n startLineNumber = a.startLineNumber;\r\n startColumn = a.startColumn;\r\n }\r\n if (b.endLineNumber > a.endLineNumber) {\r\n endLineNumber = b.endLineNumber;\r\n endColumn = b.endColumn;\r\n }\r\n else if (b.endLineNumber === a.endLineNumber) {\r\n endLineNumber = b.endLineNumber;\r\n endColumn = Math.max(b.endColumn, a.endColumn);\r\n }\r\n else {\r\n endLineNumber = a.endLineNumber;\r\n endColumn = a.endColumn;\r\n }\r\n return new Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n /**\r\n * A intersection of the two ranges.\r\n */\r\n intersectRanges(range) {\r\n return Range.intersectRanges(this, range);\r\n }\r\n /**\r\n * A intersection of the two ranges.\r\n */\r\n static intersectRanges(a, b) {\r\n let resultStartLineNumber = a.startLineNumber;\r\n let resultStartColumn = a.startColumn;\r\n let resultEndLineNumber = a.endLineNumber;\r\n let resultEndColumn = a.endColumn;\r\n let otherStartLineNumber = b.startLineNumber;\r\n let otherStartColumn = b.startColumn;\r\n let otherEndLineNumber = b.endLineNumber;\r\n let otherEndColumn = b.endColumn;\r\n if (resultStartLineNumber < otherStartLineNumber) {\r\n resultStartLineNumber = otherStartLineNumber;\r\n resultStartColumn = otherStartColumn;\r\n }\r\n else if (resultStartLineNumber === otherStartLineNumber) {\r\n resultStartColumn = Math.max(resultStartColumn, otherStartColumn);\r\n }\r\n if (resultEndLineNumber > otherEndLineNumber) {\r\n resultEndLineNumber = otherEndLineNumber;\r\n resultEndColumn = otherEndColumn;\r\n }\r\n else if (resultEndLineNumber === otherEndLineNumber) {\r\n resultEndColumn = Math.min(resultEndColumn, otherEndColumn);\r\n }\r\n // Check if selection is now empty\r\n if (resultStartLineNumber > resultEndLineNumber) {\r\n return null;\r\n }\r\n if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {\r\n return null;\r\n }\r\n return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);\r\n }\r\n /**\r\n * Test if this range equals other.\r\n */\r\n equalsRange(other) {\r\n return Range.equalsRange(this, other);\r\n }\r\n /**\r\n * Test if range `a` equals `b`.\r\n */\r\n static equalsRange(a, b) {\r\n return (!!a &&\r\n !!b &&\r\n a.startLineNumber === b.startLineNumber &&\r\n a.startColumn === b.startColumn &&\r\n a.endLineNumber === b.endLineNumber &&\r\n a.endColumn === b.endColumn);\r\n }\r\n /**\r\n * Return the end position (which will be after or equal to the start position)\r\n */\r\n getEndPosition() {\r\n return Range.getEndPosition(this);\r\n }\r\n /**\r\n * Return the end position (which will be after or equal to the start position)\r\n */\r\n static getEndPosition(range) {\r\n return new _position_js__WEBPACK_IMPORTED_MODULE_0__.Position(range.endLineNumber, range.endColumn);\r\n }\r\n /**\r\n * Return the start position (which will be before or equal to the end position)\r\n */\r\n getStartPosition() {\r\n return Range.getStartPosition(this);\r\n }\r\n /**\r\n * Return the start position (which will be before or equal to the end position)\r\n */\r\n static getStartPosition(range) {\r\n return new _position_js__WEBPACK_IMPORTED_MODULE_0__.Position(range.startLineNumber, range.startColumn);\r\n }\r\n /**\r\n * Transform to a user presentable string representation.\r\n */\r\n toString() {\r\n return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']';\r\n }\r\n /**\r\n * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.\r\n */\r\n setEndPosition(endLineNumber, endColumn) {\r\n return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\r\n }\r\n /**\r\n * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.\r\n */\r\n setStartPosition(startLineNumber, startColumn) {\r\n return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\r\n }\r\n /**\r\n * Create a new empty range using this range's start position.\r\n */\r\n collapseToStart() {\r\n return Range.collapseToStart(this);\r\n }\r\n /**\r\n * Create a new empty range using this range's start position.\r\n */\r\n static collapseToStart(range) {\r\n return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\r\n }\r\n // ---\r\n static fromPositions(start, end = start) {\r\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n static lift(range) {\r\n if (!range) {\r\n return null;\r\n }\r\n return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n /**\r\n * Test if `obj` is an `IRange`.\r\n */\r\n static isIRange(obj) {\r\n return (obj\r\n && (typeof obj.startLineNumber === 'number')\r\n && (typeof obj.startColumn === 'number')\r\n && (typeof obj.endLineNumber === 'number')\r\n && (typeof obj.endColumn === 'number'));\r\n }\r\n /**\r\n * Test if the two ranges are touching in any way.\r\n */\r\n static areIntersectingOrTouching(a, b) {\r\n // Check if `a` is before `b`\r\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) {\r\n return false;\r\n }\r\n // Check if `b` is before `a`\r\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) {\r\n return false;\r\n }\r\n // These ranges must intersect\r\n return true;\r\n }\r\n /**\r\n * Test if the two ranges are intersecting. If the ranges are touching it returns true.\r\n */\r\n static areIntersecting(a, b) {\r\n // Check if `a` is before `b`\r\n if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) {\r\n return false;\r\n }\r\n // Check if `b` is before `a`\r\n if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) {\r\n return false;\r\n }\r\n // These ranges must intersect\r\n return true;\r\n }\r\n /**\r\n * A function that compares ranges, useful for sorting ranges\r\n * It will first compare ranges on the startPosition and then on the endPosition\r\n */\r\n static compareRangesUsingStarts(a, b) {\r\n if (a && b) {\r\n const aStartLineNumber = a.startLineNumber | 0;\r\n const bStartLineNumber = b.startLineNumber | 0;\r\n if (aStartLineNumber === bStartLineNumber) {\r\n const aStartColumn = a.startColumn | 0;\r\n const bStartColumn = b.startColumn | 0;\r\n if (aStartColumn === bStartColumn) {\r\n const aEndLineNumber = a.endLineNumber | 0;\r\n const bEndLineNumber = b.endLineNumber | 0;\r\n if (aEndLineNumber === bEndLineNumber) {\r\n const aEndColumn = a.endColumn | 0;\r\n const bEndColumn = b.endColumn | 0;\r\n return aEndColumn - bEndColumn;\r\n }\r\n return aEndLineNumber - bEndLineNumber;\r\n }\r\n return aStartColumn - bStartColumn;\r\n }\r\n return aStartLineNumber - bStartLineNumber;\r\n }\r\n const aExists = (a ? 1 : 0);\r\n const bExists = (b ? 1 : 0);\r\n return aExists - bExists;\r\n }\r\n /**\r\n * A function that compares ranges, useful for sorting ranges\r\n * It will first compare ranges on the endPosition and then on the startPosition\r\n */\r\n static compareRangesUsingEnds(a, b) {\r\n if (a.endLineNumber === b.endLineNumber) {\r\n if (a.endColumn === b.endColumn) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.startColumn - b.startColumn;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return a.endColumn - b.endColumn;\r\n }\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n /**\r\n * Test if the range spans multiple lines.\r\n */\r\n static spansMultipleLines(range) {\r\n return range.endLineNumber > range.startLineNumber;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/range.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RGBA8\": () => (/* binding */ RGBA8)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * A very VM friendly rgba datastructure.\r\n * Please don't touch unless you take a look at the IR.\r\n */\r\nclass RGBA8 {\r\n constructor(r, g, b, a) {\r\n this.r = RGBA8._clamp(r);\r\n this.g = RGBA8._clamp(g);\r\n this.b = RGBA8._clamp(b);\r\n this.a = RGBA8._clamp(a);\r\n }\r\n equals(other) {\r\n return (this.r === other.r\r\n && this.g === other.g\r\n && this.b === other.b\r\n && this.a === other.a);\r\n }\r\n static _clamp(c) {\r\n if (c < 0) {\r\n return 0;\r\n }\r\n if (c > 255) {\r\n return 255;\r\n }\r\n return c | 0;\r\n }\r\n}\r\nRGBA8.Empty = new RGBA8(0, 0, 0, 0);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Selection\": () => (/* binding */ Selection)\n/* harmony export */ });\n/* harmony import */ var _position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/**\r\n * A selection in the editor.\r\n * The selection is a range that has an orientation.\r\n */\r\nclass Selection extends _range_js__WEBPACK_IMPORTED_MODULE_1__.Range {\r\n constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) {\r\n super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn);\r\n this.selectionStartLineNumber = selectionStartLineNumber;\r\n this.selectionStartColumn = selectionStartColumn;\r\n this.positionLineNumber = positionLineNumber;\r\n this.positionColumn = positionColumn;\r\n }\r\n /**\r\n * Transform to a human-readable representation.\r\n */\r\n toString() {\r\n return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']';\r\n }\r\n /**\r\n * Test if equals other selection.\r\n */\r\n equalsSelection(other) {\r\n return (Selection.selectionsEqual(this, other));\r\n }\r\n /**\r\n * Test if the two selections are equal.\r\n */\r\n static selectionsEqual(a, b) {\r\n return (a.selectionStartLineNumber === b.selectionStartLineNumber &&\r\n a.selectionStartColumn === b.selectionStartColumn &&\r\n a.positionLineNumber === b.positionLineNumber &&\r\n a.positionColumn === b.positionColumn);\r\n }\r\n /**\r\n * Get directions (LTR or RTL).\r\n */\r\n getDirection() {\r\n if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) {\r\n return 0 /* LTR */;\r\n }\r\n return 1 /* RTL */;\r\n }\r\n /**\r\n * Create a new selection with a different `positionLineNumber` and `positionColumn`.\r\n */\r\n setEndPosition(endLineNumber, endColumn) {\r\n if (this.getDirection() === 0 /* LTR */) {\r\n return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn);\r\n }\r\n return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn);\r\n }\r\n /**\r\n * Get the position at `positionLineNumber` and `positionColumn`.\r\n */\r\n getPosition() {\r\n return new _position_js__WEBPACK_IMPORTED_MODULE_0__.Position(this.positionLineNumber, this.positionColumn);\r\n }\r\n /**\r\n * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.\r\n */\r\n setStartPosition(startLineNumber, startColumn) {\r\n if (this.getDirection() === 0 /* LTR */) {\r\n return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn);\r\n }\r\n return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn);\r\n }\r\n // ----\r\n /**\r\n * Create a `Selection` from one or two positions\r\n */\r\n static fromPositions(start, end = start) {\r\n return new Selection(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n /**\r\n * Create a `Selection` from an `ISelection`.\r\n */\r\n static liftSelection(sel) {\r\n return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\r\n }\r\n /**\r\n * `a` equals `b`.\r\n */\r\n static selectionsArrEqual(a, b) {\r\n if (a && !b || !a && b) {\r\n return false;\r\n }\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = a.length; i < len; i++) {\r\n if (!this.selectionsEqual(a[i], b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Test if `obj` is an `ISelection`.\r\n */\r\n static isISelection(obj) {\r\n return (obj\r\n && (typeof obj.selectionStartLineNumber === 'number')\r\n && (typeof obj.selectionStartColumn === 'number')\r\n && (typeof obj.positionLineNumber === 'number')\r\n && (typeof obj.positionColumn === 'number'));\r\n }\r\n /**\r\n * Create with a direction.\r\n */\r\n static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) {\r\n if (direction === 0 /* LTR */) {\r\n return new Selection(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n return new Selection(endLineNumber, endColumn, startLineNumber, startColumn);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getPlatformTextDecoder\": () => (/* binding */ getPlatformTextDecoder),\n/* harmony export */ \"hasTextDecoder\": () => (/* binding */ hasTextDecoder),\n/* harmony export */ \"createStringBuilder\": () => (/* binding */ createStringBuilder),\n/* harmony export */ \"decodeUTF16LE\": () => (/* binding */ decodeUTF16LE)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/buffer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/buffer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nlet _platformTextDecoder;\r\nfunction getPlatformTextDecoder() {\r\n if (!_platformTextDecoder) {\r\n _platformTextDecoder = new TextDecoder(_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLittleEndian() ? 'UTF-16LE' : 'UTF-16BE');\r\n }\r\n return _platformTextDecoder;\r\n}\r\nconst hasTextDecoder = (typeof TextDecoder !== 'undefined');\r\nlet createStringBuilder;\r\nlet decodeUTF16LE;\r\nif (hasTextDecoder) {\r\n createStringBuilder = (capacity) => new StringBuilder(capacity);\r\n decodeUTF16LE = standardDecodeUTF16LE;\r\n}\r\nelse {\r\n createStringBuilder = (capacity) => new CompatStringBuilder();\r\n decodeUTF16LE = compatDecodeUTF16LE;\r\n}\r\nfunction standardDecodeUTF16LE(source, offset, len) {\r\n const view = new Uint16Array(source.buffer, offset, len);\r\n return getPlatformTextDecoder().decode(view);\r\n}\r\nfunction compatDecodeUTF16LE(source, offset, len) {\r\n let result = [];\r\n let resultLen = 0;\r\n for (let i = 0; i < len; i++) {\r\n const charCode = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_2__.readUInt16LE(source, offset);\r\n offset += 2;\r\n result[resultLen++] = String.fromCharCode(charCode);\r\n }\r\n return result.join('');\r\n}\r\nclass StringBuilder {\r\n constructor(capacity) {\r\n this._capacity = capacity | 0;\r\n this._buffer = new Uint16Array(this._capacity);\r\n this._completedStrings = null;\r\n this._bufferLength = 0;\r\n }\r\n reset() {\r\n this._completedStrings = null;\r\n this._bufferLength = 0;\r\n }\r\n build() {\r\n if (this._completedStrings !== null) {\r\n this._flushBuffer();\r\n return this._completedStrings.join('');\r\n }\r\n return this._buildBuffer();\r\n }\r\n _buildBuffer() {\r\n if (this._bufferLength === 0) {\r\n return '';\r\n }\r\n const view = new Uint16Array(this._buffer.buffer, 0, this._bufferLength);\r\n return getPlatformTextDecoder().decode(view);\r\n }\r\n _flushBuffer() {\r\n const bufferString = this._buildBuffer();\r\n this._bufferLength = 0;\r\n if (this._completedStrings === null) {\r\n this._completedStrings = [bufferString];\r\n }\r\n else {\r\n this._completedStrings[this._completedStrings.length] = bufferString;\r\n }\r\n }\r\n write1(charCode) {\r\n const remainingSpace = this._capacity - this._bufferLength;\r\n if (remainingSpace <= 1) {\r\n if (remainingSpace === 0 || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCode)) {\r\n this._flushBuffer();\r\n }\r\n }\r\n this._buffer[this._bufferLength++] = charCode;\r\n }\r\n appendASCII(charCode) {\r\n if (this._bufferLength === this._capacity) {\r\n // buffer is full\r\n this._flushBuffer();\r\n }\r\n this._buffer[this._bufferLength++] = charCode;\r\n }\r\n appendASCIIString(str) {\r\n const strLen = str.length;\r\n if (this._bufferLength + strLen >= this._capacity) {\r\n // This string does not fit in the remaining buffer space\r\n this._flushBuffer();\r\n this._completedStrings[this._completedStrings.length] = str;\r\n return;\r\n }\r\n for (let i = 0; i < strLen; i++) {\r\n this._buffer[this._bufferLength++] = str.charCodeAt(i);\r\n }\r\n }\r\n}\r\nclass CompatStringBuilder {\r\n constructor() {\r\n this._pieces = [];\r\n this._piecesLen = 0;\r\n }\r\n reset() {\r\n this._pieces = [];\r\n this._piecesLen = 0;\r\n }\r\n build() {\r\n return this._pieces.join('');\r\n }\r\n write1(charCode) {\r\n this._pieces[this._piecesLen++] = String.fromCharCode(charCode);\r\n }\r\n appendASCII(charCode) {\r\n this._pieces[this._piecesLen++] = String.fromCharCode(charCode);\r\n }\r\n appendASCIIString(str) {\r\n this._pieces[this._piecesLen++] = str;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js":
|
||
/*!***********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js ***!
|
||
\***********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Token\": () => (/* binding */ Token),\n/* harmony export */ \"TokenizationResult\": () => (/* binding */ TokenizationResult),\n/* harmony export */ \"TokenizationResult2\": () => (/* binding */ TokenizationResult2)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Token {\r\n constructor(offset, type, language) {\r\n this.offset = offset | 0; // @perf\r\n this.type = type;\r\n this.language = language;\r\n }\r\n toString() {\r\n return '(' + this.offset + ', ' + this.type + ')';\r\n }\r\n}\r\nclass TokenizationResult {\r\n constructor(tokens, endState) {\r\n this.tokens = tokens;\r\n this.endState = endState;\r\n }\r\n}\r\nclass TokenizationResult2 {\r\n constructor(tokens, endState) {\r\n this.tokens = tokens;\r\n this.endState = endState;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/core/token.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiffComputer\": () => (/* binding */ DiffComputer)\n/* harmony export */ });\n/* harmony import */ var _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/diff/diff.js */ \"./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst MINIMUM_MATCHING_CHARACTER_LENGTH = 3;\r\nfunction computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) {\r\n const diffAlgo = new _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_0__.LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate);\r\n return diffAlgo.ComputeDiff(pretty);\r\n}\r\nclass LineSequence {\r\n constructor(lines) {\r\n const startColumns = [];\r\n const endColumns = [];\r\n for (let i = 0, length = lines.length; i < length; i++) {\r\n startColumns[i] = getFirstNonBlankColumn(lines[i], 1);\r\n endColumns[i] = getLastNonBlankColumn(lines[i], 1);\r\n }\r\n this.lines = lines;\r\n this._startColumns = startColumns;\r\n this._endColumns = endColumns;\r\n }\r\n getElements() {\r\n const elements = [];\r\n for (let i = 0, len = this.lines.length; i < len; i++) {\r\n elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1);\r\n }\r\n return elements;\r\n }\r\n getStartLineNumber(i) {\r\n return i + 1;\r\n }\r\n getEndLineNumber(i) {\r\n return i + 1;\r\n }\r\n createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) {\r\n const charCodes = [];\r\n const lineNumbers = [];\r\n const columns = [];\r\n let len = 0;\r\n for (let index = startIndex; index <= endIndex; index++) {\r\n const lineContent = this.lines[index];\r\n const startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1);\r\n const endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1);\r\n for (let col = startColumn; col < endColumn; col++) {\r\n charCodes[len] = lineContent.charCodeAt(col - 1);\r\n lineNumbers[len] = index + 1;\r\n columns[len] = col;\r\n len++;\r\n }\r\n }\r\n return new CharSequence(charCodes, lineNumbers, columns);\r\n }\r\n}\r\nclass CharSequence {\r\n constructor(charCodes, lineNumbers, columns) {\r\n this._charCodes = charCodes;\r\n this._lineNumbers = lineNumbers;\r\n this._columns = columns;\r\n }\r\n getElements() {\r\n return this._charCodes;\r\n }\r\n getStartLineNumber(i) {\r\n return this._lineNumbers[i];\r\n }\r\n getStartColumn(i) {\r\n return this._columns[i];\r\n }\r\n getEndLineNumber(i) {\r\n return this._lineNumbers[i];\r\n }\r\n getEndColumn(i) {\r\n return this._columns[i] + 1;\r\n }\r\n}\r\nclass CharChange {\r\n constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) {\r\n this.originalStartLineNumber = originalStartLineNumber;\r\n this.originalStartColumn = originalStartColumn;\r\n this.originalEndLineNumber = originalEndLineNumber;\r\n this.originalEndColumn = originalEndColumn;\r\n this.modifiedStartLineNumber = modifiedStartLineNumber;\r\n this.modifiedStartColumn = modifiedStartColumn;\r\n this.modifiedEndLineNumber = modifiedEndLineNumber;\r\n this.modifiedEndColumn = modifiedEndColumn;\r\n }\r\n static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) {\r\n let originalStartLineNumber;\r\n let originalStartColumn;\r\n let originalEndLineNumber;\r\n let originalEndColumn;\r\n let modifiedStartLineNumber;\r\n let modifiedStartColumn;\r\n let modifiedEndLineNumber;\r\n let modifiedEndColumn;\r\n if (diffChange.originalLength === 0) {\r\n originalStartLineNumber = 0;\r\n originalStartColumn = 0;\r\n originalEndLineNumber = 0;\r\n originalEndColumn = 0;\r\n }\r\n else {\r\n originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart);\r\n originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart);\r\n originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\r\n originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1);\r\n }\r\n if (diffChange.modifiedLength === 0) {\r\n modifiedStartLineNumber = 0;\r\n modifiedStartColumn = 0;\r\n modifiedEndLineNumber = 0;\r\n modifiedEndColumn = 0;\r\n }\r\n else {\r\n modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);\r\n modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart);\r\n modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n }\r\n return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn);\r\n }\r\n}\r\nfunction postProcessCharChanges(rawChanges) {\r\n if (rawChanges.length <= 1) {\r\n return rawChanges;\r\n }\r\n const result = [rawChanges[0]];\r\n let prevChange = result[0];\r\n for (let i = 1, len = rawChanges.length; i < len; i++) {\r\n const currChange = rawChanges[i];\r\n const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength);\r\n const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength);\r\n // Both of the above should be equal, but the continueProcessingPredicate may prevent this from being true\r\n const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength);\r\n if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) {\r\n // Merge the current change into the previous one\r\n prevChange.originalLength = (currChange.originalStart + currChange.originalLength) - prevChange.originalStart;\r\n prevChange.modifiedLength = (currChange.modifiedStart + currChange.modifiedLength) - prevChange.modifiedStart;\r\n }\r\n else {\r\n // Add the current change\r\n result.push(currChange);\r\n prevChange = currChange;\r\n }\r\n }\r\n return result;\r\n}\r\nclass LineChange {\r\n constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) {\r\n this.originalStartLineNumber = originalStartLineNumber;\r\n this.originalEndLineNumber = originalEndLineNumber;\r\n this.modifiedStartLineNumber = modifiedStartLineNumber;\r\n this.modifiedEndLineNumber = modifiedEndLineNumber;\r\n this.charChanges = charChanges;\r\n }\r\n static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) {\r\n let originalStartLineNumber;\r\n let originalEndLineNumber;\r\n let modifiedStartLineNumber;\r\n let modifiedEndLineNumber;\r\n let charChanges = undefined;\r\n if (diffChange.originalLength === 0) {\r\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1;\r\n originalEndLineNumber = 0;\r\n }\r\n else {\r\n originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart);\r\n originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);\r\n }\r\n if (diffChange.modifiedLength === 0) {\r\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1;\r\n modifiedEndLineNumber = 0;\r\n }\r\n else {\r\n modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);\r\n modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n }\r\n if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) {\r\n // Compute character changes for diff chunks of at most 20 lines...\r\n const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);\r\n const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);\r\n let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes;\r\n if (shouldPostProcessCharChanges) {\r\n rawChanges = postProcessCharChanges(rawChanges);\r\n }\r\n charChanges = [];\r\n for (let i = 0, length = rawChanges.length; i < length; i++) {\r\n charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence));\r\n }\r\n }\r\n return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges);\r\n }\r\n}\r\nclass DiffComputer {\r\n constructor(originalLines, modifiedLines, opts) {\r\n this.shouldComputeCharChanges = opts.shouldComputeCharChanges;\r\n this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges;\r\n this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace;\r\n this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff;\r\n this.originalLines = originalLines;\r\n this.modifiedLines = modifiedLines;\r\n this.original = new LineSequence(originalLines);\r\n this.modified = new LineSequence(modifiedLines);\r\n this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime);\r\n this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5000)); // never run after 5s for character changes...\r\n }\r\n computeDiff() {\r\n if (this.original.lines.length === 1 && this.original.lines[0].length === 0) {\r\n // empty original => fast path\r\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\r\n return {\r\n quitEarly: false,\r\n changes: []\r\n };\r\n }\r\n return {\r\n quitEarly: false,\r\n changes: [{\r\n originalStartLineNumber: 1,\r\n originalEndLineNumber: 1,\r\n modifiedStartLineNumber: 1,\r\n modifiedEndLineNumber: this.modified.lines.length,\r\n charChanges: [{\r\n modifiedEndColumn: 0,\r\n modifiedEndLineNumber: 0,\r\n modifiedStartColumn: 0,\r\n modifiedStartLineNumber: 0,\r\n originalEndColumn: 0,\r\n originalEndLineNumber: 0,\r\n originalStartColumn: 0,\r\n originalStartLineNumber: 0\r\n }]\r\n }]\r\n };\r\n }\r\n if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {\r\n // empty modified => fast path\r\n return {\r\n quitEarly: false,\r\n changes: [{\r\n originalStartLineNumber: 1,\r\n originalEndLineNumber: this.original.lines.length,\r\n modifiedStartLineNumber: 1,\r\n modifiedEndLineNumber: 1,\r\n charChanges: [{\r\n modifiedEndColumn: 0,\r\n modifiedEndLineNumber: 0,\r\n modifiedStartColumn: 0,\r\n modifiedStartLineNumber: 0,\r\n originalEndColumn: 0,\r\n originalEndLineNumber: 0,\r\n originalStartColumn: 0,\r\n originalStartLineNumber: 0\r\n }]\r\n }]\r\n };\r\n }\r\n const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff);\r\n const rawChanges = diffResult.changes;\r\n const quitEarly = diffResult.quitEarly;\r\n // The diff is always computed with ignoring trim whitespace\r\n // This ensures we get the prettiest diff\r\n if (this.shouldIgnoreTrimWhitespace) {\r\n const lineChanges = [];\r\n for (let i = 0, length = rawChanges.length; i < length; i++) {\r\n lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\r\n }\r\n return {\r\n quitEarly: quitEarly,\r\n changes: lineChanges\r\n };\r\n }\r\n // Need to post-process and introduce changes where the trim whitespace is different\r\n // Note that we are looping starting at -1 to also cover the lines before the first change\r\n const result = [];\r\n let originalLineIndex = 0;\r\n let modifiedLineIndex = 0;\r\n for (let i = -1 /* !!!! */, len = rawChanges.length; i < len; i++) {\r\n const nextChange = (i + 1 < len ? rawChanges[i + 1] : null);\r\n const originalStop = (nextChange ? nextChange.originalStart : this.originalLines.length);\r\n const modifiedStop = (nextChange ? nextChange.modifiedStart : this.modifiedLines.length);\r\n while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) {\r\n const originalLine = this.originalLines[originalLineIndex];\r\n const modifiedLine = this.modifiedLines[modifiedLineIndex];\r\n if (originalLine !== modifiedLine) {\r\n // These lines differ only in trim whitespace\r\n // Check the leading whitespace\r\n {\r\n let originalStartColumn = getFirstNonBlankColumn(originalLine, 1);\r\n let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1);\r\n while (originalStartColumn > 1 && modifiedStartColumn > 1) {\r\n const originalChar = originalLine.charCodeAt(originalStartColumn - 2);\r\n const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2);\r\n if (originalChar !== modifiedChar) {\r\n break;\r\n }\r\n originalStartColumn--;\r\n modifiedStartColumn--;\r\n }\r\n if (originalStartColumn > 1 || modifiedStartColumn > 1) {\r\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn);\r\n }\r\n }\r\n // Check the trailing whitespace\r\n {\r\n let originalEndColumn = getLastNonBlankColumn(originalLine, 1);\r\n let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1);\r\n const originalMaxColumn = originalLine.length + 1;\r\n const modifiedMaxColumn = modifiedLine.length + 1;\r\n while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) {\r\n const originalChar = originalLine.charCodeAt(originalEndColumn - 1);\r\n const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1);\r\n if (originalChar !== modifiedChar) {\r\n break;\r\n }\r\n originalEndColumn++;\r\n modifiedEndColumn++;\r\n }\r\n if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) {\r\n this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn);\r\n }\r\n }\r\n }\r\n originalLineIndex++;\r\n modifiedLineIndex++;\r\n }\r\n if (nextChange) {\r\n // Emit the actual change\r\n result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));\r\n originalLineIndex += nextChange.originalLength;\r\n modifiedLineIndex += nextChange.modifiedLength;\r\n }\r\n }\r\n return {\r\n quitEarly: quitEarly,\r\n changes: result\r\n };\r\n }\r\n _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\r\n if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) {\r\n // Merged into previous\r\n return;\r\n }\r\n let charChanges = undefined;\r\n if (this.shouldComputeCharChanges) {\r\n charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)];\r\n }\r\n result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges));\r\n }\r\n _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {\r\n const len = result.length;\r\n if (len === 0) {\r\n return false;\r\n }\r\n const prevChange = result[len - 1];\r\n if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) {\r\n // Don't merge with inserts/deletes\r\n return false;\r\n }\r\n if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) {\r\n prevChange.originalEndLineNumber = originalLineNumber;\r\n prevChange.modifiedEndLineNumber = modifiedLineNumber;\r\n if (this.shouldComputeCharChanges && prevChange.charChanges) {\r\n prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nfunction getFirstNonBlankColumn(txt, defaultValue) {\r\n const r = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(txt);\r\n if (r === -1) {\r\n return defaultValue;\r\n }\r\n return r + 1;\r\n}\r\nfunction getLastNonBlankColumn(txt, defaultValue) {\r\n const r = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.lastNonWhitespaceIndex(txt);\r\n if (r === -1) {\r\n return defaultValue;\r\n }\r\n return r + 2;\r\n}\r\nfunction createContinueProcessingPredicate(maximumRuntime) {\r\n if (maximumRuntime === 0) {\r\n return () => true;\r\n }\r\n const startTime = Date.now();\r\n return () => {\r\n return Date.now() - startTime < maximumRuntime;\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InternalEditorAction\": () => (/* binding */ InternalEditorAction)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass InternalEditorAction {\r\n constructor(id, label, alias, precondition, run, contextKeyService) {\r\n this.id = id;\r\n this.label = label;\r\n this.alias = alias;\r\n this._precondition = precondition;\r\n this._run = run;\r\n this._contextKeyService = contextKeyService;\r\n }\r\n isSupported() {\r\n return this._contextKeyService.contextMatchesRules(this._precondition);\r\n }\r\n run() {\r\n if (!this.isSupported()) {\r\n return Promise.resolve(undefined);\r\n }\r\n return this._run();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isThemeColor\": () => (/* binding */ isThemeColor),\n/* harmony export */ \"EditorType\": () => (/* binding */ EditorType)\n/* harmony export */ });\n/**\r\n * @internal\r\n */\r\nfunction isThemeColor(o) {\r\n return o && typeof o.id === 'string';\r\n}\r\n/**\r\n * The type of the `IEditor`.\r\n */\r\nconst EditorType = {\r\n ICodeEditor: 'vs.editor.ICodeEditor',\r\n IDiffEditor: 'vs.editor.IDiffEditor'\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorContextKeys\": () => (/* binding */ EditorContextKeys)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nvar EditorContextKeys;\r\n(function (EditorContextKeys) {\r\n EditorContextKeys.editorSimpleInput = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorSimpleInput', false, true);\r\n /**\r\n * A context key that is set when the editor's text has focus (cursor is blinking).\r\n * Is false when focus is in simple editor widgets (repl input, scm commit input).\r\n */\r\n EditorContextKeys.editorTextFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorTextFocus', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorTextFocus', \"Whether the editor text has focus (cursor is blinking)\"));\r\n /**\r\n * A context key that is set when the editor's text or an editor's widget has focus.\r\n */\r\n EditorContextKeys.focus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorFocus', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorFocus', \"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)\"));\r\n /**\r\n * A context key that is set when any editor input has focus (regular editor, repl input...).\r\n */\r\n EditorContextKeys.textInputFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('textInputFocus', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('textInputFocus', \"Whether an editor or a rich text input has focus (cursor is blinking)\"));\r\n EditorContextKeys.readOnly = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorReadonly', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorReadonly', \"Whether the editor is read only\"));\r\n EditorContextKeys.inDiffEditor = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('inDiffEditor', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inDiffEditor', \"Whether the context is a diff editor\"));\r\n EditorContextKeys.columnSelection = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorColumnSelection', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorColumnSelection', \"Whether `editor.columnSelection` is enabled\"));\r\n EditorContextKeys.writable = EditorContextKeys.readOnly.toNegated();\r\n EditorContextKeys.hasNonEmptySelection = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasSelection', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasSelection', \"Whether the editor has text selected\"));\r\n EditorContextKeys.hasOnlyEmptySelection = EditorContextKeys.hasNonEmptySelection.toNegated();\r\n EditorContextKeys.hasMultipleSelections = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasMultipleSelections', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasMultipleSelections', \"Whether the editor has multiple selections\"));\r\n EditorContextKeys.hasSingleSelection = EditorContextKeys.hasMultipleSelections.toNegated();\r\n EditorContextKeys.tabMovesFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorTabMovesFocus', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorTabMovesFocus', \"Whether `Tab` will move focus out of the editor\"));\r\n EditorContextKeys.tabDoesNotMoveFocus = EditorContextKeys.tabMovesFocus.toNegated();\r\n EditorContextKeys.isInWalkThroughSnippet = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('isInEmbeddedEditor', false, true);\r\n EditorContextKeys.canUndo = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('canUndo', false, true);\r\n EditorContextKeys.canRedo = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('canRedo', false, true);\r\n EditorContextKeys.hoverVisible = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHoverVisible', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHoverVisible', \"Whether the editor hover is visible\"));\r\n /**\r\n * A context key that is set when an editor is part of a larger editor, like notebooks or\r\n * (future) a diff editor\r\n */\r\n EditorContextKeys.inCompositeEditor = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('inCompositeEditor', undefined, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inCompositeEditor', \"Whether the editor is part of a larger editor (e.g. notebooks)\"));\r\n EditorContextKeys.notInCompositeEditor = EditorContextKeys.inCompositeEditor.toNegated();\r\n // -- mode context keys\r\n EditorContextKeys.languageId = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorLangId', '', _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorLangId', \"The language identifier of the editor\"));\r\n EditorContextKeys.hasCompletionItemProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasCompletionItemProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasCompletionItemProvider', \"Whether the editor has a completion item provider\"));\r\n EditorContextKeys.hasCodeActionsProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasCodeActionsProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasCodeActionsProvider', \"Whether the editor has a code actions provider\"));\r\n EditorContextKeys.hasCodeLensProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasCodeLensProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasCodeLensProvider', \"Whether the editor has a code lens provider\"));\r\n EditorContextKeys.hasDefinitionProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDefinitionProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDefinitionProvider', \"Whether the editor has a definition provider\"));\r\n EditorContextKeys.hasDeclarationProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDeclarationProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDeclarationProvider', \"Whether the editor has a declaration provider\"));\r\n EditorContextKeys.hasImplementationProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasImplementationProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasImplementationProvider', \"Whether the editor has an implementation provider\"));\r\n EditorContextKeys.hasTypeDefinitionProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasTypeDefinitionProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasTypeDefinitionProvider', \"Whether the editor has a type definition provider\"));\r\n EditorContextKeys.hasHoverProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasHoverProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasHoverProvider', \"Whether the editor has a hover provider\"));\r\n EditorContextKeys.hasDocumentHighlightProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDocumentHighlightProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDocumentHighlightProvider', \"Whether the editor has a document highlight provider\"));\r\n EditorContextKeys.hasDocumentSymbolProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDocumentSymbolProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDocumentSymbolProvider', \"Whether the editor has a document symbol provider\"));\r\n EditorContextKeys.hasReferenceProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasReferenceProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasReferenceProvider', \"Whether the editor has a reference provider\"));\r\n EditorContextKeys.hasRenameProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasRenameProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasRenameProvider', \"Whether the editor has a rename provider\"));\r\n EditorContextKeys.hasSignatureHelpProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasSignatureHelpProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasSignatureHelpProvider', \"Whether the editor has a signature help provider\"));\r\n EditorContextKeys.hasInlineHintsProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasInlineHintsProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasInlineHintsProvider', \"Whether the editor has an inline hints provider\"));\r\n // -- mode context keys: formatting\r\n EditorContextKeys.hasDocumentFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDocumentFormattingProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDocumentFormattingProvider', \"Whether the editor has a document formatting provider\"));\r\n EditorContextKeys.hasDocumentSelectionFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasDocumentSelectionFormattingProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasDocumentSelectionFormattingProvider', \"Whether the editor has a document selection formatting provider\"));\r\n EditorContextKeys.hasMultipleDocumentFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasMultipleDocumentFormattingProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasMultipleDocumentFormattingProvider', \"Whether the editor has multiple document formatting providers\"));\r\n EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('editorHasMultipleDocumentSelectionFormattingProvider', false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorHasMultipleDocumentSelectionFormattingProvider', \"Whether the editor has multiple document selection formatting providers\"));\r\n})(EditorContextKeys || (EditorContextKeys = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OverviewRulerLane\": () => (/* binding */ OverviewRulerLane),\n/* harmony export */ \"MinimapPosition\": () => (/* binding */ MinimapPosition),\n/* harmony export */ \"TextModelResolvedOptions\": () => (/* binding */ TextModelResolvedOptions),\n/* harmony export */ \"FindMatch\": () => (/* binding */ FindMatch),\n/* harmony export */ \"ValidAnnotatedEditOperation\": () => (/* binding */ ValidAnnotatedEditOperation),\n/* harmony export */ \"ApplyEditsResult\": () => (/* binding */ ApplyEditsResult)\n/* harmony export */ });\n/**\r\n * Vertical Lane in the overview ruler of the editor.\r\n */\r\nvar OverviewRulerLane;\r\n(function (OverviewRulerLane) {\r\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\r\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\r\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\r\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\r\n})(OverviewRulerLane || (OverviewRulerLane = {}));\r\n/**\r\n * Position in the minimap to render the decoration.\r\n */\r\nvar MinimapPosition;\r\n(function (MinimapPosition) {\r\n MinimapPosition[MinimapPosition[\"Inline\"] = 1] = \"Inline\";\r\n MinimapPosition[MinimapPosition[\"Gutter\"] = 2] = \"Gutter\";\r\n})(MinimapPosition || (MinimapPosition = {}));\r\nclass TextModelResolvedOptions {\r\n /**\r\n * @internal\r\n */\r\n constructor(src) {\r\n this.tabSize = Math.max(1, src.tabSize | 0);\r\n this.indentSize = src.tabSize | 0;\r\n this.insertSpaces = Boolean(src.insertSpaces);\r\n this.defaultEOL = src.defaultEOL | 0;\r\n this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace);\r\n }\r\n /**\r\n * @internal\r\n */\r\n equals(other) {\r\n return (this.tabSize === other.tabSize\r\n && this.indentSize === other.indentSize\r\n && this.insertSpaces === other.insertSpaces\r\n && this.defaultEOL === other.defaultEOL\r\n && this.trimAutoWhitespace === other.trimAutoWhitespace);\r\n }\r\n /**\r\n * @internal\r\n */\r\n createChangeEvent(newOpts) {\r\n return {\r\n tabSize: this.tabSize !== newOpts.tabSize,\r\n indentSize: this.indentSize !== newOpts.indentSize,\r\n insertSpaces: this.insertSpaces !== newOpts.insertSpaces,\r\n trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace,\r\n };\r\n }\r\n}\r\nclass FindMatch {\r\n /**\r\n * @internal\r\n */\r\n constructor(range, matches) {\r\n this.range = range;\r\n this.matches = matches;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass ValidAnnotatedEditOperation {\r\n constructor(identifier, range, text, forceMoveMarkers, isAutoWhitespaceEdit, _isTracked) {\r\n this.identifier = identifier;\r\n this.range = range;\r\n this.text = text;\r\n this.forceMoveMarkers = forceMoveMarkers;\r\n this.isAutoWhitespaceEdit = isAutoWhitespaceEdit;\r\n this._isTracked = _isTracked;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass ApplyEditsResult {\r\n constructor(reverseEdits, changes, trimAutoWhitespaceLineNumbers) {\r\n this.reverseEdits = reverseEdits;\r\n this.changes = changes;\r\n this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SingleModelEditStackElement\": () => (/* binding */ SingleModelEditStackElement),\n/* harmony export */ \"MultiModelEditStackElement\": () => (/* binding */ MultiModelEditStackElement),\n/* harmony export */ \"isEditStackElement\": () => (/* binding */ isEditStackElement),\n/* harmony export */ \"EditStack\": () => (/* binding */ EditStack)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _textChange_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textChange.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js\");\n/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/buffer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/buffer.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction uriGetComparisonKey(resource) {\r\n return resource.toString();\r\n}\r\nclass SingleModelEditStackData {\r\n constructor(beforeVersionId, afterVersionId, beforeEOL, afterEOL, beforeCursorState, afterCursorState, changes) {\r\n this.beforeVersionId = beforeVersionId;\r\n this.afterVersionId = afterVersionId;\r\n this.beforeEOL = beforeEOL;\r\n this.afterEOL = afterEOL;\r\n this.beforeCursorState = beforeCursorState;\r\n this.afterCursorState = afterCursorState;\r\n this.changes = changes;\r\n }\r\n static create(model, beforeCursorState) {\r\n const alternativeVersionId = model.getAlternativeVersionId();\r\n const eol = getModelEOL(model);\r\n return new SingleModelEditStackData(alternativeVersionId, alternativeVersionId, eol, eol, beforeCursorState, beforeCursorState, []);\r\n }\r\n append(model, textChanges, afterEOL, afterVersionId, afterCursorState) {\r\n if (textChanges.length > 0) {\r\n this.changes = (0,_textChange_js__WEBPACK_IMPORTED_MODULE_4__.compressConsecutiveTextChanges)(this.changes, textChanges);\r\n }\r\n this.afterEOL = afterEOL;\r\n this.afterVersionId = afterVersionId;\r\n this.afterCursorState = afterCursorState;\r\n }\r\n static _writeSelectionsSize(selections) {\r\n return 4 + 4 * 4 * (selections ? selections.length : 0);\r\n }\r\n static _writeSelections(b, selections, offset) {\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, (selections ? selections.length : 0), offset);\r\n offset += 4;\r\n if (selections) {\r\n for (const selection of selections) {\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, selection.selectionStartLineNumber, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, selection.selectionStartColumn, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, selection.positionLineNumber, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, selection.positionColumn, offset);\r\n offset += 4;\r\n }\r\n }\r\n return offset;\r\n }\r\n static _readSelections(b, offset, dest) {\r\n const count = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n for (let i = 0; i < count; i++) {\r\n const selectionStartLineNumber = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const selectionStartColumn = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const positionLineNumber = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const positionColumn = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n dest.push(new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__.Selection(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn));\r\n }\r\n return offset;\r\n }\r\n serialize() {\r\n let necessarySize = (+4 // beforeVersionId\r\n + 4 // afterVersionId\r\n + 1 // beforeEOL\r\n + 1 // afterEOL\r\n + SingleModelEditStackData._writeSelectionsSize(this.beforeCursorState)\r\n + SingleModelEditStackData._writeSelectionsSize(this.afterCursorState)\r\n + 4 // change count\r\n );\r\n for (const change of this.changes) {\r\n necessarySize += change.writeSize();\r\n }\r\n const b = new Uint8Array(necessarySize);\r\n let offset = 0;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, this.beforeVersionId, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, this.afterVersionId, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt8(b, this.beforeEOL, offset);\r\n offset += 1;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt8(b, this.afterEOL, offset);\r\n offset += 1;\r\n offset = SingleModelEditStackData._writeSelections(b, this.beforeCursorState, offset);\r\n offset = SingleModelEditStackData._writeSelections(b, this.afterCursorState, offset);\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.writeUInt32BE(b, this.changes.length, offset);\r\n offset += 4;\r\n for (const change of this.changes) {\r\n offset = change.write(b, offset);\r\n }\r\n return b.buffer;\r\n }\r\n static deserialize(source) {\r\n const b = new Uint8Array(source);\r\n let offset = 0;\r\n const beforeVersionId = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const afterVersionId = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const beforeEOL = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt8(b, offset);\r\n offset += 1;\r\n const afterEOL = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt8(b, offset);\r\n offset += 1;\r\n const beforeCursorState = [];\r\n offset = SingleModelEditStackData._readSelections(b, offset, beforeCursorState);\r\n const afterCursorState = [];\r\n offset = SingleModelEditStackData._readSelections(b, offset, afterCursorState);\r\n const changeCount = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const changes = [];\r\n for (let i = 0; i < changeCount; i++) {\r\n offset = _textChange_js__WEBPACK_IMPORTED_MODULE_4__.TextChange.read(b, offset, changes);\r\n }\r\n return new SingleModelEditStackData(beforeVersionId, afterVersionId, beforeEOL, afterEOL, beforeCursorState, afterCursorState, changes);\r\n }\r\n}\r\nclass SingleModelEditStackElement {\r\n constructor(model, beforeCursorState) {\r\n this.model = model;\r\n this._data = SingleModelEditStackData.create(model, beforeCursorState);\r\n }\r\n get type() {\r\n return 0 /* Resource */;\r\n }\r\n get resource() {\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(this.model)) {\r\n return this.model;\r\n }\r\n return this.model.uri;\r\n }\r\n get label() {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('edit', \"Typing\");\r\n }\r\n toString() {\r\n const data = (this._data instanceof SingleModelEditStackData ? this._data : SingleModelEditStackData.deserialize(this._data));\r\n return data.changes.map(change => change.toString()).join(', ');\r\n }\r\n matchesResource(resource) {\r\n const uri = (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(this.model) ? this.model : this.model.uri);\r\n return (uri.toString() === resource.toString());\r\n }\r\n setModel(model) {\r\n this.model = model;\r\n }\r\n canAppend(model) {\r\n return (this.model === model && this._data instanceof SingleModelEditStackData);\r\n }\r\n append(model, textChanges, afterEOL, afterVersionId, afterCursorState) {\r\n if (this._data instanceof SingleModelEditStackData) {\r\n this._data.append(model, textChanges, afterEOL, afterVersionId, afterCursorState);\r\n }\r\n }\r\n close() {\r\n if (this._data instanceof SingleModelEditStackData) {\r\n this._data = this._data.serialize();\r\n }\r\n }\r\n open() {\r\n if (!(this._data instanceof SingleModelEditStackData)) {\r\n this._data = SingleModelEditStackData.deserialize(this._data);\r\n }\r\n }\r\n undo() {\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(this.model)) {\r\n // don't have a model\r\n throw new Error(`Invalid SingleModelEditStackElement`);\r\n }\r\n if (this._data instanceof SingleModelEditStackData) {\r\n this._data = this._data.serialize();\r\n }\r\n const data = SingleModelEditStackData.deserialize(this._data);\r\n this.model._applyUndo(data.changes, data.beforeEOL, data.beforeVersionId, data.beforeCursorState);\r\n }\r\n redo() {\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(this.model)) {\r\n // don't have a model\r\n throw new Error(`Invalid SingleModelEditStackElement`);\r\n }\r\n if (this._data instanceof SingleModelEditStackData) {\r\n this._data = this._data.serialize();\r\n }\r\n const data = SingleModelEditStackData.deserialize(this._data);\r\n this.model._applyRedo(data.changes, data.afterEOL, data.afterVersionId, data.afterCursorState);\r\n }\r\n heapSize() {\r\n if (this._data instanceof SingleModelEditStackData) {\r\n this._data = this._data.serialize();\r\n }\r\n return this._data.byteLength + 168 /*heap overhead*/;\r\n }\r\n}\r\nclass MultiModelEditStackElement {\r\n constructor(label, editStackElements) {\r\n this.type = 1 /* Workspace */;\r\n this.label = label;\r\n this._isOpen = true;\r\n this._editStackElementsArr = editStackElements.slice(0);\r\n this._editStackElementsMap = new Map();\r\n for (const editStackElement of this._editStackElementsArr) {\r\n const key = uriGetComparisonKey(editStackElement.resource);\r\n this._editStackElementsMap.set(key, editStackElement);\r\n }\r\n this._delegate = null;\r\n }\r\n get resources() {\r\n return this._editStackElementsArr.map(editStackElement => editStackElement.resource);\r\n }\r\n prepareUndoRedo() {\r\n if (this._delegate) {\r\n return this._delegate.prepareUndoRedo(this);\r\n }\r\n }\r\n matchesResource(resource) {\r\n const key = uriGetComparisonKey(resource);\r\n return (this._editStackElementsMap.has(key));\r\n }\r\n setModel(model) {\r\n const key = uriGetComparisonKey(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(model) ? model : model.uri);\r\n if (this._editStackElementsMap.has(key)) {\r\n this._editStackElementsMap.get(key).setModel(model);\r\n }\r\n }\r\n canAppend(model) {\r\n if (!this._isOpen) {\r\n return false;\r\n }\r\n const key = uriGetComparisonKey(model.uri);\r\n if (this._editStackElementsMap.has(key)) {\r\n const editStackElement = this._editStackElementsMap.get(key);\r\n return editStackElement.canAppend(model);\r\n }\r\n return false;\r\n }\r\n append(model, textChanges, afterEOL, afterVersionId, afterCursorState) {\r\n const key = uriGetComparisonKey(model.uri);\r\n const editStackElement = this._editStackElementsMap.get(key);\r\n editStackElement.append(model, textChanges, afterEOL, afterVersionId, afterCursorState);\r\n }\r\n close() {\r\n this._isOpen = false;\r\n }\r\n open() {\r\n // cannot reopen\r\n }\r\n undo() {\r\n this._isOpen = false;\r\n for (const editStackElement of this._editStackElementsArr) {\r\n editStackElement.undo();\r\n }\r\n }\r\n redo() {\r\n for (const editStackElement of this._editStackElementsArr) {\r\n editStackElement.redo();\r\n }\r\n }\r\n heapSize(resource) {\r\n const key = uriGetComparisonKey(resource);\r\n if (this._editStackElementsMap.has(key)) {\r\n const editStackElement = this._editStackElementsMap.get(key);\r\n return editStackElement.heapSize();\r\n }\r\n return 0;\r\n }\r\n split() {\r\n return this._editStackElementsArr;\r\n }\r\n toString() {\r\n let result = [];\r\n for (const editStackElement of this._editStackElementsArr) {\r\n result.push(`${(0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__.basename)(editStackElement.resource)}: ${editStackElement}`);\r\n }\r\n return `{${result.join(', ')}}`;\r\n }\r\n}\r\nfunction getModelEOL(model) {\r\n const eol = model.getEOL();\r\n if (eol === '\\n') {\r\n return 0 /* LF */;\r\n }\r\n else {\r\n return 1 /* CRLF */;\r\n }\r\n}\r\nfunction isEditStackElement(element) {\r\n if (!element) {\r\n return false;\r\n }\r\n return ((element instanceof SingleModelEditStackElement) || (element instanceof MultiModelEditStackElement));\r\n}\r\nclass EditStack {\r\n constructor(model, undoRedoService) {\r\n this._model = model;\r\n this._undoRedoService = undoRedoService;\r\n }\r\n pushStackElement() {\r\n const lastElement = this._undoRedoService.getLastElement(this._model.uri);\r\n if (isEditStackElement(lastElement)) {\r\n lastElement.close();\r\n }\r\n }\r\n popStackElement() {\r\n const lastElement = this._undoRedoService.getLastElement(this._model.uri);\r\n if (isEditStackElement(lastElement)) {\r\n lastElement.open();\r\n }\r\n }\r\n clear() {\r\n this._undoRedoService.removeElements(this._model.uri);\r\n }\r\n _getOrCreateEditStackElement(beforeCursorState) {\r\n const lastElement = this._undoRedoService.getLastElement(this._model.uri);\r\n if (isEditStackElement(lastElement) && lastElement.canAppend(this._model)) {\r\n return lastElement;\r\n }\r\n const newElement = new SingleModelEditStackElement(this._model, beforeCursorState);\r\n this._undoRedoService.pushElement(newElement);\r\n return newElement;\r\n }\r\n pushEOL(eol) {\r\n const editStackElement = this._getOrCreateEditStackElement(null);\r\n this._model.setEOL(eol);\r\n editStackElement.append(this._model, [], getModelEOL(this._model), this._model.getAlternativeVersionId(), null);\r\n }\r\n pushEditOperation(beforeCursorState, editOperations, cursorStateComputer) {\r\n const editStackElement = this._getOrCreateEditStackElement(beforeCursorState);\r\n const inverseEditOperations = this._model.applyEdits(editOperations, true);\r\n const afterCursorState = EditStack._computeCursorState(cursorStateComputer, inverseEditOperations);\r\n const textChanges = inverseEditOperations.map((op, index) => ({ index: index, textChange: op.textChange }));\r\n textChanges.sort((a, b) => {\r\n if (a.textChange.oldPosition === b.textChange.oldPosition) {\r\n return a.index - b.index;\r\n }\r\n return a.textChange.oldPosition - b.textChange.oldPosition;\r\n });\r\n editStackElement.append(this._model, textChanges.map(op => op.textChange), getModelEOL(this._model), this._model.getAlternativeVersionId(), afterCursorState);\r\n return afterCursorState;\r\n }\r\n static _computeCursorState(cursorStateComputer, inverseEditOperations) {\r\n try {\r\n return cursorStateComputer ? cursorStateComputer(inverseEditOperations) : null;\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n return null;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"guessIndentation\": () => (/* binding */ guessIndentation)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass SpacesDiffResult {\r\n constructor() {\r\n this.spacesDiff = 0;\r\n this.looksLikeAlignment = false;\r\n }\r\n}\r\n/**\r\n * Compute the diff in spaces between two line's indentation.\r\n */\r\nfunction spacesDiff(a, aLength, b, bLength, result) {\r\n result.spacesDiff = 0;\r\n result.looksLikeAlignment = false;\r\n // This can go both ways (e.g.):\r\n // - a: \"\\t\"\r\n // - b: \"\\t \"\r\n // => This should count 1 tab and 4 spaces\r\n let i;\r\n for (i = 0; i < aLength && i < bLength; i++) {\r\n let aCharCode = a.charCodeAt(i);\r\n let bCharCode = b.charCodeAt(i);\r\n if (aCharCode !== bCharCode) {\r\n break;\r\n }\r\n }\r\n let aSpacesCnt = 0, aTabsCount = 0;\r\n for (let j = i; j < aLength; j++) {\r\n let aCharCode = a.charCodeAt(j);\r\n if (aCharCode === 32 /* Space */) {\r\n aSpacesCnt++;\r\n }\r\n else {\r\n aTabsCount++;\r\n }\r\n }\r\n let bSpacesCnt = 0, bTabsCount = 0;\r\n for (let j = i; j < bLength; j++) {\r\n let bCharCode = b.charCodeAt(j);\r\n if (bCharCode === 32 /* Space */) {\r\n bSpacesCnt++;\r\n }\r\n else {\r\n bTabsCount++;\r\n }\r\n }\r\n if (aSpacesCnt > 0 && aTabsCount > 0) {\r\n return;\r\n }\r\n if (bSpacesCnt > 0 && bTabsCount > 0) {\r\n return;\r\n }\r\n let tabsDiff = Math.abs(aTabsCount - bTabsCount);\r\n let spacesDiff = Math.abs(aSpacesCnt - bSpacesCnt);\r\n if (tabsDiff === 0) {\r\n // check if the indentation difference might be caused by alignment reasons\r\n // sometime folks like to align their code, but this should not be used as a hint\r\n result.spacesDiff = spacesDiff;\r\n if (spacesDiff > 0 && 0 <= bSpacesCnt - 1 && bSpacesCnt - 1 < a.length && bSpacesCnt < b.length) {\r\n if (b.charCodeAt(bSpacesCnt) !== 32 /* Space */ && a.charCodeAt(bSpacesCnt - 1) === 32 /* Space */) {\r\n if (a.charCodeAt(a.length - 1) === 44 /* Comma */) {\r\n // This looks like an alignment desire: e.g.\r\n // const a = b + c,\r\n // d = b - c;\r\n result.looksLikeAlignment = true;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n if (spacesDiff % tabsDiff === 0) {\r\n result.spacesDiff = spacesDiff / tabsDiff;\r\n return;\r\n }\r\n}\r\nfunction guessIndentation(source, defaultTabSize, defaultInsertSpaces) {\r\n // Look at most at the first 10k lines\r\n const linesCount = Math.min(source.getLineCount(), 10000);\r\n let linesIndentedWithTabsCount = 0; // number of lines that contain at least one tab in indentation\r\n let linesIndentedWithSpacesCount = 0; // number of lines that contain only spaces in indentation\r\n let previousLineText = ''; // content of latest line that contained non-whitespace chars\r\n let previousLineIndentation = 0; // index at which latest line contained the first non-whitespace char\r\n const ALLOWED_TAB_SIZE_GUESSES = [2, 4, 6, 8, 3, 5, 7]; // prefer even guesses for `tabSize`, limit to [2, 8].\r\n const MAX_ALLOWED_TAB_SIZE_GUESS = 8; // max(ALLOWED_TAB_SIZE_GUESSES) = 8\r\n let spacesDiffCount = [0, 0, 0, 0, 0, 0, 0, 0, 0]; // `tabSize` scores\r\n let tmp = new SpacesDiffResult();\r\n for (let lineNumber = 1; lineNumber <= linesCount; lineNumber++) {\r\n let currentLineLength = source.getLineLength(lineNumber);\r\n let currentLineText = source.getLineContent(lineNumber);\r\n // if the text buffer is chunk based, so long lines are cons-string, v8 will flattern the string when we check charCode.\r\n // checking charCode on chunks directly is cheaper.\r\n const useCurrentLineText = (currentLineLength <= 65536);\r\n let currentLineHasContent = false; // does `currentLineText` contain non-whitespace chars\r\n let currentLineIndentation = 0; // index at which `currentLineText` contains the first non-whitespace char\r\n let currentLineSpacesCount = 0; // count of spaces found in `currentLineText` indentation\r\n let currentLineTabsCount = 0; // count of tabs found in `currentLineText` indentation\r\n for (let j = 0, lenJ = currentLineLength; j < lenJ; j++) {\r\n let charCode = (useCurrentLineText ? currentLineText.charCodeAt(j) : source.getLineCharCode(lineNumber, j));\r\n if (charCode === 9 /* Tab */) {\r\n currentLineTabsCount++;\r\n }\r\n else if (charCode === 32 /* Space */) {\r\n currentLineSpacesCount++;\r\n }\r\n else {\r\n // Hit non whitespace character on this line\r\n currentLineHasContent = true;\r\n currentLineIndentation = j;\r\n break;\r\n }\r\n }\r\n // Ignore empty or only whitespace lines\r\n if (!currentLineHasContent) {\r\n continue;\r\n }\r\n if (currentLineTabsCount > 0) {\r\n linesIndentedWithTabsCount++;\r\n }\r\n else if (currentLineSpacesCount > 1) {\r\n linesIndentedWithSpacesCount++;\r\n }\r\n spacesDiff(previousLineText, previousLineIndentation, currentLineText, currentLineIndentation, tmp);\r\n if (tmp.looksLikeAlignment) {\r\n // if defaultInsertSpaces === true && the spaces count == tabSize, we may want to count it as valid indentation\r\n //\r\n // - item1\r\n // - item2\r\n //\r\n // otherwise skip this line entirely\r\n //\r\n // const a = 1,\r\n // b = 2;\r\n if (!(defaultInsertSpaces && defaultTabSize === tmp.spacesDiff)) {\r\n continue;\r\n }\r\n }\r\n let currentSpacesDiff = tmp.spacesDiff;\r\n if (currentSpacesDiff <= MAX_ALLOWED_TAB_SIZE_GUESS) {\r\n spacesDiffCount[currentSpacesDiff]++;\r\n }\r\n previousLineText = currentLineText;\r\n previousLineIndentation = currentLineIndentation;\r\n }\r\n let insertSpaces = defaultInsertSpaces;\r\n if (linesIndentedWithTabsCount !== linesIndentedWithSpacesCount) {\r\n insertSpaces = (linesIndentedWithTabsCount < linesIndentedWithSpacesCount);\r\n }\r\n let tabSize = defaultTabSize;\r\n // Guess tabSize only if inserting spaces...\r\n if (insertSpaces) {\r\n let tabSizeScore = (insertSpaces ? 0 : 0.1 * linesCount);\r\n // console.log(\"score threshold: \" + tabSizeScore);\r\n ALLOWED_TAB_SIZE_GUESSES.forEach((possibleTabSize) => {\r\n let possibleTabSizeScore = spacesDiffCount[possibleTabSize];\r\n if (possibleTabSizeScore > tabSizeScore) {\r\n tabSizeScore = possibleTabSizeScore;\r\n tabSize = possibleTabSize;\r\n }\r\n });\r\n // Let a tabSize of 2 win even if it is not the maximum\r\n // (only in case 4 was guessed)\r\n if (tabSize === 4 && spacesDiffCount[4] > 0 && spacesDiffCount[2] > 0 && spacesDiffCount[2] >= spacesDiffCount[4] / 2) {\r\n tabSize = 2;\r\n }\r\n }\r\n // console.log('--------------------------');\r\n // console.log('linesIndentedWithTabsCount: ' + linesIndentedWithTabsCount + ', linesIndentedWithSpacesCount: ' + linesIndentedWithSpacesCount);\r\n // console.log('spacesDiffCount: ' + spacesDiffCount);\r\n // console.log('tabSize: ' + tabSize + ', tabSizeScore: ' + tabSizeScore);\r\n return {\r\n insertSpaces: insertSpaces,\r\n tabSize: tabSize\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getNodeColor\": () => (/* binding */ getNodeColor),\n/* harmony export */ \"getNodeIsInOverviewRuler\": () => (/* binding */ getNodeIsInOverviewRuler),\n/* harmony export */ \"IntervalNode\": () => (/* binding */ IntervalNode),\n/* harmony export */ \"SENTINEL\": () => (/* binding */ SENTINEL),\n/* harmony export */ \"IntervalTree\": () => (/* binding */ IntervalTree),\n/* harmony export */ \"nodeAcceptEdit\": () => (/* binding */ nodeAcceptEdit),\n/* harmony export */ \"recomputeMaxEnd\": () => (/* binding */ recomputeMaxEnd),\n/* harmony export */ \"intervalCompare\": () => (/* binding */ intervalCompare)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction getNodeColor(node) {\r\n return ((node.metadata & 1 /* ColorMask */) >>> 0 /* ColorOffset */);\r\n}\r\nfunction setNodeColor(node, color) {\r\n node.metadata = ((node.metadata & 254 /* ColorMaskInverse */) | (color << 0 /* ColorOffset */));\r\n}\r\nfunction getNodeIsVisited(node) {\r\n return ((node.metadata & 2 /* IsVisitedMask */) >>> 1 /* IsVisitedOffset */) === 1;\r\n}\r\nfunction setNodeIsVisited(node, value) {\r\n node.metadata = ((node.metadata & 253 /* IsVisitedMaskInverse */) | ((value ? 1 : 0) << 1 /* IsVisitedOffset */));\r\n}\r\nfunction getNodeIsForValidation(node) {\r\n return ((node.metadata & 4 /* IsForValidationMask */) >>> 2 /* IsForValidationOffset */) === 1;\r\n}\r\nfunction setNodeIsForValidation(node, value) {\r\n node.metadata = ((node.metadata & 251 /* IsForValidationMaskInverse */) | ((value ? 1 : 0) << 2 /* IsForValidationOffset */));\r\n}\r\nfunction getNodeIsInOverviewRuler(node) {\r\n return ((node.metadata & 8 /* IsInOverviewRulerMask */) >>> 3 /* IsInOverviewRulerOffset */) === 1;\r\n}\r\nfunction setNodeIsInOverviewRuler(node, value) {\r\n node.metadata = ((node.metadata & 247 /* IsInOverviewRulerMaskInverse */) | ((value ? 1 : 0) << 3 /* IsInOverviewRulerOffset */));\r\n}\r\nfunction getNodeStickiness(node) {\r\n return ((node.metadata & 48 /* StickinessMask */) >>> 4 /* StickinessOffset */);\r\n}\r\nfunction _setNodeStickiness(node, stickiness) {\r\n node.metadata = ((node.metadata & 207 /* StickinessMaskInverse */) | (stickiness << 4 /* StickinessOffset */));\r\n}\r\nfunction getCollapseOnReplaceEdit(node) {\r\n return ((node.metadata & 64 /* CollapseOnReplaceEditMask */) >>> 6 /* CollapseOnReplaceEditOffset */) === 1;\r\n}\r\nfunction setCollapseOnReplaceEdit(node, value) {\r\n node.metadata = ((node.metadata & 191 /* CollapseOnReplaceEditMaskInverse */) | ((value ? 1 : 0) << 6 /* CollapseOnReplaceEditOffset */));\r\n}\r\nclass IntervalNode {\r\n constructor(id, start, end) {\r\n this.metadata = 0;\r\n this.parent = this;\r\n this.left = this;\r\n this.right = this;\r\n setNodeColor(this, 1 /* Red */);\r\n this.start = start;\r\n this.end = end;\r\n // FORCE_OVERFLOWING_TEST: this.delta = start;\r\n this.delta = 0;\r\n this.maxEnd = end;\r\n this.id = id;\r\n this.ownerId = 0;\r\n this.options = null;\r\n setNodeIsForValidation(this, false);\r\n _setNodeStickiness(this, 1 /* NeverGrowsWhenTypingAtEdges */);\r\n setNodeIsInOverviewRuler(this, false);\r\n setCollapseOnReplaceEdit(this, false);\r\n this.cachedVersionId = 0;\r\n this.cachedAbsoluteStart = start;\r\n this.cachedAbsoluteEnd = end;\r\n this.range = null;\r\n setNodeIsVisited(this, false);\r\n }\r\n reset(versionId, start, end, range) {\r\n this.start = start;\r\n this.end = end;\r\n this.maxEnd = end;\r\n this.cachedVersionId = versionId;\r\n this.cachedAbsoluteStart = start;\r\n this.cachedAbsoluteEnd = end;\r\n this.range = range;\r\n }\r\n setOptions(options) {\r\n this.options = options;\r\n let className = this.options.className;\r\n setNodeIsForValidation(this, (className === \"squiggly-error\" /* EditorErrorDecoration */\r\n || className === \"squiggly-warning\" /* EditorWarningDecoration */\r\n || className === \"squiggly-info\" /* EditorInfoDecoration */));\r\n _setNodeStickiness(this, this.options.stickiness);\r\n setNodeIsInOverviewRuler(this, (this.options.overviewRuler && this.options.overviewRuler.color) ? true : false);\r\n setCollapseOnReplaceEdit(this, this.options.collapseOnReplaceEdit);\r\n }\r\n setCachedOffsets(absoluteStart, absoluteEnd, cachedVersionId) {\r\n if (this.cachedVersionId !== cachedVersionId) {\r\n this.range = null;\r\n }\r\n this.cachedVersionId = cachedVersionId;\r\n this.cachedAbsoluteStart = absoluteStart;\r\n this.cachedAbsoluteEnd = absoluteEnd;\r\n }\r\n detach() {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n }\r\n}\r\nconst SENTINEL = new IntervalNode(null, 0, 0);\r\nSENTINEL.parent = SENTINEL;\r\nSENTINEL.left = SENTINEL;\r\nSENTINEL.right = SENTINEL;\r\nsetNodeColor(SENTINEL, 0 /* Black */);\r\nclass IntervalTree {\r\n constructor() {\r\n this.root = SENTINEL;\r\n this.requestNormalizeDelta = false;\r\n }\r\n intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId) {\r\n if (this.root === SENTINEL) {\r\n return [];\r\n }\r\n return intervalSearch(this, start, end, filterOwnerId, filterOutValidation, cachedVersionId);\r\n }\r\n search(filterOwnerId, filterOutValidation, cachedVersionId) {\r\n if (this.root === SENTINEL) {\r\n return [];\r\n }\r\n return search(this, filterOwnerId, filterOutValidation, cachedVersionId);\r\n }\r\n /**\r\n * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes!\r\n */\r\n collectNodesFromOwner(ownerId) {\r\n return collectNodesFromOwner(this, ownerId);\r\n }\r\n /**\r\n * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes!\r\n */\r\n collectNodesPostOrder() {\r\n return collectNodesPostOrder(this);\r\n }\r\n insert(node) {\r\n rbTreeInsert(this, node);\r\n this._normalizeDeltaIfNecessary();\r\n }\r\n delete(node) {\r\n rbTreeDelete(this, node);\r\n this._normalizeDeltaIfNecessary();\r\n }\r\n resolveNode(node, cachedVersionId) {\r\n const initialNode = node;\r\n let delta = 0;\r\n while (node !== this.root) {\r\n if (node === node.parent.right) {\r\n delta += node.parent.delta;\r\n }\r\n node = node.parent;\r\n }\r\n const nodeStart = initialNode.start + delta;\r\n const nodeEnd = initialNode.end + delta;\r\n initialNode.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\r\n }\r\n acceptReplace(offset, length, textLength, forceMoveMarkers) {\r\n // Our strategy is to remove all directly impacted nodes, and then add them back to the tree.\r\n // (1) collect all nodes that are intersecting this edit as nodes of interest\r\n const nodesOfInterest = searchForEditing(this, offset, offset + length);\r\n // (2) remove all nodes that are intersecting this edit\r\n for (let i = 0, len = nodesOfInterest.length; i < len; i++) {\r\n const node = nodesOfInterest[i];\r\n rbTreeDelete(this, node);\r\n }\r\n this._normalizeDeltaIfNecessary();\r\n // (3) edit all tree nodes except the nodes of interest\r\n noOverlapReplace(this, offset, offset + length, textLength);\r\n this._normalizeDeltaIfNecessary();\r\n // (4) edit the nodes of interest and insert them back in the tree\r\n for (let i = 0, len = nodesOfInterest.length; i < len; i++) {\r\n const node = nodesOfInterest[i];\r\n node.start = node.cachedAbsoluteStart;\r\n node.end = node.cachedAbsoluteEnd;\r\n nodeAcceptEdit(node, offset, (offset + length), textLength, forceMoveMarkers);\r\n node.maxEnd = node.end;\r\n rbTreeInsert(this, node);\r\n }\r\n this._normalizeDeltaIfNecessary();\r\n }\r\n _normalizeDeltaIfNecessary() {\r\n if (!this.requestNormalizeDelta) {\r\n return;\r\n }\r\n this.requestNormalizeDelta = false;\r\n normalizeDelta(this);\r\n }\r\n}\r\n//#region Delta Normalization\r\nfunction normalizeDelta(T) {\r\n let node = T.root;\r\n let delta = 0;\r\n while (node !== SENTINEL) {\r\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n delta += node.delta;\r\n node = node.right;\r\n continue;\r\n }\r\n // handle current node\r\n node.start = delta + node.start;\r\n node.end = delta + node.end;\r\n node.delta = 0;\r\n recomputeMaxEnd(node);\r\n setNodeIsVisited(node, true);\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n if (node === node.parent.right) {\r\n delta -= node.parent.delta;\r\n }\r\n node = node.parent;\r\n }\r\n setNodeIsVisited(T.root, false);\r\n}\r\nfunction adjustMarkerBeforeColumn(markerOffset, markerStickToPreviousCharacter, checkOffset, moveSemantics) {\r\n if (markerOffset < checkOffset) {\r\n return true;\r\n }\r\n if (markerOffset > checkOffset) {\r\n return false;\r\n }\r\n if (moveSemantics === 1 /* ForceMove */) {\r\n return false;\r\n }\r\n if (moveSemantics === 2 /* ForceStay */) {\r\n return true;\r\n }\r\n return markerStickToPreviousCharacter;\r\n}\r\n/**\r\n * This is a lot more complicated than strictly necessary to maintain the same behaviour\r\n * as when decorations were implemented using two markers.\r\n */\r\nfunction nodeAcceptEdit(node, start, end, textLength, forceMoveMarkers) {\r\n const nodeStickiness = getNodeStickiness(node);\r\n const startStickToPreviousCharacter = (nodeStickiness === 0 /* AlwaysGrowsWhenTypingAtEdges */\r\n || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */);\r\n const endStickToPreviousCharacter = (nodeStickiness === 1 /* NeverGrowsWhenTypingAtEdges */\r\n || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */);\r\n const deletingCnt = (end - start);\r\n const insertingCnt = textLength;\r\n const commonLength = Math.min(deletingCnt, insertingCnt);\r\n const nodeStart = node.start;\r\n let startDone = false;\r\n const nodeEnd = node.end;\r\n let endDone = false;\r\n if (start <= nodeStart && nodeEnd <= end && getCollapseOnReplaceEdit(node)) {\r\n // This edit encompasses the entire decoration range\r\n // and the decoration has asked to become collapsed\r\n node.start = start;\r\n startDone = true;\r\n node.end = start;\r\n endDone = true;\r\n }\r\n {\r\n const moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : (deletingCnt > 0 ? 2 /* ForceStay */ : 0 /* MarkerDefined */);\r\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start, moveSemantics)) {\r\n startDone = true;\r\n }\r\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start, moveSemantics)) {\r\n endDone = true;\r\n }\r\n }\r\n if (commonLength > 0 && !forceMoveMarkers) {\r\n const moveSemantics = (deletingCnt > insertingCnt ? 2 /* ForceStay */ : 0 /* MarkerDefined */);\r\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start + commonLength, moveSemantics)) {\r\n startDone = true;\r\n }\r\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start + commonLength, moveSemantics)) {\r\n endDone = true;\r\n }\r\n }\r\n {\r\n const moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : 0 /* MarkerDefined */;\r\n if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, end, moveSemantics)) {\r\n node.start = start + insertingCnt;\r\n startDone = true;\r\n }\r\n if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, end, moveSemantics)) {\r\n node.end = start + insertingCnt;\r\n endDone = true;\r\n }\r\n }\r\n // Finish\r\n const deltaColumn = (insertingCnt - deletingCnt);\r\n if (!startDone) {\r\n node.start = Math.max(0, nodeStart + deltaColumn);\r\n }\r\n if (!endDone) {\r\n node.end = Math.max(0, nodeEnd + deltaColumn);\r\n }\r\n if (node.start > node.end) {\r\n node.end = node.start;\r\n }\r\n}\r\nfunction searchForEditing(T, start, end) {\r\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\r\n // Now, it is known that two intervals A and B overlap only when both\r\n // A.low <= B.high and A.high >= B.low. When searching the trees for\r\n // nodes overlapping with a given interval, you can immediately skip:\r\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\r\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\r\n let node = T.root;\r\n let delta = 0;\r\n let nodeMaxEnd = 0;\r\n let nodeStart = 0;\r\n let nodeEnd = 0;\r\n let result = [];\r\n let resultLen = 0;\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n if (node === node.parent.right) {\r\n delta -= node.parent.delta;\r\n }\r\n node = node.parent;\r\n continue;\r\n }\r\n if (!getNodeIsVisited(node.left)) {\r\n // first time seeing this node\r\n nodeMaxEnd = delta + node.maxEnd;\r\n if (nodeMaxEnd < start) {\r\n // cover case b) from above\r\n // there is no need to search this node or its children\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n if (node.left !== SENTINEL) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n }\r\n // handle current node\r\n nodeStart = delta + node.start;\r\n if (nodeStart > end) {\r\n // cover case a) from above\r\n // there is no need to search this node or its right subtree\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n nodeEnd = delta + node.end;\r\n if (nodeEnd >= start) {\r\n node.setCachedOffsets(nodeStart, nodeEnd, 0);\r\n result[resultLen++] = node;\r\n }\r\n setNodeIsVisited(node, true);\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n delta += node.delta;\r\n node = node.right;\r\n continue;\r\n }\r\n }\r\n setNodeIsVisited(T.root, false);\r\n return result;\r\n}\r\nfunction noOverlapReplace(T, start, end, textLength) {\r\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\r\n // Now, it is known that two intervals A and B overlap only when both\r\n // A.low <= B.high and A.high >= B.low. When searching the trees for\r\n // nodes overlapping with a given interval, you can immediately skip:\r\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\r\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\r\n let node = T.root;\r\n let delta = 0;\r\n let nodeMaxEnd = 0;\r\n let nodeStart = 0;\r\n const editDelta = (textLength - (end - start));\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n if (node === node.parent.right) {\r\n delta -= node.parent.delta;\r\n }\r\n recomputeMaxEnd(node);\r\n node = node.parent;\r\n continue;\r\n }\r\n if (!getNodeIsVisited(node.left)) {\r\n // first time seeing this node\r\n nodeMaxEnd = delta + node.maxEnd;\r\n if (nodeMaxEnd < start) {\r\n // cover case b) from above\r\n // there is no need to search this node or its children\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n if (node.left !== SENTINEL) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n }\r\n // handle current node\r\n nodeStart = delta + node.start;\r\n if (nodeStart > end) {\r\n node.start += editDelta;\r\n node.end += editDelta;\r\n node.delta += editDelta;\r\n if (node.delta < -1073741824 /* MIN_SAFE_DELTA */ || node.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n // cover case a) from above\r\n // there is no need to search this node or its right subtree\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n setNodeIsVisited(node, true);\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n delta += node.delta;\r\n node = node.right;\r\n continue;\r\n }\r\n }\r\n setNodeIsVisited(T.root, false);\r\n}\r\n//#endregion\r\n//#region Searching\r\nfunction collectNodesFromOwner(T, ownerId) {\r\n let node = T.root;\r\n let result = [];\r\n let resultLen = 0;\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n node = node.parent;\r\n continue;\r\n }\r\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n // handle current node\r\n if (node.ownerId === ownerId) {\r\n result[resultLen++] = node;\r\n }\r\n setNodeIsVisited(node, true);\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n node = node.right;\r\n continue;\r\n }\r\n }\r\n setNodeIsVisited(T.root, false);\r\n return result;\r\n}\r\nfunction collectNodesPostOrder(T) {\r\n let node = T.root;\r\n let result = [];\r\n let resultLen = 0;\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n node = node.parent;\r\n continue;\r\n }\r\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n node = node.right;\r\n continue;\r\n }\r\n // handle current node\r\n result[resultLen++] = node;\r\n setNodeIsVisited(node, true);\r\n }\r\n setNodeIsVisited(T.root, false);\r\n return result;\r\n}\r\nfunction search(T, filterOwnerId, filterOutValidation, cachedVersionId) {\r\n let node = T.root;\r\n let delta = 0;\r\n let nodeStart = 0;\r\n let nodeEnd = 0;\r\n let result = [];\r\n let resultLen = 0;\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n if (node === node.parent.right) {\r\n delta -= node.parent.delta;\r\n }\r\n node = node.parent;\r\n continue;\r\n }\r\n if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n // handle current node\r\n nodeStart = delta + node.start;\r\n nodeEnd = delta + node.end;\r\n node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\r\n let include = true;\r\n if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) {\r\n include = false;\r\n }\r\n if (filterOutValidation && getNodeIsForValidation(node)) {\r\n include = false;\r\n }\r\n if (include) {\r\n result[resultLen++] = node;\r\n }\r\n setNodeIsVisited(node, true);\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n delta += node.delta;\r\n node = node.right;\r\n continue;\r\n }\r\n }\r\n setNodeIsVisited(T.root, false);\r\n return result;\r\n}\r\nfunction intervalSearch(T, intervalStart, intervalEnd, filterOwnerId, filterOutValidation, cachedVersionId) {\r\n // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree\r\n // Now, it is known that two intervals A and B overlap only when both\r\n // A.low <= B.high and A.high >= B.low. When searching the trees for\r\n // nodes overlapping with a given interval, you can immediately skip:\r\n // a) all nodes to the right of nodes whose low value is past the end of the given interval.\r\n // b) all nodes that have their maximum 'high' value below the start of the given interval.\r\n let node = T.root;\r\n let delta = 0;\r\n let nodeMaxEnd = 0;\r\n let nodeStart = 0;\r\n let nodeEnd = 0;\r\n let result = [];\r\n let resultLen = 0;\r\n while (node !== SENTINEL) {\r\n if (getNodeIsVisited(node)) {\r\n // going up from this node\r\n setNodeIsVisited(node.left, false);\r\n setNodeIsVisited(node.right, false);\r\n if (node === node.parent.right) {\r\n delta -= node.parent.delta;\r\n }\r\n node = node.parent;\r\n continue;\r\n }\r\n if (!getNodeIsVisited(node.left)) {\r\n // first time seeing this node\r\n nodeMaxEnd = delta + node.maxEnd;\r\n if (nodeMaxEnd < intervalStart) {\r\n // cover case b) from above\r\n // there is no need to search this node or its children\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n if (node.left !== SENTINEL) {\r\n // go left\r\n node = node.left;\r\n continue;\r\n }\r\n }\r\n // handle current node\r\n nodeStart = delta + node.start;\r\n if (nodeStart > intervalEnd) {\r\n // cover case a) from above\r\n // there is no need to search this node or its right subtree\r\n setNodeIsVisited(node, true);\r\n continue;\r\n }\r\n nodeEnd = delta + node.end;\r\n if (nodeEnd >= intervalStart) {\r\n // There is overlap\r\n node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId);\r\n let include = true;\r\n if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) {\r\n include = false;\r\n }\r\n if (filterOutValidation && getNodeIsForValidation(node)) {\r\n include = false;\r\n }\r\n if (include) {\r\n result[resultLen++] = node;\r\n }\r\n }\r\n setNodeIsVisited(node, true);\r\n if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) {\r\n // go right\r\n delta += node.delta;\r\n node = node.right;\r\n continue;\r\n }\r\n }\r\n setNodeIsVisited(T.root, false);\r\n return result;\r\n}\r\n//#endregion\r\n//#region Insertion\r\nfunction rbTreeInsert(T, newNode) {\r\n if (T.root === SENTINEL) {\r\n newNode.parent = SENTINEL;\r\n newNode.left = SENTINEL;\r\n newNode.right = SENTINEL;\r\n setNodeColor(newNode, 0 /* Black */);\r\n T.root = newNode;\r\n return T.root;\r\n }\r\n treeInsert(T, newNode);\r\n recomputeMaxEndWalkToRoot(newNode.parent);\r\n // repair tree\r\n let x = newNode;\r\n while (x !== T.root && getNodeColor(x.parent) === 1 /* Red */) {\r\n if (x.parent === x.parent.parent.left) {\r\n const y = x.parent.parent.right;\r\n if (getNodeColor(y) === 1 /* Red */) {\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(y, 0 /* Black */);\r\n setNodeColor(x.parent.parent, 1 /* Red */);\r\n x = x.parent.parent;\r\n }\r\n else {\r\n if (x === x.parent.right) {\r\n x = x.parent;\r\n leftRotate(T, x);\r\n }\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(x.parent.parent, 1 /* Red */);\r\n rightRotate(T, x.parent.parent);\r\n }\r\n }\r\n else {\r\n const y = x.parent.parent.left;\r\n if (getNodeColor(y) === 1 /* Red */) {\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(y, 0 /* Black */);\r\n setNodeColor(x.parent.parent, 1 /* Red */);\r\n x = x.parent.parent;\r\n }\r\n else {\r\n if (x === x.parent.left) {\r\n x = x.parent;\r\n rightRotate(T, x);\r\n }\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(x.parent.parent, 1 /* Red */);\r\n leftRotate(T, x.parent.parent);\r\n }\r\n }\r\n }\r\n setNodeColor(T.root, 0 /* Black */);\r\n return newNode;\r\n}\r\nfunction treeInsert(T, z) {\r\n let delta = 0;\r\n let x = T.root;\r\n const zAbsoluteStart = z.start;\r\n const zAbsoluteEnd = z.end;\r\n while (true) {\r\n const cmp = intervalCompare(zAbsoluteStart, zAbsoluteEnd, x.start + delta, x.end + delta);\r\n if (cmp < 0) {\r\n // this node should be inserted to the left\r\n // => it is not affected by the node's delta\r\n if (x.left === SENTINEL) {\r\n z.start -= delta;\r\n z.end -= delta;\r\n z.maxEnd -= delta;\r\n x.left = z;\r\n break;\r\n }\r\n else {\r\n x = x.left;\r\n }\r\n }\r\n else {\r\n // this node should be inserted to the right\r\n // => it is not affected by the node's delta\r\n if (x.right === SENTINEL) {\r\n z.start -= (delta + x.delta);\r\n z.end -= (delta + x.delta);\r\n z.maxEnd -= (delta + x.delta);\r\n x.right = z;\r\n break;\r\n }\r\n else {\r\n delta += x.delta;\r\n x = x.right;\r\n }\r\n }\r\n }\r\n z.parent = x;\r\n z.left = SENTINEL;\r\n z.right = SENTINEL;\r\n setNodeColor(z, 1 /* Red */);\r\n}\r\n//#endregion\r\n//#region Deletion\r\nfunction rbTreeDelete(T, z) {\r\n let x;\r\n let y;\r\n // RB-DELETE except we don't swap z and y in case c)\r\n // i.e. we always delete what's pointed at by z.\r\n if (z.left === SENTINEL) {\r\n x = z.right;\r\n y = z;\r\n // x's delta is no longer influenced by z's delta\r\n x.delta += z.delta;\r\n if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n x.start += z.delta;\r\n x.end += z.delta;\r\n }\r\n else if (z.right === SENTINEL) {\r\n x = z.left;\r\n y = z;\r\n }\r\n else {\r\n y = leftest(z.right);\r\n x = y.right;\r\n // y's delta is no longer influenced by z's delta,\r\n // but we don't want to walk the entire right-hand-side subtree of x.\r\n // we therefore maintain z's delta in y, and adjust only x\r\n x.start += y.delta;\r\n x.end += y.delta;\r\n x.delta += y.delta;\r\n if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n y.start += z.delta;\r\n y.end += z.delta;\r\n y.delta = z.delta;\r\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n }\r\n if (y === T.root) {\r\n T.root = x;\r\n setNodeColor(x, 0 /* Black */);\r\n z.detach();\r\n resetSentinel();\r\n recomputeMaxEnd(x);\r\n T.root.parent = SENTINEL;\r\n return;\r\n }\r\n let yWasRed = (getNodeColor(y) === 1 /* Red */);\r\n if (y === y.parent.left) {\r\n y.parent.left = x;\r\n }\r\n else {\r\n y.parent.right = x;\r\n }\r\n if (y === z) {\r\n x.parent = y.parent;\r\n }\r\n else {\r\n if (y.parent === z) {\r\n x.parent = y;\r\n }\r\n else {\r\n x.parent = y.parent;\r\n }\r\n y.left = z.left;\r\n y.right = z.right;\r\n y.parent = z.parent;\r\n setNodeColor(y, getNodeColor(z));\r\n if (z === T.root) {\r\n T.root = y;\r\n }\r\n else {\r\n if (z === z.parent.left) {\r\n z.parent.left = y;\r\n }\r\n else {\r\n z.parent.right = y;\r\n }\r\n }\r\n if (y.left !== SENTINEL) {\r\n y.left.parent = y;\r\n }\r\n if (y.right !== SENTINEL) {\r\n y.right.parent = y;\r\n }\r\n }\r\n z.detach();\r\n if (yWasRed) {\r\n recomputeMaxEndWalkToRoot(x.parent);\r\n if (y !== z) {\r\n recomputeMaxEndWalkToRoot(y);\r\n recomputeMaxEndWalkToRoot(y.parent);\r\n }\r\n resetSentinel();\r\n return;\r\n }\r\n recomputeMaxEndWalkToRoot(x);\r\n recomputeMaxEndWalkToRoot(x.parent);\r\n if (y !== z) {\r\n recomputeMaxEndWalkToRoot(y);\r\n recomputeMaxEndWalkToRoot(y.parent);\r\n }\r\n // RB-DELETE-FIXUP\r\n let w;\r\n while (x !== T.root && getNodeColor(x) === 0 /* Black */) {\r\n if (x === x.parent.left) {\r\n w = x.parent.right;\r\n if (getNodeColor(w) === 1 /* Red */) {\r\n setNodeColor(w, 0 /* Black */);\r\n setNodeColor(x.parent, 1 /* Red */);\r\n leftRotate(T, x.parent);\r\n w = x.parent.right;\r\n }\r\n if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) {\r\n setNodeColor(w, 1 /* Red */);\r\n x = x.parent;\r\n }\r\n else {\r\n if (getNodeColor(w.right) === 0 /* Black */) {\r\n setNodeColor(w.left, 0 /* Black */);\r\n setNodeColor(w, 1 /* Red */);\r\n rightRotate(T, w);\r\n w = x.parent.right;\r\n }\r\n setNodeColor(w, getNodeColor(x.parent));\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(w.right, 0 /* Black */);\r\n leftRotate(T, x.parent);\r\n x = T.root;\r\n }\r\n }\r\n else {\r\n w = x.parent.left;\r\n if (getNodeColor(w) === 1 /* Red */) {\r\n setNodeColor(w, 0 /* Black */);\r\n setNodeColor(x.parent, 1 /* Red */);\r\n rightRotate(T, x.parent);\r\n w = x.parent.left;\r\n }\r\n if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) {\r\n setNodeColor(w, 1 /* Red */);\r\n x = x.parent;\r\n }\r\n else {\r\n if (getNodeColor(w.left) === 0 /* Black */) {\r\n setNodeColor(w.right, 0 /* Black */);\r\n setNodeColor(w, 1 /* Red */);\r\n leftRotate(T, w);\r\n w = x.parent.left;\r\n }\r\n setNodeColor(w, getNodeColor(x.parent));\r\n setNodeColor(x.parent, 0 /* Black */);\r\n setNodeColor(w.left, 0 /* Black */);\r\n rightRotate(T, x.parent);\r\n x = T.root;\r\n }\r\n }\r\n }\r\n setNodeColor(x, 0 /* Black */);\r\n resetSentinel();\r\n}\r\nfunction leftest(node) {\r\n while (node.left !== SENTINEL) {\r\n node = node.left;\r\n }\r\n return node;\r\n}\r\nfunction resetSentinel() {\r\n SENTINEL.parent = SENTINEL;\r\n SENTINEL.delta = 0; // optional\r\n SENTINEL.start = 0; // optional\r\n SENTINEL.end = 0; // optional\r\n}\r\n//#endregion\r\n//#region Rotations\r\nfunction leftRotate(T, x) {\r\n const y = x.right; // set y.\r\n y.delta += x.delta; // y's delta is no longer influenced by x's delta\r\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n y.start += x.delta;\r\n y.end += x.delta;\r\n x.right = y.left; // turn y's left subtree into x's right subtree.\r\n if (y.left !== SENTINEL) {\r\n y.left.parent = x;\r\n }\r\n y.parent = x.parent; // link x's parent to y.\r\n if (x.parent === SENTINEL) {\r\n T.root = y;\r\n }\r\n else if (x === x.parent.left) {\r\n x.parent.left = y;\r\n }\r\n else {\r\n x.parent.right = y;\r\n }\r\n y.left = x; // put x on y's left.\r\n x.parent = y;\r\n recomputeMaxEnd(x);\r\n recomputeMaxEnd(y);\r\n}\r\nfunction rightRotate(T, y) {\r\n const x = y.left;\r\n y.delta -= x.delta;\r\n if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) {\r\n T.requestNormalizeDelta = true;\r\n }\r\n y.start -= x.delta;\r\n y.end -= x.delta;\r\n y.left = x.right;\r\n if (x.right !== SENTINEL) {\r\n x.right.parent = y;\r\n }\r\n x.parent = y.parent;\r\n if (y.parent === SENTINEL) {\r\n T.root = x;\r\n }\r\n else if (y === y.parent.right) {\r\n y.parent.right = x;\r\n }\r\n else {\r\n y.parent.left = x;\r\n }\r\n x.right = y;\r\n y.parent = x;\r\n recomputeMaxEnd(y);\r\n recomputeMaxEnd(x);\r\n}\r\n//#endregion\r\n//#region max end computation\r\nfunction computeMaxEnd(node) {\r\n let maxEnd = node.end;\r\n if (node.left !== SENTINEL) {\r\n const leftMaxEnd = node.left.maxEnd;\r\n if (leftMaxEnd > maxEnd) {\r\n maxEnd = leftMaxEnd;\r\n }\r\n }\r\n if (node.right !== SENTINEL) {\r\n const rightMaxEnd = node.right.maxEnd + node.delta;\r\n if (rightMaxEnd > maxEnd) {\r\n maxEnd = rightMaxEnd;\r\n }\r\n }\r\n return maxEnd;\r\n}\r\nfunction recomputeMaxEnd(node) {\r\n node.maxEnd = computeMaxEnd(node);\r\n}\r\nfunction recomputeMaxEndWalkToRoot(node) {\r\n while (node !== SENTINEL) {\r\n const maxEnd = computeMaxEnd(node);\r\n if (node.maxEnd === maxEnd) {\r\n // no need to go further\r\n return;\r\n }\r\n node.maxEnd = maxEnd;\r\n node = node.parent;\r\n }\r\n}\r\n//#endregion\r\n//#region utils\r\nfunction intervalCompare(aStart, aEnd, bStart, bEnd) {\r\n if (aStart === bStart) {\r\n return aEnd - bEnd;\r\n }\r\n return aStart - bStart;\r\n}\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MirrorTextModel\": () => (/* binding */ MirrorTextModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _viewModel_prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../viewModel/prefixSumComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass MirrorTextModel {\r\n constructor(uri, lines, eol, versionId) {\r\n this._uri = uri;\r\n this._lines = lines;\r\n this._eol = eol;\r\n this._versionId = versionId;\r\n this._lineStarts = null;\r\n this._cachedTextValue = null;\r\n }\r\n dispose() {\r\n this._lines.length = 0;\r\n }\r\n getText() {\r\n if (this._cachedTextValue === null) {\r\n this._cachedTextValue = this._lines.join(this._eol);\r\n }\r\n return this._cachedTextValue;\r\n }\r\n onEvents(e) {\r\n if (e.eol && e.eol !== this._eol) {\r\n this._eol = e.eol;\r\n this._lineStarts = null;\r\n }\r\n // Update my lines\r\n const changes = e.changes;\r\n for (const change of changes) {\r\n this._acceptDeleteRange(change.range);\r\n this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(change.range.startLineNumber, change.range.startColumn), change.text);\r\n }\r\n this._versionId = e.versionId;\r\n this._cachedTextValue = null;\r\n }\r\n _ensureLineStarts() {\r\n if (!this._lineStarts) {\r\n const eolLength = this._eol.length;\r\n const linesLength = this._lines.length;\r\n const lineStartValues = new Uint32Array(linesLength);\r\n for (let i = 0; i < linesLength; i++) {\r\n lineStartValues[i] = this._lines[i].length + eolLength;\r\n }\r\n this._lineStarts = new _viewModel_prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_2__.PrefixSumComputer(lineStartValues);\r\n }\r\n }\r\n /**\r\n * All changes to a line's text go through this method\r\n */\r\n _setLineText(lineIndex, newValue) {\r\n this._lines[lineIndex] = newValue;\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.changeValue(lineIndex, this._lines[lineIndex].length + this._eol.length);\r\n }\r\n }\r\n _acceptDeleteRange(range) {\r\n if (range.startLineNumber === range.endLineNumber) {\r\n if (range.startColumn === range.endColumn) {\r\n // Nothing to delete\r\n return;\r\n }\r\n // Delete text on the affected line\r\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\r\n + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1));\r\n return;\r\n }\r\n // Take remaining text on last line and append it to remaining text on first line\r\n this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1)\r\n + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1));\r\n // Delete middle lines\r\n this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n }\r\n }\r\n _acceptInsertText(position, insertText) {\r\n if (insertText.length === 0) {\r\n // Nothing to insert\r\n return;\r\n }\r\n let insertLines = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.splitLines)(insertText);\r\n if (insertLines.length === 1) {\r\n // Inserting text on one line\r\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\r\n + insertLines[0]\r\n + this._lines[position.lineNumber - 1].substring(position.column - 1));\r\n return;\r\n }\r\n // Append overflowing text from first line to the end of text to insert\r\n insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1);\r\n // Delete overflowing text from first line and insert text on first line\r\n this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1)\r\n + insertLines[0]);\r\n // Insert new lines & store lengths\r\n let newLengths = new Uint32Array(insertLines.length - 1);\r\n for (let i = 1; i < insertLines.length; i++) {\r\n this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]);\r\n newLengths[i - 1] = insertLines[i].length + this._eol.length;\r\n }\r\n if (this._lineStarts) {\r\n // update prefix sum\r\n this._lineStarts.insertValues(position.lineNumber, newLengths);\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js":
|
||
/*!****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js ***!
|
||
\****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AverageBufferSize\": () => (/* binding */ AverageBufferSize),\n/* harmony export */ \"createUintArray\": () => (/* binding */ createUintArray),\n/* harmony export */ \"LineStarts\": () => (/* binding */ LineStarts),\n/* harmony export */ \"createLineStartsFast\": () => (/* binding */ createLineStartsFast),\n/* harmony export */ \"createLineStarts\": () => (/* binding */ createLineStarts),\n/* harmony export */ \"Piece\": () => (/* binding */ Piece),\n/* harmony export */ \"StringBuffer\": () => (/* binding */ StringBuffer),\n/* harmony export */ \"PieceTreeBase\": () => (/* binding */ PieceTreeBase)\n/* harmony export */ });\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rbTreeBase.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js\");\n/* harmony import */ var _textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../textModelSearch.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n// const lfRegex = new RegExp(/\\r\\n|\\r|\\n/g);\r\nconst AverageBufferSize = 65535;\r\nfunction createUintArray(arr) {\r\n let r;\r\n if (arr[arr.length - 1] < 65536) {\r\n r = new Uint16Array(arr.length);\r\n }\r\n else {\r\n r = new Uint32Array(arr.length);\r\n }\r\n r.set(arr, 0);\r\n return r;\r\n}\r\nclass LineStarts {\r\n constructor(lineStarts, cr, lf, crlf, isBasicASCII) {\r\n this.lineStarts = lineStarts;\r\n this.cr = cr;\r\n this.lf = lf;\r\n this.crlf = crlf;\r\n this.isBasicASCII = isBasicASCII;\r\n }\r\n}\r\nfunction createLineStartsFast(str, readonly = true) {\r\n let r = [0], rLength = 1;\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n const chr = str.charCodeAt(i);\r\n if (chr === 13 /* CarriageReturn */) {\r\n if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {\r\n // \\r\\n... case\r\n r[rLength++] = i + 2;\r\n i++; // skip \\n\r\n }\r\n else {\r\n // \\r... case\r\n r[rLength++] = i + 1;\r\n }\r\n }\r\n else if (chr === 10 /* LineFeed */) {\r\n r[rLength++] = i + 1;\r\n }\r\n }\r\n if (readonly) {\r\n return createUintArray(r);\r\n }\r\n else {\r\n return r;\r\n }\r\n}\r\nfunction createLineStarts(r, str) {\r\n r.length = 0;\r\n r[0] = 0;\r\n let rLength = 1;\r\n let cr = 0, lf = 0, crlf = 0;\r\n let isBasicASCII = true;\r\n for (let i = 0, len = str.length; i < len; i++) {\r\n const chr = str.charCodeAt(i);\r\n if (chr === 13 /* CarriageReturn */) {\r\n if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {\r\n // \\r\\n... case\r\n crlf++;\r\n r[rLength++] = i + 2;\r\n i++; // skip \\n\r\n }\r\n else {\r\n cr++;\r\n // \\r... case\r\n r[rLength++] = i + 1;\r\n }\r\n }\r\n else if (chr === 10 /* LineFeed */) {\r\n lf++;\r\n r[rLength++] = i + 1;\r\n }\r\n else {\r\n if (isBasicASCII) {\r\n if (chr !== 9 /* Tab */ && (chr < 32 || chr > 126)) {\r\n isBasicASCII = false;\r\n }\r\n }\r\n }\r\n }\r\n const result = new LineStarts(createUintArray(r), cr, lf, crlf, isBasicASCII);\r\n r.length = 0;\r\n return result;\r\n}\r\nclass Piece {\r\n constructor(bufferIndex, start, end, lineFeedCnt, length) {\r\n this.bufferIndex = bufferIndex;\r\n this.start = start;\r\n this.end = end;\r\n this.lineFeedCnt = lineFeedCnt;\r\n this.length = length;\r\n }\r\n}\r\nclass StringBuffer {\r\n constructor(buffer, lineStarts) {\r\n this.buffer = buffer;\r\n this.lineStarts = lineStarts;\r\n }\r\n}\r\n/**\r\n * Readonly snapshot for piece tree.\r\n * In a real multiple thread environment, to make snapshot reading always work correctly, we need to\r\n * 1. Make TreeNode.piece immutable, then reading and writing can run in parallel.\r\n * 2. TreeNode/Buffers normalization should not happen during snapshot reading.\r\n */\r\nclass PieceTreeSnapshot {\r\n constructor(tree, BOM) {\r\n this._pieces = [];\r\n this._tree = tree;\r\n this._BOM = BOM;\r\n this._index = 0;\r\n if (tree.root !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n tree.iterate(tree.root, node => {\r\n if (node !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n this._pieces.push(node.piece);\r\n }\r\n return true;\r\n });\r\n }\r\n }\r\n read() {\r\n if (this._pieces.length === 0) {\r\n if (this._index === 0) {\r\n this._index++;\r\n return this._BOM;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n if (this._index > this._pieces.length - 1) {\r\n return null;\r\n }\r\n if (this._index === 0) {\r\n return this._BOM + this._tree.getPieceContent(this._pieces[this._index++]);\r\n }\r\n return this._tree.getPieceContent(this._pieces[this._index++]);\r\n }\r\n}\r\nclass PieceTreeSearchCache {\r\n constructor(limit) {\r\n this._limit = limit;\r\n this._cache = [];\r\n }\r\n get(offset) {\r\n for (let i = this._cache.length - 1; i >= 0; i--) {\r\n let nodePos = this._cache[i];\r\n if (nodePos.nodeStartOffset <= offset && nodePos.nodeStartOffset + nodePos.node.piece.length >= offset) {\r\n return nodePos;\r\n }\r\n }\r\n return null;\r\n }\r\n get2(lineNumber) {\r\n for (let i = this._cache.length - 1; i >= 0; i--) {\r\n let nodePos = this._cache[i];\r\n if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) {\r\n return nodePos;\r\n }\r\n }\r\n return null;\r\n }\r\n set(nodePosition) {\r\n if (this._cache.length >= this._limit) {\r\n this._cache.shift();\r\n }\r\n this._cache.push(nodePosition);\r\n }\r\n validate(offset) {\r\n let hasInvalidVal = false;\r\n let tmp = this._cache;\r\n for (let i = 0; i < tmp.length; i++) {\r\n let nodePos = tmp[i];\r\n if (nodePos.node.parent === null || nodePos.nodeStartOffset >= offset) {\r\n tmp[i] = null;\r\n hasInvalidVal = true;\r\n continue;\r\n }\r\n }\r\n if (hasInvalidVal) {\r\n let newArr = [];\r\n for (const entry of tmp) {\r\n if (entry !== null) {\r\n newArr.push(entry);\r\n }\r\n }\r\n this._cache = newArr;\r\n }\r\n }\r\n}\r\nclass PieceTreeBase {\r\n constructor(chunks, eol, eolNormalized) {\r\n this.create(chunks, eol, eolNormalized);\r\n }\r\n create(chunks, eol, eolNormalized) {\r\n this._buffers = [\r\n new StringBuffer('', [0])\r\n ];\r\n this._lastChangeBufferPos = { line: 0, column: 0 };\r\n this.root = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n this._lineCnt = 1;\r\n this._length = 0;\r\n this._EOL = eol;\r\n this._EOLLength = eol.length;\r\n this._EOLNormalized = eolNormalized;\r\n let lastNode = null;\r\n for (let i = 0, len = chunks.length; i < len; i++) {\r\n if (chunks[i].buffer.length > 0) {\r\n if (!chunks[i].lineStarts) {\r\n chunks[i].lineStarts = createLineStartsFast(chunks[i].buffer);\r\n }\r\n let piece = new Piece(i + 1, { line: 0, column: 0 }, { line: chunks[i].lineStarts.length - 1, column: chunks[i].buffer.length - chunks[i].lineStarts[chunks[i].lineStarts.length - 1] }, chunks[i].lineStarts.length - 1, chunks[i].buffer.length);\r\n this._buffers.push(chunks[i]);\r\n lastNode = this.rbInsertRight(lastNode, piece);\r\n }\r\n }\r\n this._searchCache = new PieceTreeSearchCache(1);\r\n this._lastVisitedLine = { lineNumber: 0, value: '' };\r\n this.computeBufferMetadata();\r\n }\r\n normalizeEOL(eol) {\r\n let averageBufferSize = AverageBufferSize;\r\n let min = averageBufferSize - Math.floor(averageBufferSize / 3);\r\n let max = min * 2;\r\n let tempChunk = '';\r\n let tempChunkLen = 0;\r\n let chunks = [];\r\n this.iterate(this.root, node => {\r\n let str = this.getNodeContent(node);\r\n let len = str.length;\r\n if (tempChunkLen <= min || tempChunkLen + len < max) {\r\n tempChunk += str;\r\n tempChunkLen += len;\r\n return true;\r\n }\r\n // flush anyways\r\n let text = tempChunk.replace(/\\r\\n|\\r|\\n/g, eol);\r\n chunks.push(new StringBuffer(text, createLineStartsFast(text)));\r\n tempChunk = str;\r\n tempChunkLen = len;\r\n return true;\r\n });\r\n if (tempChunkLen > 0) {\r\n let text = tempChunk.replace(/\\r\\n|\\r|\\n/g, eol);\r\n chunks.push(new StringBuffer(text, createLineStartsFast(text)));\r\n }\r\n this.create(chunks, eol, true);\r\n }\r\n // #region Buffer API\r\n getEOL() {\r\n return this._EOL;\r\n }\r\n setEOL(newEOL) {\r\n this._EOL = newEOL;\r\n this._EOLLength = this._EOL.length;\r\n this.normalizeEOL(newEOL);\r\n }\r\n createSnapshot(BOM) {\r\n return new PieceTreeSnapshot(this, BOM);\r\n }\r\n getOffsetAt(lineNumber, column) {\r\n let leftLen = 0; // inorder\r\n let x = this.root;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL && x.lf_left + 1 >= lineNumber) {\r\n x = x.left;\r\n }\r\n else if (x.lf_left + x.piece.lineFeedCnt + 1 >= lineNumber) {\r\n leftLen += x.size_left;\r\n // lineNumber >= 2\r\n let accumualtedValInCurrentIndex = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\r\n return leftLen += accumualtedValInCurrentIndex + column - 1;\r\n }\r\n else {\r\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\r\n leftLen += x.size_left + x.piece.length;\r\n x = x.right;\r\n }\r\n }\r\n return leftLen;\r\n }\r\n getPositionAt(offset) {\r\n offset = Math.floor(offset);\r\n offset = Math.max(0, offset);\r\n let x = this.root;\r\n let lfCnt = 0;\r\n let originalOffset = offset;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.size_left !== 0 && x.size_left >= offset) {\r\n x = x.left;\r\n }\r\n else if (x.size_left + x.piece.length >= offset) {\r\n let out = this.getIndexOf(x, offset - x.size_left);\r\n lfCnt += x.lf_left + out.index;\r\n if (out.index === 0) {\r\n let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);\r\n let column = originalOffset - lineStartOffset;\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(lfCnt + 1, column + 1);\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(lfCnt + 1, out.remainder + 1);\r\n }\r\n else {\r\n offset -= x.size_left + x.piece.length;\r\n lfCnt += x.lf_left + x.piece.lineFeedCnt;\r\n if (x.right === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n // last node\r\n let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);\r\n let column = originalOffset - offset - lineStartOffset;\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(lfCnt + 1, column + 1);\r\n }\r\n else {\r\n x = x.right;\r\n }\r\n }\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(1, 1);\r\n }\r\n getValueInRange(range, eol) {\r\n if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) {\r\n return '';\r\n }\r\n let startPosition = this.nodeAt2(range.startLineNumber, range.startColumn);\r\n let endPosition = this.nodeAt2(range.endLineNumber, range.endColumn);\r\n let value = this.getValueInRange2(startPosition, endPosition);\r\n if (eol) {\r\n if (eol !== this._EOL || !this._EOLNormalized) {\r\n return value.replace(/\\r\\n|\\r|\\n/g, eol);\r\n }\r\n if (eol === this.getEOL() && this._EOLNormalized) {\r\n if (eol === '\\r\\n') {\r\n }\r\n return value;\r\n }\r\n return value.replace(/\\r\\n|\\r|\\n/g, eol);\r\n }\r\n return value;\r\n }\r\n getValueInRange2(startPosition, endPosition) {\r\n if (startPosition.node === endPosition.node) {\r\n let node = startPosition.node;\r\n let buffer = this._buffers[node.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start);\r\n return buffer.substring(startOffset + startPosition.remainder, startOffset + endPosition.remainder);\r\n }\r\n let x = startPosition.node;\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n let ret = buffer.substring(startOffset + startPosition.remainder, startOffset + x.piece.length);\r\n x = x.next();\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n if (x === endPosition.node) {\r\n ret += buffer.substring(startOffset, startOffset + endPosition.remainder);\r\n break;\r\n }\r\n else {\r\n ret += buffer.substr(startOffset, x.piece.length);\r\n }\r\n x = x.next();\r\n }\r\n return ret;\r\n }\r\n getLinesContent() {\r\n let lines = [];\r\n let linesLength = 0;\r\n let currentLine = '';\r\n let danglingCR = false;\r\n this.iterate(this.root, node => {\r\n if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n return true;\r\n }\r\n const piece = node.piece;\r\n let pieceLength = piece.length;\r\n if (pieceLength === 0) {\r\n return true;\r\n }\r\n const buffer = this._buffers[piece.bufferIndex].buffer;\r\n const lineStarts = this._buffers[piece.bufferIndex].lineStarts;\r\n const pieceStartLine = piece.start.line;\r\n const pieceEndLine = piece.end.line;\r\n let pieceStartOffset = lineStarts[pieceStartLine] + piece.start.column;\r\n if (danglingCR) {\r\n if (buffer.charCodeAt(pieceStartOffset) === 10 /* LineFeed */) {\r\n // pretend the \\n was in the previous piece..\r\n pieceStartOffset++;\r\n pieceLength--;\r\n }\r\n lines[linesLength++] = currentLine;\r\n currentLine = '';\r\n danglingCR = false;\r\n if (pieceLength === 0) {\r\n return true;\r\n }\r\n }\r\n if (pieceStartLine === pieceEndLine) {\r\n // this piece has no new lines\r\n if (!this._EOLNormalized && buffer.charCodeAt(pieceStartOffset + pieceLength - 1) === 13 /* CarriageReturn */) {\r\n danglingCR = true;\r\n currentLine += buffer.substr(pieceStartOffset, pieceLength - 1);\r\n }\r\n else {\r\n currentLine += buffer.substr(pieceStartOffset, pieceLength);\r\n }\r\n return true;\r\n }\r\n // add the text before the first line start in this piece\r\n currentLine += (this._EOLNormalized\r\n ? buffer.substring(pieceStartOffset, Math.max(pieceStartOffset, lineStarts[pieceStartLine + 1] - this._EOLLength))\r\n : buffer.substring(pieceStartOffset, lineStarts[pieceStartLine + 1]).replace(/(\\r\\n|\\r|\\n)$/, ''));\r\n lines[linesLength++] = currentLine;\r\n for (let line = pieceStartLine + 1; line < pieceEndLine; line++) {\r\n currentLine = (this._EOLNormalized\r\n ? buffer.substring(lineStarts[line], lineStarts[line + 1] - this._EOLLength)\r\n : buffer.substring(lineStarts[line], lineStarts[line + 1]).replace(/(\\r\\n|\\r|\\n)$/, ''));\r\n lines[linesLength++] = currentLine;\r\n }\r\n if (!this._EOLNormalized && buffer.charCodeAt(lineStarts[pieceEndLine] + piece.end.column - 1) === 13 /* CarriageReturn */) {\r\n danglingCR = true;\r\n if (piece.end.column === 0) {\r\n // The last line ended with a \\r, let's undo the push, it will be pushed by next iteration\r\n linesLength--;\r\n }\r\n else {\r\n currentLine = buffer.substr(lineStarts[pieceEndLine], piece.end.column - 1);\r\n }\r\n }\r\n else {\r\n currentLine = buffer.substr(lineStarts[pieceEndLine], piece.end.column);\r\n }\r\n return true;\r\n });\r\n if (danglingCR) {\r\n lines[linesLength++] = currentLine;\r\n currentLine = '';\r\n }\r\n lines[linesLength++] = currentLine;\r\n return lines;\r\n }\r\n getLength() {\r\n return this._length;\r\n }\r\n getLineCount() {\r\n return this._lineCnt;\r\n }\r\n getLineContent(lineNumber) {\r\n if (this._lastVisitedLine.lineNumber === lineNumber) {\r\n return this._lastVisitedLine.value;\r\n }\r\n this._lastVisitedLine.lineNumber = lineNumber;\r\n if (lineNumber === this._lineCnt) {\r\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber);\r\n }\r\n else if (this._EOLNormalized) {\r\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber, this._EOLLength);\r\n }\r\n else {\r\n this._lastVisitedLine.value = this.getLineRawContent(lineNumber).replace(/(\\r\\n|\\r|\\n)$/, '');\r\n }\r\n return this._lastVisitedLine.value;\r\n }\r\n _getCharCode(nodePos) {\r\n if (nodePos.remainder === nodePos.node.piece.length) {\r\n // the char we want to fetch is at the head of next node.\r\n let matchingNode = nodePos.node.next();\r\n if (!matchingNode) {\r\n return 0;\r\n }\r\n let buffer = this._buffers[matchingNode.piece.bufferIndex];\r\n let startOffset = this.offsetInBuffer(matchingNode.piece.bufferIndex, matchingNode.piece.start);\r\n return buffer.buffer.charCodeAt(startOffset);\r\n }\r\n else {\r\n let buffer = this._buffers[nodePos.node.piece.bufferIndex];\r\n let startOffset = this.offsetInBuffer(nodePos.node.piece.bufferIndex, nodePos.node.piece.start);\r\n let targetOffset = startOffset + nodePos.remainder;\r\n return buffer.buffer.charCodeAt(targetOffset);\r\n }\r\n }\r\n getLineCharCode(lineNumber, index) {\r\n let nodePos = this.nodeAt2(lineNumber, index + 1);\r\n return this._getCharCode(nodePos);\r\n }\r\n getLineLength(lineNumber) {\r\n if (lineNumber === this.getLineCount()) {\r\n let startOffset = this.getOffsetAt(lineNumber, 1);\r\n return this.getLength() - startOffset;\r\n }\r\n return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength;\r\n }\r\n findMatchesInNode(node, searcher, startLineNumber, startColumn, startCursor, endCursor, searchData, captureMatches, limitResultCount, resultLen, result) {\r\n let buffer = this._buffers[node.piece.bufferIndex];\r\n let startOffsetInBuffer = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start);\r\n let start = this.offsetInBuffer(node.piece.bufferIndex, startCursor);\r\n let end = this.offsetInBuffer(node.piece.bufferIndex, endCursor);\r\n let m;\r\n // Reset regex to search from the beginning\r\n let ret = { line: 0, column: 0 };\r\n let searchText;\r\n let offsetInBuffer;\r\n if (searcher._wordSeparators) {\r\n searchText = buffer.buffer.substring(start, end);\r\n offsetInBuffer = (offset) => offset + start;\r\n searcher.reset(0);\r\n }\r\n else {\r\n searchText = buffer.buffer;\r\n offsetInBuffer = (offset) => offset;\r\n searcher.reset(start);\r\n }\r\n do {\r\n m = searcher.next(searchText);\r\n if (m) {\r\n if (offsetInBuffer(m.index) >= end) {\r\n return resultLen;\r\n }\r\n this.positionInBuffer(node, offsetInBuffer(m.index) - startOffsetInBuffer, ret);\r\n let lineFeedCnt = this.getLineFeedCnt(node.piece.bufferIndex, startCursor, ret);\r\n let retStartColumn = ret.line === startCursor.line ? ret.column - startCursor.column + startColumn : ret.column + 1;\r\n let retEndColumn = retStartColumn + m[0].length;\r\n result[resultLen++] = (0,_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__.createFindMatch)(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(startLineNumber + lineFeedCnt, retStartColumn, startLineNumber + lineFeedCnt, retEndColumn), m, captureMatches);\r\n if (offsetInBuffer(m.index) + m[0].length >= end) {\r\n return resultLen;\r\n }\r\n if (resultLen >= limitResultCount) {\r\n return resultLen;\r\n }\r\n }\r\n } while (m);\r\n return resultLen;\r\n }\r\n findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) {\r\n const result = [];\r\n let resultLen = 0;\r\n const searcher = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__.Searcher(searchData.wordSeparators, searchData.regex);\r\n let startPosition = this.nodeAt2(searchRange.startLineNumber, searchRange.startColumn);\r\n if (startPosition === null) {\r\n return [];\r\n }\r\n let endPosition = this.nodeAt2(searchRange.endLineNumber, searchRange.endColumn);\r\n if (endPosition === null) {\r\n return [];\r\n }\r\n let start = this.positionInBuffer(startPosition.node, startPosition.remainder);\r\n let end = this.positionInBuffer(endPosition.node, endPosition.remainder);\r\n if (startPosition.node === endPosition.node) {\r\n this.findMatchesInNode(startPosition.node, searcher, searchRange.startLineNumber, searchRange.startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);\r\n return result;\r\n }\r\n let startLineNumber = searchRange.startLineNumber;\r\n let currentNode = startPosition.node;\r\n while (currentNode !== endPosition.node) {\r\n let lineBreakCnt = this.getLineFeedCnt(currentNode.piece.bufferIndex, start, currentNode.piece.end);\r\n if (lineBreakCnt >= 1) {\r\n // last line break position\r\n let lineStarts = this._buffers[currentNode.piece.bufferIndex].lineStarts;\r\n let startOffsetInBuffer = this.offsetInBuffer(currentNode.piece.bufferIndex, currentNode.piece.start);\r\n let nextLineStartOffset = lineStarts[start.line + lineBreakCnt];\r\n let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1;\r\n resultLen = this.findMatchesInNode(currentNode, searcher, startLineNumber, startColumn, start, this.positionInBuffer(currentNode, nextLineStartOffset - startOffsetInBuffer), searchData, captureMatches, limitResultCount, resultLen, result);\r\n if (resultLen >= limitResultCount) {\r\n return result;\r\n }\r\n startLineNumber += lineBreakCnt;\r\n }\r\n let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0;\r\n // search for the remaining content\r\n if (startLineNumber === searchRange.endLineNumber) {\r\n const text = this.getLineContent(startLineNumber).substring(startColumn, searchRange.endColumn - 1);\r\n resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount);\r\n return result;\r\n }\r\n resultLen = this._findMatchesInLine(searchData, searcher, this.getLineContent(startLineNumber).substr(startColumn), startLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount);\r\n if (resultLen >= limitResultCount) {\r\n return result;\r\n }\r\n startLineNumber++;\r\n startPosition = this.nodeAt2(startLineNumber, 1);\r\n currentNode = startPosition.node;\r\n start = this.positionInBuffer(startPosition.node, startPosition.remainder);\r\n }\r\n if (startLineNumber === searchRange.endLineNumber) {\r\n let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0;\r\n const text = this.getLineContent(startLineNumber).substring(startColumn, searchRange.endColumn - 1);\r\n resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount);\r\n return result;\r\n }\r\n let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1;\r\n resultLen = this.findMatchesInNode(endPosition.node, searcher, startLineNumber, startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);\r\n return result;\r\n }\r\n _findMatchesInLine(searchData, searcher, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {\r\n const wordSeparators = searchData.wordSeparators;\r\n if (!captureMatches && searchData.simpleSearch) {\r\n const searchString = searchData.simpleSearch;\r\n const searchStringLen = searchString.length;\r\n const textLength = text.length;\r\n let lastMatchIndex = -searchStringLen;\r\n while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {\r\n if (!wordSeparators || (0,_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__.isValidMatch)(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {\r\n result[resultLen++] = new _model_js__WEBPACK_IMPORTED_MODULE_2__.FindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);\r\n if (resultLen >= limitResultCount) {\r\n return resultLen;\r\n }\r\n }\r\n }\r\n return resultLen;\r\n }\r\n let m;\r\n // Reset regex to search from the beginning\r\n searcher.reset(0);\r\n do {\r\n m = searcher.next(text);\r\n if (m) {\r\n result[resultLen++] = (0,_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__.createFindMatch)(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);\r\n if (resultLen >= limitResultCount) {\r\n return resultLen;\r\n }\r\n }\r\n } while (m);\r\n return resultLen;\r\n }\r\n // #endregion\r\n // #region Piece Table\r\n insert(offset, value, eolNormalized = false) {\r\n this._EOLNormalized = this._EOLNormalized && eolNormalized;\r\n this._lastVisitedLine.lineNumber = 0;\r\n this._lastVisitedLine.value = '';\r\n if (this.root !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n let { node, remainder, nodeStartOffset } = this.nodeAt(offset);\r\n let piece = node.piece;\r\n let bufferIndex = piece.bufferIndex;\r\n let insertPosInBuffer = this.positionInBuffer(node, remainder);\r\n if (node.piece.bufferIndex === 0 &&\r\n piece.end.line === this._lastChangeBufferPos.line &&\r\n piece.end.column === this._lastChangeBufferPos.column &&\r\n (nodeStartOffset + piece.length === offset) &&\r\n value.length < AverageBufferSize) {\r\n // changed buffer\r\n this.appendToNode(node, value);\r\n this.computeBufferMetadata();\r\n return;\r\n }\r\n if (nodeStartOffset === offset) {\r\n this.insertContentToNodeLeft(value, node);\r\n this._searchCache.validate(offset);\r\n }\r\n else if (nodeStartOffset + node.piece.length > offset) {\r\n // we are inserting into the middle of a node.\r\n let nodesToDel = [];\r\n let newRightPiece = new Piece(piece.bufferIndex, insertPosInBuffer, piece.end, this.getLineFeedCnt(piece.bufferIndex, insertPosInBuffer, piece.end), this.offsetInBuffer(bufferIndex, piece.end) - this.offsetInBuffer(bufferIndex, insertPosInBuffer));\r\n if (this.shouldCheckCRLF() && this.endWithCR(value)) {\r\n let headOfRight = this.nodeCharCodeAt(node, remainder);\r\n if (headOfRight === 10 /** \\n */) {\r\n let newStart = { line: newRightPiece.start.line + 1, column: 0 };\r\n newRightPiece = new Piece(newRightPiece.bufferIndex, newStart, newRightPiece.end, this.getLineFeedCnt(newRightPiece.bufferIndex, newStart, newRightPiece.end), newRightPiece.length - 1);\r\n value += '\\n';\r\n }\r\n }\r\n // reuse node for content before insertion point.\r\n if (this.shouldCheckCRLF() && this.startWithLF(value)) {\r\n let tailOfLeft = this.nodeCharCodeAt(node, remainder - 1);\r\n if (tailOfLeft === 13 /** \\r */) {\r\n let previousPos = this.positionInBuffer(node, remainder - 1);\r\n this.deleteNodeTail(node, previousPos);\r\n value = '\\r' + value;\r\n if (node.piece.length === 0) {\r\n nodesToDel.push(node);\r\n }\r\n }\r\n else {\r\n this.deleteNodeTail(node, insertPosInBuffer);\r\n }\r\n }\r\n else {\r\n this.deleteNodeTail(node, insertPosInBuffer);\r\n }\r\n let newPieces = this.createNewPieces(value);\r\n if (newRightPiece.length > 0) {\r\n this.rbInsertRight(node, newRightPiece);\r\n }\r\n let tmpNode = node;\r\n for (let k = 0; k < newPieces.length; k++) {\r\n tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);\r\n }\r\n this.deleteNodes(nodesToDel);\r\n }\r\n else {\r\n this.insertContentToNodeRight(value, node);\r\n }\r\n }\r\n else {\r\n // insert new node\r\n let pieces = this.createNewPieces(value);\r\n let node = this.rbInsertLeft(null, pieces[0]);\r\n for (let k = 1; k < pieces.length; k++) {\r\n node = this.rbInsertRight(node, pieces[k]);\r\n }\r\n }\r\n // todo, this is too brutal. Total line feed count should be updated the same way as lf_left.\r\n this.computeBufferMetadata();\r\n }\r\n delete(offset, cnt) {\r\n this._lastVisitedLine.lineNumber = 0;\r\n this._lastVisitedLine.value = '';\r\n if (cnt <= 0 || this.root === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n return;\r\n }\r\n let startPosition = this.nodeAt(offset);\r\n let endPosition = this.nodeAt(offset + cnt);\r\n let startNode = startPosition.node;\r\n let endNode = endPosition.node;\r\n if (startNode === endNode) {\r\n let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder);\r\n let endSplitPosInBuffer = this.positionInBuffer(startNode, endPosition.remainder);\r\n if (startPosition.nodeStartOffset === offset) {\r\n if (cnt === startNode.piece.length) { // delete node\r\n let next = startNode.next();\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.rbDelete)(this, startNode);\r\n this.validateCRLFWithPrevNode(next);\r\n this.computeBufferMetadata();\r\n return;\r\n }\r\n this.deleteNodeHead(startNode, endSplitPosInBuffer);\r\n this._searchCache.validate(offset);\r\n this.validateCRLFWithPrevNode(startNode);\r\n this.computeBufferMetadata();\r\n return;\r\n }\r\n if (startPosition.nodeStartOffset + startNode.piece.length === offset + cnt) {\r\n this.deleteNodeTail(startNode, startSplitPosInBuffer);\r\n this.validateCRLFWithNextNode(startNode);\r\n this.computeBufferMetadata();\r\n return;\r\n }\r\n // delete content in the middle, this node will be splitted to nodes\r\n this.shrinkNode(startNode, startSplitPosInBuffer, endSplitPosInBuffer);\r\n this.computeBufferMetadata();\r\n return;\r\n }\r\n let nodesToDel = [];\r\n let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder);\r\n this.deleteNodeTail(startNode, startSplitPosInBuffer);\r\n this._searchCache.validate(offset);\r\n if (startNode.piece.length === 0) {\r\n nodesToDel.push(startNode);\r\n }\r\n // update last touched node\r\n let endSplitPosInBuffer = this.positionInBuffer(endNode, endPosition.remainder);\r\n this.deleteNodeHead(endNode, endSplitPosInBuffer);\r\n if (endNode.piece.length === 0) {\r\n nodesToDel.push(endNode);\r\n }\r\n // delete nodes in between\r\n let secondNode = startNode.next();\r\n for (let node = secondNode; node !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL && node !== endNode; node = node.next()) {\r\n nodesToDel.push(node);\r\n }\r\n let prev = startNode.piece.length === 0 ? startNode.prev() : startNode;\r\n this.deleteNodes(nodesToDel);\r\n this.validateCRLFWithNextNode(prev);\r\n this.computeBufferMetadata();\r\n }\r\n insertContentToNodeLeft(value, node) {\r\n // we are inserting content to the beginning of node\r\n let nodesToDel = [];\r\n if (this.shouldCheckCRLF() && this.endWithCR(value) && this.startWithLF(node)) {\r\n // move `\\n` to new node.\r\n let piece = node.piece;\r\n let newStart = { line: piece.start.line + 1, column: 0 };\r\n let nPiece = new Piece(piece.bufferIndex, newStart, piece.end, this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end), piece.length - 1);\r\n node.piece = nPiece;\r\n value += '\\n';\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, node, -1, -1);\r\n if (node.piece.length === 0) {\r\n nodesToDel.push(node);\r\n }\r\n }\r\n let newPieces = this.createNewPieces(value);\r\n let newNode = this.rbInsertLeft(node, newPieces[newPieces.length - 1]);\r\n for (let k = newPieces.length - 2; k >= 0; k--) {\r\n newNode = this.rbInsertLeft(newNode, newPieces[k]);\r\n }\r\n this.validateCRLFWithPrevNode(newNode);\r\n this.deleteNodes(nodesToDel);\r\n }\r\n insertContentToNodeRight(value, node) {\r\n // we are inserting to the right of this node.\r\n if (this.adjustCarriageReturnFromNext(value, node)) {\r\n // move \\n to the new node.\r\n value += '\\n';\r\n }\r\n let newPieces = this.createNewPieces(value);\r\n let newNode = this.rbInsertRight(node, newPieces[0]);\r\n let tmpNode = newNode;\r\n for (let k = 1; k < newPieces.length; k++) {\r\n tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);\r\n }\r\n this.validateCRLFWithPrevNode(newNode);\r\n }\r\n positionInBuffer(node, remainder, ret) {\r\n let piece = node.piece;\r\n let bufferIndex = node.piece.bufferIndex;\r\n let lineStarts = this._buffers[bufferIndex].lineStarts;\r\n let startOffset = lineStarts[piece.start.line] + piece.start.column;\r\n let offset = startOffset + remainder;\r\n // binary search offset between startOffset and endOffset\r\n let low = piece.start.line;\r\n let high = piece.end.line;\r\n let mid = 0;\r\n let midStop = 0;\r\n let midStart = 0;\r\n while (low <= high) {\r\n mid = low + ((high - low) / 2) | 0;\r\n midStart = lineStarts[mid];\r\n if (mid === high) {\r\n break;\r\n }\r\n midStop = lineStarts[mid + 1];\r\n if (offset < midStart) {\r\n high = mid - 1;\r\n }\r\n else if (offset >= midStop) {\r\n low = mid + 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (ret) {\r\n ret.line = mid;\r\n ret.column = offset - midStart;\r\n return null;\r\n }\r\n return {\r\n line: mid,\r\n column: offset - midStart\r\n };\r\n }\r\n getLineFeedCnt(bufferIndex, start, end) {\r\n // we don't need to worry about start: abc\\r|\\n, or abc|\\r, or abc|\\n, or abc|\\r\\n doesn't change the fact that, there is one line break after start.\r\n // now let's take care of end: abc\\r|\\n, if end is in between \\r and \\n, we need to add line feed count by 1\r\n if (end.column === 0) {\r\n return end.line - start.line;\r\n }\r\n let lineStarts = this._buffers[bufferIndex].lineStarts;\r\n if (end.line === lineStarts.length - 1) { // it means, there is no \\n after end, otherwise, there will be one more lineStart.\r\n return end.line - start.line;\r\n }\r\n let nextLineStartOffset = lineStarts[end.line + 1];\r\n let endOffset = lineStarts[end.line] + end.column;\r\n if (nextLineStartOffset > endOffset + 1) { // there are more than 1 character after end, which means it can't be \\n\r\n return end.line - start.line;\r\n }\r\n // endOffset + 1 === nextLineStartOffset\r\n // character at endOffset is \\n, so we check the character before first\r\n // if character at endOffset is \\r, end.column is 0 and we can't get here.\r\n let previousCharOffset = endOffset - 1; // end.column > 0 so it's okay.\r\n let buffer = this._buffers[bufferIndex].buffer;\r\n if (buffer.charCodeAt(previousCharOffset) === 13) {\r\n return end.line - start.line + 1;\r\n }\r\n else {\r\n return end.line - start.line;\r\n }\r\n }\r\n offsetInBuffer(bufferIndex, cursor) {\r\n let lineStarts = this._buffers[bufferIndex].lineStarts;\r\n return lineStarts[cursor.line] + cursor.column;\r\n }\r\n deleteNodes(nodes) {\r\n for (let i = 0; i < nodes.length; i++) {\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.rbDelete)(this, nodes[i]);\r\n }\r\n }\r\n createNewPieces(text) {\r\n if (text.length > AverageBufferSize) {\r\n // the content is large, operations like substring, charCode becomes slow\r\n // so here we split it into smaller chunks, just like what we did for CR/LF normalization\r\n let newPieces = [];\r\n while (text.length > AverageBufferSize) {\r\n const lastChar = text.charCodeAt(AverageBufferSize - 1);\r\n let splitText;\r\n if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {\r\n // last character is \\r or a high surrogate => keep it back\r\n splitText = text.substring(0, AverageBufferSize - 1);\r\n text = text.substring(AverageBufferSize - 1);\r\n }\r\n else {\r\n splitText = text.substring(0, AverageBufferSize);\r\n text = text.substring(AverageBufferSize);\r\n }\r\n let lineStarts = createLineStartsFast(splitText);\r\n newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: splitText.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, splitText.length));\r\n this._buffers.push(new StringBuffer(splitText, lineStarts));\r\n }\r\n let lineStarts = createLineStartsFast(text);\r\n newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: text.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, text.length));\r\n this._buffers.push(new StringBuffer(text, lineStarts));\r\n return newPieces;\r\n }\r\n let startOffset = this._buffers[0].buffer.length;\r\n const lineStarts = createLineStartsFast(text, false);\r\n let start = this._lastChangeBufferPos;\r\n if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === startOffset\r\n && startOffset !== 0\r\n && this.startWithLF(text)\r\n && this.endWithCR(this._buffers[0].buffer) // todo, we can check this._lastChangeBufferPos's column as it's the last one\r\n ) {\r\n this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line, column: this._lastChangeBufferPos.column + 1 };\r\n start = this._lastChangeBufferPos;\r\n for (let i = 0; i < lineStarts.length; i++) {\r\n lineStarts[i] += startOffset + 1;\r\n }\r\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\r\n this._buffers[0].buffer += '_' + text;\r\n startOffset += 1;\r\n }\r\n else {\r\n if (startOffset !== 0) {\r\n for (let i = 0; i < lineStarts.length; i++) {\r\n lineStarts[i] += startOffset;\r\n }\r\n }\r\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\r\n this._buffers[0].buffer += text;\r\n }\r\n const endOffset = this._buffers[0].buffer.length;\r\n let endIndex = this._buffers[0].lineStarts.length - 1;\r\n let endColumn = endOffset - this._buffers[0].lineStarts[endIndex];\r\n let endPos = { line: endIndex, column: endColumn };\r\n let newPiece = new Piece(0, /** todo@peng */ start, endPos, this.getLineFeedCnt(0, start, endPos), endOffset - startOffset);\r\n this._lastChangeBufferPos = endPos;\r\n return [newPiece];\r\n }\r\n getLineRawContent(lineNumber, endOffset = 0) {\r\n let x = this.root;\r\n let ret = '';\r\n let cache = this._searchCache.get2(lineNumber);\r\n if (cache) {\r\n x = cache.node;\r\n let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber - 1);\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n if (cache.nodeStartLineNumber + x.piece.lineFeedCnt === lineNumber) {\r\n ret = buffer.substring(startOffset + prevAccumulatedValue, startOffset + x.piece.length);\r\n }\r\n else {\r\n let accumulatedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber);\r\n return buffer.substring(startOffset + prevAccumulatedValue, startOffset + accumulatedValue - endOffset);\r\n }\r\n }\r\n else {\r\n let nodeStartOffset = 0;\r\n const originalLineNumber = lineNumber;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL && x.lf_left >= lineNumber - 1) {\r\n x = x.left;\r\n }\r\n else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {\r\n let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\r\n let accumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n nodeStartOffset += x.size_left;\r\n this._searchCache.set({\r\n node: x,\r\n nodeStartOffset,\r\n nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left)\r\n });\r\n return buffer.substring(startOffset + prevAccumulatedValue, startOffset + accumulatedValue - endOffset);\r\n }\r\n else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {\r\n let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n ret = buffer.substring(startOffset + prevAccumulatedValue, startOffset + x.piece.length);\r\n break;\r\n }\r\n else {\r\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\r\n nodeStartOffset += x.size_left + x.piece.length;\r\n x = x.right;\r\n }\r\n }\r\n }\r\n // search in order, to find the node contains end column\r\n x = x.next();\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n let buffer = this._buffers[x.piece.bufferIndex].buffer;\r\n if (x.piece.lineFeedCnt > 0) {\r\n let accumulatedValue = this.getAccumulatedValue(x, 0);\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n ret += buffer.substring(startOffset, startOffset + accumulatedValue - endOffset);\r\n return ret;\r\n }\r\n else {\r\n let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);\r\n ret += buffer.substr(startOffset, x.piece.length);\r\n }\r\n x = x.next();\r\n }\r\n return ret;\r\n }\r\n computeBufferMetadata() {\r\n let x = this.root;\r\n let lfCnt = 1;\r\n let len = 0;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n lfCnt += x.lf_left + x.piece.lineFeedCnt;\r\n len += x.size_left + x.piece.length;\r\n x = x.right;\r\n }\r\n this._lineCnt = lfCnt;\r\n this._length = len;\r\n this._searchCache.validate(this._length);\r\n }\r\n // #region node operations\r\n getIndexOf(node, accumulatedValue) {\r\n let piece = node.piece;\r\n let pos = this.positionInBuffer(node, accumulatedValue);\r\n let lineCnt = pos.line - piece.start.line;\r\n if (this.offsetInBuffer(piece.bufferIndex, piece.end) - this.offsetInBuffer(piece.bufferIndex, piece.start) === accumulatedValue) {\r\n // we are checking the end of this node, so a CRLF check is necessary.\r\n let realLineCnt = this.getLineFeedCnt(node.piece.bufferIndex, piece.start, pos);\r\n if (realLineCnt !== lineCnt) {\r\n // aha yes, CRLF\r\n return { index: realLineCnt, remainder: 0 };\r\n }\r\n }\r\n return { index: lineCnt, remainder: pos.column };\r\n }\r\n getAccumulatedValue(node, index) {\r\n if (index < 0) {\r\n return 0;\r\n }\r\n let piece = node.piece;\r\n let lineStarts = this._buffers[piece.bufferIndex].lineStarts;\r\n let expectedLineStartIndex = piece.start.line + index + 1;\r\n if (expectedLineStartIndex > piece.end.line) {\r\n return lineStarts[piece.end.line] + piece.end.column - lineStarts[piece.start.line] - piece.start.column;\r\n }\r\n else {\r\n return lineStarts[expectedLineStartIndex] - lineStarts[piece.start.line] - piece.start.column;\r\n }\r\n }\r\n deleteNodeTail(node, pos) {\r\n const piece = node.piece;\r\n const originalLFCnt = piece.lineFeedCnt;\r\n const originalEndOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);\r\n const newEnd = pos;\r\n const newEndOffset = this.offsetInBuffer(piece.bufferIndex, newEnd);\r\n const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);\r\n const lf_delta = newLineFeedCnt - originalLFCnt;\r\n const size_delta = newEndOffset - originalEndOffset;\r\n const newLength = piece.length + size_delta;\r\n node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, node, size_delta, lf_delta);\r\n }\r\n deleteNodeHead(node, pos) {\r\n const piece = node.piece;\r\n const originalLFCnt = piece.lineFeedCnt;\r\n const originalStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);\r\n const newStart = pos;\r\n const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);\r\n const newStartOffset = this.offsetInBuffer(piece.bufferIndex, newStart);\r\n const lf_delta = newLineFeedCnt - originalLFCnt;\r\n const size_delta = originalStartOffset - newStartOffset;\r\n const newLength = piece.length + size_delta;\r\n node.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, node, size_delta, lf_delta);\r\n }\r\n shrinkNode(node, start, end) {\r\n const piece = node.piece;\r\n const originalStartPos = piece.start;\r\n const originalEndPos = piece.end;\r\n // old piece, originalStartPos, start\r\n const oldLength = piece.length;\r\n const oldLFCnt = piece.lineFeedCnt;\r\n const newEnd = start;\r\n const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);\r\n const newLength = this.offsetInBuffer(piece.bufferIndex, start) - this.offsetInBuffer(piece.bufferIndex, originalStartPos);\r\n node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, node, newLength - oldLength, newLineFeedCnt - oldLFCnt);\r\n // new right piece, end, originalEndPos\r\n let newPiece = new Piece(piece.bufferIndex, end, originalEndPos, this.getLineFeedCnt(piece.bufferIndex, end, originalEndPos), this.offsetInBuffer(piece.bufferIndex, originalEndPos) - this.offsetInBuffer(piece.bufferIndex, end));\r\n let newNode = this.rbInsertRight(node, newPiece);\r\n this.validateCRLFWithPrevNode(newNode);\r\n }\r\n appendToNode(node, value) {\r\n if (this.adjustCarriageReturnFromNext(value, node)) {\r\n value += '\\n';\r\n }\r\n const hitCRLF = this.shouldCheckCRLF() && this.startWithLF(value) && this.endWithCR(node);\r\n const startOffset = this._buffers[0].buffer.length;\r\n this._buffers[0].buffer += value;\r\n const lineStarts = createLineStartsFast(value, false);\r\n for (let i = 0; i < lineStarts.length; i++) {\r\n lineStarts[i] += startOffset;\r\n }\r\n if (hitCRLF) {\r\n let prevStartOffset = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2];\r\n this._buffers[0].lineStarts.pop();\r\n // _lastChangeBufferPos is already wrong\r\n this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line - 1, column: startOffset - prevStartOffset };\r\n }\r\n this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));\r\n const endIndex = this._buffers[0].lineStarts.length - 1;\r\n const endColumn = this._buffers[0].buffer.length - this._buffers[0].lineStarts[endIndex];\r\n const newEnd = { line: endIndex, column: endColumn };\r\n const newLength = node.piece.length + value.length;\r\n const oldLineFeedCnt = node.piece.lineFeedCnt;\r\n const newLineFeedCnt = this.getLineFeedCnt(0, node.piece.start, newEnd);\r\n const lf_delta = newLineFeedCnt - oldLineFeedCnt;\r\n node.piece = new Piece(node.piece.bufferIndex, node.piece.start, newEnd, newLineFeedCnt, newLength);\r\n this._lastChangeBufferPos = newEnd;\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, node, value.length, lf_delta);\r\n }\r\n nodeAt(offset) {\r\n let x = this.root;\r\n let cache = this._searchCache.get(offset);\r\n if (cache) {\r\n return {\r\n node: cache.node,\r\n nodeStartOffset: cache.nodeStartOffset,\r\n remainder: offset - cache.nodeStartOffset\r\n };\r\n }\r\n let nodeStartOffset = 0;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.size_left > offset) {\r\n x = x.left;\r\n }\r\n else if (x.size_left + x.piece.length >= offset) {\r\n nodeStartOffset += x.size_left;\r\n let ret = {\r\n node: x,\r\n remainder: offset - x.size_left,\r\n nodeStartOffset\r\n };\r\n this._searchCache.set(ret);\r\n return ret;\r\n }\r\n else {\r\n offset -= x.size_left + x.piece.length;\r\n nodeStartOffset += x.size_left + x.piece.length;\r\n x = x.right;\r\n }\r\n }\r\n return null;\r\n }\r\n nodeAt2(lineNumber, column) {\r\n let x = this.root;\r\n let nodeStartOffset = 0;\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL && x.lf_left >= lineNumber - 1) {\r\n x = x.left;\r\n }\r\n else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {\r\n let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\r\n let accumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);\r\n nodeStartOffset += x.size_left;\r\n return {\r\n node: x,\r\n remainder: Math.min(prevAccumualtedValue + column - 1, accumulatedValue),\r\n nodeStartOffset\r\n };\r\n }\r\n else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {\r\n let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);\r\n if (prevAccumualtedValue + column - 1 <= x.piece.length) {\r\n return {\r\n node: x,\r\n remainder: prevAccumualtedValue + column - 1,\r\n nodeStartOffset\r\n };\r\n }\r\n else {\r\n column -= x.piece.length - prevAccumualtedValue;\r\n break;\r\n }\r\n }\r\n else {\r\n lineNumber -= x.lf_left + x.piece.lineFeedCnt;\r\n nodeStartOffset += x.size_left + x.piece.length;\r\n x = x.right;\r\n }\r\n }\r\n // search in order, to find the node contains position.column\r\n x = x.next();\r\n while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n if (x.piece.lineFeedCnt > 0) {\r\n let accumulatedValue = this.getAccumulatedValue(x, 0);\r\n let nodeStartOffset = this.offsetOfNode(x);\r\n return {\r\n node: x,\r\n remainder: Math.min(column - 1, accumulatedValue),\r\n nodeStartOffset\r\n };\r\n }\r\n else {\r\n if (x.piece.length >= column - 1) {\r\n let nodeStartOffset = this.offsetOfNode(x);\r\n return {\r\n node: x,\r\n remainder: column - 1,\r\n nodeStartOffset\r\n };\r\n }\r\n else {\r\n column -= x.piece.length;\r\n }\r\n }\r\n x = x.next();\r\n }\r\n return null;\r\n }\r\n nodeCharCodeAt(node, offset) {\r\n if (node.piece.lineFeedCnt < 1) {\r\n return -1;\r\n }\r\n let buffer = this._buffers[node.piece.bufferIndex];\r\n let newOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start) + offset;\r\n return buffer.buffer.charCodeAt(newOffset);\r\n }\r\n offsetOfNode(node) {\r\n if (!node) {\r\n return 0;\r\n }\r\n let pos = node.size_left;\r\n while (node !== this.root) {\r\n if (node.parent.right === node) {\r\n pos += node.parent.size_left + node.parent.piece.length;\r\n }\r\n node = node.parent;\r\n }\r\n return pos;\r\n }\r\n // #endregion\r\n // #region CRLF\r\n shouldCheckCRLF() {\r\n return !(this._EOLNormalized && this._EOL === '\\n');\r\n }\r\n startWithLF(val) {\r\n if (typeof val === 'string') {\r\n return val.charCodeAt(0) === 10;\r\n }\r\n if (val === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL || val.piece.lineFeedCnt === 0) {\r\n return false;\r\n }\r\n let piece = val.piece;\r\n let lineStarts = this._buffers[piece.bufferIndex].lineStarts;\r\n let line = piece.start.line;\r\n let startOffset = lineStarts[line] + piece.start.column;\r\n if (line === lineStarts.length - 1) {\r\n // last line, so there is no line feed at the end of this line\r\n return false;\r\n }\r\n let nextLineOffset = lineStarts[line + 1];\r\n if (nextLineOffset > startOffset + 1) {\r\n return false;\r\n }\r\n return this._buffers[piece.bufferIndex].buffer.charCodeAt(startOffset) === 10;\r\n }\r\n endWithCR(val) {\r\n if (typeof val === 'string') {\r\n return val.charCodeAt(val.length - 1) === 13;\r\n }\r\n if (val === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL || val.piece.lineFeedCnt === 0) {\r\n return false;\r\n }\r\n return this.nodeCharCodeAt(val, val.piece.length - 1) === 13;\r\n }\r\n validateCRLFWithPrevNode(nextNode) {\r\n if (this.shouldCheckCRLF() && this.startWithLF(nextNode)) {\r\n let node = nextNode.prev();\r\n if (this.endWithCR(node)) {\r\n this.fixCRLF(node, nextNode);\r\n }\r\n }\r\n }\r\n validateCRLFWithNextNode(node) {\r\n if (this.shouldCheckCRLF() && this.endWithCR(node)) {\r\n let nextNode = node.next();\r\n if (this.startWithLF(nextNode)) {\r\n this.fixCRLF(node, nextNode);\r\n }\r\n }\r\n }\r\n fixCRLF(prev, next) {\r\n let nodesToDel = [];\r\n // update node\r\n let lineStarts = this._buffers[prev.piece.bufferIndex].lineStarts;\r\n let newEnd;\r\n if (prev.piece.end.column === 0) {\r\n // it means, last line ends with \\r, not \\r\\n\r\n newEnd = { line: prev.piece.end.line - 1, column: lineStarts[prev.piece.end.line] - lineStarts[prev.piece.end.line - 1] - 1 };\r\n }\r\n else {\r\n // \\r\\n\r\n newEnd = { line: prev.piece.end.line, column: prev.piece.end.column - 1 };\r\n }\r\n const prevNewLength = prev.piece.length - 1;\r\n const prevNewLFCnt = prev.piece.lineFeedCnt - 1;\r\n prev.piece = new Piece(prev.piece.bufferIndex, prev.piece.start, newEnd, prevNewLFCnt, prevNewLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, prev, -1, -1);\r\n if (prev.piece.length === 0) {\r\n nodesToDel.push(prev);\r\n }\r\n // update nextNode\r\n let newStart = { line: next.piece.start.line + 1, column: 0 };\r\n const newLength = next.piece.length - 1;\r\n const newLineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, newStart, next.piece.end);\r\n next.piece = new Piece(next.piece.bufferIndex, newStart, next.piece.end, newLineFeedCnt, newLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, next, -1, -1);\r\n if (next.piece.length === 0) {\r\n nodesToDel.push(next);\r\n }\r\n // create new piece which contains \\r\\n\r\n let pieces = this.createNewPieces('\\r\\n');\r\n this.rbInsertRight(prev, pieces[0]);\r\n // delete empty nodes\r\n for (let i = 0; i < nodesToDel.length; i++) {\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.rbDelete)(this, nodesToDel[i]);\r\n }\r\n }\r\n adjustCarriageReturnFromNext(value, node) {\r\n if (this.shouldCheckCRLF() && this.endWithCR(value)) {\r\n let nextNode = node.next();\r\n if (this.startWithLF(nextNode)) {\r\n // move `\\n` forward\r\n value += '\\n';\r\n if (nextNode.piece.length === 1) {\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.rbDelete)(this, nextNode);\r\n }\r\n else {\r\n const piece = nextNode.piece;\r\n const newStart = { line: piece.start.line + 1, column: 0 };\r\n const newLength = piece.length - 1;\r\n const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);\r\n nextNode.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.updateTreeMetadata)(this, nextNode, -1, -1);\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n // #endregion\r\n // #endregion\r\n // #region Tree operations\r\n iterate(node, callback) {\r\n if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n return callback(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL);\r\n }\r\n let leftRet = this.iterate(node.left, callback);\r\n if (!leftRet) {\r\n return leftRet;\r\n }\r\n return callback(node) && this.iterate(node.right, callback);\r\n }\r\n getNodeContent(node) {\r\n if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n return '';\r\n }\r\n let buffer = this._buffers[node.piece.bufferIndex];\r\n let currentContent;\r\n let piece = node.piece;\r\n let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);\r\n let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);\r\n currentContent = buffer.buffer.substring(startOffset, endOffset);\r\n return currentContent;\r\n }\r\n getPieceContent(piece) {\r\n let buffer = this._buffers[piece.bufferIndex];\r\n let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);\r\n let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);\r\n let currentContent = buffer.buffer.substring(startOffset, endOffset);\r\n return currentContent;\r\n }\r\n /**\r\n * node node\r\n * / \\ / \\\r\n * a b <---- a b\r\n * /\r\n * z\r\n */\r\n rbInsertRight(node, p) {\r\n let z = new _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.TreeNode(p, 1 /* Red */);\r\n z.left = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.right = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.parent = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.size_left = 0;\r\n z.lf_left = 0;\r\n let x = this.root;\r\n if (x === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n this.root = z;\r\n z.color = 0 /* Black */;\r\n }\r\n else if (node.right === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n node.right = z;\r\n z.parent = node;\r\n }\r\n else {\r\n let nextNode = (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.leftest)(node.right);\r\n nextNode.left = z;\r\n z.parent = nextNode;\r\n }\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.fixInsert)(this, z);\r\n return z;\r\n }\r\n /**\r\n * node node\r\n * / \\ / \\\r\n * a b ----> a b\r\n * \\\r\n * z\r\n */\r\n rbInsertLeft(node, p) {\r\n let z = new _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.TreeNode(p, 1 /* Red */);\r\n z.left = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.right = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.parent = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL;\r\n z.size_left = 0;\r\n z.lf_left = 0;\r\n if (this.root === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n this.root = z;\r\n z.color = 0 /* Black */;\r\n }\r\n else if (node.left === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.SENTINEL) {\r\n node.left = z;\r\n z.parent = node;\r\n }\r\n else {\r\n let prevNode = (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.righttest)(node.left); // a\r\n prevNode.right = z;\r\n z.parent = prevNode;\r\n }\r\n (0,_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__.fixInsert)(this, z);\r\n return z;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js":
|
||
/*!**********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js ***!
|
||
\**********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PieceTreeTextBuffer\": () => (/* binding */ PieceTreeTextBuffer)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pieceTreeBase.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js\");\n/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tokensStore.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js\");\n/* harmony import */ var _textChange_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../textChange.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass PieceTreeTextBuffer extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(chunks, BOM, eol, containsRTL, containsUnusualLineTerminators, isBasicASCII, eolNormalized) {\r\n super();\r\n this._onDidChangeContent = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this._BOM = BOM;\r\n this._mightContainNonBasicASCII = !isBasicASCII;\r\n this._mightContainRTL = containsRTL;\r\n this._mightContainUnusualLineTerminators = containsUnusualLineTerminators;\r\n this._pieceTree = new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_4__.PieceTreeBase(chunks, eol, eolNormalized);\r\n }\r\n mightContainRTL() {\r\n return this._mightContainRTL;\r\n }\r\n mightContainUnusualLineTerminators() {\r\n return this._mightContainUnusualLineTerminators;\r\n }\r\n resetMightContainUnusualLineTerminators() {\r\n this._mightContainUnusualLineTerminators = false;\r\n }\r\n mightContainNonBasicASCII() {\r\n return this._mightContainNonBasicASCII;\r\n }\r\n getBOM() {\r\n return this._BOM;\r\n }\r\n getEOL() {\r\n return this._pieceTree.getEOL();\r\n }\r\n createSnapshot(preserveBOM) {\r\n return this._pieceTree.createSnapshot(preserveBOM ? this._BOM : '');\r\n }\r\n getOffsetAt(lineNumber, column) {\r\n return this._pieceTree.getOffsetAt(lineNumber, column);\r\n }\r\n getPositionAt(offset) {\r\n return this._pieceTree.getPositionAt(offset);\r\n }\r\n getRangeAt(start, length) {\r\n let end = start + length;\r\n const startPosition = this.getPositionAt(start);\r\n const endPosition = this.getPositionAt(end);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);\r\n }\r\n getValueInRange(range, eol = 0 /* TextDefined */) {\r\n if (range.isEmpty()) {\r\n return '';\r\n }\r\n const lineEnding = this._getEndOfLine(eol);\r\n return this._pieceTree.getValueInRange(range, lineEnding);\r\n }\r\n getValueLengthInRange(range, eol = 0 /* TextDefined */) {\r\n if (range.isEmpty()) {\r\n return 0;\r\n }\r\n if (range.startLineNumber === range.endLineNumber) {\r\n return (range.endColumn - range.startColumn);\r\n }\r\n let startOffset = this.getOffsetAt(range.startLineNumber, range.startColumn);\r\n let endOffset = this.getOffsetAt(range.endLineNumber, range.endColumn);\r\n return endOffset - startOffset;\r\n }\r\n getCharacterCountInRange(range, eol = 0 /* TextDefined */) {\r\n if (this._mightContainNonBasicASCII) {\r\n // we must count by iterating\r\n let result = 0;\r\n const fromLineNumber = range.startLineNumber;\r\n const toLineNumber = range.endLineNumber;\r\n for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\r\n const lineContent = this.getLineContent(lineNumber);\r\n const fromOffset = (lineNumber === fromLineNumber ? range.startColumn - 1 : 0);\r\n const toOffset = (lineNumber === toLineNumber ? range.endColumn - 1 : lineContent.length);\r\n for (let offset = fromOffset; offset < toOffset; offset++) {\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isHighSurrogate(lineContent.charCodeAt(offset))) {\r\n result = result + 1;\r\n offset = offset + 1;\r\n }\r\n else {\r\n result = result + 1;\r\n }\r\n }\r\n }\r\n result += this._getEndOfLine(eol).length * (toLineNumber - fromLineNumber);\r\n return result;\r\n }\r\n return this.getValueLengthInRange(range, eol);\r\n }\r\n getLength() {\r\n return this._pieceTree.getLength();\r\n }\r\n getLineCount() {\r\n return this._pieceTree.getLineCount();\r\n }\r\n getLinesContent() {\r\n return this._pieceTree.getLinesContent();\r\n }\r\n getLineContent(lineNumber) {\r\n return this._pieceTree.getLineContent(lineNumber);\r\n }\r\n getLineCharCode(lineNumber, index) {\r\n return this._pieceTree.getLineCharCode(lineNumber, index);\r\n }\r\n getLineLength(lineNumber) {\r\n return this._pieceTree.getLineLength(lineNumber);\r\n }\r\n getLineFirstNonWhitespaceColumn(lineNumber) {\r\n const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 1;\r\n }\r\n getLineLastNonWhitespaceColumn(lineNumber) {\r\n const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.lastNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 2;\r\n }\r\n _getEndOfLine(eol) {\r\n switch (eol) {\r\n case 1 /* LF */:\r\n return '\\n';\r\n case 2 /* CRLF */:\r\n return '\\r\\n';\r\n case 0 /* TextDefined */:\r\n return this.getEOL();\r\n default:\r\n throw new Error('Unknown EOL preference');\r\n }\r\n }\r\n setEOL(newEOL) {\r\n this._pieceTree.setEOL(newEOL);\r\n }\r\n applyEdits(rawOperations, recordTrimAutoWhitespace, computeUndoEdits) {\r\n let mightContainRTL = this._mightContainRTL;\r\n let mightContainUnusualLineTerminators = this._mightContainUnusualLineTerminators;\r\n let mightContainNonBasicASCII = this._mightContainNonBasicASCII;\r\n let canReduceOperations = true;\r\n let operations = [];\r\n for (let i = 0; i < rawOperations.length; i++) {\r\n let op = rawOperations[i];\r\n if (canReduceOperations && op._isTracked) {\r\n canReduceOperations = false;\r\n }\r\n let validatedRange = op.range;\r\n if (op.text) {\r\n let textMightContainNonBasicASCII = true;\r\n if (!mightContainNonBasicASCII) {\r\n textMightContainNonBasicASCII = !_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isBasicASCII(op.text);\r\n mightContainNonBasicASCII = textMightContainNonBasicASCII;\r\n }\r\n if (!mightContainRTL && textMightContainNonBasicASCII) {\r\n // check if the new inserted text contains RTL\r\n mightContainRTL = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.containsRTL(op.text);\r\n }\r\n if (!mightContainUnusualLineTerminators && textMightContainNonBasicASCII) {\r\n // check if the new inserted text contains unusual line terminators\r\n mightContainUnusualLineTerminators = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.containsUnusualLineTerminators(op.text);\r\n }\r\n }\r\n let validText = '';\r\n let eolCount = 0;\r\n let firstLineLength = 0;\r\n let lastLineLength = 0;\r\n if (op.text) {\r\n let strEOL;\r\n [eolCount, firstLineLength, lastLineLength, strEOL] = (0,_tokensStore_js__WEBPACK_IMPORTED_MODULE_5__.countEOL)(op.text);\r\n const bufferEOL = this.getEOL();\r\n const expectedStrEOL = (bufferEOL === '\\r\\n' ? 2 /* CRLF */ : 1 /* LF */);\r\n if (strEOL === 0 /* Unknown */ || strEOL === expectedStrEOL) {\r\n validText = op.text;\r\n }\r\n else {\r\n validText = op.text.replace(/\\r\\n|\\r|\\n/g, bufferEOL);\r\n }\r\n }\r\n operations[i] = {\r\n sortIndex: i,\r\n identifier: op.identifier || null,\r\n range: validatedRange,\r\n rangeOffset: this.getOffsetAt(validatedRange.startLineNumber, validatedRange.startColumn),\r\n rangeLength: this.getValueLengthInRange(validatedRange),\r\n text: validText,\r\n eolCount: eolCount,\r\n firstLineLength: firstLineLength,\r\n lastLineLength: lastLineLength,\r\n forceMoveMarkers: Boolean(op.forceMoveMarkers),\r\n isAutoWhitespaceEdit: op.isAutoWhitespaceEdit || false\r\n };\r\n }\r\n // Sort operations ascending\r\n operations.sort(PieceTreeTextBuffer._sortOpsAscending);\r\n let hasTouchingRanges = false;\r\n for (let i = 0, count = operations.length - 1; i < count; i++) {\r\n let rangeEnd = operations[i].range.getEndPosition();\r\n let nextRangeStart = operations[i + 1].range.getStartPosition();\r\n if (nextRangeStart.isBeforeOrEqual(rangeEnd)) {\r\n if (nextRangeStart.isBefore(rangeEnd)) {\r\n // overlapping ranges\r\n throw new Error('Overlapping ranges are not allowed!');\r\n }\r\n hasTouchingRanges = true;\r\n }\r\n }\r\n if (canReduceOperations) {\r\n operations = this._reduceOperations(operations);\r\n }\r\n // Delta encode operations\r\n let reverseRanges = (computeUndoEdits || recordTrimAutoWhitespace ? PieceTreeTextBuffer._getInverseEditRanges(operations) : []);\r\n let newTrimAutoWhitespaceCandidates = [];\r\n if (recordTrimAutoWhitespace) {\r\n for (let i = 0; i < operations.length; i++) {\r\n let op = operations[i];\r\n let reverseRange = reverseRanges[i];\r\n if (op.isAutoWhitespaceEdit && op.range.isEmpty()) {\r\n // Record already the future line numbers that might be auto whitespace removal candidates on next edit\r\n for (let lineNumber = reverseRange.startLineNumber; lineNumber <= reverseRange.endLineNumber; lineNumber++) {\r\n let currentLineContent = '';\r\n if (lineNumber === reverseRange.startLineNumber) {\r\n currentLineContent = this.getLineContent(op.range.startLineNumber);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(currentLineContent) !== -1) {\r\n continue;\r\n }\r\n }\r\n newTrimAutoWhitespaceCandidates.push({ lineNumber: lineNumber, oldContent: currentLineContent });\r\n }\r\n }\r\n }\r\n }\r\n let reverseOperations = null;\r\n if (computeUndoEdits) {\r\n let reverseRangeDeltaOffset = 0;\r\n reverseOperations = [];\r\n for (let i = 0; i < operations.length; i++) {\r\n const op = operations[i];\r\n const reverseRange = reverseRanges[i];\r\n const bufferText = this.getValueInRange(op.range);\r\n const reverseRangeOffset = op.rangeOffset + reverseRangeDeltaOffset;\r\n reverseRangeDeltaOffset += (op.text.length - bufferText.length);\r\n reverseOperations[i] = {\r\n sortIndex: op.sortIndex,\r\n identifier: op.identifier,\r\n range: reverseRange,\r\n text: bufferText,\r\n textChange: new _textChange_js__WEBPACK_IMPORTED_MODULE_6__.TextChange(op.rangeOffset, bufferText, reverseRangeOffset, op.text)\r\n };\r\n }\r\n // Can only sort reverse operations when the order is not significant\r\n if (!hasTouchingRanges) {\r\n reverseOperations.sort((a, b) => a.sortIndex - b.sortIndex);\r\n }\r\n }\r\n this._mightContainRTL = mightContainRTL;\r\n this._mightContainUnusualLineTerminators = mightContainUnusualLineTerminators;\r\n this._mightContainNonBasicASCII = mightContainNonBasicASCII;\r\n const contentChanges = this._doApplyEdits(operations);\r\n let trimAutoWhitespaceLineNumbers = null;\r\n if (recordTrimAutoWhitespace && newTrimAutoWhitespaceCandidates.length > 0) {\r\n // sort line numbers auto whitespace removal candidates for next edit descending\r\n newTrimAutoWhitespaceCandidates.sort((a, b) => b.lineNumber - a.lineNumber);\r\n trimAutoWhitespaceLineNumbers = [];\r\n for (let i = 0, len = newTrimAutoWhitespaceCandidates.length; i < len; i++) {\r\n let lineNumber = newTrimAutoWhitespaceCandidates[i].lineNumber;\r\n if (i > 0 && newTrimAutoWhitespaceCandidates[i - 1].lineNumber === lineNumber) {\r\n // Do not have the same line number twice\r\n continue;\r\n }\r\n let prevContent = newTrimAutoWhitespaceCandidates[i].oldContent;\r\n let lineContent = this.getLineContent(lineNumber);\r\n if (lineContent.length === 0 || lineContent === prevContent || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.firstNonWhitespaceIndex(lineContent) !== -1) {\r\n continue;\r\n }\r\n trimAutoWhitespaceLineNumbers.push(lineNumber);\r\n }\r\n }\r\n this._onDidChangeContent.fire();\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_3__.ApplyEditsResult(reverseOperations, contentChanges, trimAutoWhitespaceLineNumbers);\r\n }\r\n /**\r\n * Transform operations such that they represent the same logic edit,\r\n * but that they also do not cause OOM crashes.\r\n */\r\n _reduceOperations(operations) {\r\n if (operations.length < 1000) {\r\n // We know from empirical testing that a thousand edits work fine regardless of their shape.\r\n return operations;\r\n }\r\n // At one point, due to how events are emitted and how each operation is handled,\r\n // some operations can trigger a high amount of temporary string allocations,\r\n // that will immediately get edited again.\r\n // e.g. a formatter inserting ridiculous ammounts of \\n on a model with a single line\r\n // Therefore, the strategy is to collapse all the operations into a huge single edit operation\r\n return [this._toSingleEditOperation(operations)];\r\n }\r\n _toSingleEditOperation(operations) {\r\n let forceMoveMarkers = false;\r\n const firstEditRange = operations[0].range;\r\n const lastEditRange = operations[operations.length - 1].range;\r\n const entireEditRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(firstEditRange.startLineNumber, firstEditRange.startColumn, lastEditRange.endLineNumber, lastEditRange.endColumn);\r\n let lastEndLineNumber = firstEditRange.startLineNumber;\r\n let lastEndColumn = firstEditRange.startColumn;\r\n const result = [];\r\n for (let i = 0, len = operations.length; i < len; i++) {\r\n const operation = operations[i];\r\n const range = operation.range;\r\n forceMoveMarkers = forceMoveMarkers || operation.forceMoveMarkers;\r\n // (1) -- Push old text\r\n result.push(this.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lastEndLineNumber, lastEndColumn, range.startLineNumber, range.startColumn)));\r\n // (2) -- Push new text\r\n if (operation.text.length > 0) {\r\n result.push(operation.text);\r\n }\r\n lastEndLineNumber = range.endLineNumber;\r\n lastEndColumn = range.endColumn;\r\n }\r\n const text = result.join('');\r\n const [eolCount, firstLineLength, lastLineLength] = (0,_tokensStore_js__WEBPACK_IMPORTED_MODULE_5__.countEOL)(text);\r\n return {\r\n sortIndex: 0,\r\n identifier: operations[0].identifier,\r\n range: entireEditRange,\r\n rangeOffset: this.getOffsetAt(entireEditRange.startLineNumber, entireEditRange.startColumn),\r\n rangeLength: this.getValueLengthInRange(entireEditRange, 0 /* TextDefined */),\r\n text: text,\r\n eolCount: eolCount,\r\n firstLineLength: firstLineLength,\r\n lastLineLength: lastLineLength,\r\n forceMoveMarkers: forceMoveMarkers,\r\n isAutoWhitespaceEdit: false\r\n };\r\n }\r\n _doApplyEdits(operations) {\r\n operations.sort(PieceTreeTextBuffer._sortOpsDescending);\r\n let contentChanges = [];\r\n // operations are from bottom to top\r\n for (let i = 0; i < operations.length; i++) {\r\n let op = operations[i];\r\n const startLineNumber = op.range.startLineNumber;\r\n const startColumn = op.range.startColumn;\r\n const endLineNumber = op.range.endLineNumber;\r\n const endColumn = op.range.endColumn;\r\n if (startLineNumber === endLineNumber && startColumn === endColumn && op.text.length === 0) {\r\n // no-op\r\n continue;\r\n }\r\n if (op.text) {\r\n // replacement\r\n this._pieceTree.delete(op.rangeOffset, op.rangeLength);\r\n this._pieceTree.insert(op.rangeOffset, op.text, true);\r\n }\r\n else {\r\n // deletion\r\n this._pieceTree.delete(op.rangeOffset, op.rangeLength);\r\n }\r\n const contentChangeRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n contentChanges.push({\r\n range: contentChangeRange,\r\n rangeLength: op.rangeLength,\r\n text: op.text,\r\n rangeOffset: op.rangeOffset,\r\n forceMoveMarkers: op.forceMoveMarkers\r\n });\r\n }\r\n return contentChanges;\r\n }\r\n findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) {\r\n return this._pieceTree.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\r\n }\r\n /**\r\n * Assumes `operations` are validated and sorted ascending\r\n */\r\n static _getInverseEditRanges(operations) {\r\n let result = [];\r\n let prevOpEndLineNumber = 0;\r\n let prevOpEndColumn = 0;\r\n let prevOp = null;\r\n for (let i = 0, len = operations.length; i < len; i++) {\r\n let op = operations[i];\r\n let startLineNumber;\r\n let startColumn;\r\n if (prevOp) {\r\n if (prevOp.range.endLineNumber === op.range.startLineNumber) {\r\n startLineNumber = prevOpEndLineNumber;\r\n startColumn = prevOpEndColumn + (op.range.startColumn - prevOp.range.endColumn);\r\n }\r\n else {\r\n startLineNumber = prevOpEndLineNumber + (op.range.startLineNumber - prevOp.range.endLineNumber);\r\n startColumn = op.range.startColumn;\r\n }\r\n }\r\n else {\r\n startLineNumber = op.range.startLineNumber;\r\n startColumn = op.range.startColumn;\r\n }\r\n let resultRange;\r\n if (op.text.length > 0) {\r\n // the operation inserts something\r\n const lineCount = op.eolCount + 1;\r\n if (lineCount === 1) {\r\n // single line insert\r\n resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, startColumn, startLineNumber, startColumn + op.firstLineLength);\r\n }\r\n else {\r\n // multi line insert\r\n resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, startColumn, startLineNumber + lineCount - 1, op.lastLineLength + 1);\r\n }\r\n }\r\n else {\r\n // There is nothing to insert\r\n resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, startColumn, startLineNumber, startColumn);\r\n }\r\n prevOpEndLineNumber = resultRange.endLineNumber;\r\n prevOpEndColumn = resultRange.endColumn;\r\n result.push(resultRange);\r\n prevOp = op;\r\n }\r\n return result;\r\n }\r\n static _sortOpsAscending(a, b) {\r\n let r = _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingEnds(a.range, b.range);\r\n if (r === 0) {\r\n return a.sortIndex - b.sortIndex;\r\n }\r\n return r;\r\n }\r\n static _sortOpsDescending(a, b) {\r\n let r = _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingEnds(a.range, b.range);\r\n if (r === 0) {\r\n return b.sortIndex - a.sortIndex;\r\n }\r\n return -r;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js":
|
||
/*!*****************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js ***!
|
||
\*****************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PieceTreeTextBufferFactory\": () => (/* binding */ PieceTreeTextBufferFactory),\n/* harmony export */ \"PieceTreeTextBufferBuilder\": () => (/* binding */ PieceTreeTextBufferBuilder)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieceTreeBase.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js\");\n/* harmony import */ var _pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pieceTreeTextBuffer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass PieceTreeTextBufferFactory {\r\n constructor(_chunks, _bom, _cr, _lf, _crlf, _containsRTL, _containsUnusualLineTerminators, _isBasicASCII, _normalizeEOL) {\r\n this._chunks = _chunks;\r\n this._bom = _bom;\r\n this._cr = _cr;\r\n this._lf = _lf;\r\n this._crlf = _crlf;\r\n this._containsRTL = _containsRTL;\r\n this._containsUnusualLineTerminators = _containsUnusualLineTerminators;\r\n this._isBasicASCII = _isBasicASCII;\r\n this._normalizeEOL = _normalizeEOL;\r\n }\r\n _getEOL(defaultEOL) {\r\n const totalEOLCount = this._cr + this._lf + this._crlf;\r\n const totalCRCount = this._cr + this._crlf;\r\n if (totalEOLCount === 0) {\r\n // This is an empty file or a file with precisely one line\r\n return (defaultEOL === 1 /* LF */ ? '\\n' : '\\r\\n');\r\n }\r\n if (totalCRCount > totalEOLCount / 2) {\r\n // More than half of the file contains \\r\\n ending lines\r\n return '\\r\\n';\r\n }\r\n // At least one line more ends in \\n\r\n return '\\n';\r\n }\r\n create(defaultEOL) {\r\n const eol = this._getEOL(defaultEOL);\r\n let chunks = this._chunks;\r\n if (this._normalizeEOL &&\r\n ((eol === '\\r\\n' && (this._cr > 0 || this._lf > 0))\r\n || (eol === '\\n' && (this._cr > 0 || this._crlf > 0)))) {\r\n // Normalize pieces\r\n for (let i = 0, len = chunks.length; i < len; i++) {\r\n let str = chunks[i].buffer.replace(/\\r\\n|\\r|\\n/g, eol);\r\n let newLineStart = (0,_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__.createLineStartsFast)(str);\r\n chunks[i] = new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__.StringBuffer(str, newLineStart);\r\n }\r\n }\r\n const textBuffer = new _pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_2__.PieceTreeTextBuffer(chunks, this._bom, eol, this._containsRTL, this._containsUnusualLineTerminators, this._isBasicASCII, this._normalizeEOL);\r\n return { textBuffer: textBuffer, disposable: textBuffer };\r\n }\r\n}\r\nclass PieceTreeTextBufferBuilder {\r\n constructor() {\r\n this.chunks = [];\r\n this.BOM = '';\r\n this._hasPreviousChar = false;\r\n this._previousChar = 0;\r\n this._tmpLineStarts = [];\r\n this.cr = 0;\r\n this.lf = 0;\r\n this.crlf = 0;\r\n this.containsRTL = false;\r\n this.containsUnusualLineTerminators = false;\r\n this.isBasicASCII = true;\r\n }\r\n acceptChunk(chunk) {\r\n if (chunk.length === 0) {\r\n return;\r\n }\r\n if (this.chunks.length === 0) {\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.startsWithUTF8BOM(chunk)) {\r\n this.BOM = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.UTF8_BOM_CHARACTER;\r\n chunk = chunk.substr(1);\r\n }\r\n }\r\n const lastChar = chunk.charCodeAt(chunk.length - 1);\r\n if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {\r\n // last character is \\r or a high surrogate => keep it back\r\n this._acceptChunk1(chunk.substr(0, chunk.length - 1), false);\r\n this._hasPreviousChar = true;\r\n this._previousChar = lastChar;\r\n }\r\n else {\r\n this._acceptChunk1(chunk, false);\r\n this._hasPreviousChar = false;\r\n this._previousChar = lastChar;\r\n }\r\n }\r\n _acceptChunk1(chunk, allowEmptyStrings) {\r\n if (!allowEmptyStrings && chunk.length === 0) {\r\n // Nothing to do\r\n return;\r\n }\r\n if (this._hasPreviousChar) {\r\n this._acceptChunk2(String.fromCharCode(this._previousChar) + chunk);\r\n }\r\n else {\r\n this._acceptChunk2(chunk);\r\n }\r\n }\r\n _acceptChunk2(chunk) {\r\n const lineStarts = (0,_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__.createLineStarts)(this._tmpLineStarts, chunk);\r\n this.chunks.push(new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__.StringBuffer(chunk, lineStarts.lineStarts));\r\n this.cr += lineStarts.cr;\r\n this.lf += lineStarts.lf;\r\n this.crlf += lineStarts.crlf;\r\n if (this.isBasicASCII) {\r\n this.isBasicASCII = lineStarts.isBasicASCII;\r\n }\r\n if (!this.isBasicASCII && !this.containsRTL) {\r\n // No need to check if it is basic ASCII\r\n this.containsRTL = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsRTL(chunk);\r\n }\r\n if (!this.isBasicASCII && !this.containsUnusualLineTerminators) {\r\n // No need to check if it is basic ASCII\r\n this.containsUnusualLineTerminators = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsUnusualLineTerminators(chunk);\r\n }\r\n }\r\n finish(normalizeEOL = true) {\r\n this._finish();\r\n return new PieceTreeTextBufferFactory(this.chunks, this.BOM, this.cr, this.lf, this.crlf, this.containsRTL, this.containsUnusualLineTerminators, this.isBasicASCII, normalizeEOL);\r\n }\r\n _finish() {\r\n if (this.chunks.length === 0) {\r\n this._acceptChunk1('', true);\r\n }\r\n if (this._hasPreviousChar) {\r\n this._hasPreviousChar = false;\r\n // recreate last chunk\r\n let lastChunk = this.chunks[this.chunks.length - 1];\r\n lastChunk.buffer += String.fromCharCode(this._previousChar);\r\n let newLineStarts = (0,_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__.createLineStartsFast)(lastChunk.buffer);\r\n lastChunk.lineStarts = newLineStarts;\r\n if (this._previousChar === 13 /* CarriageReturn */) {\r\n this.cr++;\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TreeNode\": () => (/* binding */ TreeNode),\n/* harmony export */ \"SENTINEL\": () => (/* binding */ SENTINEL),\n/* harmony export */ \"leftest\": () => (/* binding */ leftest),\n/* harmony export */ \"righttest\": () => (/* binding */ righttest),\n/* harmony export */ \"calculateSize\": () => (/* binding */ calculateSize),\n/* harmony export */ \"calculateLF\": () => (/* binding */ calculateLF),\n/* harmony export */ \"resetSentinel\": () => (/* binding */ resetSentinel),\n/* harmony export */ \"leftRotate\": () => (/* binding */ leftRotate),\n/* harmony export */ \"rightRotate\": () => (/* binding */ rightRotate),\n/* harmony export */ \"rbDelete\": () => (/* binding */ rbDelete),\n/* harmony export */ \"fixInsert\": () => (/* binding */ fixInsert),\n/* harmony export */ \"updateTreeMetadata\": () => (/* binding */ updateTreeMetadata),\n/* harmony export */ \"recomputeTreeMetadata\": () => (/* binding */ recomputeTreeMetadata)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass TreeNode {\r\n constructor(piece, color) {\r\n this.piece = piece;\r\n this.color = color;\r\n this.size_left = 0;\r\n this.lf_left = 0;\r\n this.parent = this;\r\n this.left = this;\r\n this.right = this;\r\n }\r\n next() {\r\n if (this.right !== SENTINEL) {\r\n return leftest(this.right);\r\n }\r\n let node = this;\r\n while (node.parent !== SENTINEL) {\r\n if (node.parent.left === node) {\r\n break;\r\n }\r\n node = node.parent;\r\n }\r\n if (node.parent === SENTINEL) {\r\n return SENTINEL;\r\n }\r\n else {\r\n return node.parent;\r\n }\r\n }\r\n prev() {\r\n if (this.left !== SENTINEL) {\r\n return righttest(this.left);\r\n }\r\n let node = this;\r\n while (node.parent !== SENTINEL) {\r\n if (node.parent.right === node) {\r\n break;\r\n }\r\n node = node.parent;\r\n }\r\n if (node.parent === SENTINEL) {\r\n return SENTINEL;\r\n }\r\n else {\r\n return node.parent;\r\n }\r\n }\r\n detach() {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n }\r\n}\r\nconst SENTINEL = new TreeNode(null, 0 /* Black */);\r\nSENTINEL.parent = SENTINEL;\r\nSENTINEL.left = SENTINEL;\r\nSENTINEL.right = SENTINEL;\r\nSENTINEL.color = 0 /* Black */;\r\nfunction leftest(node) {\r\n while (node.left !== SENTINEL) {\r\n node = node.left;\r\n }\r\n return node;\r\n}\r\nfunction righttest(node) {\r\n while (node.right !== SENTINEL) {\r\n node = node.right;\r\n }\r\n return node;\r\n}\r\nfunction calculateSize(node) {\r\n if (node === SENTINEL) {\r\n return 0;\r\n }\r\n return node.size_left + node.piece.length + calculateSize(node.right);\r\n}\r\nfunction calculateLF(node) {\r\n if (node === SENTINEL) {\r\n return 0;\r\n }\r\n return node.lf_left + node.piece.lineFeedCnt + calculateLF(node.right);\r\n}\r\nfunction resetSentinel() {\r\n SENTINEL.parent = SENTINEL;\r\n}\r\nfunction leftRotate(tree, x) {\r\n let y = x.right;\r\n // fix size_left\r\n y.size_left += x.size_left + (x.piece ? x.piece.length : 0);\r\n y.lf_left += x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);\r\n x.right = y.left;\r\n if (y.left !== SENTINEL) {\r\n y.left.parent = x;\r\n }\r\n y.parent = x.parent;\r\n if (x.parent === SENTINEL) {\r\n tree.root = y;\r\n }\r\n else if (x.parent.left === x) {\r\n x.parent.left = y;\r\n }\r\n else {\r\n x.parent.right = y;\r\n }\r\n y.left = x;\r\n x.parent = y;\r\n}\r\nfunction rightRotate(tree, y) {\r\n let x = y.left;\r\n y.left = x.right;\r\n if (x.right !== SENTINEL) {\r\n x.right.parent = y;\r\n }\r\n x.parent = y.parent;\r\n // fix size_left\r\n y.size_left -= x.size_left + (x.piece ? x.piece.length : 0);\r\n y.lf_left -= x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);\r\n if (y.parent === SENTINEL) {\r\n tree.root = x;\r\n }\r\n else if (y === y.parent.right) {\r\n y.parent.right = x;\r\n }\r\n else {\r\n y.parent.left = x;\r\n }\r\n x.right = y;\r\n y.parent = x;\r\n}\r\nfunction rbDelete(tree, z) {\r\n let x;\r\n let y;\r\n if (z.left === SENTINEL) {\r\n y = z;\r\n x = y.right;\r\n }\r\n else if (z.right === SENTINEL) {\r\n y = z;\r\n x = y.left;\r\n }\r\n else {\r\n y = leftest(z.right);\r\n x = y.right;\r\n }\r\n if (y === tree.root) {\r\n tree.root = x;\r\n // if x is null, we are removing the only node\r\n x.color = 0 /* Black */;\r\n z.detach();\r\n resetSentinel();\r\n tree.root.parent = SENTINEL;\r\n return;\r\n }\r\n let yWasRed = (y.color === 1 /* Red */);\r\n if (y === y.parent.left) {\r\n y.parent.left = x;\r\n }\r\n else {\r\n y.parent.right = x;\r\n }\r\n if (y === z) {\r\n x.parent = y.parent;\r\n recomputeTreeMetadata(tree, x);\r\n }\r\n else {\r\n if (y.parent === z) {\r\n x.parent = y;\r\n }\r\n else {\r\n x.parent = y.parent;\r\n }\r\n // as we make changes to x's hierarchy, update size_left of subtree first\r\n recomputeTreeMetadata(tree, x);\r\n y.left = z.left;\r\n y.right = z.right;\r\n y.parent = z.parent;\r\n y.color = z.color;\r\n if (z === tree.root) {\r\n tree.root = y;\r\n }\r\n else {\r\n if (z === z.parent.left) {\r\n z.parent.left = y;\r\n }\r\n else {\r\n z.parent.right = y;\r\n }\r\n }\r\n if (y.left !== SENTINEL) {\r\n y.left.parent = y;\r\n }\r\n if (y.right !== SENTINEL) {\r\n y.right.parent = y;\r\n }\r\n // update metadata\r\n // we replace z with y, so in this sub tree, the length change is z.item.length\r\n y.size_left = z.size_left;\r\n y.lf_left = z.lf_left;\r\n recomputeTreeMetadata(tree, y);\r\n }\r\n z.detach();\r\n if (x.parent.left === x) {\r\n let newSizeLeft = calculateSize(x);\r\n let newLFLeft = calculateLF(x);\r\n if (newSizeLeft !== x.parent.size_left || newLFLeft !== x.parent.lf_left) {\r\n let delta = newSizeLeft - x.parent.size_left;\r\n let lf_delta = newLFLeft - x.parent.lf_left;\r\n x.parent.size_left = newSizeLeft;\r\n x.parent.lf_left = newLFLeft;\r\n updateTreeMetadata(tree, x.parent, delta, lf_delta);\r\n }\r\n }\r\n recomputeTreeMetadata(tree, x.parent);\r\n if (yWasRed) {\r\n resetSentinel();\r\n return;\r\n }\r\n // RB-DELETE-FIXUP\r\n let w;\r\n while (x !== tree.root && x.color === 0 /* Black */) {\r\n if (x === x.parent.left) {\r\n w = x.parent.right;\r\n if (w.color === 1 /* Red */) {\r\n w.color = 0 /* Black */;\r\n x.parent.color = 1 /* Red */;\r\n leftRotate(tree, x.parent);\r\n w = x.parent.right;\r\n }\r\n if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {\r\n w.color = 1 /* Red */;\r\n x = x.parent;\r\n }\r\n else {\r\n if (w.right.color === 0 /* Black */) {\r\n w.left.color = 0 /* Black */;\r\n w.color = 1 /* Red */;\r\n rightRotate(tree, w);\r\n w = x.parent.right;\r\n }\r\n w.color = x.parent.color;\r\n x.parent.color = 0 /* Black */;\r\n w.right.color = 0 /* Black */;\r\n leftRotate(tree, x.parent);\r\n x = tree.root;\r\n }\r\n }\r\n else {\r\n w = x.parent.left;\r\n if (w.color === 1 /* Red */) {\r\n w.color = 0 /* Black */;\r\n x.parent.color = 1 /* Red */;\r\n rightRotate(tree, x.parent);\r\n w = x.parent.left;\r\n }\r\n if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {\r\n w.color = 1 /* Red */;\r\n x = x.parent;\r\n }\r\n else {\r\n if (w.left.color === 0 /* Black */) {\r\n w.right.color = 0 /* Black */;\r\n w.color = 1 /* Red */;\r\n leftRotate(tree, w);\r\n w = x.parent.left;\r\n }\r\n w.color = x.parent.color;\r\n x.parent.color = 0 /* Black */;\r\n w.left.color = 0 /* Black */;\r\n rightRotate(tree, x.parent);\r\n x = tree.root;\r\n }\r\n }\r\n }\r\n x.color = 0 /* Black */;\r\n resetSentinel();\r\n}\r\nfunction fixInsert(tree, x) {\r\n recomputeTreeMetadata(tree, x);\r\n while (x !== tree.root && x.parent.color === 1 /* Red */) {\r\n if (x.parent === x.parent.parent.left) {\r\n const y = x.parent.parent.right;\r\n if (y.color === 1 /* Red */) {\r\n x.parent.color = 0 /* Black */;\r\n y.color = 0 /* Black */;\r\n x.parent.parent.color = 1 /* Red */;\r\n x = x.parent.parent;\r\n }\r\n else {\r\n if (x === x.parent.right) {\r\n x = x.parent;\r\n leftRotate(tree, x);\r\n }\r\n x.parent.color = 0 /* Black */;\r\n x.parent.parent.color = 1 /* Red */;\r\n rightRotate(tree, x.parent.parent);\r\n }\r\n }\r\n else {\r\n const y = x.parent.parent.left;\r\n if (y.color === 1 /* Red */) {\r\n x.parent.color = 0 /* Black */;\r\n y.color = 0 /* Black */;\r\n x.parent.parent.color = 1 /* Red */;\r\n x = x.parent.parent;\r\n }\r\n else {\r\n if (x === x.parent.left) {\r\n x = x.parent;\r\n rightRotate(tree, x);\r\n }\r\n x.parent.color = 0 /* Black */;\r\n x.parent.parent.color = 1 /* Red */;\r\n leftRotate(tree, x.parent.parent);\r\n }\r\n }\r\n }\r\n tree.root.color = 0 /* Black */;\r\n}\r\nfunction updateTreeMetadata(tree, x, delta, lineFeedCntDelta) {\r\n // node length change or line feed count change\r\n while (x !== tree.root && x !== SENTINEL) {\r\n if (x.parent.left === x) {\r\n x.parent.size_left += delta;\r\n x.parent.lf_left += lineFeedCntDelta;\r\n }\r\n x = x.parent;\r\n }\r\n}\r\nfunction recomputeTreeMetadata(tree, x) {\r\n let delta = 0;\r\n let lf_delta = 0;\r\n if (x === tree.root) {\r\n return;\r\n }\r\n if (delta === 0) {\r\n // go upwards till the node whose left subtree is changed.\r\n while (x !== tree.root && x === x.parent.right) {\r\n x = x.parent;\r\n }\r\n if (x === tree.root) {\r\n // well, it means we add a node to the end (inorder)\r\n return;\r\n }\r\n // x is the node whose right subtree is changed.\r\n x = x.parent;\r\n delta = calculateSize(x.left) - x.size_left;\r\n lf_delta = calculateLF(x.left) - x.lf_left;\r\n x.size_left += delta;\r\n x.lf_left += lf_delta;\r\n }\r\n // go upwards till root. O(logN)\r\n while (x !== tree.root && (delta !== 0 || lf_delta !== 0)) {\r\n if (x.parent.left === x) {\r\n x.parent.size_left += delta;\r\n x.parent.lf_left += lf_delta;\r\n }\r\n x = x.parent;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TextChange\": () => (/* binding */ TextChange),\n/* harmony export */ \"compressConsecutiveTextChanges\": () => (/* binding */ compressConsecutiveTextChanges)\n/* harmony export */ });\n/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/buffer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/buffer.js\");\n/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nfunction escapeNewLine(str) {\r\n return (str\r\n .replace(/\\n/g, '\\\\n')\r\n .replace(/\\r/g, '\\\\r'));\r\n}\r\nclass TextChange {\r\n constructor(oldPosition, oldText, newPosition, newText) {\r\n this.oldPosition = oldPosition;\r\n this.oldText = oldText;\r\n this.newPosition = newPosition;\r\n this.newText = newText;\r\n }\r\n get oldLength() {\r\n return this.oldText.length;\r\n }\r\n get oldEnd() {\r\n return this.oldPosition + this.oldText.length;\r\n }\r\n get newLength() {\r\n return this.newText.length;\r\n }\r\n get newEnd() {\r\n return this.newPosition + this.newText.length;\r\n }\r\n toString() {\r\n if (this.oldText.length === 0) {\r\n return `(insert@${this.oldPosition} \"${escapeNewLine(this.newText)}\")`;\r\n }\r\n if (this.newText.length === 0) {\r\n return `(delete@${this.oldPosition} \"${escapeNewLine(this.oldText)}\")`;\r\n }\r\n return `(replace@${this.oldPosition} \"${escapeNewLine(this.oldText)}\" with \"${escapeNewLine(this.newText)}\")`;\r\n }\r\n static _writeStringSize(str) {\r\n return (4 + 2 * str.length);\r\n }\r\n static _writeString(b, str, offset) {\r\n const len = str.length;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.writeUInt32BE(b, len, offset);\r\n offset += 4;\r\n for (let i = 0; i < len; i++) {\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.writeUInt16LE(b, str.charCodeAt(i), offset);\r\n offset += 2;\r\n }\r\n return offset;\r\n }\r\n static _readString(b, offset) {\r\n const len = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.readUInt32BE(b, offset);\r\n offset += 4;\r\n return (0,_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__.decodeUTF16LE)(b, offset, len);\r\n }\r\n writeSize() {\r\n return (+4 // oldPosition\r\n + 4 // newPosition\r\n + TextChange._writeStringSize(this.oldText)\r\n + TextChange._writeStringSize(this.newText));\r\n }\r\n write(b, offset) {\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.writeUInt32BE(b, this.oldPosition, offset);\r\n offset += 4;\r\n _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.writeUInt32BE(b, this.newPosition, offset);\r\n offset += 4;\r\n offset = TextChange._writeString(b, this.oldText, offset);\r\n offset = TextChange._writeString(b, this.newText, offset);\r\n return offset;\r\n }\r\n static read(b, offset, dest) {\r\n const oldPosition = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const newPosition = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.readUInt32BE(b, offset);\r\n offset += 4;\r\n const oldText = TextChange._readString(b, offset);\r\n offset += TextChange._writeStringSize(oldText);\r\n const newText = TextChange._readString(b, offset);\r\n offset += TextChange._writeStringSize(newText);\r\n dest.push(new TextChange(oldPosition, oldText, newPosition, newText));\r\n return offset;\r\n }\r\n}\r\nfunction compressConsecutiveTextChanges(prevEdits, currEdits) {\r\n if (prevEdits === null || prevEdits.length === 0) {\r\n return currEdits;\r\n }\r\n const compressor = new TextChangeCompressor(prevEdits, currEdits);\r\n return compressor.compress();\r\n}\r\nclass TextChangeCompressor {\r\n constructor(prevEdits, currEdits) {\r\n this._prevEdits = prevEdits;\r\n this._currEdits = currEdits;\r\n this._result = [];\r\n this._resultLen = 0;\r\n this._prevLen = this._prevEdits.length;\r\n this._prevDeltaOffset = 0;\r\n this._currLen = this._currEdits.length;\r\n this._currDeltaOffset = 0;\r\n }\r\n compress() {\r\n let prevIndex = 0;\r\n let currIndex = 0;\r\n let prevEdit = this._getPrev(prevIndex);\r\n let currEdit = this._getCurr(currIndex);\r\n while (prevIndex < this._prevLen || currIndex < this._currLen) {\r\n if (prevEdit === null) {\r\n this._acceptCurr(currEdit);\r\n currEdit = this._getCurr(++currIndex);\r\n continue;\r\n }\r\n if (currEdit === null) {\r\n this._acceptPrev(prevEdit);\r\n prevEdit = this._getPrev(++prevIndex);\r\n continue;\r\n }\r\n if (currEdit.oldEnd <= prevEdit.newPosition) {\r\n this._acceptCurr(currEdit);\r\n currEdit = this._getCurr(++currIndex);\r\n continue;\r\n }\r\n if (prevEdit.newEnd <= currEdit.oldPosition) {\r\n this._acceptPrev(prevEdit);\r\n prevEdit = this._getPrev(++prevIndex);\r\n continue;\r\n }\r\n if (currEdit.oldPosition < prevEdit.newPosition) {\r\n const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newPosition - currEdit.oldPosition);\r\n this._acceptCurr(e1);\r\n currEdit = e2;\r\n continue;\r\n }\r\n if (prevEdit.newPosition < currEdit.oldPosition) {\r\n const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldPosition - prevEdit.newPosition);\r\n this._acceptPrev(e1);\r\n prevEdit = e2;\r\n continue;\r\n }\r\n // At this point, currEdit.oldPosition === prevEdit.newPosition\r\n let mergePrev;\r\n let mergeCurr;\r\n if (currEdit.oldEnd === prevEdit.newEnd) {\r\n mergePrev = prevEdit;\r\n mergeCurr = currEdit;\r\n prevEdit = this._getPrev(++prevIndex);\r\n currEdit = this._getCurr(++currIndex);\r\n }\r\n else if (currEdit.oldEnd < prevEdit.newEnd) {\r\n const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldLength);\r\n mergePrev = e1;\r\n mergeCurr = currEdit;\r\n prevEdit = e2;\r\n currEdit = this._getCurr(++currIndex);\r\n }\r\n else {\r\n const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newLength);\r\n mergePrev = prevEdit;\r\n mergeCurr = e1;\r\n prevEdit = this._getPrev(++prevIndex);\r\n currEdit = e2;\r\n }\r\n this._result[this._resultLen++] = new TextChange(mergePrev.oldPosition, mergePrev.oldText, mergeCurr.newPosition, mergeCurr.newText);\r\n this._prevDeltaOffset += mergePrev.newLength - mergePrev.oldLength;\r\n this._currDeltaOffset += mergeCurr.newLength - mergeCurr.oldLength;\r\n }\r\n const merged = TextChangeCompressor._merge(this._result);\r\n const cleaned = TextChangeCompressor._removeNoOps(merged);\r\n return cleaned;\r\n }\r\n _acceptCurr(currEdit) {\r\n this._result[this._resultLen++] = TextChangeCompressor._rebaseCurr(this._prevDeltaOffset, currEdit);\r\n this._currDeltaOffset += currEdit.newLength - currEdit.oldLength;\r\n }\r\n _getCurr(currIndex) {\r\n return (currIndex < this._currLen ? this._currEdits[currIndex] : null);\r\n }\r\n _acceptPrev(prevEdit) {\r\n this._result[this._resultLen++] = TextChangeCompressor._rebasePrev(this._currDeltaOffset, prevEdit);\r\n this._prevDeltaOffset += prevEdit.newLength - prevEdit.oldLength;\r\n }\r\n _getPrev(prevIndex) {\r\n return (prevIndex < this._prevLen ? this._prevEdits[prevIndex] : null);\r\n }\r\n static _rebaseCurr(prevDeltaOffset, currEdit) {\r\n return new TextChange(currEdit.oldPosition - prevDeltaOffset, currEdit.oldText, currEdit.newPosition, currEdit.newText);\r\n }\r\n static _rebasePrev(currDeltaOffset, prevEdit) {\r\n return new TextChange(prevEdit.oldPosition, prevEdit.oldText, prevEdit.newPosition + currDeltaOffset, prevEdit.newText);\r\n }\r\n static _splitPrev(edit, offset) {\r\n const preText = edit.newText.substr(0, offset);\r\n const postText = edit.newText.substr(offset);\r\n return [\r\n new TextChange(edit.oldPosition, edit.oldText, edit.newPosition, preText),\r\n new TextChange(edit.oldEnd, '', edit.newPosition + offset, postText)\r\n ];\r\n }\r\n static _splitCurr(edit, offset) {\r\n const preText = edit.oldText.substr(0, offset);\r\n const postText = edit.oldText.substr(offset);\r\n return [\r\n new TextChange(edit.oldPosition, preText, edit.newPosition, edit.newText),\r\n new TextChange(edit.oldPosition + offset, postText, edit.newEnd, '')\r\n ];\r\n }\r\n static _merge(edits) {\r\n if (edits.length === 0) {\r\n return edits;\r\n }\r\n let result = [], resultLen = 0;\r\n let prev = edits[0];\r\n for (let i = 1; i < edits.length; i++) {\r\n const curr = edits[i];\r\n if (prev.oldEnd === curr.oldPosition) {\r\n // Merge into `prev`\r\n prev = new TextChange(prev.oldPosition, prev.oldText + curr.oldText, prev.newPosition, prev.newText + curr.newText);\r\n }\r\n else {\r\n result[resultLen++] = prev;\r\n prev = curr;\r\n }\r\n }\r\n result[resultLen++] = prev;\r\n return result;\r\n }\r\n static _removeNoOps(edits) {\r\n if (edits.length === 0) {\r\n return edits;\r\n }\r\n let result = [], resultLen = 0;\r\n for (let i = 0; i < edits.length; i++) {\r\n const edit = edits[i];\r\n if (edit.oldText === edit.newText) {\r\n continue;\r\n }\r\n result[resultLen++] = edit;\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createTextBufferFactory\": () => (/* binding */ createTextBufferFactory),\n/* harmony export */ \"createTextBuffer\": () => (/* binding */ createTextBuffer),\n/* harmony export */ \"LONG_LINE_BOUNDARY\": () => (/* binding */ LONG_LINE_BOUNDARY),\n/* harmony export */ \"TextModel\": () => (/* binding */ TextModel),\n/* harmony export */ \"ModelDecorationOverviewRulerOptions\": () => (/* binding */ ModelDecorationOverviewRulerOptions),\n/* harmony export */ \"ModelDecorationMinimapOptions\": () => (/* binding */ ModelDecorationMinimapOptions),\n/* harmony export */ \"ModelDecorationOptions\": () => (/* binding */ ModelDecorationOptions),\n/* harmony export */ \"DidChangeDecorationsEmitter\": () => (/* binding */ DidChangeDecorationsEmitter),\n/* harmony export */ \"DidChangeContentEmitter\": () => (/* binding */ DidChangeContentEmitter)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _editStack_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editStack.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js\");\n/* harmony import */ var _indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./indentationGuesser.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js\");\n/* harmony import */ var _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./intervalTree.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js\");\n/* harmony import */ var _pieceTreeTextBuffer_pieceTreeTextBufferBuilder_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js\");\n/* harmony import */ var _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./textModelEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js\");\n/* harmony import */ var _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./textModelSearch.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js\");\n/* harmony import */ var _textModelTokens_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textModelTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js\");\n/* harmony import */ var _wordHelper_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./wordHelper.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js\");\n/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _modes_supports_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../modes/supports.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js\");\n/* harmony import */ var _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../modes/supports/richEditBrackets.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js\");\n/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./tokensStore.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _pieceTreeTextBuffer_pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./pieceTreeTextBuffer/pieceTreeTextBuffer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction createTextBufferBuilder() {\r\n return new _pieceTreeTextBuffer_pieceTreeTextBufferBuilder_js__WEBPACK_IMPORTED_MODULE_13__.PieceTreeTextBufferBuilder();\r\n}\r\nfunction createTextBufferFactory(text) {\r\n const builder = createTextBufferBuilder();\r\n builder.acceptChunk(text);\r\n return builder.finish();\r\n}\r\nfunction createTextBuffer(value, defaultEOL) {\r\n const factory = (typeof value === 'string' ? createTextBufferFactory(value) : value);\r\n return factory.create(defaultEOL);\r\n}\r\nlet MODEL_ID = 0;\r\nconst LIMIT_FIND_COUNT = 999;\r\nconst LONG_LINE_BOUNDARY = 10000;\r\nclass TextModelSnapshot {\r\n constructor(source) {\r\n this._source = source;\r\n this._eos = false;\r\n }\r\n read() {\r\n if (this._eos) {\r\n return null;\r\n }\r\n let result = [], resultCnt = 0, resultLength = 0;\r\n do {\r\n let tmp = this._source.read();\r\n if (tmp === null) {\r\n // end-of-stream\r\n this._eos = true;\r\n if (resultCnt === 0) {\r\n return null;\r\n }\r\n else {\r\n return result.join('');\r\n }\r\n }\r\n if (tmp.length > 0) {\r\n result[resultCnt++] = tmp;\r\n resultLength += tmp.length;\r\n }\r\n if (resultLength >= 64 * 1024) {\r\n return result.join('');\r\n }\r\n } while (true);\r\n }\r\n}\r\nconst invalidFunc = () => { throw new Error(`Invalid change accessor`); };\r\nclass BracketSearchCanceled {\r\n constructor() {\r\n this._searchCanceledBrand = undefined;\r\n }\r\n}\r\nBracketSearchCanceled.INSTANCE = new BracketSearchCanceled();\r\nfunction stripBracketSearchCanceled(result) {\r\n if (result instanceof BracketSearchCanceled) {\r\n return null;\r\n }\r\n return result;\r\n}\r\nclass TextModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n //#endregion\r\n constructor(source, creationOptions, languageIdentifier, associatedResource = null, undoRedoService) {\r\n super();\r\n //#region Events\r\n this._onWillDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onWillDispose = this._onWillDispose.event;\r\n this._onDidChangeDecorations = this._register(new DidChangeDecorationsEmitter());\r\n this.onDidChangeDecorations = this._onDidChangeDecorations.event;\r\n this._onDidChangeLanguage = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeLanguage = this._onDidChangeLanguage.event;\r\n this._onDidChangeLanguageConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeLanguageConfiguration = this._onDidChangeLanguageConfiguration.event;\r\n this._onDidChangeTokens = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeTokens = this._onDidChangeTokens.event;\r\n this._onDidChangeOptions = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeOptions = this._onDidChangeOptions.event;\r\n this._onDidChangeAttached = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChangeAttached = this._onDidChangeAttached.event;\r\n this._eventEmitter = this._register(new DidChangeContentEmitter());\r\n // Generate a new unique model id\r\n MODEL_ID++;\r\n this.id = '$model' + MODEL_ID;\r\n this.isForSimpleWidget = creationOptions.isForSimpleWidget;\r\n if (typeof associatedResource === 'undefined' || associatedResource === null) {\r\n this._associatedResource = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI.parse('inmemory://model/' + MODEL_ID);\r\n }\r\n else {\r\n this._associatedResource = associatedResource;\r\n }\r\n this._undoRedoService = undoRedoService;\r\n this._attachedEditorCount = 0;\r\n const { textBuffer, disposable } = createTextBuffer(source, creationOptions.defaultEOL);\r\n this._buffer = textBuffer;\r\n this._bufferDisposable = disposable;\r\n this._options = TextModel.resolveOptions(this._buffer, creationOptions);\r\n const bufferLineCount = this._buffer.getLineCount();\r\n const bufferTextLength = this._buffer.getValueLengthInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, bufferLineCount, this._buffer.getLineLength(bufferLineCount) + 1), 0 /* TextDefined */);\r\n // !!! Make a decision in the ctor and permanently respect this decision !!!\r\n // If a model is too large at construction time, it will never get tokenized,\r\n // under no circumstances.\r\n if (creationOptions.largeFileOptimizations) {\r\n this._isTooLargeForTokenization = ((bufferTextLength > TextModel.LARGE_FILE_SIZE_THRESHOLD)\r\n || (bufferLineCount > TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD));\r\n }\r\n else {\r\n this._isTooLargeForTokenization = false;\r\n }\r\n this._isTooLargeForSyncing = (bufferTextLength > TextModel.MODEL_SYNC_LIMIT);\r\n this._versionId = 1;\r\n this._alternativeVersionId = 1;\r\n this._initialUndoRedoSnapshot = null;\r\n this._isDisposed = false;\r\n this._isDisposing = false;\r\n this._languageIdentifier = languageIdentifier || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_19__.NULL_LANGUAGE_IDENTIFIER;\r\n this._languageRegistryListener = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.onDidChange((e) => {\r\n if (e.languageIdentifier.id === this._languageIdentifier.id) {\r\n this._onDidChangeLanguageConfiguration.fire({});\r\n }\r\n });\r\n this._instanceId = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.singleLetterHash(MODEL_ID);\r\n this._lastDecorationId = 0;\r\n this._decorations = Object.create(null);\r\n this._decorationsTree = new DecorationsTrees();\r\n this._commandManager = new _editStack_js__WEBPACK_IMPORTED_MODULE_10__.EditStack(this, undoRedoService);\r\n this._isUndoing = false;\r\n this._isRedoing = false;\r\n this._trimAutoWhitespaceLines = null;\r\n this._tokens = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__.TokensStore();\r\n this._tokens2 = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__.TokensStore2();\r\n this._tokenization = new _textModelTokens_js__WEBPACK_IMPORTED_MODULE_16__.TextModelTokenization(this);\r\n }\r\n static resolveOptions(textBuffer, options) {\r\n if (options.detectIndentation) {\r\n const guessedIndentation = (0,_indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__.guessIndentation)(textBuffer, options.tabSize, options.insertSpaces);\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_9__.TextModelResolvedOptions({\r\n tabSize: guessedIndentation.tabSize,\r\n indentSize: guessedIndentation.tabSize,\r\n insertSpaces: guessedIndentation.insertSpaces,\r\n trimAutoWhitespace: options.trimAutoWhitespace,\r\n defaultEOL: options.defaultEOL\r\n });\r\n }\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_9__.TextModelResolvedOptions({\r\n tabSize: options.tabSize,\r\n indentSize: options.indentSize,\r\n insertSpaces: options.insertSpaces,\r\n trimAutoWhitespace: options.trimAutoWhitespace,\r\n defaultEOL: options.defaultEOL\r\n });\r\n }\r\n onDidChangeRawContentFast(listener) {\r\n return this._eventEmitter.fastEvent((e) => listener(e.rawContentChangedEvent));\r\n }\r\n onDidChangeContentFast(listener) {\r\n return this._eventEmitter.fastEvent((e) => listener(e.contentChangedEvent));\r\n }\r\n onDidChangeContent(listener) {\r\n return this._eventEmitter.slowEvent((e) => listener(e.contentChangedEvent));\r\n }\r\n dispose() {\r\n this._isDisposing = true;\r\n this._onWillDispose.fire();\r\n this._languageRegistryListener.dispose();\r\n this._tokenization.dispose();\r\n this._isDisposed = true;\r\n super.dispose();\r\n this._bufferDisposable.dispose();\r\n this._isDisposing = false;\r\n // Manually release reference to previous text buffer to avoid large leaks\r\n // in case someone leaks a TextModel reference\r\n const emptyDisposedTextBuffer = new _pieceTreeTextBuffer_pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_24__.PieceTreeTextBuffer([], '', '\\n', false, false, true, true);\r\n emptyDisposedTextBuffer.dispose();\r\n this._buffer = emptyDisposedTextBuffer;\r\n }\r\n _assertNotDisposed() {\r\n if (this._isDisposed) {\r\n throw new Error('Model is disposed!');\r\n }\r\n }\r\n _emitContentChangedEvent(rawChange, change) {\r\n if (this._isDisposing) {\r\n // Do not confuse listeners by emitting any event after disposing\r\n return;\r\n }\r\n this._eventEmitter.fire(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.InternalModelContentChangeEvent(rawChange, change));\r\n }\r\n setValue(value) {\r\n this._assertNotDisposed();\r\n if (value === null) {\r\n // There's nothing to do\r\n return;\r\n }\r\n const { textBuffer, disposable } = createTextBuffer(value, this._options.defaultEOL);\r\n this._setValueFromTextBuffer(textBuffer, disposable);\r\n }\r\n _createContentChanged2(range, rangeOffset, rangeLength, text, isUndoing, isRedoing, isFlush) {\r\n return {\r\n changes: [{\r\n range: range,\r\n rangeOffset: rangeOffset,\r\n rangeLength: rangeLength,\r\n text: text,\r\n }],\r\n eol: this._buffer.getEOL(),\r\n versionId: this.getVersionId(),\r\n isUndoing: isUndoing,\r\n isRedoing: isRedoing,\r\n isFlush: isFlush\r\n };\r\n }\r\n _setValueFromTextBuffer(textBuffer, textBufferDisposable) {\r\n this._assertNotDisposed();\r\n const oldFullModelRange = this.getFullModelRange();\r\n const oldModelValueLength = this.getValueLengthInRange(oldFullModelRange);\r\n const endLineNumber = this.getLineCount();\r\n const endColumn = this.getLineMaxColumn(endLineNumber);\r\n this._buffer = textBuffer;\r\n this._bufferDisposable.dispose();\r\n this._bufferDisposable = textBufferDisposable;\r\n this._increaseVersionId();\r\n // Flush all tokens\r\n this._tokens.flush();\r\n this._tokens2.flush();\r\n // Destroy all my decorations\r\n this._decorations = Object.create(null);\r\n this._decorationsTree = new DecorationsTrees();\r\n // Destroy my edit history and settings\r\n this._commandManager.clear();\r\n this._trimAutoWhitespaceLines = null;\r\n this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawContentChangedEvent([\r\n new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawFlush()\r\n ], this._versionId, false, false), this._createContentChanged2(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, true));\r\n }\r\n setEOL(eol) {\r\n this._assertNotDisposed();\r\n const newEOL = (eol === 1 /* CRLF */ ? '\\r\\n' : '\\n');\r\n if (this._buffer.getEOL() === newEOL) {\r\n // Nothing to do\r\n return;\r\n }\r\n const oldFullModelRange = this.getFullModelRange();\r\n const oldModelValueLength = this.getValueLengthInRange(oldFullModelRange);\r\n const endLineNumber = this.getLineCount();\r\n const endColumn = this.getLineMaxColumn(endLineNumber);\r\n this._onBeforeEOLChange();\r\n this._buffer.setEOL(newEOL);\r\n this._increaseVersionId();\r\n this._onAfterEOLChange();\r\n this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawContentChangedEvent([\r\n new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawEOLChanged()\r\n ], this._versionId, false, false), this._createContentChanged2(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, false));\r\n }\r\n _onBeforeEOLChange() {\r\n // Ensure all decorations get their `range` set.\r\n const versionId = this.getVersionId();\r\n const allDecorations = this._decorationsTree.search(0, false, false, versionId);\r\n this._ensureNodesHaveRanges(allDecorations);\r\n }\r\n _onAfterEOLChange() {\r\n // Transform back `range` to offsets\r\n const versionId = this.getVersionId();\r\n const allDecorations = this._decorationsTree.collectNodesPostOrder();\r\n for (let i = 0, len = allDecorations.length; i < len; i++) {\r\n const node = allDecorations[i];\r\n const delta = node.cachedAbsoluteStart - node.start;\r\n const startOffset = this._buffer.getOffsetAt(node.range.startLineNumber, node.range.startColumn);\r\n const endOffset = this._buffer.getOffsetAt(node.range.endLineNumber, node.range.endColumn);\r\n node.cachedAbsoluteStart = startOffset;\r\n node.cachedAbsoluteEnd = endOffset;\r\n node.cachedVersionId = versionId;\r\n node.start = startOffset - delta;\r\n node.end = endOffset - delta;\r\n (0,_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.recomputeMaxEnd)(node);\r\n }\r\n }\r\n onBeforeAttached() {\r\n this._attachedEditorCount++;\r\n if (this._attachedEditorCount === 1) {\r\n this._onDidChangeAttached.fire(undefined);\r\n }\r\n }\r\n onBeforeDetached() {\r\n this._attachedEditorCount--;\r\n if (this._attachedEditorCount === 0) {\r\n this._onDidChangeAttached.fire(undefined);\r\n }\r\n }\r\n isAttachedToEditor() {\r\n return this._attachedEditorCount > 0;\r\n }\r\n getAttachedEditorCount() {\r\n return this._attachedEditorCount;\r\n }\r\n isTooLargeForSyncing() {\r\n return this._isTooLargeForSyncing;\r\n }\r\n isTooLargeForTokenization() {\r\n return this._isTooLargeForTokenization;\r\n }\r\n isDisposed() {\r\n return this._isDisposed;\r\n }\r\n isDominatedByLongLines() {\r\n this._assertNotDisposed();\r\n if (this.isTooLargeForTokenization()) {\r\n // Cannot word wrap huge files anyways, so it doesn't really matter\r\n return false;\r\n }\r\n let smallLineCharCount = 0;\r\n let longLineCharCount = 0;\r\n const lineCount = this._buffer.getLineCount();\r\n for (let lineNumber = 1; lineNumber <= lineCount; lineNumber++) {\r\n const lineLength = this._buffer.getLineLength(lineNumber);\r\n if (lineLength >= LONG_LINE_BOUNDARY) {\r\n longLineCharCount += lineLength;\r\n }\r\n else {\r\n smallLineCharCount += lineLength;\r\n }\r\n }\r\n return (longLineCharCount > smallLineCharCount);\r\n }\r\n get uri() {\r\n return this._associatedResource;\r\n }\r\n //#region Options\r\n getOptions() {\r\n this._assertNotDisposed();\r\n return this._options;\r\n }\r\n getFormattingOptions() {\r\n return {\r\n tabSize: this._options.indentSize,\r\n insertSpaces: this._options.insertSpaces\r\n };\r\n }\r\n updateOptions(_newOpts) {\r\n this._assertNotDisposed();\r\n let tabSize = (typeof _newOpts.tabSize !== 'undefined') ? _newOpts.tabSize : this._options.tabSize;\r\n let indentSize = (typeof _newOpts.indentSize !== 'undefined') ? _newOpts.indentSize : this._options.indentSize;\r\n let insertSpaces = (typeof _newOpts.insertSpaces !== 'undefined') ? _newOpts.insertSpaces : this._options.insertSpaces;\r\n let trimAutoWhitespace = (typeof _newOpts.trimAutoWhitespace !== 'undefined') ? _newOpts.trimAutoWhitespace : this._options.trimAutoWhitespace;\r\n let newOpts = new _model_js__WEBPACK_IMPORTED_MODULE_9__.TextModelResolvedOptions({\r\n tabSize: tabSize,\r\n indentSize: indentSize,\r\n insertSpaces: insertSpaces,\r\n defaultEOL: this._options.defaultEOL,\r\n trimAutoWhitespace: trimAutoWhitespace\r\n });\r\n if (this._options.equals(newOpts)) {\r\n return;\r\n }\r\n let e = this._options.createChangeEvent(newOpts);\r\n this._options = newOpts;\r\n this._onDidChangeOptions.fire(e);\r\n }\r\n detectIndentation(defaultInsertSpaces, defaultTabSize) {\r\n this._assertNotDisposed();\r\n let guessedIndentation = (0,_indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__.guessIndentation)(this._buffer, defaultTabSize, defaultInsertSpaces);\r\n this.updateOptions({\r\n insertSpaces: guessedIndentation.insertSpaces,\r\n tabSize: guessedIndentation.tabSize,\r\n indentSize: guessedIndentation.tabSize, // TODO@Alex: guess indentSize independent of tabSize\r\n });\r\n }\r\n static _normalizeIndentationFromWhitespace(str, indentSize, insertSpaces) {\r\n let spacesCnt = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n if (str.charAt(i) === '\\t') {\r\n spacesCnt += indentSize;\r\n }\r\n else {\r\n spacesCnt++;\r\n }\r\n }\r\n let result = '';\r\n if (!insertSpaces) {\r\n let tabsCnt = Math.floor(spacesCnt / indentSize);\r\n spacesCnt = spacesCnt % indentSize;\r\n for (let i = 0; i < tabsCnt; i++) {\r\n result += '\\t';\r\n }\r\n }\r\n for (let i = 0; i < spacesCnt; i++) {\r\n result += ' ';\r\n }\r\n return result;\r\n }\r\n static normalizeIndentation(str, indentSize, insertSpaces) {\r\n let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.firstNonWhitespaceIndex(str);\r\n if (firstNonWhitespaceIndex === -1) {\r\n firstNonWhitespaceIndex = str.length;\r\n }\r\n return TextModel._normalizeIndentationFromWhitespace(str.substring(0, firstNonWhitespaceIndex), indentSize, insertSpaces) + str.substring(firstNonWhitespaceIndex);\r\n }\r\n normalizeIndentation(str) {\r\n this._assertNotDisposed();\r\n return TextModel.normalizeIndentation(str, this._options.indentSize, this._options.insertSpaces);\r\n }\r\n //#endregion\r\n //#region Reading\r\n getVersionId() {\r\n this._assertNotDisposed();\r\n return this._versionId;\r\n }\r\n mightContainRTL() {\r\n return this._buffer.mightContainRTL();\r\n }\r\n mightContainUnusualLineTerminators() {\r\n return this._buffer.mightContainUnusualLineTerminators();\r\n }\r\n removeUnusualLineTerminators(selections = null) {\r\n const matches = this.findMatches(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.UNUSUAL_LINE_TERMINATORS.source, false, true, false, null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n this._buffer.resetMightContainUnusualLineTerminators();\r\n this.pushEditOperations(selections, matches.map(m => ({ range: m.range, text: null })), () => null);\r\n }\r\n mightContainNonBasicASCII() {\r\n return this._buffer.mightContainNonBasicASCII();\r\n }\r\n getAlternativeVersionId() {\r\n this._assertNotDisposed();\r\n return this._alternativeVersionId;\r\n }\r\n getInitialUndoRedoSnapshot() {\r\n this._assertNotDisposed();\r\n return this._initialUndoRedoSnapshot;\r\n }\r\n getOffsetAt(rawPosition) {\r\n this._assertNotDisposed();\r\n let position = this._validatePosition(rawPosition.lineNumber, rawPosition.column, 0 /* Relaxed */);\r\n return this._buffer.getOffsetAt(position.lineNumber, position.column);\r\n }\r\n getPositionAt(rawOffset) {\r\n this._assertNotDisposed();\r\n let offset = (Math.min(this._buffer.getLength(), Math.max(0, rawOffset)));\r\n return this._buffer.getPositionAt(offset);\r\n }\r\n _increaseVersionId() {\r\n this._versionId = this._versionId + 1;\r\n this._alternativeVersionId = this._versionId;\r\n }\r\n _overwriteVersionId(versionId) {\r\n this._versionId = versionId;\r\n }\r\n _overwriteAlternativeVersionId(newAlternativeVersionId) {\r\n this._alternativeVersionId = newAlternativeVersionId;\r\n }\r\n _overwriteInitialUndoRedoSnapshot(newInitialUndoRedoSnapshot) {\r\n this._initialUndoRedoSnapshot = newInitialUndoRedoSnapshot;\r\n }\r\n getValue(eol, preserveBOM = false) {\r\n this._assertNotDisposed();\r\n const fullModelRange = this.getFullModelRange();\r\n const fullModelValue = this.getValueInRange(fullModelRange, eol);\r\n if (preserveBOM) {\r\n return this._buffer.getBOM() + fullModelValue;\r\n }\r\n return fullModelValue;\r\n }\r\n createSnapshot(preserveBOM = false) {\r\n return new TextModelSnapshot(this._buffer.createSnapshot(preserveBOM));\r\n }\r\n getValueLength(eol, preserveBOM = false) {\r\n this._assertNotDisposed();\r\n const fullModelRange = this.getFullModelRange();\r\n const fullModelValue = this.getValueLengthInRange(fullModelRange, eol);\r\n if (preserveBOM) {\r\n return this._buffer.getBOM().length + fullModelValue;\r\n }\r\n return fullModelValue;\r\n }\r\n getValueInRange(rawRange, eol = 0 /* TextDefined */) {\r\n this._assertNotDisposed();\r\n return this._buffer.getValueInRange(this.validateRange(rawRange), eol);\r\n }\r\n getValueLengthInRange(rawRange, eol = 0 /* TextDefined */) {\r\n this._assertNotDisposed();\r\n return this._buffer.getValueLengthInRange(this.validateRange(rawRange), eol);\r\n }\r\n getCharacterCountInRange(rawRange, eol = 0 /* TextDefined */) {\r\n this._assertNotDisposed();\r\n return this._buffer.getCharacterCountInRange(this.validateRange(rawRange), eol);\r\n }\r\n getLineCount() {\r\n this._assertNotDisposed();\r\n return this._buffer.getLineCount();\r\n }\r\n getLineContent(lineNumber) {\r\n this._assertNotDisposed();\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._buffer.getLineContent(lineNumber);\r\n }\r\n getLineLength(lineNumber) {\r\n this._assertNotDisposed();\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._buffer.getLineLength(lineNumber);\r\n }\r\n getLinesContent() {\r\n this._assertNotDisposed();\r\n return this._buffer.getLinesContent();\r\n }\r\n getEOL() {\r\n this._assertNotDisposed();\r\n return this._buffer.getEOL();\r\n }\r\n getEndOfLineSequence() {\r\n this._assertNotDisposed();\r\n return (this._buffer.getEOL() === '\\n'\r\n ? 0 /* LF */\r\n : 1 /* CRLF */);\r\n }\r\n getLineMinColumn(lineNumber) {\r\n this._assertNotDisposed();\r\n return 1;\r\n }\r\n getLineMaxColumn(lineNumber) {\r\n this._assertNotDisposed();\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._buffer.getLineLength(lineNumber) + 1;\r\n }\r\n getLineFirstNonWhitespaceColumn(lineNumber) {\r\n this._assertNotDisposed();\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._buffer.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n getLineLastNonWhitespaceColumn(lineNumber) {\r\n this._assertNotDisposed();\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._buffer.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n /**\r\n * Validates `range` is within buffer bounds, but allows it to sit in between surrogate pairs, etc.\r\n * Will try to not allocate if possible.\r\n */\r\n _validateRangeRelaxedNoAllocations(range) {\r\n const linesCount = this._buffer.getLineCount();\r\n const initialStartLineNumber = range.startLineNumber;\r\n const initialStartColumn = range.startColumn;\r\n let startLineNumber;\r\n let startColumn;\r\n if (initialStartLineNumber < 1) {\r\n startLineNumber = 1;\r\n startColumn = 1;\r\n }\r\n else if (initialStartLineNumber > linesCount) {\r\n startLineNumber = linesCount;\r\n startColumn = this.getLineMaxColumn(startLineNumber);\r\n }\r\n else {\r\n startLineNumber = initialStartLineNumber | 0;\r\n if (initialStartColumn <= 1) {\r\n startColumn = 1;\r\n }\r\n else {\r\n const maxColumn = this.getLineMaxColumn(startLineNumber);\r\n if (initialStartColumn >= maxColumn) {\r\n startColumn = maxColumn;\r\n }\r\n else {\r\n startColumn = initialStartColumn | 0;\r\n }\r\n }\r\n }\r\n const initialEndLineNumber = range.endLineNumber;\r\n const initialEndColumn = range.endColumn;\r\n let endLineNumber;\r\n let endColumn;\r\n if (initialEndLineNumber < 1) {\r\n endLineNumber = 1;\r\n endColumn = 1;\r\n }\r\n else if (initialEndLineNumber > linesCount) {\r\n endLineNumber = linesCount;\r\n endColumn = this.getLineMaxColumn(endLineNumber);\r\n }\r\n else {\r\n endLineNumber = initialEndLineNumber | 0;\r\n if (initialEndColumn <= 1) {\r\n endColumn = 1;\r\n }\r\n else {\r\n const maxColumn = this.getLineMaxColumn(endLineNumber);\r\n if (initialEndColumn >= maxColumn) {\r\n endColumn = maxColumn;\r\n }\r\n else {\r\n endColumn = initialEndColumn | 0;\r\n }\r\n }\r\n }\r\n if (initialStartLineNumber === startLineNumber\r\n && initialStartColumn === startColumn\r\n && initialEndLineNumber === endLineNumber\r\n && initialEndColumn === endColumn\r\n && range instanceof _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range\r\n && !(range instanceof _core_selection_js__WEBPACK_IMPORTED_MODULE_8__.Selection)) {\r\n return range;\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n _isValidPosition(lineNumber, column, validationType) {\r\n if (typeof lineNumber !== 'number' || typeof column !== 'number') {\r\n return false;\r\n }\r\n if (isNaN(lineNumber) || isNaN(column)) {\r\n return false;\r\n }\r\n if (lineNumber < 1 || column < 1) {\r\n return false;\r\n }\r\n if ((lineNumber | 0) !== lineNumber || (column | 0) !== column) {\r\n return false;\r\n }\r\n const lineCount = this._buffer.getLineCount();\r\n if (lineNumber > lineCount) {\r\n return false;\r\n }\r\n if (column === 1) {\r\n return true;\r\n }\r\n const maxColumn = this.getLineMaxColumn(lineNumber);\r\n if (column > maxColumn) {\r\n return false;\r\n }\r\n if (validationType === 1 /* SurrogatePairs */) {\r\n // !!At this point, column > 1\r\n const charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBefore)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n _validatePosition(_lineNumber, _column, validationType) {\r\n const lineNumber = Math.floor((typeof _lineNumber === 'number' && !isNaN(_lineNumber)) ? _lineNumber : 1);\r\n const column = Math.floor((typeof _column === 'number' && !isNaN(_column)) ? _column : 1);\r\n const lineCount = this._buffer.getLineCount();\r\n if (lineNumber < 1) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(1, 1);\r\n }\r\n if (lineNumber > lineCount) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineCount, this.getLineMaxColumn(lineCount));\r\n }\r\n if (column <= 1) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineNumber, 1);\r\n }\r\n const maxColumn = this.getLineMaxColumn(lineNumber);\r\n if (column >= maxColumn) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineNumber, maxColumn);\r\n }\r\n if (validationType === 1 /* SurrogatePairs */) {\r\n // If the position would end up in the middle of a high-low surrogate pair,\r\n // we move it to before the pair\r\n // !!At this point, column > 1\r\n const charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBefore)) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineNumber, column - 1);\r\n }\r\n }\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineNumber, column);\r\n }\r\n validatePosition(position) {\r\n const validationType = 1 /* SurrogatePairs */;\r\n this._assertNotDisposed();\r\n // Avoid object allocation and cover most likely case\r\n if (position instanceof _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position) {\r\n if (this._isValidPosition(position.lineNumber, position.column, validationType)) {\r\n return position;\r\n }\r\n }\r\n return this._validatePosition(position.lineNumber, position.column, validationType);\r\n }\r\n _isValidRange(range, validationType) {\r\n const startLineNumber = range.startLineNumber;\r\n const startColumn = range.startColumn;\r\n const endLineNumber = range.endLineNumber;\r\n const endColumn = range.endColumn;\r\n if (!this._isValidPosition(startLineNumber, startColumn, 0 /* Relaxed */)) {\r\n return false;\r\n }\r\n if (!this._isValidPosition(endLineNumber, endColumn, 0 /* Relaxed */)) {\r\n return false;\r\n }\r\n if (validationType === 1 /* SurrogatePairs */) {\r\n const charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0);\r\n const charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0);\r\n const startInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBeforeStart);\r\n const endInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBeforeEnd);\r\n if (!startInsideSurrogatePair && !endInsideSurrogatePair) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n validateRange(_range) {\r\n const validationType = 1 /* SurrogatePairs */;\r\n this._assertNotDisposed();\r\n // Avoid object allocation and cover most likely case\r\n if ((_range instanceof _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range) && !(_range instanceof _core_selection_js__WEBPACK_IMPORTED_MODULE_8__.Selection)) {\r\n if (this._isValidRange(_range, validationType)) {\r\n return _range;\r\n }\r\n }\r\n const start = this._validatePosition(_range.startLineNumber, _range.startColumn, 0 /* Relaxed */);\r\n const end = this._validatePosition(_range.endLineNumber, _range.endColumn, 0 /* Relaxed */);\r\n const startLineNumber = start.lineNumber;\r\n const startColumn = start.column;\r\n const endLineNumber = end.lineNumber;\r\n const endColumn = end.column;\r\n if (validationType === 1 /* SurrogatePairs */) {\r\n const charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0);\r\n const charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0);\r\n const startInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBeforeStart);\r\n const endInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.isHighSurrogate(charCodeBeforeEnd);\r\n if (!startInsideSurrogatePair && !endInsideSurrogatePair) {\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n if (startLineNumber === endLineNumber && startColumn === endColumn) {\r\n // do not expand a collapsed range, simply move it to a valid location\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn - 1, endLineNumber, endColumn - 1);\r\n }\r\n if (startInsideSurrogatePair && endInsideSurrogatePair) {\r\n // expand range at both ends\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn - 1, endLineNumber, endColumn + 1);\r\n }\r\n if (startInsideSurrogatePair) {\r\n // only expand range at the start\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn - 1, endLineNumber, endColumn);\r\n }\r\n // only expand range at the end\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn, endLineNumber, endColumn + 1);\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n modifyPosition(rawPosition, offset) {\r\n this._assertNotDisposed();\r\n let candidate = this.getOffsetAt(rawPosition) + offset;\r\n return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max(0, candidate)));\r\n }\r\n getFullModelRange() {\r\n this._assertNotDisposed();\r\n const lineCount = this.getLineCount();\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, lineCount, this.getLineMaxColumn(lineCount));\r\n }\r\n findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) {\r\n return this._buffer.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\r\n }\r\n findMatches(searchString, rawSearchScope, isRegex, matchCase, wordSeparators, captureMatches, limitResultCount = LIMIT_FIND_COUNT) {\r\n this._assertNotDisposed();\r\n let searchRanges = null;\r\n if (rawSearchScope !== null) {\r\n if (!Array.isArray(rawSearchScope)) {\r\n rawSearchScope = [rawSearchScope];\r\n }\r\n if (rawSearchScope.every((searchScope) => _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.isIRange(searchScope))) {\r\n searchRanges = rawSearchScope.map((searchScope) => this.validateRange(searchScope));\r\n }\r\n }\r\n if (searchRanges === null) {\r\n searchRanges = [this.getFullModelRange()];\r\n }\r\n searchRanges = searchRanges.sort((d1, d2) => d1.startLineNumber - d2.startLineNumber || d1.startColumn - d2.startColumn);\r\n const uniqueSearchRanges = [];\r\n uniqueSearchRanges.push(searchRanges.reduce((prev, curr) => {\r\n if (_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.areIntersecting(prev, curr)) {\r\n return prev.plusRange(curr);\r\n }\r\n uniqueSearchRanges.push(prev);\r\n return curr;\r\n }));\r\n let matchMapper;\r\n if (!isRegex && searchString.indexOf('\\n') < 0) {\r\n // not regex, not multi line\r\n const searchParams = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators);\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return [];\r\n }\r\n matchMapper = (searchRange) => this.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount);\r\n }\r\n else {\r\n matchMapper = (searchRange) => _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.TextModelSearch.findMatches(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators), searchRange, captureMatches, limitResultCount);\r\n }\r\n return uniqueSearchRanges.map(matchMapper).reduce((arr, matches) => arr.concat(matches), []);\r\n }\r\n findNextMatch(searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) {\r\n this._assertNotDisposed();\r\n const searchStart = this.validatePosition(rawSearchStart);\r\n if (!isRegex && searchString.indexOf('\\n') < 0) {\r\n const searchParams = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators);\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return null;\r\n }\r\n const lineCount = this.getLineCount();\r\n let searchRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(searchStart.lineNumber, searchStart.column, lineCount, this.getLineMaxColumn(lineCount));\r\n let ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1);\r\n _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.TextModelSearch.findNextMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\r\n if (ret.length > 0) {\r\n return ret[0];\r\n }\r\n searchRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, searchStart.lineNumber, this.getLineMaxColumn(searchStart.lineNumber));\r\n ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1);\r\n if (ret.length > 0) {\r\n return ret[0];\r\n }\r\n return null;\r\n }\r\n return _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.TextModelSearch.findNextMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\r\n }\r\n findPreviousMatch(searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) {\r\n this._assertNotDisposed();\r\n const searchStart = this.validatePosition(rawSearchStart);\r\n return _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.TextModelSearch.findPreviousMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__.SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches);\r\n }\r\n //#endregion\r\n //#region Editing\r\n pushStackElement() {\r\n this._commandManager.pushStackElement();\r\n }\r\n popStackElement() {\r\n this._commandManager.popStackElement();\r\n }\r\n pushEOL(eol) {\r\n const currentEOL = (this.getEOL() === '\\n' ? 0 /* LF */ : 1 /* CRLF */);\r\n if (currentEOL === eol) {\r\n return;\r\n }\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n this._eventEmitter.beginDeferredEmit();\r\n if (this._initialUndoRedoSnapshot === null) {\r\n this._initialUndoRedoSnapshot = this._undoRedoService.createSnapshot(this.uri);\r\n }\r\n this._commandManager.pushEOL(eol);\r\n }\r\n finally {\r\n this._eventEmitter.endDeferredEmit();\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n _validateEditOperation(rawOperation) {\r\n if (rawOperation instanceof _model_js__WEBPACK_IMPORTED_MODULE_9__.ValidAnnotatedEditOperation) {\r\n return rawOperation;\r\n }\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_9__.ValidAnnotatedEditOperation(rawOperation.identifier || null, this.validateRange(rawOperation.range), rawOperation.text, rawOperation.forceMoveMarkers || false, rawOperation.isAutoWhitespaceEdit || false, rawOperation._isTracked || false);\r\n }\r\n _validateEditOperations(rawOperations) {\r\n const result = [];\r\n for (let i = 0, len = rawOperations.length; i < len; i++) {\r\n result[i] = this._validateEditOperation(rawOperations[i]);\r\n }\r\n return result;\r\n }\r\n pushEditOperations(beforeCursorState, editOperations, cursorStateComputer) {\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n this._eventEmitter.beginDeferredEmit();\r\n return this._pushEditOperations(beforeCursorState, this._validateEditOperations(editOperations), cursorStateComputer);\r\n }\r\n finally {\r\n this._eventEmitter.endDeferredEmit();\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n _pushEditOperations(beforeCursorState, editOperations, cursorStateComputer) {\r\n if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) {\r\n // Go through each saved line number and insert a trim whitespace edit\r\n // if it is safe to do so (no conflicts with other edits).\r\n let incomingEdits = editOperations.map((op) => {\r\n return {\r\n range: this.validateRange(op.range),\r\n text: op.text\r\n };\r\n });\r\n // Sometimes, auto-formatters change ranges automatically which can cause undesired auto whitespace trimming near the cursor\r\n // We'll use the following heuristic: if the edits occur near the cursor, then it's ok to trim auto whitespace\r\n let editsAreNearCursors = true;\r\n if (beforeCursorState) {\r\n for (let i = 0, len = beforeCursorState.length; i < len; i++) {\r\n let sel = beforeCursorState[i];\r\n let foundEditNearSel = false;\r\n for (let j = 0, lenJ = incomingEdits.length; j < lenJ; j++) {\r\n let editRange = incomingEdits[j].range;\r\n let selIsAbove = editRange.startLineNumber > sel.endLineNumber;\r\n let selIsBelow = sel.startLineNumber > editRange.endLineNumber;\r\n if (!selIsAbove && !selIsBelow) {\r\n foundEditNearSel = true;\r\n break;\r\n }\r\n }\r\n if (!foundEditNearSel) {\r\n editsAreNearCursors = false;\r\n break;\r\n }\r\n }\r\n }\r\n if (editsAreNearCursors) {\r\n for (let i = 0, len = this._trimAutoWhitespaceLines.length; i < len; i++) {\r\n let trimLineNumber = this._trimAutoWhitespaceLines[i];\r\n let maxLineColumn = this.getLineMaxColumn(trimLineNumber);\r\n let allowTrimLine = true;\r\n for (let j = 0, lenJ = incomingEdits.length; j < lenJ; j++) {\r\n let editRange = incomingEdits[j].range;\r\n let editText = incomingEdits[j].text;\r\n if (trimLineNumber < editRange.startLineNumber || trimLineNumber > editRange.endLineNumber) {\r\n // `trimLine` is completely outside this edit\r\n continue;\r\n }\r\n // At this point:\r\n // editRange.startLineNumber <= trimLine <= editRange.endLineNumber\r\n if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === maxLineColumn\r\n && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(0) === '\\n') {\r\n // This edit inserts a new line (and maybe other text) after `trimLine`\r\n continue;\r\n }\r\n if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === 1\r\n && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(editText.length - 1) === '\\n') {\r\n // This edit inserts a new line (and maybe other text) before `trimLine`\r\n continue;\r\n }\r\n // Looks like we can't trim this line as it would interfere with an incoming edit\r\n allowTrimLine = false;\r\n break;\r\n }\r\n if (allowTrimLine) {\r\n const trimRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(trimLineNumber, 1, trimLineNumber, maxLineColumn);\r\n editOperations.push(new _model_js__WEBPACK_IMPORTED_MODULE_9__.ValidAnnotatedEditOperation(null, trimRange, null, false, false, false));\r\n }\r\n }\r\n }\r\n this._trimAutoWhitespaceLines = null;\r\n }\r\n if (this._initialUndoRedoSnapshot === null) {\r\n this._initialUndoRedoSnapshot = this._undoRedoService.createSnapshot(this.uri);\r\n }\r\n return this._commandManager.pushEditOperation(beforeCursorState, editOperations, cursorStateComputer);\r\n }\r\n _applyUndo(changes, eol, resultingAlternativeVersionId, resultingSelection) {\r\n const edits = changes.map((change) => {\r\n const rangeStart = this.getPositionAt(change.newPosition);\r\n const rangeEnd = this.getPositionAt(change.newEnd);\r\n return {\r\n range: new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(rangeStart.lineNumber, rangeStart.column, rangeEnd.lineNumber, rangeEnd.column),\r\n text: change.oldText\r\n };\r\n });\r\n this._applyUndoRedoEdits(edits, eol, true, false, resultingAlternativeVersionId, resultingSelection);\r\n }\r\n _applyRedo(changes, eol, resultingAlternativeVersionId, resultingSelection) {\r\n const edits = changes.map((change) => {\r\n const rangeStart = this.getPositionAt(change.oldPosition);\r\n const rangeEnd = this.getPositionAt(change.oldEnd);\r\n return {\r\n range: new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(rangeStart.lineNumber, rangeStart.column, rangeEnd.lineNumber, rangeEnd.column),\r\n text: change.newText\r\n };\r\n });\r\n this._applyUndoRedoEdits(edits, eol, false, true, resultingAlternativeVersionId, resultingSelection);\r\n }\r\n _applyUndoRedoEdits(edits, eol, isUndoing, isRedoing, resultingAlternativeVersionId, resultingSelection) {\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n this._eventEmitter.beginDeferredEmit();\r\n this._isUndoing = isUndoing;\r\n this._isRedoing = isRedoing;\r\n this.applyEdits(edits, false);\r\n this.setEOL(eol);\r\n this._overwriteAlternativeVersionId(resultingAlternativeVersionId);\r\n }\r\n finally {\r\n this._isUndoing = false;\r\n this._isRedoing = false;\r\n this._eventEmitter.endDeferredEmit(resultingSelection);\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n applyEdits(rawOperations, computeUndoEdits = false) {\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n this._eventEmitter.beginDeferredEmit();\r\n const operations = this._validateEditOperations(rawOperations);\r\n return this._doApplyEdits(operations, computeUndoEdits);\r\n }\r\n finally {\r\n this._eventEmitter.endDeferredEmit();\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n _doApplyEdits(rawOperations, computeUndoEdits) {\r\n const oldLineCount = this._buffer.getLineCount();\r\n const result = this._buffer.applyEdits(rawOperations, this._options.trimAutoWhitespace, computeUndoEdits);\r\n const newLineCount = this._buffer.getLineCount();\r\n const contentChanges = result.changes;\r\n this._trimAutoWhitespaceLines = result.trimAutoWhitespaceLineNumbers;\r\n if (contentChanges.length !== 0) {\r\n let rawContentChanges = [];\r\n let lineCount = oldLineCount;\r\n for (let i = 0, len = contentChanges.length; i < len; i++) {\r\n const change = contentChanges[i];\r\n const [eolCount, firstLineLength, lastLineLength] = (0,_tokensStore_js__WEBPACK_IMPORTED_MODULE_22__.countEOL)(change.text);\r\n this._tokens.acceptEdit(change.range, eolCount, firstLineLength);\r\n this._tokens2.acceptEdit(change.range, eolCount, firstLineLength, lastLineLength, change.text.length > 0 ? change.text.charCodeAt(0) : 0 /* Null */);\r\n this._onDidChangeDecorations.fire();\r\n this._decorationsTree.acceptReplace(change.rangeOffset, change.rangeLength, change.text.length, change.forceMoveMarkers);\r\n const startLineNumber = change.range.startLineNumber;\r\n const endLineNumber = change.range.endLineNumber;\r\n const deletingLinesCnt = endLineNumber - startLineNumber;\r\n const insertingLinesCnt = eolCount;\r\n const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt);\r\n const changeLineCountDelta = (insertingLinesCnt - deletingLinesCnt);\r\n for (let j = editingLinesCnt; j >= 0; j--) {\r\n const editLineNumber = startLineNumber + j;\r\n const currentEditLineNumber = newLineCount - lineCount - changeLineCountDelta + editLineNumber;\r\n rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawLineChanged(editLineNumber, this.getLineContent(currentEditLineNumber)));\r\n }\r\n if (editingLinesCnt < deletingLinesCnt) {\r\n // Must delete some lines\r\n const spliceStartLineNumber = startLineNumber + editingLinesCnt;\r\n rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawLinesDeleted(spliceStartLineNumber + 1, endLineNumber));\r\n }\r\n if (editingLinesCnt < insertingLinesCnt) {\r\n // Must insert some lines\r\n const spliceLineNumber = startLineNumber + editingLinesCnt;\r\n const cnt = insertingLinesCnt - editingLinesCnt;\r\n const fromLineNumber = newLineCount - lineCount - cnt + spliceLineNumber + 1;\r\n let newLines = [];\r\n for (let i = 0; i < cnt; i++) {\r\n let lineNumber = fromLineNumber + i;\r\n newLines[lineNumber - fromLineNumber] = this.getLineContent(lineNumber);\r\n }\r\n rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawLinesInserted(spliceLineNumber + 1, startLineNumber + insertingLinesCnt, newLines));\r\n }\r\n lineCount += changeLineCountDelta;\r\n }\r\n this._increaseVersionId();\r\n this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__.ModelRawContentChangedEvent(rawContentChanges, this.getVersionId(), this._isUndoing, this._isRedoing), {\r\n changes: contentChanges,\r\n eol: this._buffer.getEOL(),\r\n versionId: this.getVersionId(),\r\n isUndoing: this._isUndoing,\r\n isRedoing: this._isRedoing,\r\n isFlush: false\r\n });\r\n }\r\n return (result.reverseEdits === null ? undefined : result.reverseEdits);\r\n }\r\n undo() {\r\n return this._undoRedoService.undo(this.uri);\r\n }\r\n canUndo() {\r\n return this._undoRedoService.canUndo(this.uri);\r\n }\r\n redo() {\r\n return this._undoRedoService.redo(this.uri);\r\n }\r\n canRedo() {\r\n return this._undoRedoService.canRedo(this.uri);\r\n }\r\n //#endregion\r\n //#region Decorations\r\n changeDecorations(callback, ownerId = 0) {\r\n this._assertNotDisposed();\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n return this._changeDecorations(ownerId, callback);\r\n }\r\n finally {\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n _changeDecorations(ownerId, callback) {\r\n let changeAccessor = {\r\n addDecoration: (range, options) => {\r\n return this._deltaDecorationsImpl(ownerId, [], [{ range: range, options: options }])[0];\r\n },\r\n changeDecoration: (id, newRange) => {\r\n this._changeDecorationImpl(id, newRange);\r\n },\r\n changeDecorationOptions: (id, options) => {\r\n this._changeDecorationOptionsImpl(id, _normalizeOptions(options));\r\n },\r\n removeDecoration: (id) => {\r\n this._deltaDecorationsImpl(ownerId, [id], []);\r\n },\r\n deltaDecorations: (oldDecorations, newDecorations) => {\r\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\r\n // nothing to do\r\n return [];\r\n }\r\n return this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations);\r\n }\r\n };\r\n let result = null;\r\n try {\r\n result = callback(changeAccessor);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n }\r\n // Invalidate change accessor\r\n changeAccessor.addDecoration = invalidFunc;\r\n changeAccessor.changeDecoration = invalidFunc;\r\n changeAccessor.changeDecorationOptions = invalidFunc;\r\n changeAccessor.removeDecoration = invalidFunc;\r\n changeAccessor.deltaDecorations = invalidFunc;\r\n return result;\r\n }\r\n deltaDecorations(oldDecorations, newDecorations, ownerId = 0) {\r\n this._assertNotDisposed();\r\n if (!oldDecorations) {\r\n oldDecorations = [];\r\n }\r\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\r\n // nothing to do\r\n return [];\r\n }\r\n try {\r\n this._onDidChangeDecorations.beginDeferredEmit();\r\n return this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations);\r\n }\r\n finally {\r\n this._onDidChangeDecorations.endDeferredEmit();\r\n }\r\n }\r\n _getTrackedRange(id) {\r\n return this.getDecorationRange(id);\r\n }\r\n _setTrackedRange(id, newRange, newStickiness) {\r\n const node = (id ? this._decorations[id] : null);\r\n if (!node) {\r\n if (!newRange) {\r\n // node doesn't exist, the request is to delete => nothing to do\r\n return null;\r\n }\r\n // node doesn't exist, the request is to set => add the tracked range\r\n return this._deltaDecorationsImpl(0, [], [{ range: newRange, options: TRACKED_RANGE_OPTIONS[newStickiness] }])[0];\r\n }\r\n if (!newRange) {\r\n // node exists, the request is to delete => delete node\r\n this._decorationsTree.delete(node);\r\n delete this._decorations[node.id];\r\n return null;\r\n }\r\n // node exists, the request is to set => change the tracked range and its options\r\n const range = this._validateRangeRelaxedNoAllocations(newRange);\r\n const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\r\n const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\r\n this._decorationsTree.delete(node);\r\n node.reset(this.getVersionId(), startOffset, endOffset, range);\r\n node.setOptions(TRACKED_RANGE_OPTIONS[newStickiness]);\r\n this._decorationsTree.insert(node);\r\n return node.id;\r\n }\r\n removeAllDecorationsWithOwnerId(ownerId) {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n const nodes = this._decorationsTree.collectNodesFromOwner(ownerId);\r\n for (let i = 0, len = nodes.length; i < len; i++) {\r\n const node = nodes[i];\r\n this._decorationsTree.delete(node);\r\n delete this._decorations[node.id];\r\n }\r\n }\r\n getDecorationOptions(decorationId) {\r\n const node = this._decorations[decorationId];\r\n if (!node) {\r\n return null;\r\n }\r\n return node.options;\r\n }\r\n getDecorationRange(decorationId) {\r\n const node = this._decorations[decorationId];\r\n if (!node) {\r\n return null;\r\n }\r\n const versionId = this.getVersionId();\r\n if (node.cachedVersionId !== versionId) {\r\n this._decorationsTree.resolveNode(node, versionId);\r\n }\r\n if (node.range === null) {\r\n node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd);\r\n }\r\n return node.range;\r\n }\r\n getLineDecorations(lineNumber, ownerId = 0, filterOutValidation = false) {\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n return [];\r\n }\r\n return this.getLinesDecorations(lineNumber, lineNumber, ownerId, filterOutValidation);\r\n }\r\n getLinesDecorations(_startLineNumber, _endLineNumber, ownerId = 0, filterOutValidation = false) {\r\n let lineCount = this.getLineCount();\r\n let startLineNumber = Math.min(lineCount, Math.max(1, _startLineNumber));\r\n let endLineNumber = Math.min(lineCount, Math.max(1, _endLineNumber));\r\n let endColumn = this.getLineMaxColumn(endLineNumber);\r\n return this._getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(startLineNumber, 1, endLineNumber, endColumn), ownerId, filterOutValidation);\r\n }\r\n getDecorationsInRange(range, ownerId = 0, filterOutValidation = false) {\r\n let validatedRange = this.validateRange(range);\r\n return this._getDecorationsInRange(validatedRange, ownerId, filterOutValidation);\r\n }\r\n getOverviewRulerDecorations(ownerId = 0, filterOutValidation = false) {\r\n const versionId = this.getVersionId();\r\n const result = this._decorationsTree.search(ownerId, filterOutValidation, true, versionId);\r\n return this._ensureNodesHaveRanges(result);\r\n }\r\n getAllDecorations(ownerId = 0, filterOutValidation = false) {\r\n const versionId = this.getVersionId();\r\n const result = this._decorationsTree.search(ownerId, filterOutValidation, false, versionId);\r\n return this._ensureNodesHaveRanges(result);\r\n }\r\n _getDecorationsInRange(filterRange, filterOwnerId, filterOutValidation) {\r\n const startOffset = this._buffer.getOffsetAt(filterRange.startLineNumber, filterRange.startColumn);\r\n const endOffset = this._buffer.getOffsetAt(filterRange.endLineNumber, filterRange.endColumn);\r\n const versionId = this.getVersionId();\r\n const result = this._decorationsTree.intervalSearch(startOffset, endOffset, filterOwnerId, filterOutValidation, versionId);\r\n return this._ensureNodesHaveRanges(result);\r\n }\r\n _ensureNodesHaveRanges(nodes) {\r\n for (let i = 0, len = nodes.length; i < len; i++) {\r\n const node = nodes[i];\r\n if (node.range === null) {\r\n node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd);\r\n }\r\n }\r\n return nodes;\r\n }\r\n _getRangeAt(start, end) {\r\n return this._buffer.getRangeAt(start, end - start);\r\n }\r\n _changeDecorationImpl(decorationId, _range) {\r\n const node = this._decorations[decorationId];\r\n if (!node) {\r\n return;\r\n }\r\n const range = this._validateRangeRelaxedNoAllocations(_range);\r\n const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\r\n const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\r\n this._decorationsTree.delete(node);\r\n node.reset(this.getVersionId(), startOffset, endOffset, range);\r\n this._decorationsTree.insert(node);\r\n this._onDidChangeDecorations.checkAffectedAndFire(node.options);\r\n }\r\n _changeDecorationOptionsImpl(decorationId, options) {\r\n const node = this._decorations[decorationId];\r\n if (!node) {\r\n return;\r\n }\r\n const nodeWasInOverviewRuler = (node.options.overviewRuler && node.options.overviewRuler.color ? true : false);\r\n const nodeIsInOverviewRuler = (options.overviewRuler && options.overviewRuler.color ? true : false);\r\n this._onDidChangeDecorations.checkAffectedAndFire(node.options);\r\n this._onDidChangeDecorations.checkAffectedAndFire(options);\r\n if (nodeWasInOverviewRuler !== nodeIsInOverviewRuler) {\r\n // Delete + Insert due to an overview ruler status change\r\n this._decorationsTree.delete(node);\r\n node.setOptions(options);\r\n this._decorationsTree.insert(node);\r\n }\r\n else {\r\n node.setOptions(options);\r\n }\r\n }\r\n _deltaDecorationsImpl(ownerId, oldDecorationsIds, newDecorations) {\r\n const versionId = this.getVersionId();\r\n const oldDecorationsLen = oldDecorationsIds.length;\r\n let oldDecorationIndex = 0;\r\n const newDecorationsLen = newDecorations.length;\r\n let newDecorationIndex = 0;\r\n let result = new Array(newDecorationsLen);\r\n while (oldDecorationIndex < oldDecorationsLen || newDecorationIndex < newDecorationsLen) {\r\n let node = null;\r\n if (oldDecorationIndex < oldDecorationsLen) {\r\n // (1) get ourselves an old node\r\n do {\r\n node = this._decorations[oldDecorationsIds[oldDecorationIndex++]];\r\n } while (!node && oldDecorationIndex < oldDecorationsLen);\r\n // (2) remove the node from the tree (if it exists)\r\n if (node) {\r\n this._decorationsTree.delete(node);\r\n this._onDidChangeDecorations.checkAffectedAndFire(node.options);\r\n }\r\n }\r\n if (newDecorationIndex < newDecorationsLen) {\r\n // (3) create a new node if necessary\r\n if (!node) {\r\n const internalDecorationId = (++this._lastDecorationId);\r\n const decorationId = `${this._instanceId};${internalDecorationId}`;\r\n node = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.IntervalNode(decorationId, 0, 0);\r\n this._decorations[decorationId] = node;\r\n }\r\n // (4) initialize node\r\n const newDecoration = newDecorations[newDecorationIndex];\r\n const range = this._validateRangeRelaxedNoAllocations(newDecoration.range);\r\n const options = _normalizeOptions(newDecoration.options);\r\n const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);\r\n const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);\r\n node.ownerId = ownerId;\r\n node.reset(versionId, startOffset, endOffset, range);\r\n node.setOptions(options);\r\n this._onDidChangeDecorations.checkAffectedAndFire(options);\r\n this._decorationsTree.insert(node);\r\n result[newDecorationIndex] = node.id;\r\n newDecorationIndex++;\r\n }\r\n else {\r\n if (node) {\r\n delete this._decorations[node.id];\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n setTokens(tokens) {\r\n if (tokens.length === 0) {\r\n return;\r\n }\r\n let ranges = [];\r\n for (let i = 0, len = tokens.length; i < len; i++) {\r\n const element = tokens[i];\r\n let minChangedLineNumber = 0;\r\n let maxChangedLineNumber = 0;\r\n let hasChange = false;\r\n for (let j = 0, lenJ = element.tokens.length; j < lenJ; j++) {\r\n const lineNumber = element.startLineNumber + j;\r\n if (hasChange) {\r\n this._tokens.setTokens(this._languageIdentifier.id, lineNumber - 1, this._buffer.getLineLength(lineNumber), element.tokens[j], false);\r\n maxChangedLineNumber = lineNumber;\r\n }\r\n else {\r\n const lineHasChange = this._tokens.setTokens(this._languageIdentifier.id, lineNumber - 1, this._buffer.getLineLength(lineNumber), element.tokens[j], true);\r\n if (lineHasChange) {\r\n hasChange = true;\r\n minChangedLineNumber = lineNumber;\r\n maxChangedLineNumber = lineNumber;\r\n }\r\n }\r\n }\r\n if (hasChange) {\r\n ranges.push({ fromLineNumber: minChangedLineNumber, toLineNumber: maxChangedLineNumber });\r\n }\r\n }\r\n if (ranges.length > 0) {\r\n this._emitModelTokensChangedEvent({\r\n tokenizationSupportChanged: false,\r\n semanticTokensApplied: false,\r\n ranges: ranges\r\n });\r\n }\r\n }\r\n setSemanticTokens(tokens, isComplete) {\r\n this._tokens2.set(tokens, isComplete);\r\n this._emitModelTokensChangedEvent({\r\n tokenizationSupportChanged: false,\r\n semanticTokensApplied: tokens !== null,\r\n ranges: [{ fromLineNumber: 1, toLineNumber: this.getLineCount() }]\r\n });\r\n }\r\n hasCompleteSemanticTokens() {\r\n return this._tokens2.isComplete();\r\n }\r\n hasSomeSemanticTokens() {\r\n return !this._tokens2.isEmpty();\r\n }\r\n setPartialSemanticTokens(range, tokens) {\r\n if (this.hasCompleteSemanticTokens()) {\r\n return;\r\n }\r\n const changedRange = this._tokens2.setPartial(range, tokens);\r\n this._emitModelTokensChangedEvent({\r\n tokenizationSupportChanged: false,\r\n semanticTokensApplied: true,\r\n ranges: [{ fromLineNumber: changedRange.startLineNumber, toLineNumber: changedRange.endLineNumber }]\r\n });\r\n }\r\n tokenizeViewport(startLineNumber, endLineNumber) {\r\n startLineNumber = Math.max(1, startLineNumber);\r\n endLineNumber = Math.min(this._buffer.getLineCount(), endLineNumber);\r\n this._tokenization.tokenizeViewport(startLineNumber, endLineNumber);\r\n }\r\n clearTokens() {\r\n this._tokens.flush();\r\n this._emitModelTokensChangedEvent({\r\n tokenizationSupportChanged: true,\r\n semanticTokensApplied: false,\r\n ranges: [{\r\n fromLineNumber: 1,\r\n toLineNumber: this._buffer.getLineCount()\r\n }]\r\n });\r\n }\r\n _emitModelTokensChangedEvent(e) {\r\n if (!this._isDisposing) {\r\n this._onDidChangeTokens.fire(e);\r\n }\r\n }\r\n resetTokenization() {\r\n this._tokenization.reset();\r\n }\r\n forceTokenization(lineNumber) {\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n this._tokenization.forceTokenization(lineNumber);\r\n }\r\n isCheapToTokenize(lineNumber) {\r\n return this._tokenization.isCheapToTokenize(lineNumber);\r\n }\r\n tokenizeIfCheap(lineNumber) {\r\n if (this.isCheapToTokenize(lineNumber)) {\r\n this.forceTokenization(lineNumber);\r\n }\r\n }\r\n getLineTokens(lineNumber) {\r\n if (lineNumber < 1 || lineNumber > this.getLineCount()) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._getLineTokens(lineNumber);\r\n }\r\n _getLineTokens(lineNumber) {\r\n const lineText = this.getLineContent(lineNumber);\r\n const syntacticTokens = this._tokens.getTokens(this._languageIdentifier.id, lineNumber - 1, lineText);\r\n return this._tokens2.addSemanticTokens(lineNumber, syntacticTokens);\r\n }\r\n getLanguageIdentifier() {\r\n return this._languageIdentifier;\r\n }\r\n getModeId() {\r\n return this._languageIdentifier.language;\r\n }\r\n setMode(languageIdentifier) {\r\n if (this._languageIdentifier.id === languageIdentifier.id) {\r\n // There's nothing to do\r\n return;\r\n }\r\n let e = {\r\n oldLanguage: this._languageIdentifier.language,\r\n newLanguage: languageIdentifier.language\r\n };\r\n this._languageIdentifier = languageIdentifier;\r\n this._onDidChangeLanguage.fire(e);\r\n this._onDidChangeLanguageConfiguration.fire({});\r\n }\r\n getLanguageIdAtPosition(lineNumber, column) {\r\n const position = this.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(lineNumber, column));\r\n const lineTokens = this.getLineTokens(position.lineNumber);\r\n return lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(position.column - 1));\r\n }\r\n // Having tokens allows implementing additional helper methods\r\n getWordAtPosition(_position) {\r\n this._assertNotDisposed();\r\n const position = this.validatePosition(_position);\r\n const lineContent = this.getLineContent(position.lineNumber);\r\n const lineTokens = this._getLineTokens(position.lineNumber);\r\n const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n // (1). First try checking right biased word\r\n const [rbStartOffset, rbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex);\r\n const rightBiasedWord = (0,_wordHelper_js__WEBPACK_IMPORTED_MODULE_17__.getWordAtText)(position.column, _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex)), lineContent.substring(rbStartOffset, rbEndOffset), rbStartOffset);\r\n // Make sure the result touches the original passed in position\r\n if (rightBiasedWord && rightBiasedWord.startColumn <= _position.column && _position.column <= rightBiasedWord.endColumn) {\r\n return rightBiasedWord;\r\n }\r\n // (2). Else, if we were at a language boundary, check the left biased word\r\n if (tokenIndex > 0 && rbStartOffset === position.column - 1) {\r\n // edge case, where `position` sits between two tokens belonging to two different languages\r\n const [lbStartOffset, lbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex - 1);\r\n const leftBiasedWord = (0,_wordHelper_js__WEBPACK_IMPORTED_MODULE_17__.getWordAtText)(position.column, _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex - 1)), lineContent.substring(lbStartOffset, lbEndOffset), lbStartOffset);\r\n // Make sure the result touches the original passed in position\r\n if (leftBiasedWord && leftBiasedWord.startColumn <= _position.column && _position.column <= leftBiasedWord.endColumn) {\r\n return leftBiasedWord;\r\n }\r\n }\r\n return null;\r\n }\r\n static _findLanguageBoundaries(lineTokens, tokenIndex) {\r\n const languageId = lineTokens.getLanguageId(tokenIndex);\r\n // go left until a different language is hit\r\n let startOffset = 0;\r\n for (let i = tokenIndex; i >= 0 && lineTokens.getLanguageId(i) === languageId; i--) {\r\n startOffset = lineTokens.getStartOffset(i);\r\n }\r\n // go right until a different language is hit\r\n let endOffset = lineTokens.getLineContent().length;\r\n for (let i = tokenIndex, tokenCount = lineTokens.getCount(); i < tokenCount && lineTokens.getLanguageId(i) === languageId; i++) {\r\n endOffset = lineTokens.getEndOffset(i);\r\n }\r\n return [startOffset, endOffset];\r\n }\r\n getWordUntilPosition(position) {\r\n const wordAtPosition = this.getWordAtPosition(position);\r\n if (!wordAtPosition) {\r\n return {\r\n word: '',\r\n startColumn: position.column,\r\n endColumn: position.column\r\n };\r\n }\r\n return {\r\n word: wordAtPosition.word.substr(0, position.column - wordAtPosition.startColumn),\r\n startColumn: wordAtPosition.startColumn,\r\n endColumn: position.column\r\n };\r\n }\r\n findMatchingBracketUp(_bracket, _position) {\r\n let bracket = _bracket.toLowerCase();\r\n let position = this.validatePosition(_position);\r\n let lineTokens = this._getLineTokens(position.lineNumber);\r\n let languageId = lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(position.column - 1));\r\n let bracketsSupport = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n if (!bracketsSupport) {\r\n return null;\r\n }\r\n let data = bracketsSupport.textIsBracket[bracket];\r\n if (!data) {\r\n return null;\r\n }\r\n return stripBracketSearchCanceled(this._findMatchingBracketUp(data, position, null));\r\n }\r\n matchBracket(position) {\r\n return this._matchBracket(this.validatePosition(position));\r\n }\r\n _matchBracket(position) {\r\n const lineNumber = position.lineNumber;\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n if (tokenIndex < 0) {\r\n return null;\r\n }\r\n const currentModeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(lineTokens.getLanguageId(tokenIndex));\r\n // check that the token is not to be ignored\r\n if (currentModeBrackets && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex))) {\r\n // limit search to not go before `maxBracketLength`\r\n let searchStartOffset = Math.max(0, position.column - 1 - currentModeBrackets.maxBracketLength);\r\n for (let i = tokenIndex - 1; i >= 0; i--) {\r\n const tokenEndOffset = lineTokens.getEndOffset(i);\r\n if (tokenEndOffset <= searchStartOffset) {\r\n break;\r\n }\r\n if ((0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(i))) {\r\n searchStartOffset = tokenEndOffset;\r\n }\r\n }\r\n // limit search to not go after `maxBracketLength`\r\n const searchEndOffset = Math.min(lineText.length, position.column - 1 + currentModeBrackets.maxBracketLength);\r\n // it might be the case that [currentTokenStart -> currentTokenEnd] contains multiple brackets\r\n // `bestResult` will contain the most right-side result\r\n let bestResult = null;\r\n while (true) {\r\n const foundBracket = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(currentModeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (!foundBracket) {\r\n // there are no more brackets in this text\r\n break;\r\n }\r\n // check that we didn't hit a bracket too far away from position\r\n if (foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) {\r\n const foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1).toLowerCase();\r\n const r = this._matchFoundBracket(foundBracket, currentModeBrackets.textIsBracket[foundBracketText], currentModeBrackets.textIsOpenBracket[foundBracketText], null);\r\n if (r) {\r\n if (r instanceof BracketSearchCanceled) {\r\n return null;\r\n }\r\n bestResult = r;\r\n }\r\n }\r\n searchStartOffset = foundBracket.endColumn - 1;\r\n }\r\n if (bestResult) {\r\n return bestResult;\r\n }\r\n }\r\n // If position is in between two tokens, try also looking in the previous token\r\n if (tokenIndex > 0 && lineTokens.getStartOffset(tokenIndex) === position.column - 1) {\r\n const prevTokenIndex = tokenIndex - 1;\r\n const prevModeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(lineTokens.getLanguageId(prevTokenIndex));\r\n // check that previous token is not to be ignored\r\n if (prevModeBrackets && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(prevTokenIndex))) {\r\n // limit search in case previous token is very large, there's no need to go beyond `maxBracketLength`\r\n const searchStartOffset = Math.max(0, position.column - 1 - prevModeBrackets.maxBracketLength);\r\n let searchEndOffset = Math.min(lineText.length, position.column - 1 + prevModeBrackets.maxBracketLength);\r\n for (let i = prevTokenIndex + 1; i < tokenCount; i++) {\r\n const tokenStartOffset = lineTokens.getStartOffset(i);\r\n if (tokenStartOffset >= searchEndOffset) {\r\n break;\r\n }\r\n if ((0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(i))) {\r\n searchEndOffset = tokenStartOffset;\r\n }\r\n }\r\n const foundBracket = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findPrevBracketInRange(prevModeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n // check that we didn't hit a bracket too far away from position\r\n if (foundBracket && foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) {\r\n const foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1).toLowerCase();\r\n const r = this._matchFoundBracket(foundBracket, prevModeBrackets.textIsBracket[foundBracketText], prevModeBrackets.textIsOpenBracket[foundBracketText], null);\r\n if (r) {\r\n if (r instanceof BracketSearchCanceled) {\r\n return null;\r\n }\r\n return r;\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n _matchFoundBracket(foundBracket, data, isOpen, continueSearchPredicate) {\r\n if (!data) {\r\n return null;\r\n }\r\n const matched = (isOpen\r\n ? this._findMatchingBracketDown(data, foundBracket.getEndPosition(), continueSearchPredicate)\r\n : this._findMatchingBracketUp(data, foundBracket.getStartPosition(), continueSearchPredicate));\r\n if (!matched) {\r\n return null;\r\n }\r\n if (matched instanceof BracketSearchCanceled) {\r\n return matched;\r\n }\r\n return [foundBracket, matched];\r\n }\r\n _findMatchingBracketUp(bracket, position, continueSearchPredicate) {\r\n // console.log('_findMatchingBracketUp: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position));\r\n const languageId = bracket.languageIdentifier.id;\r\n const reversedBracketRegex = bracket.reversedRegex;\r\n let count = -1;\r\n let totalCallCount = 0;\r\n const searchPrevMatchingBracketInRange = (lineNumber, lineText, searchStartOffset, searchEndOffset) => {\r\n while (true) {\r\n if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) {\r\n return BracketSearchCanceled.INSTANCE;\r\n }\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findPrevBracketInRange(reversedBracketRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (!r) {\r\n break;\r\n }\r\n const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase();\r\n if (bracket.isOpen(hitText)) {\r\n count++;\r\n }\r\n else if (bracket.isClose(hitText)) {\r\n count--;\r\n }\r\n if (count === 0) {\r\n return r;\r\n }\r\n searchEndOffset = r.startColumn - 1;\r\n }\r\n return null;\r\n };\r\n for (let lineNumber = position.lineNumber; lineNumber >= 1; lineNumber--) {\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n let tokenIndex = tokenCount - 1;\r\n let searchStartOffset = lineText.length;\r\n let searchEndOffset = lineText.length;\r\n if (lineNumber === position.lineNumber) {\r\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n searchStartOffset = position.column - 1;\r\n searchEndOffset = position.column - 1;\r\n }\r\n let prevSearchInToken = true;\r\n for (; tokenIndex >= 0; tokenIndex--) {\r\n const searchInToken = (lineTokens.getLanguageId(tokenIndex) === languageId && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex)));\r\n if (searchInToken) {\r\n // this token should be searched\r\n if (prevSearchInToken) {\r\n // the previous token should be searched, simply extend searchStartOffset\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n }\r\n else {\r\n // the previous token should not be searched\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n }\r\n else {\r\n // this token should not be searched\r\n if (prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchPrevMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n }\r\n prevSearchInToken = searchInToken;\r\n }\r\n if (prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchPrevMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n _findMatchingBracketDown(bracket, position, continueSearchPredicate) {\r\n // console.log('_findMatchingBracketDown: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position));\r\n const languageId = bracket.languageIdentifier.id;\r\n const bracketRegex = bracket.forwardRegex;\r\n let count = 1;\r\n let totalCallCount = 0;\r\n const searchNextMatchingBracketInRange = (lineNumber, lineText, searchStartOffset, searchEndOffset) => {\r\n while (true) {\r\n if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) {\r\n return BracketSearchCanceled.INSTANCE;\r\n }\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(bracketRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (!r) {\r\n break;\r\n }\r\n const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase();\r\n if (bracket.isOpen(hitText)) {\r\n count++;\r\n }\r\n else if (bracket.isClose(hitText)) {\r\n count--;\r\n }\r\n if (count === 0) {\r\n return r;\r\n }\r\n searchStartOffset = r.endColumn - 1;\r\n }\r\n return null;\r\n };\r\n const lineCount = this.getLineCount();\r\n for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) {\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n let tokenIndex = 0;\r\n let searchStartOffset = 0;\r\n let searchEndOffset = 0;\r\n if (lineNumber === position.lineNumber) {\r\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n searchStartOffset = position.column - 1;\r\n searchEndOffset = position.column - 1;\r\n }\r\n let prevSearchInToken = true;\r\n for (; tokenIndex < tokenCount; tokenIndex++) {\r\n const searchInToken = (lineTokens.getLanguageId(tokenIndex) === languageId && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex)));\r\n if (searchInToken) {\r\n // this token should be searched\r\n if (prevSearchInToken) {\r\n // the previous token should be searched, simply extend searchEndOffset\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n else {\r\n // the previous token should not be searched\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n }\r\n else {\r\n // this token should not be searched\r\n if (prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchNextMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n }\r\n prevSearchInToken = searchInToken;\r\n }\r\n if (prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchNextMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n findPrevBracket(_position) {\r\n const position = this.validatePosition(_position);\r\n let languageId = -1;\r\n let modeBrackets = null;\r\n for (let lineNumber = position.lineNumber; lineNumber >= 1; lineNumber--) {\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n let tokenIndex = tokenCount - 1;\r\n let searchStartOffset = lineText.length;\r\n let searchEndOffset = lineText.length;\r\n if (lineNumber === position.lineNumber) {\r\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n searchStartOffset = position.column - 1;\r\n searchEndOffset = position.column - 1;\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n }\r\n }\r\n let prevSearchInToken = true;\r\n for (; tokenIndex >= 0; tokenIndex--) {\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n // language id change!\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n prevSearchInToken = false;\r\n }\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n }\r\n const searchInToken = (!!modeBrackets && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex)));\r\n if (searchInToken) {\r\n // this token should be searched\r\n if (prevSearchInToken) {\r\n // the previous token should be searched, simply extend searchStartOffset\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n }\r\n else {\r\n // the previous token should not be searched\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n }\r\n else {\r\n // this token should not be searched\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n }\r\n }\r\n prevSearchInToken = searchInToken;\r\n }\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n findNextBracket(_position) {\r\n const position = this.validatePosition(_position);\r\n const lineCount = this.getLineCount();\r\n let languageId = -1;\r\n let modeBrackets = null;\r\n for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) {\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n let tokenIndex = 0;\r\n let searchStartOffset = 0;\r\n let searchEndOffset = 0;\r\n if (lineNumber === position.lineNumber) {\r\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n searchStartOffset = position.column - 1;\r\n searchEndOffset = position.column - 1;\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n }\r\n }\r\n let prevSearchInToken = true;\r\n for (; tokenIndex < tokenCount; tokenIndex++) {\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n // language id change!\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n prevSearchInToken = false;\r\n }\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n }\r\n const searchInToken = (!!modeBrackets && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex)));\r\n if (searchInToken) {\r\n // this token should be searched\r\n if (prevSearchInToken) {\r\n // the previous token should be searched, simply extend searchEndOffset\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n else {\r\n // the previous token should not be searched\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n }\r\n else {\r\n // this token should not be searched\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n }\r\n }\r\n prevSearchInToken = searchInToken;\r\n }\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return this._toFoundBracket(modeBrackets, r);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n findEnclosingBrackets(_position, maxDuration) {\r\n let continueSearchPredicate;\r\n if (typeof maxDuration === 'undefined') {\r\n continueSearchPredicate = null;\r\n }\r\n else {\r\n const startTime = Date.now();\r\n continueSearchPredicate = () => {\r\n return (Date.now() - startTime <= maxDuration);\r\n };\r\n }\r\n const position = this.validatePosition(_position);\r\n const lineCount = this.getLineCount();\r\n const savedCounts = new Map();\r\n let counts = [];\r\n const resetCounts = (languageId, modeBrackets) => {\r\n if (!savedCounts.has(languageId)) {\r\n let tmp = [];\r\n for (let i = 0, len = modeBrackets ? modeBrackets.brackets.length : 0; i < len; i++) {\r\n tmp[i] = 0;\r\n }\r\n savedCounts.set(languageId, tmp);\r\n }\r\n counts = savedCounts.get(languageId);\r\n };\r\n let totalCallCount = 0;\r\n const searchInRange = (modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset) => {\r\n while (true) {\r\n if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) {\r\n return BracketSearchCanceled.INSTANCE;\r\n }\r\n const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__.BracketsUtils.findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (!r) {\r\n break;\r\n }\r\n const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase();\r\n const bracket = modeBrackets.textIsBracket[hitText];\r\n if (bracket) {\r\n if (bracket.isOpen(hitText)) {\r\n counts[bracket.index]++;\r\n }\r\n else if (bracket.isClose(hitText)) {\r\n counts[bracket.index]--;\r\n }\r\n if (counts[bracket.index] === -1) {\r\n return this._matchFoundBracket(r, bracket, false, continueSearchPredicate);\r\n }\r\n }\r\n searchStartOffset = r.endColumn - 1;\r\n }\r\n return null;\r\n };\r\n let languageId = -1;\r\n let modeBrackets = null;\r\n for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) {\r\n const lineTokens = this._getLineTokens(lineNumber);\r\n const tokenCount = lineTokens.getCount();\r\n const lineText = this._buffer.getLineContent(lineNumber);\r\n let tokenIndex = 0;\r\n let searchStartOffset = 0;\r\n let searchEndOffset = 0;\r\n if (lineNumber === position.lineNumber) {\r\n tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1);\r\n searchStartOffset = position.column - 1;\r\n searchEndOffset = position.column - 1;\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n resetCounts(languageId, modeBrackets);\r\n }\r\n }\r\n let prevSearchInToken = true;\r\n for (; tokenIndex < tokenCount; tokenIndex++) {\r\n const tokenLanguageId = lineTokens.getLanguageId(tokenIndex);\r\n if (languageId !== tokenLanguageId) {\r\n // language id change!\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return stripBracketSearchCanceled(r);\r\n }\r\n prevSearchInToken = false;\r\n }\r\n languageId = tokenLanguageId;\r\n modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getBracketsSupport(languageId);\r\n resetCounts(languageId, modeBrackets);\r\n }\r\n const searchInToken = (!!modeBrackets && !(0,_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__.ignoreBracketsInToken)(lineTokens.getStandardTokenType(tokenIndex)));\r\n if (searchInToken) {\r\n // this token should be searched\r\n if (prevSearchInToken) {\r\n // the previous token should be searched, simply extend searchEndOffset\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n else {\r\n // the previous token should not be searched\r\n searchStartOffset = lineTokens.getStartOffset(tokenIndex);\r\n searchEndOffset = lineTokens.getEndOffset(tokenIndex);\r\n }\r\n }\r\n else {\r\n // this token should not be searched\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return stripBracketSearchCanceled(r);\r\n }\r\n }\r\n }\r\n prevSearchInToken = searchInToken;\r\n }\r\n if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) {\r\n const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset);\r\n if (r) {\r\n return stripBracketSearchCanceled(r);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n _toFoundBracket(modeBrackets, r) {\r\n if (!r) {\r\n return null;\r\n }\r\n let text = this.getValueInRange(r);\r\n text = text.toLowerCase();\r\n let data = modeBrackets.textIsBracket[text];\r\n if (!data) {\r\n return null;\r\n }\r\n return {\r\n range: r,\r\n open: data.open,\r\n close: data.close,\r\n isOpen: modeBrackets.textIsOpenBracket[text]\r\n };\r\n }\r\n /**\r\n * Returns:\r\n * - -1 => the line consists of whitespace\r\n * - otherwise => the indent level is returned value\r\n */\r\n static computeIndentLevel(line, tabSize) {\r\n let indent = 0;\r\n let i = 0;\r\n let len = line.length;\r\n while (i < len) {\r\n let chCode = line.charCodeAt(i);\r\n if (chCode === 32 /* Space */) {\r\n indent++;\r\n }\r\n else if (chCode === 9 /* Tab */) {\r\n indent = indent - indent % tabSize + tabSize;\r\n }\r\n else {\r\n break;\r\n }\r\n i++;\r\n }\r\n if (i === len) {\r\n return -1; // line only consists of whitespace\r\n }\r\n return indent;\r\n }\r\n _computeIndentLevel(lineIndex) {\r\n return TextModel.computeIndentLevel(this._buffer.getLineContent(lineIndex + 1), this._options.tabSize);\r\n }\r\n getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber) {\r\n this._assertNotDisposed();\r\n const lineCount = this.getLineCount();\r\n if (lineNumber < 1 || lineNumber > lineCount) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n const foldingRules = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id);\r\n const offSide = Boolean(foldingRules && foldingRules.offSide);\r\n let up_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let up_aboveContentLineIndent = -1;\r\n let up_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let up_belowContentLineIndent = -1;\r\n const up_resolveIndents = (lineNumber) => {\r\n if (up_aboveContentLineIndex !== -1 && (up_aboveContentLineIndex === -2 || up_aboveContentLineIndex > lineNumber - 1)) {\r\n up_aboveContentLineIndex = -1;\r\n up_aboveContentLineIndent = -1;\r\n // must find previous line with content\r\n for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n up_aboveContentLineIndex = lineIndex;\r\n up_aboveContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n if (up_belowContentLineIndex === -2) {\r\n up_belowContentLineIndex = -1;\r\n up_belowContentLineIndent = -1;\r\n // must find next line with content\r\n for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n up_belowContentLineIndex = lineIndex;\r\n up_belowContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n let down_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let down_aboveContentLineIndent = -1;\r\n let down_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let down_belowContentLineIndent = -1;\r\n const down_resolveIndents = (lineNumber) => {\r\n if (down_aboveContentLineIndex === -2) {\r\n down_aboveContentLineIndex = -1;\r\n down_aboveContentLineIndent = -1;\r\n // must find previous line with content\r\n for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n down_aboveContentLineIndex = lineIndex;\r\n down_aboveContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n if (down_belowContentLineIndex !== -1 && (down_belowContentLineIndex === -2 || down_belowContentLineIndex < lineNumber - 1)) {\r\n down_belowContentLineIndex = -1;\r\n down_belowContentLineIndent = -1;\r\n // must find next line with content\r\n for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n down_belowContentLineIndex = lineIndex;\r\n down_belowContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n let startLineNumber = 0;\r\n let goUp = true;\r\n let endLineNumber = 0;\r\n let goDown = true;\r\n let indent = 0;\r\n let initialIndent = 0;\r\n for (let distance = 0; goUp || goDown; distance++) {\r\n const upLineNumber = lineNumber - distance;\r\n const downLineNumber = lineNumber + distance;\r\n if (distance > 1 && (upLineNumber < 1 || upLineNumber < minLineNumber)) {\r\n goUp = false;\r\n }\r\n if (distance > 1 && (downLineNumber > lineCount || downLineNumber > maxLineNumber)) {\r\n goDown = false;\r\n }\r\n if (distance > 50000) {\r\n // stop processing\r\n goUp = false;\r\n goDown = false;\r\n }\r\n let upLineIndentLevel = -1;\r\n if (goUp) {\r\n // compute indent level going up\r\n const currentIndent = this._computeIndentLevel(upLineNumber - 1);\r\n if (currentIndent >= 0) {\r\n // This line has content (besides whitespace)\r\n // Use the line's indent\r\n up_belowContentLineIndex = upLineNumber - 1;\r\n up_belowContentLineIndent = currentIndent;\r\n upLineIndentLevel = Math.ceil(currentIndent / this._options.indentSize);\r\n }\r\n else {\r\n up_resolveIndents(upLineNumber);\r\n upLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, up_aboveContentLineIndent, up_belowContentLineIndent);\r\n }\r\n }\r\n let downLineIndentLevel = -1;\r\n if (goDown) {\r\n // compute indent level going down\r\n const currentIndent = this._computeIndentLevel(downLineNumber - 1);\r\n if (currentIndent >= 0) {\r\n // This line has content (besides whitespace)\r\n // Use the line's indent\r\n down_aboveContentLineIndex = downLineNumber - 1;\r\n down_aboveContentLineIndent = currentIndent;\r\n downLineIndentLevel = Math.ceil(currentIndent / this._options.indentSize);\r\n }\r\n else {\r\n down_resolveIndents(downLineNumber);\r\n downLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, down_aboveContentLineIndent, down_belowContentLineIndent);\r\n }\r\n }\r\n if (distance === 0) {\r\n initialIndent = upLineIndentLevel;\r\n continue;\r\n }\r\n if (distance === 1) {\r\n if (downLineNumber <= lineCount && downLineIndentLevel >= 0 && initialIndent + 1 === downLineIndentLevel) {\r\n // This is the beginning of a scope, we have special handling here, since we want the\r\n // child scope indent to be active, not the parent scope\r\n goUp = false;\r\n startLineNumber = downLineNumber;\r\n endLineNumber = downLineNumber;\r\n indent = downLineIndentLevel;\r\n continue;\r\n }\r\n if (upLineNumber >= 1 && upLineIndentLevel >= 0 && upLineIndentLevel - 1 === initialIndent) {\r\n // This is the end of a scope, just like above\r\n goDown = false;\r\n startLineNumber = upLineNumber;\r\n endLineNumber = upLineNumber;\r\n indent = upLineIndentLevel;\r\n continue;\r\n }\r\n startLineNumber = lineNumber;\r\n endLineNumber = lineNumber;\r\n indent = initialIndent;\r\n if (indent === 0) {\r\n // No need to continue\r\n return { startLineNumber, endLineNumber, indent };\r\n }\r\n }\r\n if (goUp) {\r\n if (upLineIndentLevel >= indent) {\r\n startLineNumber = upLineNumber;\r\n }\r\n else {\r\n goUp = false;\r\n }\r\n }\r\n if (goDown) {\r\n if (downLineIndentLevel >= indent) {\r\n endLineNumber = downLineNumber;\r\n }\r\n else {\r\n goDown = false;\r\n }\r\n }\r\n }\r\n return { startLineNumber, endLineNumber, indent };\r\n }\r\n getLinesIndentGuides(startLineNumber, endLineNumber) {\r\n this._assertNotDisposed();\r\n const lineCount = this.getLineCount();\r\n if (startLineNumber < 1 || startLineNumber > lineCount) {\r\n throw new Error('Illegal value for startLineNumber');\r\n }\r\n if (endLineNumber < 1 || endLineNumber > lineCount) {\r\n throw new Error('Illegal value for endLineNumber');\r\n }\r\n const foldingRules = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id);\r\n const offSide = Boolean(foldingRules && foldingRules.offSide);\r\n let result = new Array(endLineNumber - startLineNumber + 1);\r\n let aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let aboveContentLineIndent = -1;\r\n let belowContentLineIndex = -2; /* -2 is a marker for not having computed it */\r\n let belowContentLineIndent = -1;\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n let resultIndex = lineNumber - startLineNumber;\r\n const currentIndent = this._computeIndentLevel(lineNumber - 1);\r\n if (currentIndent >= 0) {\r\n // This line has content (besides whitespace)\r\n // Use the line's indent\r\n aboveContentLineIndex = lineNumber - 1;\r\n aboveContentLineIndent = currentIndent;\r\n result[resultIndex] = Math.ceil(currentIndent / this._options.indentSize);\r\n continue;\r\n }\r\n if (aboveContentLineIndex === -2) {\r\n aboveContentLineIndex = -1;\r\n aboveContentLineIndent = -1;\r\n // must find previous line with content\r\n for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n aboveContentLineIndex = lineIndex;\r\n aboveContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n if (belowContentLineIndex !== -1 && (belowContentLineIndex === -2 || belowContentLineIndex < lineNumber - 1)) {\r\n belowContentLineIndex = -1;\r\n belowContentLineIndent = -1;\r\n // must find next line with content\r\n for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) {\r\n let indent = this._computeIndentLevel(lineIndex);\r\n if (indent >= 0) {\r\n belowContentLineIndex = lineIndex;\r\n belowContentLineIndent = indent;\r\n break;\r\n }\r\n }\r\n }\r\n result[resultIndex] = this._getIndentLevelForWhitespaceLine(offSide, aboveContentLineIndent, belowContentLineIndent);\r\n }\r\n return result;\r\n }\r\n _getIndentLevelForWhitespaceLine(offSide, aboveContentLineIndent, belowContentLineIndent) {\r\n if (aboveContentLineIndent === -1 || belowContentLineIndent === -1) {\r\n // At the top or bottom of the file\r\n return 0;\r\n }\r\n else if (aboveContentLineIndent < belowContentLineIndent) {\r\n // we are inside the region above\r\n return (1 + Math.floor(aboveContentLineIndent / this._options.indentSize));\r\n }\r\n else if (aboveContentLineIndent === belowContentLineIndent) {\r\n // we are in between two regions\r\n return Math.ceil(belowContentLineIndent / this._options.indentSize);\r\n }\r\n else {\r\n if (offSide) {\r\n // same level as region below\r\n return Math.ceil(belowContentLineIndent / this._options.indentSize);\r\n }\r\n else {\r\n // we are inside the region that ends below\r\n return (1 + Math.floor(belowContentLineIndent / this._options.indentSize));\r\n }\r\n }\r\n }\r\n}\r\nTextModel.MODEL_SYNC_LIMIT = 50 * 1024 * 1024; // 50 MB\r\nTextModel.LARGE_FILE_SIZE_THRESHOLD = 20 * 1024 * 1024; // 20 MB;\r\nTextModel.LARGE_FILE_LINE_COUNT_THRESHOLD = 300 * 1000; // 300K lines\r\nTextModel.DEFAULT_CREATION_OPTIONS = {\r\n isForSimpleWidget: false,\r\n tabSize: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.tabSize,\r\n indentSize: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.indentSize,\r\n insertSpaces: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.insertSpaces,\r\n detectIndentation: false,\r\n defaultEOL: 1 /* LF */,\r\n trimAutoWhitespace: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,\r\n largeFileOptimizations: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,\r\n};\r\n//#region Decorations\r\nclass DecorationsTrees {\r\n constructor() {\r\n this._decorationsTree0 = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.IntervalTree();\r\n this._decorationsTree1 = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.IntervalTree();\r\n }\r\n intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId) {\r\n const r0 = this._decorationsTree0.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId);\r\n const r1 = this._decorationsTree1.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId);\r\n return r0.concat(r1);\r\n }\r\n search(filterOwnerId, filterOutValidation, overviewRulerOnly, cachedVersionId) {\r\n if (overviewRulerOnly) {\r\n return this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId);\r\n }\r\n else {\r\n const r0 = this._decorationsTree0.search(filterOwnerId, filterOutValidation, cachedVersionId);\r\n const r1 = this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId);\r\n return r0.concat(r1);\r\n }\r\n }\r\n collectNodesFromOwner(ownerId) {\r\n const r0 = this._decorationsTree0.collectNodesFromOwner(ownerId);\r\n const r1 = this._decorationsTree1.collectNodesFromOwner(ownerId);\r\n return r0.concat(r1);\r\n }\r\n collectNodesPostOrder() {\r\n const r0 = this._decorationsTree0.collectNodesPostOrder();\r\n const r1 = this._decorationsTree1.collectNodesPostOrder();\r\n return r0.concat(r1);\r\n }\r\n insert(node) {\r\n if ((0,_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.getNodeIsInOverviewRuler)(node)) {\r\n this._decorationsTree1.insert(node);\r\n }\r\n else {\r\n this._decorationsTree0.insert(node);\r\n }\r\n }\r\n delete(node) {\r\n if ((0,_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.getNodeIsInOverviewRuler)(node)) {\r\n this._decorationsTree1.delete(node);\r\n }\r\n else {\r\n this._decorationsTree0.delete(node);\r\n }\r\n }\r\n resolveNode(node, cachedVersionId) {\r\n if ((0,_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__.getNodeIsInOverviewRuler)(node)) {\r\n this._decorationsTree1.resolveNode(node, cachedVersionId);\r\n }\r\n else {\r\n this._decorationsTree0.resolveNode(node, cachedVersionId);\r\n }\r\n }\r\n acceptReplace(offset, length, textLength, forceMoveMarkers) {\r\n this._decorationsTree0.acceptReplace(offset, length, textLength, forceMoveMarkers);\r\n this._decorationsTree1.acceptReplace(offset, length, textLength, forceMoveMarkers);\r\n }\r\n}\r\nfunction cleanClassName(className) {\r\n return className.replace(/[^a-z0-9\\-_]/gi, ' ');\r\n}\r\nclass DecorationOptions {\r\n constructor(options) {\r\n this.color = options.color || '';\r\n this.darkColor = options.darkColor || '';\r\n }\r\n}\r\nclass ModelDecorationOverviewRulerOptions extends DecorationOptions {\r\n constructor(options) {\r\n super(options);\r\n this._resolvedColor = null;\r\n this.position = (typeof options.position === 'number' ? options.position : _model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center);\r\n }\r\n getColor(theme) {\r\n if (!this._resolvedColor) {\r\n if (theme.type !== 'light' && this.darkColor) {\r\n this._resolvedColor = this._resolveColor(this.darkColor, theme);\r\n }\r\n else {\r\n this._resolvedColor = this._resolveColor(this.color, theme);\r\n }\r\n }\r\n return this._resolvedColor;\r\n }\r\n invalidateCachedColor() {\r\n this._resolvedColor = null;\r\n }\r\n _resolveColor(color, theme) {\r\n if (typeof color === 'string') {\r\n return color;\r\n }\r\n let c = color ? theme.getColor(color.id) : null;\r\n if (!c) {\r\n return '';\r\n }\r\n return c.toString();\r\n }\r\n}\r\nclass ModelDecorationMinimapOptions extends DecorationOptions {\r\n constructor(options) {\r\n super(options);\r\n this.position = options.position;\r\n }\r\n getColor(theme) {\r\n if (!this._resolvedColor) {\r\n if (theme.type !== 'light' && this.darkColor) {\r\n this._resolvedColor = this._resolveColor(this.darkColor, theme);\r\n }\r\n else {\r\n this._resolvedColor = this._resolveColor(this.color, theme);\r\n }\r\n }\r\n return this._resolvedColor;\r\n }\r\n invalidateCachedColor() {\r\n this._resolvedColor = undefined;\r\n }\r\n _resolveColor(color, theme) {\r\n if (typeof color === 'string') {\r\n return _base_common_color_js__WEBPACK_IMPORTED_MODULE_23__.Color.fromHex(color);\r\n }\r\n return theme.getColor(color.id);\r\n }\r\n}\r\nclass ModelDecorationOptions {\r\n constructor(options) {\r\n this.stickiness = options.stickiness || 0 /* AlwaysGrowsWhenTypingAtEdges */;\r\n this.zIndex = options.zIndex || 0;\r\n this.className = options.className ? cleanClassName(options.className) : null;\r\n this.hoverMessage = options.hoverMessage || null;\r\n this.glyphMarginHoverMessage = options.glyphMarginHoverMessage || null;\r\n this.isWholeLine = options.isWholeLine || false;\r\n this.showIfCollapsed = options.showIfCollapsed || false;\r\n this.collapseOnReplaceEdit = options.collapseOnReplaceEdit || false;\r\n this.overviewRuler = options.overviewRuler ? new ModelDecorationOverviewRulerOptions(options.overviewRuler) : null;\r\n this.minimap = options.minimap ? new ModelDecorationMinimapOptions(options.minimap) : null;\r\n this.glyphMarginClassName = options.glyphMarginClassName ? cleanClassName(options.glyphMarginClassName) : null;\r\n this.linesDecorationsClassName = options.linesDecorationsClassName ? cleanClassName(options.linesDecorationsClassName) : null;\r\n this.firstLineDecorationClassName = options.firstLineDecorationClassName ? cleanClassName(options.firstLineDecorationClassName) : null;\r\n this.marginClassName = options.marginClassName ? cleanClassName(options.marginClassName) : null;\r\n this.inlineClassName = options.inlineClassName ? cleanClassName(options.inlineClassName) : null;\r\n this.inlineClassNameAffectsLetterSpacing = options.inlineClassNameAffectsLetterSpacing || false;\r\n this.beforeContentClassName = options.beforeContentClassName ? cleanClassName(options.beforeContentClassName) : null;\r\n this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : null;\r\n }\r\n static register(options) {\r\n return new ModelDecorationOptions(options);\r\n }\r\n static createDynamic(options) {\r\n return new ModelDecorationOptions(options);\r\n }\r\n}\r\nModelDecorationOptions.EMPTY = ModelDecorationOptions.register({});\r\n/**\r\n * The order carefully matches the values of the enum.\r\n */\r\nconst TRACKED_RANGE_OPTIONS = [\r\n ModelDecorationOptions.register({ stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */ }),\r\n ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ }),\r\n ModelDecorationOptions.register({ stickiness: 2 /* GrowsOnlyWhenTypingBefore */ }),\r\n ModelDecorationOptions.register({ stickiness: 3 /* GrowsOnlyWhenTypingAfter */ }),\r\n];\r\nfunction _normalizeOptions(options) {\r\n if (options instanceof ModelDecorationOptions) {\r\n return options;\r\n }\r\n return ModelDecorationOptions.createDynamic(options);\r\n}\r\nclass DidChangeDecorationsEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor() {\r\n super();\r\n this._actual = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.event = this._actual.event;\r\n this._deferredCnt = 0;\r\n this._shouldFire = false;\r\n this._affectsMinimap = false;\r\n this._affectsOverviewRuler = false;\r\n }\r\n beginDeferredEmit() {\r\n this._deferredCnt++;\r\n }\r\n endDeferredEmit() {\r\n this._deferredCnt--;\r\n if (this._deferredCnt === 0) {\r\n if (this._shouldFire) {\r\n const event = {\r\n affectsMinimap: this._affectsMinimap,\r\n affectsOverviewRuler: this._affectsOverviewRuler,\r\n };\r\n this._shouldFire = false;\r\n this._affectsMinimap = false;\r\n this._affectsOverviewRuler = false;\r\n this._actual.fire(event);\r\n }\r\n }\r\n }\r\n checkAffectedAndFire(options) {\r\n if (!this._affectsMinimap) {\r\n this._affectsMinimap = options.minimap && options.minimap.position ? true : false;\r\n }\r\n if (!this._affectsOverviewRuler) {\r\n this._affectsOverviewRuler = options.overviewRuler && options.overviewRuler.color ? true : false;\r\n }\r\n this._shouldFire = true;\r\n }\r\n fire() {\r\n this._affectsMinimap = true;\r\n this._affectsOverviewRuler = true;\r\n this._shouldFire = true;\r\n }\r\n}\r\n//#endregion\r\nclass DidChangeContentEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor() {\r\n super();\r\n /**\r\n * Both `fastEvent` and `slowEvent` work the same way and contain the same events, but first we invoke `fastEvent` and then `slowEvent`.\r\n */\r\n this._fastEmitter = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.fastEvent = this._fastEmitter.event;\r\n this._slowEmitter = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.slowEvent = this._slowEmitter.event;\r\n this._deferredCnt = 0;\r\n this._deferredEvent = null;\r\n }\r\n beginDeferredEmit() {\r\n this._deferredCnt++;\r\n }\r\n endDeferredEmit(resultingSelection = null) {\r\n this._deferredCnt--;\r\n if (this._deferredCnt === 0) {\r\n if (this._deferredEvent !== null) {\r\n this._deferredEvent.rawContentChangedEvent.resultingSelection = resultingSelection;\r\n const e = this._deferredEvent;\r\n this._deferredEvent = null;\r\n this._fastEmitter.fire(e);\r\n this._slowEmitter.fire(e);\r\n }\r\n }\r\n }\r\n fire(e) {\r\n if (this._deferredCnt > 0) {\r\n if (this._deferredEvent) {\r\n this._deferredEvent = this._deferredEvent.merge(e);\r\n }\r\n else {\r\n this._deferredEvent = e;\r\n }\r\n return;\r\n }\r\n this._fastEmitter.fire(e);\r\n this._slowEmitter.fire(e);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModelRawFlush\": () => (/* binding */ ModelRawFlush),\n/* harmony export */ \"ModelRawLineChanged\": () => (/* binding */ ModelRawLineChanged),\n/* harmony export */ \"ModelRawLinesDeleted\": () => (/* binding */ ModelRawLinesDeleted),\n/* harmony export */ \"ModelRawLinesInserted\": () => (/* binding */ ModelRawLinesInserted),\n/* harmony export */ \"ModelRawEOLChanged\": () => (/* binding */ ModelRawEOLChanged),\n/* harmony export */ \"ModelRawContentChangedEvent\": () => (/* binding */ ModelRawContentChangedEvent),\n/* harmony export */ \"InternalModelContentChangeEvent\": () => (/* binding */ InternalModelContentChangeEvent)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * An event describing that a model has been reset to a new value.\r\n * @internal\r\n */\r\nclass ModelRawFlush {\r\n constructor() {\r\n this.changeType = 1 /* Flush */;\r\n }\r\n}\r\n/**\r\n * An event describing that a line has changed in a model.\r\n * @internal\r\n */\r\nclass ModelRawLineChanged {\r\n constructor(lineNumber, detail) {\r\n this.changeType = 2 /* LineChanged */;\r\n this.lineNumber = lineNumber;\r\n this.detail = detail;\r\n }\r\n}\r\n/**\r\n * An event describing that line(s) have been deleted in a model.\r\n * @internal\r\n */\r\nclass ModelRawLinesDeleted {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.changeType = 3 /* LinesDeleted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\n/**\r\n * An event describing that line(s) have been inserted in a model.\r\n * @internal\r\n */\r\nclass ModelRawLinesInserted {\r\n constructor(fromLineNumber, toLineNumber, detail) {\r\n this.changeType = 4 /* LinesInserted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n this.detail = detail;\r\n }\r\n}\r\n/**\r\n * An event describing that a model has had its EOL changed.\r\n * @internal\r\n */\r\nclass ModelRawEOLChanged {\r\n constructor() {\r\n this.changeType = 5 /* EOLChanged */;\r\n }\r\n}\r\n/**\r\n * An event describing a change in the text of a model.\r\n * @internal\r\n */\r\nclass ModelRawContentChangedEvent {\r\n constructor(changes, versionId, isUndoing, isRedoing) {\r\n this.changes = changes;\r\n this.versionId = versionId;\r\n this.isUndoing = isUndoing;\r\n this.isRedoing = isRedoing;\r\n this.resultingSelection = null;\r\n }\r\n containsEvent(type) {\r\n for (let i = 0, len = this.changes.length; i < len; i++) {\r\n const change = this.changes[i];\r\n if (change.changeType === type) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n static merge(a, b) {\r\n const changes = [].concat(a.changes).concat(b.changes);\r\n const versionId = b.versionId;\r\n const isUndoing = (a.isUndoing || b.isUndoing);\r\n const isRedoing = (a.isRedoing || b.isRedoing);\r\n return new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing);\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass InternalModelContentChangeEvent {\r\n constructor(rawContentChangedEvent, contentChangedEvent) {\r\n this.rawContentChangedEvent = rawContentChangedEvent;\r\n this.contentChangedEvent = contentChangedEvent;\r\n }\r\n merge(other) {\r\n const rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent);\r\n const contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent);\r\n return new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent);\r\n }\r\n static _mergeChangeEvents(a, b) {\r\n const changes = [].concat(a.changes).concat(b.changes);\r\n const eol = b.eol;\r\n const versionId = b.versionId;\r\n const isUndoing = (a.isUndoing || b.isUndoing);\r\n const isRedoing = (a.isRedoing || b.isRedoing);\r\n const isFlush = (a.isFlush || b.isFlush);\r\n return {\r\n changes: changes,\r\n eol: eol,\r\n versionId: versionId,\r\n isUndoing: isUndoing,\r\n isRedoing: isRedoing,\r\n isFlush: isFlush\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SearchParams\": () => (/* binding */ SearchParams),\n/* harmony export */ \"isMultilineRegexSource\": () => (/* binding */ isMultilineRegexSource),\n/* harmony export */ \"SearchData\": () => (/* binding */ SearchData),\n/* harmony export */ \"createFindMatch\": () => (/* binding */ createFindMatch),\n/* harmony export */ \"TextModelSearch\": () => (/* binding */ TextModelSearch),\n/* harmony export */ \"isValidMatch\": () => (/* binding */ isValidMatch),\n/* harmony export */ \"Searcher\": () => (/* binding */ Searcher)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../controller/wordCharacterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst LIMIT_FIND_COUNT = 999;\r\nclass SearchParams {\r\n constructor(searchString, isRegex, matchCase, wordSeparators) {\r\n this.searchString = searchString;\r\n this.isRegex = isRegex;\r\n this.matchCase = matchCase;\r\n this.wordSeparators = wordSeparators;\r\n }\r\n parseSearchRequest() {\r\n if (this.searchString === '') {\r\n return null;\r\n }\r\n // Try to create a RegExp out of the params\r\n let multiline;\r\n if (this.isRegex) {\r\n multiline = isMultilineRegexSource(this.searchString);\r\n }\r\n else {\r\n multiline = (this.searchString.indexOf('\\n') >= 0);\r\n }\r\n let regex = null;\r\n try {\r\n regex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.createRegExp(this.searchString, this.isRegex, {\r\n matchCase: this.matchCase,\r\n wholeWord: false,\r\n multiline: multiline,\r\n global: true,\r\n unicode: true\r\n });\r\n }\r\n catch (err) {\r\n return null;\r\n }\r\n if (!regex) {\r\n return null;\r\n }\r\n let canUseSimpleSearch = (!this.isRegex && !multiline);\r\n if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) {\r\n // casing might make a difference\r\n canUseSimpleSearch = this.matchCase;\r\n }\r\n return new SearchData(regex, this.wordSeparators ? (0,_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_1__.getMapForWordSeparators)(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null);\r\n }\r\n}\r\nfunction isMultilineRegexSource(searchString) {\r\n if (!searchString || searchString.length === 0) {\r\n return false;\r\n }\r\n for (let i = 0, len = searchString.length; i < len; i++) {\r\n const chCode = searchString.charCodeAt(i);\r\n if (chCode === 92 /* Backslash */) {\r\n // move to next char\r\n i++;\r\n if (i >= len) {\r\n // string ends with a \\\r\n break;\r\n }\r\n const nextChCode = searchString.charCodeAt(i);\r\n if (nextChCode === 110 /* n */ || nextChCode === 114 /* r */ || nextChCode === 87 /* W */ || nextChCode === 119 /* w */) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\nclass SearchData {\r\n constructor(regex, wordSeparators, simpleSearch) {\r\n this.regex = regex;\r\n this.wordSeparators = wordSeparators;\r\n this.simpleSearch = simpleSearch;\r\n }\r\n}\r\nfunction createFindMatch(range, rawMatches, captureMatches) {\r\n if (!captureMatches) {\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_4__.FindMatch(range, null);\r\n }\r\n let matches = [];\r\n for (let i = 0, len = rawMatches.length; i < len; i++) {\r\n matches[i] = rawMatches[i];\r\n }\r\n return new _model_js__WEBPACK_IMPORTED_MODULE_4__.FindMatch(range, matches);\r\n}\r\nclass LineFeedCounter {\r\n constructor(text) {\r\n let lineFeedsOffsets = [];\r\n let lineFeedsOffsetsLen = 0;\r\n for (let i = 0, textLen = text.length; i < textLen; i++) {\r\n if (text.charCodeAt(i) === 10 /* LineFeed */) {\r\n lineFeedsOffsets[lineFeedsOffsetsLen++] = i;\r\n }\r\n }\r\n this._lineFeedsOffsets = lineFeedsOffsets;\r\n }\r\n findLineFeedCountBeforeOffset(offset) {\r\n const lineFeedsOffsets = this._lineFeedsOffsets;\r\n let min = 0;\r\n let max = lineFeedsOffsets.length - 1;\r\n if (max === -1) {\r\n // no line feeds\r\n return 0;\r\n }\r\n if (offset <= lineFeedsOffsets[0]) {\r\n // before first line feed\r\n return 0;\r\n }\r\n while (min < max) {\r\n const mid = min + ((max - min) / 2 >> 0);\r\n if (lineFeedsOffsets[mid] >= offset) {\r\n max = mid - 1;\r\n }\r\n else {\r\n if (lineFeedsOffsets[mid + 1] >= offset) {\r\n // bingo!\r\n min = mid;\r\n max = mid;\r\n }\r\n else {\r\n min = mid + 1;\r\n }\r\n }\r\n }\r\n return min + 1;\r\n }\r\n}\r\nclass TextModelSearch {\r\n static findMatches(model, searchParams, searchRange, captureMatches, limitResultCount) {\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return [];\r\n }\r\n if (searchData.regex.multiline) {\r\n return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount);\r\n }\r\n return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount);\r\n }\r\n /**\r\n * Multiline search always executes on the lines concatenated with \\n.\r\n * We must therefore compensate for the count of \\n in case the model is CRLF\r\n */\r\n static _getMultilineMatchRange(model, deltaOffset, text, lfCounter, matchIndex, match0) {\r\n let startOffset;\r\n let lineFeedCountBeforeMatch = 0;\r\n if (lfCounter) {\r\n lineFeedCountBeforeMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex);\r\n startOffset = deltaOffset + matchIndex + lineFeedCountBeforeMatch /* add as many \\r as there were \\n */;\r\n }\r\n else {\r\n startOffset = deltaOffset + matchIndex;\r\n }\r\n let endOffset;\r\n if (lfCounter) {\r\n let lineFeedCountBeforeEndOfMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex + match0.length);\r\n let lineFeedCountInMatch = lineFeedCountBeforeEndOfMatch - lineFeedCountBeforeMatch;\r\n endOffset = startOffset + match0.length + lineFeedCountInMatch /* add as many \\r as there were \\n */;\r\n }\r\n else {\r\n endOffset = startOffset + match0.length;\r\n }\r\n const startPosition = model.getPositionAt(startOffset);\r\n const endPosition = model.getPositionAt(endOffset);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);\r\n }\r\n static _doFindMatchesMultiline(model, searchRange, searcher, captureMatches, limitResultCount) {\r\n const deltaOffset = model.getOffsetAt(searchRange.getStartPosition());\r\n // We always execute multiline search over the lines joined with \\n\r\n // This makes it that \\n will match the EOL for both CRLF and LF models\r\n // We compensate for offset errors in `_getMultilineMatchRange`\r\n const text = model.getValueInRange(searchRange, 1 /* LF */);\r\n const lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\r\n const result = [];\r\n let counter = 0;\r\n let m;\r\n searcher.reset(0);\r\n while ((m = searcher.next(text))) {\r\n result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\r\n if (counter >= limitResultCount) {\r\n return result;\r\n }\r\n }\r\n return result;\r\n }\r\n static _doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount) {\r\n const result = [];\r\n let resultLen = 0;\r\n // Early case for a search range that starts & stops on the same line number\r\n if (searchRange.startLineNumber === searchRange.endLineNumber) {\r\n const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1, searchRange.endColumn - 1);\r\n resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\r\n return result;\r\n }\r\n // Collect results from first line\r\n const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1);\r\n resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);\r\n // Collect results from middle lines\r\n for (let lineNumber = searchRange.startLineNumber + 1; lineNumber < searchRange.endLineNumber && resultLen < limitResultCount; lineNumber++) {\r\n resultLen = this._findMatchesInLine(searchData, model.getLineContent(lineNumber), lineNumber, 0, resultLen, result, captureMatches, limitResultCount);\r\n }\r\n // Collect results from last line\r\n if (resultLen < limitResultCount) {\r\n const text = model.getLineContent(searchRange.endLineNumber).substring(0, searchRange.endColumn - 1);\r\n resultLen = this._findMatchesInLine(searchData, text, searchRange.endLineNumber, 0, resultLen, result, captureMatches, limitResultCount);\r\n }\r\n return result;\r\n }\r\n static _findMatchesInLine(searchData, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {\r\n const wordSeparators = searchData.wordSeparators;\r\n if (!captureMatches && searchData.simpleSearch) {\r\n const searchString = searchData.simpleSearch;\r\n const searchStringLen = searchString.length;\r\n const textLength = text.length;\r\n let lastMatchIndex = -searchStringLen;\r\n while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {\r\n if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {\r\n result[resultLen++] = new _model_js__WEBPACK_IMPORTED_MODULE_4__.FindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);\r\n if (resultLen >= limitResultCount) {\r\n return resultLen;\r\n }\r\n }\r\n }\r\n return resultLen;\r\n }\r\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\r\n let m;\r\n // Reset regex to search from the beginning\r\n searcher.reset(0);\r\n do {\r\n m = searcher.next(text);\r\n if (m) {\r\n result[resultLen++] = createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);\r\n if (resultLen >= limitResultCount) {\r\n return resultLen;\r\n }\r\n }\r\n } while (m);\r\n return resultLen;\r\n }\r\n static findNextMatch(model, searchParams, searchStart, captureMatches) {\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return null;\r\n }\r\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\r\n if (searchData.regex.multiline) {\r\n return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches);\r\n }\r\n return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches);\r\n }\r\n static _doFindNextMatchMultiline(model, searchStart, searcher, captureMatches) {\r\n const searchTextStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(searchStart.lineNumber, 1);\r\n const deltaOffset = model.getOffsetAt(searchTextStart);\r\n const lineCount = model.getLineCount();\r\n // We always execute multiline search over the lines joined with \\n\r\n // This makes it that \\n will match the EOL for both CRLF and LF models\r\n // We compensate for offset errors in `_getMultilineMatchRange`\r\n const text = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), 1 /* LF */);\r\n const lfCounter = (model.getEOL() === '\\r\\n' ? new LineFeedCounter(text) : null);\r\n searcher.reset(searchStart.column - 1);\r\n let m = searcher.next(text);\r\n if (m) {\r\n return createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);\r\n }\r\n if (searchStart.lineNumber !== 1 || searchStart.column !== 1) {\r\n // Try again from the top\r\n return this._doFindNextMatchMultiline(model, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(1, 1), searcher, captureMatches);\r\n }\r\n return null;\r\n }\r\n static _doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches) {\r\n const lineCount = model.getLineCount();\r\n const startLineNumber = searchStart.lineNumber;\r\n // Look in first line\r\n const text = model.getLineContent(startLineNumber);\r\n const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches);\r\n if (r) {\r\n return r;\r\n }\r\n for (let i = 1; i <= lineCount; i++) {\r\n const lineIndex = (startLineNumber + i - 1) % lineCount;\r\n const text = model.getLineContent(lineIndex + 1);\r\n const r = this._findFirstMatchInLine(searcher, text, lineIndex + 1, 1, captureMatches);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n return null;\r\n }\r\n static _findFirstMatchInLine(searcher, text, lineNumber, fromColumn, captureMatches) {\r\n // Set regex to search from column\r\n searcher.reset(fromColumn - 1);\r\n const m = searcher.next(text);\r\n if (m) {\r\n return createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\r\n }\r\n return null;\r\n }\r\n static findPreviousMatch(model, searchParams, searchStart, captureMatches) {\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return null;\r\n }\r\n const searcher = new Searcher(searchData.wordSeparators, searchData.regex);\r\n if (searchData.regex.multiline) {\r\n return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches);\r\n }\r\n return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches);\r\n }\r\n static _doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches) {\r\n const matches = this._doFindMatchesMultiline(model, new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT);\r\n if (matches.length > 0) {\r\n return matches[matches.length - 1];\r\n }\r\n const lineCount = model.getLineCount();\r\n if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) {\r\n // Try again with all content\r\n return this._doFindPreviousMatchMultiline(model, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches);\r\n }\r\n return null;\r\n }\r\n static _doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches) {\r\n const lineCount = model.getLineCount();\r\n const startLineNumber = searchStart.lineNumber;\r\n // Look in first line\r\n const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1);\r\n const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches);\r\n if (r) {\r\n return r;\r\n }\r\n for (let i = 1; i <= lineCount; i++) {\r\n const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount;\r\n const text = model.getLineContent(lineIndex + 1);\r\n const r = this._findLastMatchInLine(searcher, text, lineIndex + 1, captureMatches);\r\n if (r) {\r\n return r;\r\n }\r\n }\r\n return null;\r\n }\r\n static _findLastMatchInLine(searcher, text, lineNumber, captureMatches) {\r\n let bestResult = null;\r\n let m;\r\n searcher.reset(0);\r\n while ((m = searcher.next(text))) {\r\n bestResult = createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);\r\n }\r\n return bestResult;\r\n }\r\n}\r\nfunction leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\r\n if (matchStartIndex === 0) {\r\n // Match starts at start of string\r\n return true;\r\n }\r\n const charBefore = text.charCodeAt(matchStartIndex - 1);\r\n if (wordSeparators.get(charBefore) !== 0 /* Regular */) {\r\n // The character before the match is a word separator\r\n return true;\r\n }\r\n if (charBefore === 13 /* CarriageReturn */ || charBefore === 10 /* LineFeed */) {\r\n // The character before the match is line break or carriage return.\r\n return true;\r\n }\r\n if (matchLength > 0) {\r\n const firstCharInMatch = text.charCodeAt(matchStartIndex);\r\n if (wordSeparators.get(firstCharInMatch) !== 0 /* Regular */) {\r\n // The first character inside the match is a word separator\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {\r\n if (matchStartIndex + matchLength === textLength) {\r\n // Match ends at end of string\r\n return true;\r\n }\r\n const charAfter = text.charCodeAt(matchStartIndex + matchLength);\r\n if (wordSeparators.get(charAfter) !== 0 /* Regular */) {\r\n // The character after the match is a word separator\r\n return true;\r\n }\r\n if (charAfter === 13 /* CarriageReturn */ || charAfter === 10 /* LineFeed */) {\r\n // The character after the match is line break or carriage return.\r\n return true;\r\n }\r\n if (matchLength > 0) {\r\n const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1);\r\n if (wordSeparators.get(lastCharInMatch) !== 0 /* Regular */) {\r\n // The last character in the match is a word separator\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) {\r\n return (leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength)\r\n && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength));\r\n}\r\nclass Searcher {\r\n constructor(wordSeparators, searchRegex) {\r\n this._wordSeparators = wordSeparators;\r\n this._searchRegex = searchRegex;\r\n this._prevMatchStartIndex = -1;\r\n this._prevMatchLength = 0;\r\n }\r\n reset(lastIndex) {\r\n this._searchRegex.lastIndex = lastIndex;\r\n this._prevMatchStartIndex = -1;\r\n this._prevMatchLength = 0;\r\n }\r\n next(text) {\r\n const textLength = text.length;\r\n let m;\r\n do {\r\n if (this._prevMatchStartIndex + this._prevMatchLength === textLength) {\r\n // Reached the end of the line\r\n return null;\r\n }\r\n m = this._searchRegex.exec(text);\r\n if (!m) {\r\n return null;\r\n }\r\n const matchStartIndex = m.index;\r\n const matchLength = m[0].length;\r\n if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) {\r\n if (matchLength === 0) {\r\n // the search result is an empty string and won't advance `regex.lastIndex`, so `regex.exec` will stuck here\r\n // we attempt to recover from that by advancing by two if surrogate pair found and by one otherwise\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getNextCodePoint(text, textLength, this._searchRegex.lastIndex) > 0xFFFF) {\r\n this._searchRegex.lastIndex += 2;\r\n }\r\n else {\r\n this._searchRegex.lastIndex += 1;\r\n }\r\n continue;\r\n }\r\n // Exit early if the regex matches the same range twice\r\n return null;\r\n }\r\n this._prevMatchStartIndex = matchStartIndex;\r\n this._prevMatchLength = matchLength;\r\n if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) {\r\n return m;\r\n }\r\n } while (m);\r\n return null;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TokenizationStateStore\": () => (/* binding */ TokenizationStateStore),\n/* harmony export */ \"TextModelTokenization\": () => (/* binding */ TextModelTokenization)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/lineTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tokensStore.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TokenizationStateStore {\r\n constructor() {\r\n this._beginState = [];\r\n this._valid = [];\r\n this._len = 0;\r\n this._invalidLineStartIndex = 0;\r\n }\r\n _reset(initialState) {\r\n this._beginState = [];\r\n this._valid = [];\r\n this._len = 0;\r\n this._invalidLineStartIndex = 0;\r\n if (initialState) {\r\n this._setBeginState(0, initialState);\r\n }\r\n }\r\n flush(initialState) {\r\n this._reset(initialState);\r\n }\r\n get invalidLineStartIndex() {\r\n return this._invalidLineStartIndex;\r\n }\r\n _invalidateLine(lineIndex) {\r\n if (lineIndex < this._len) {\r\n this._valid[lineIndex] = false;\r\n }\r\n if (lineIndex < this._invalidLineStartIndex) {\r\n this._invalidLineStartIndex = lineIndex;\r\n }\r\n }\r\n _isValid(lineIndex) {\r\n if (lineIndex < this._len) {\r\n return this._valid[lineIndex];\r\n }\r\n return false;\r\n }\r\n getBeginState(lineIndex) {\r\n if (lineIndex < this._len) {\r\n return this._beginState[lineIndex];\r\n }\r\n return null;\r\n }\r\n _ensureLine(lineIndex) {\r\n while (lineIndex >= this._len) {\r\n this._beginState[this._len] = null;\r\n this._valid[this._len] = false;\r\n this._len++;\r\n }\r\n }\r\n _deleteLines(start, deleteCount) {\r\n if (deleteCount === 0) {\r\n return;\r\n }\r\n if (start + deleteCount > this._len) {\r\n deleteCount = this._len - start;\r\n }\r\n this._beginState.splice(start, deleteCount);\r\n this._valid.splice(start, deleteCount);\r\n this._len -= deleteCount;\r\n }\r\n _insertLines(insertIndex, insertCount) {\r\n if (insertCount === 0) {\r\n return;\r\n }\r\n let beginState = [];\r\n let valid = [];\r\n for (let i = 0; i < insertCount; i++) {\r\n beginState[i] = null;\r\n valid[i] = false;\r\n }\r\n this._beginState = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.arrayInsert(this._beginState, insertIndex, beginState);\r\n this._valid = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.arrayInsert(this._valid, insertIndex, valid);\r\n this._len += insertCount;\r\n }\r\n _setValid(lineIndex, valid) {\r\n this._ensureLine(lineIndex);\r\n this._valid[lineIndex] = valid;\r\n }\r\n _setBeginState(lineIndex, beginState) {\r\n this._ensureLine(lineIndex);\r\n this._beginState[lineIndex] = beginState;\r\n }\r\n setEndState(linesLength, lineIndex, endState) {\r\n this._setValid(lineIndex, true);\r\n this._invalidLineStartIndex = lineIndex + 1;\r\n // Check if this was the last line\r\n if (lineIndex === linesLength - 1) {\r\n return;\r\n }\r\n // Check if the end state has changed\r\n const previousEndState = this.getBeginState(lineIndex + 1);\r\n if (previousEndState === null || !endState.equals(previousEndState)) {\r\n this._setBeginState(lineIndex + 1, endState);\r\n this._invalidateLine(lineIndex + 1);\r\n return;\r\n }\r\n // Perhaps we can skip tokenizing some lines...\r\n let i = lineIndex + 1;\r\n while (i < linesLength) {\r\n if (!this._isValid(i)) {\r\n break;\r\n }\r\n i++;\r\n }\r\n this._invalidLineStartIndex = i;\r\n }\r\n setFakeTokens(lineIndex) {\r\n this._setValid(lineIndex, false);\r\n }\r\n //#region Editing\r\n applyEdits(range, eolCount) {\r\n const deletingLinesCnt = range.endLineNumber - range.startLineNumber;\r\n const insertingLinesCnt = eolCount;\r\n const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt);\r\n for (let j = editingLinesCnt; j >= 0; j--) {\r\n this._invalidateLine(range.startLineNumber + j - 1);\r\n }\r\n this._acceptDeleteRange(range);\r\n this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(range.startLineNumber, range.startColumn), eolCount);\r\n }\r\n _acceptDeleteRange(range) {\r\n const firstLineIndex = range.startLineNumber - 1;\r\n if (firstLineIndex >= this._len) {\r\n return;\r\n }\r\n this._deleteLines(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n }\r\n _acceptInsertText(position, eolCount) {\r\n const lineIndex = position.lineNumber - 1;\r\n if (lineIndex >= this._len) {\r\n return;\r\n }\r\n this._insertLines(position.lineNumber, eolCount);\r\n }\r\n}\r\nclass TextModelTokenization extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(textModel) {\r\n super();\r\n this._isDisposed = false;\r\n this._textModel = textModel;\r\n this._tokenizationStateStore = new TokenizationStateStore();\r\n this._tokenizationSupport = null;\r\n this._register(_modes_js__WEBPACK_IMPORTED_MODULE_4__.TokenizationRegistry.onDidChange((e) => {\r\n const languageIdentifier = this._textModel.getLanguageIdentifier();\r\n if (e.changedLanguages.indexOf(languageIdentifier.language) === -1) {\r\n return;\r\n }\r\n this._resetTokenizationState();\r\n this._textModel.clearTokens();\r\n }));\r\n this._register(this._textModel.onDidChangeRawContentFast((e) => {\r\n if (e.containsEvent(1 /* Flush */)) {\r\n this._resetTokenizationState();\r\n return;\r\n }\r\n }));\r\n this._register(this._textModel.onDidChangeContentFast((e) => {\r\n for (let i = 0, len = e.changes.length; i < len; i++) {\r\n const change = e.changes[i];\r\n const [eolCount] = (0,_tokensStore_js__WEBPACK_IMPORTED_MODULE_8__.countEOL)(change.text);\r\n this._tokenizationStateStore.applyEdits(change.range, eolCount);\r\n }\r\n this._beginBackgroundTokenization();\r\n }));\r\n this._register(this._textModel.onDidChangeAttached(() => {\r\n this._beginBackgroundTokenization();\r\n }));\r\n this._register(this._textModel.onDidChangeLanguage(() => {\r\n this._resetTokenizationState();\r\n this._textModel.clearTokens();\r\n }));\r\n this._resetTokenizationState();\r\n }\r\n dispose() {\r\n this._isDisposed = true;\r\n super.dispose();\r\n }\r\n _resetTokenizationState() {\r\n const [tokenizationSupport, initialState] = initializeTokenization(this._textModel);\r\n this._tokenizationSupport = tokenizationSupport;\r\n this._tokenizationStateStore.flush(initialState);\r\n this._beginBackgroundTokenization();\r\n }\r\n _beginBackgroundTokenization() {\r\n if (this._textModel.isAttachedToEditor() && this._hasLinesToTokenize()) {\r\n _base_common_platform_js__WEBPACK_IMPORTED_MODULE_9__.setImmediate(() => {\r\n if (this._isDisposed) {\r\n // disposed in the meantime\r\n return;\r\n }\r\n this._revalidateTokensNow();\r\n });\r\n }\r\n }\r\n _revalidateTokensNow(toLineNumber = this._textModel.getLineCount()) {\r\n const MAX_ALLOWED_TIME = 1;\r\n const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__.MultilineTokensBuilder();\r\n const sw = _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_7__.StopWatch.create(false);\r\n while (this._hasLinesToTokenize()) {\r\n if (sw.elapsed() > MAX_ALLOWED_TIME) {\r\n // Stop if MAX_ALLOWED_TIME is reached\r\n break;\r\n }\r\n const tokenizedLineNumber = this._tokenizeOneInvalidLine(builder);\r\n if (tokenizedLineNumber >= toLineNumber) {\r\n break;\r\n }\r\n }\r\n this._beginBackgroundTokenization();\r\n this._textModel.setTokens(builder.tokens);\r\n }\r\n tokenizeViewport(startLineNumber, endLineNumber) {\r\n const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__.MultilineTokensBuilder();\r\n this._tokenizeViewport(builder, startLineNumber, endLineNumber);\r\n this._textModel.setTokens(builder.tokens);\r\n }\r\n reset() {\r\n this._resetTokenizationState();\r\n this._textModel.clearTokens();\r\n }\r\n forceTokenization(lineNumber) {\r\n const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__.MultilineTokensBuilder();\r\n this._updateTokensUntilLine(builder, lineNumber);\r\n this._textModel.setTokens(builder.tokens);\r\n }\r\n isCheapToTokenize(lineNumber) {\r\n if (!this._tokenizationSupport) {\r\n return true;\r\n }\r\n const firstInvalidLineNumber = this._tokenizationStateStore.invalidLineStartIndex + 1;\r\n if (lineNumber > firstInvalidLineNumber) {\r\n return false;\r\n }\r\n if (lineNumber < firstInvalidLineNumber) {\r\n return true;\r\n }\r\n if (this._textModel.getLineLength(lineNumber) < 2048 /* CHEAP_TOKENIZATION_LENGTH_LIMIT */) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n _hasLinesToTokenize() {\r\n if (!this._tokenizationSupport) {\r\n return false;\r\n }\r\n return (this._tokenizationStateStore.invalidLineStartIndex < this._textModel.getLineCount());\r\n }\r\n _tokenizeOneInvalidLine(builder) {\r\n if (!this._hasLinesToTokenize()) {\r\n return this._textModel.getLineCount() + 1;\r\n }\r\n const lineNumber = this._tokenizationStateStore.invalidLineStartIndex + 1;\r\n this._updateTokensUntilLine(builder, lineNumber);\r\n return lineNumber;\r\n }\r\n _updateTokensUntilLine(builder, lineNumber) {\r\n if (!this._tokenizationSupport) {\r\n return;\r\n }\r\n const languageIdentifier = this._textModel.getLanguageIdentifier();\r\n const linesLength = this._textModel.getLineCount();\r\n const endLineIndex = lineNumber - 1;\r\n // Validate all states up to and including endLineIndex\r\n for (let lineIndex = this._tokenizationStateStore.invalidLineStartIndex; lineIndex <= endLineIndex; lineIndex++) {\r\n const text = this._textModel.getLineContent(lineIndex + 1);\r\n const lineStartState = this._tokenizationStateStore.getBeginState(lineIndex);\r\n const r = safeTokenize(languageIdentifier, this._tokenizationSupport, text, true, lineStartState);\r\n builder.add(lineIndex + 1, r.tokens);\r\n this._tokenizationStateStore.setEndState(linesLength, lineIndex, r.endState);\r\n lineIndex = this._tokenizationStateStore.invalidLineStartIndex - 1; // -1 because the outer loop increments it\r\n }\r\n }\r\n _tokenizeViewport(builder, startLineNumber, endLineNumber) {\r\n if (!this._tokenizationSupport) {\r\n // nothing to do\r\n return;\r\n }\r\n if (endLineNumber <= this._tokenizationStateStore.invalidLineStartIndex) {\r\n // nothing to do\r\n return;\r\n }\r\n if (startLineNumber <= this._tokenizationStateStore.invalidLineStartIndex) {\r\n // tokenization has reached the viewport start...\r\n this._updateTokensUntilLine(builder, endLineNumber);\r\n return;\r\n }\r\n let nonWhitespaceColumn = this._textModel.getLineFirstNonWhitespaceColumn(startLineNumber);\r\n let fakeLines = [];\r\n let initialState = null;\r\n for (let i = startLineNumber - 1; nonWhitespaceColumn > 0 && i >= 1; i--) {\r\n let newNonWhitespaceIndex = this._textModel.getLineFirstNonWhitespaceColumn(i);\r\n if (newNonWhitespaceIndex === 0) {\r\n continue;\r\n }\r\n if (newNonWhitespaceIndex < nonWhitespaceColumn) {\r\n initialState = this._tokenizationStateStore.getBeginState(i - 1);\r\n if (initialState) {\r\n break;\r\n }\r\n fakeLines.push(this._textModel.getLineContent(i));\r\n nonWhitespaceColumn = newNonWhitespaceIndex;\r\n }\r\n }\r\n if (!initialState) {\r\n initialState = this._tokenizationSupport.getInitialState();\r\n }\r\n const languageIdentifier = this._textModel.getLanguageIdentifier();\r\n let state = initialState;\r\n for (let i = fakeLines.length - 1; i >= 0; i--) {\r\n let r = safeTokenize(languageIdentifier, this._tokenizationSupport, fakeLines[i], false, state);\r\n state = r.endState;\r\n }\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n let text = this._textModel.getLineContent(lineNumber);\r\n let r = safeTokenize(languageIdentifier, this._tokenizationSupport, text, true, state);\r\n builder.add(lineNumber, r.tokens);\r\n this._tokenizationStateStore.setFakeTokens(lineNumber - 1);\r\n state = r.endState;\r\n }\r\n }\r\n}\r\nfunction initializeTokenization(textModel) {\r\n const languageIdentifier = textModel.getLanguageIdentifier();\r\n let tokenizationSupport = (textModel.isTooLargeForTokenization()\r\n ? null\r\n : _modes_js__WEBPACK_IMPORTED_MODULE_4__.TokenizationRegistry.get(languageIdentifier.language));\r\n let initialState = null;\r\n if (tokenizationSupport) {\r\n try {\r\n initialState = tokenizationSupport.getInitialState();\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n tokenizationSupport = null;\r\n }\r\n }\r\n return [tokenizationSupport, initialState];\r\n}\r\nfunction safeTokenize(languageIdentifier, tokenizationSupport, text, hasEOL, state) {\r\n let r = null;\r\n if (tokenizationSupport) {\r\n try {\r\n r = tokenizationSupport.tokenize2(text, hasEOL, state.clone(), 0);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(e);\r\n }\r\n }\r\n if (!r) {\r\n r = (0,_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_5__.nullTokenize2)(languageIdentifier.id, text, state, 0);\r\n }\r\n _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__.LineTokens.convertToEndOffset(r.tokens, text.length);\r\n return r;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"countEOL\": () => (/* binding */ countEOL),\n/* harmony export */ \"MultilineTokensBuilder\": () => (/* binding */ MultilineTokensBuilder),\n/* harmony export */ \"SparseEncodedTokens\": () => (/* binding */ SparseEncodedTokens),\n/* harmony export */ \"LineTokens2\": () => (/* binding */ LineTokens2),\n/* harmony export */ \"MultilineTokens2\": () => (/* binding */ MultilineTokens2),\n/* harmony export */ \"MultilineTokens\": () => (/* binding */ MultilineTokens),\n/* harmony export */ \"TokensStore2\": () => (/* binding */ TokensStore2),\n/* harmony export */ \"TokensStore\": () => (/* binding */ TokensStore)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/lineTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nfunction countEOL(text) {\r\n let eolCount = 0;\r\n let firstLineLength = 0;\r\n let lastLineStart = 0;\r\n let eol = 0 /* Unknown */;\r\n for (let i = 0, len = text.length; i < len; i++) {\r\n const chr = text.charCodeAt(i);\r\n if (chr === 13 /* CarriageReturn */) {\r\n if (eolCount === 0) {\r\n firstLineLength = i;\r\n }\r\n eolCount++;\r\n if (i + 1 < len && text.charCodeAt(i + 1) === 10 /* LineFeed */) {\r\n // \\r\\n... case\r\n eol |= 2 /* CRLF */;\r\n i++; // skip \\n\r\n }\r\n else {\r\n // \\r... case\r\n eol |= 3 /* Invalid */;\r\n }\r\n lastLineStart = i + 1;\r\n }\r\n else if (chr === 10 /* LineFeed */) {\r\n // \\n... case\r\n eol |= 1 /* LF */;\r\n if (eolCount === 0) {\r\n firstLineLength = i;\r\n }\r\n eolCount++;\r\n lastLineStart = i + 1;\r\n }\r\n }\r\n if (eolCount === 0) {\r\n firstLineLength = text.length;\r\n }\r\n return [eolCount, firstLineLength, text.length - lastLineStart, eol];\r\n}\r\nfunction getDefaultMetadata(topLevelLanguageId) {\r\n return ((topLevelLanguageId << 0 /* LANGUAGEID_OFFSET */)\r\n | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */)\r\n | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\r\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\r\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n}\r\nconst EMPTY_LINE_TOKENS = (new Uint32Array(0)).buffer;\r\nclass MultilineTokensBuilder {\r\n constructor() {\r\n this.tokens = [];\r\n }\r\n add(lineNumber, lineTokens) {\r\n if (this.tokens.length > 0) {\r\n const last = this.tokens[this.tokens.length - 1];\r\n const lastLineNumber = last.startLineNumber + last.tokens.length - 1;\r\n if (lastLineNumber + 1 === lineNumber) {\r\n // append\r\n last.tokens.push(lineTokens);\r\n return;\r\n }\r\n }\r\n this.tokens.push(new MultilineTokens(lineNumber, [lineTokens]));\r\n }\r\n}\r\nclass SparseEncodedTokens {\r\n constructor(tokens) {\r\n this._tokens = tokens;\r\n this._tokenCount = tokens.length / 4;\r\n }\r\n toString(startLineNumber) {\r\n let pieces = [];\r\n for (let i = 0; i < this._tokenCount; i++) {\r\n pieces.push(`(${this._getDeltaLine(i) + startLineNumber},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);\r\n }\r\n return `[${pieces.join(',')}]`;\r\n }\r\n getMaxDeltaLine() {\r\n const tokenCount = this._getTokenCount();\r\n if (tokenCount === 0) {\r\n return -1;\r\n }\r\n return this._getDeltaLine(tokenCount - 1);\r\n }\r\n getRange() {\r\n const tokenCount = this._getTokenCount();\r\n if (tokenCount === 0) {\r\n return null;\r\n }\r\n const startChar = this._getStartCharacter(0);\r\n const maxDeltaLine = this._getDeltaLine(tokenCount - 1);\r\n const endChar = this._getEndCharacter(tokenCount - 1);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(0, startChar + 1, maxDeltaLine, endChar + 1);\r\n }\r\n _getTokenCount() {\r\n return this._tokenCount;\r\n }\r\n _getDeltaLine(tokenIndex) {\r\n return this._tokens[4 * tokenIndex];\r\n }\r\n _getStartCharacter(tokenIndex) {\r\n return this._tokens[4 * tokenIndex + 1];\r\n }\r\n _getEndCharacter(tokenIndex) {\r\n return this._tokens[4 * tokenIndex + 2];\r\n }\r\n isEmpty() {\r\n return (this._getTokenCount() === 0);\r\n }\r\n getLineTokens(deltaLine) {\r\n let low = 0;\r\n let high = this._getTokenCount() - 1;\r\n while (low < high) {\r\n const mid = low + Math.floor((high - low) / 2);\r\n const midDeltaLine = this._getDeltaLine(mid);\r\n if (midDeltaLine < deltaLine) {\r\n low = mid + 1;\r\n }\r\n else if (midDeltaLine > deltaLine) {\r\n high = mid - 1;\r\n }\r\n else {\r\n let min = mid;\r\n while (min > low && this._getDeltaLine(min - 1) === deltaLine) {\r\n min--;\r\n }\r\n let max = mid;\r\n while (max < high && this._getDeltaLine(max + 1) === deltaLine) {\r\n max++;\r\n }\r\n return new LineTokens2(this._tokens.subarray(4 * min, 4 * max + 4));\r\n }\r\n }\r\n if (this._getDeltaLine(low) === deltaLine) {\r\n return new LineTokens2(this._tokens.subarray(4 * low, 4 * low + 4));\r\n }\r\n return null;\r\n }\r\n clear() {\r\n this._tokenCount = 0;\r\n }\r\n removeTokens(startDeltaLine, startChar, endDeltaLine, endChar) {\r\n const tokens = this._tokens;\r\n const tokenCount = this._tokenCount;\r\n let newTokenCount = 0;\r\n let hasDeletedTokens = false;\r\n let firstDeltaLine = 0;\r\n for (let i = 0; i < tokenCount; i++) {\r\n const srcOffset = 4 * i;\r\n const tokenDeltaLine = tokens[srcOffset];\r\n const tokenStartCharacter = tokens[srcOffset + 1];\r\n const tokenEndCharacter = tokens[srcOffset + 2];\r\n const tokenMetadata = tokens[srcOffset + 3];\r\n if ((tokenDeltaLine > startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter >= startChar))\r\n && (tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter <= endChar))) {\r\n hasDeletedTokens = true;\r\n }\r\n else {\r\n if (newTokenCount === 0) {\r\n firstDeltaLine = tokenDeltaLine;\r\n }\r\n if (hasDeletedTokens) {\r\n // must move the token to the left\r\n const destOffset = 4 * newTokenCount;\r\n tokens[destOffset] = tokenDeltaLine - firstDeltaLine;\r\n tokens[destOffset + 1] = tokenStartCharacter;\r\n tokens[destOffset + 2] = tokenEndCharacter;\r\n tokens[destOffset + 3] = tokenMetadata;\r\n }\r\n newTokenCount++;\r\n }\r\n }\r\n this._tokenCount = newTokenCount;\r\n return firstDeltaLine;\r\n }\r\n split(startDeltaLine, startChar, endDeltaLine, endChar) {\r\n const tokens = this._tokens;\r\n const tokenCount = this._tokenCount;\r\n let aTokens = [];\r\n let bTokens = [];\r\n let destTokens = aTokens;\r\n let destOffset = 0;\r\n let destFirstDeltaLine = 0;\r\n for (let i = 0; i < tokenCount; i++) {\r\n const srcOffset = 4 * i;\r\n const tokenDeltaLine = tokens[srcOffset];\r\n const tokenStartCharacter = tokens[srcOffset + 1];\r\n const tokenEndCharacter = tokens[srcOffset + 2];\r\n const tokenMetadata = tokens[srcOffset + 3];\r\n if ((tokenDeltaLine > startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter >= startChar))) {\r\n if ((tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter <= endChar))) {\r\n // this token is touching the range\r\n continue;\r\n }\r\n else {\r\n // this token is after the range\r\n if (destTokens !== bTokens) {\r\n // this token is the first token after the range\r\n destTokens = bTokens;\r\n destOffset = 0;\r\n destFirstDeltaLine = tokenDeltaLine;\r\n }\r\n }\r\n }\r\n destTokens[destOffset++] = tokenDeltaLine - destFirstDeltaLine;\r\n destTokens[destOffset++] = tokenStartCharacter;\r\n destTokens[destOffset++] = tokenEndCharacter;\r\n destTokens[destOffset++] = tokenMetadata;\r\n }\r\n return [new SparseEncodedTokens(new Uint32Array(aTokens)), new SparseEncodedTokens(new Uint32Array(bTokens)), destFirstDeltaLine];\r\n }\r\n acceptDeleteRange(horizontalShiftForFirstLineTokens, startDeltaLine, startCharacter, endDeltaLine, endCharacter) {\r\n // This is a bit complex, here are the cases I used to think about this:\r\n //\r\n // 1. The token starts before the deletion range\r\n // 1a. The token is completely before the deletion range\r\n // -----------\r\n // xxxxxxxxxxx\r\n // 1b. The token starts before, the deletion range ends after the token\r\n // -----------\r\n // xxxxxxxxxxx\r\n // 1c. The token starts before, the deletion range ends precisely with the token\r\n // ---------------\r\n // xxxxxxxx\r\n // 1d. The token starts before, the deletion range is inside the token\r\n // ---------------\r\n // xxxxx\r\n //\r\n // 2. The token starts at the same position with the deletion range\r\n // 2a. The token starts at the same position, and ends inside the deletion range\r\n // -------\r\n // xxxxxxxxxxx\r\n // 2b. The token starts at the same position, and ends at the same position as the deletion range\r\n // ----------\r\n // xxxxxxxxxx\r\n // 2c. The token starts at the same position, and ends after the deletion range\r\n // -------------\r\n // xxxxxxx\r\n //\r\n // 3. The token starts inside the deletion range\r\n // 3a. The token is inside the deletion range\r\n // -------\r\n // xxxxxxxxxxxxx\r\n // 3b. The token starts inside the deletion range, and ends at the same position as the deletion range\r\n // ----------\r\n // xxxxxxxxxxxxx\r\n // 3c. The token starts inside the deletion range, and ends after the deletion range\r\n // ------------\r\n // xxxxxxxxxxx\r\n //\r\n // 4. The token starts after the deletion range\r\n // -----------\r\n // xxxxxxxx\r\n //\r\n const tokens = this._tokens;\r\n const tokenCount = this._tokenCount;\r\n const deletedLineCount = (endDeltaLine - startDeltaLine);\r\n let newTokenCount = 0;\r\n let hasDeletedTokens = false;\r\n for (let i = 0; i < tokenCount; i++) {\r\n const srcOffset = 4 * i;\r\n let tokenDeltaLine = tokens[srcOffset];\r\n let tokenStartCharacter = tokens[srcOffset + 1];\r\n let tokenEndCharacter = tokens[srcOffset + 2];\r\n const tokenMetadata = tokens[srcOffset + 3];\r\n if (tokenDeltaLine < startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter <= startCharacter)) {\r\n // 1a. The token is completely before the deletion range\r\n // => nothing to do\r\n newTokenCount++;\r\n continue;\r\n }\r\n else if (tokenDeltaLine === startDeltaLine && tokenStartCharacter < startCharacter) {\r\n // 1b, 1c, 1d\r\n // => the token survives, but it needs to shrink\r\n if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) {\r\n // 1d. The token starts before, the deletion range is inside the token\r\n // => the token shrinks by the deletion character count\r\n tokenEndCharacter -= (endCharacter - startCharacter);\r\n }\r\n else {\r\n // 1b. The token starts before, the deletion range ends after the token\r\n // 1c. The token starts before, the deletion range ends precisely with the token\r\n // => the token shrinks its ending to the deletion start\r\n tokenEndCharacter = startCharacter;\r\n }\r\n }\r\n else if (tokenDeltaLine === startDeltaLine && tokenStartCharacter === startCharacter) {\r\n // 2a, 2b, 2c\r\n if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) {\r\n // 2c. The token starts at the same position, and ends after the deletion range\r\n // => the token shrinks by the deletion character count\r\n tokenEndCharacter -= (endCharacter - startCharacter);\r\n }\r\n else {\r\n // 2a. The token starts at the same position, and ends inside the deletion range\r\n // 2b. The token starts at the same position, and ends at the same position as the deletion range\r\n // => the token is deleted\r\n hasDeletedTokens = true;\r\n continue;\r\n }\r\n }\r\n else if (tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter < endCharacter)) {\r\n // 3a, 3b, 3c\r\n if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) {\r\n // 3c. The token starts inside the deletion range, and ends after the deletion range\r\n // => the token moves left and shrinks\r\n if (tokenDeltaLine === startDeltaLine) {\r\n // the deletion started on the same line as the token\r\n // => the token moves left and shrinks\r\n tokenStartCharacter = startCharacter;\r\n tokenEndCharacter = tokenStartCharacter + (tokenEndCharacter - endCharacter);\r\n }\r\n else {\r\n // the deletion started on a line above the token\r\n // => the token moves to the beginning of the line\r\n tokenStartCharacter = 0;\r\n tokenEndCharacter = tokenStartCharacter + (tokenEndCharacter - endCharacter);\r\n }\r\n }\r\n else {\r\n // 3a. The token is inside the deletion range\r\n // 3b. The token starts inside the deletion range, and ends at the same position as the deletion range\r\n // => the token is deleted\r\n hasDeletedTokens = true;\r\n continue;\r\n }\r\n }\r\n else if (tokenDeltaLine > endDeltaLine) {\r\n // 4. (partial) The token starts after the deletion range, on a line below...\r\n if (deletedLineCount === 0 && !hasDeletedTokens) {\r\n // early stop, there is no need to walk all the tokens and do nothing...\r\n newTokenCount = tokenCount;\r\n break;\r\n }\r\n tokenDeltaLine -= deletedLineCount;\r\n }\r\n else if (tokenDeltaLine === endDeltaLine && tokenStartCharacter >= endCharacter) {\r\n // 4. (continued) The token starts after the deletion range, on the last line where a deletion occurs\r\n if (horizontalShiftForFirstLineTokens && tokenDeltaLine === 0) {\r\n tokenStartCharacter += horizontalShiftForFirstLineTokens;\r\n tokenEndCharacter += horizontalShiftForFirstLineTokens;\r\n }\r\n tokenDeltaLine -= deletedLineCount;\r\n tokenStartCharacter -= (endCharacter - startCharacter);\r\n tokenEndCharacter -= (endCharacter - startCharacter);\r\n }\r\n else {\r\n throw new Error(`Not possible!`);\r\n }\r\n const destOffset = 4 * newTokenCount;\r\n tokens[destOffset] = tokenDeltaLine;\r\n tokens[destOffset + 1] = tokenStartCharacter;\r\n tokens[destOffset + 2] = tokenEndCharacter;\r\n tokens[destOffset + 3] = tokenMetadata;\r\n newTokenCount++;\r\n }\r\n this._tokenCount = newTokenCount;\r\n }\r\n acceptInsertText(deltaLine, character, eolCount, firstLineLength, lastLineLength, firstCharCode) {\r\n // Here are the cases I used to think about this:\r\n //\r\n // 1. The token is completely before the insertion point\r\n // ----------- |\r\n // 2. The token ends precisely at the insertion point\r\n // -----------|\r\n // 3. The token contains the insertion point\r\n // -----|------\r\n // 4. The token starts precisely at the insertion point\r\n // |-----------\r\n // 5. The token is completely after the insertion point\r\n // | -----------\r\n //\r\n const isInsertingPreciselyOneWordCharacter = (eolCount === 0\r\n && firstLineLength === 1\r\n && ((firstCharCode >= 48 /* Digit0 */ && firstCharCode <= 57 /* Digit9 */)\r\n || (firstCharCode >= 65 /* A */ && firstCharCode <= 90 /* Z */)\r\n || (firstCharCode >= 97 /* a */ && firstCharCode <= 122 /* z */)));\r\n const tokens = this._tokens;\r\n const tokenCount = this._tokenCount;\r\n for (let i = 0; i < tokenCount; i++) {\r\n const offset = 4 * i;\r\n let tokenDeltaLine = tokens[offset];\r\n let tokenStartCharacter = tokens[offset + 1];\r\n let tokenEndCharacter = tokens[offset + 2];\r\n if (tokenDeltaLine < deltaLine || (tokenDeltaLine === deltaLine && tokenEndCharacter < character)) {\r\n // 1. The token is completely before the insertion point\r\n // => nothing to do\r\n continue;\r\n }\r\n else if (tokenDeltaLine === deltaLine && tokenEndCharacter === character) {\r\n // 2. The token ends precisely at the insertion point\r\n // => expand the end character only if inserting precisely one character that is a word character\r\n if (isInsertingPreciselyOneWordCharacter) {\r\n tokenEndCharacter += 1;\r\n }\r\n else {\r\n continue;\r\n }\r\n }\r\n else if (tokenDeltaLine === deltaLine && tokenStartCharacter < character && character < tokenEndCharacter) {\r\n // 3. The token contains the insertion point\r\n if (eolCount === 0) {\r\n // => just expand the end character\r\n tokenEndCharacter += firstLineLength;\r\n }\r\n else {\r\n // => cut off the token\r\n tokenEndCharacter = character;\r\n }\r\n }\r\n else {\r\n // 4. or 5.\r\n if (tokenDeltaLine === deltaLine && tokenStartCharacter === character) {\r\n // 4. The token starts precisely at the insertion point\r\n // => grow the token (by keeping its start constant) only if inserting precisely one character that is a word character\r\n // => otherwise behave as in case 5.\r\n if (isInsertingPreciselyOneWordCharacter) {\r\n continue;\r\n }\r\n }\r\n // => the token must move and keep its size constant\r\n if (tokenDeltaLine === deltaLine) {\r\n tokenDeltaLine += eolCount;\r\n // this token is on the line where the insertion is taking place\r\n if (eolCount === 0) {\r\n tokenStartCharacter += firstLineLength;\r\n tokenEndCharacter += firstLineLength;\r\n }\r\n else {\r\n const tokenLength = tokenEndCharacter - tokenStartCharacter;\r\n tokenStartCharacter = lastLineLength + (tokenStartCharacter - character);\r\n tokenEndCharacter = tokenStartCharacter + tokenLength;\r\n }\r\n }\r\n else {\r\n tokenDeltaLine += eolCount;\r\n }\r\n }\r\n tokens[offset] = tokenDeltaLine;\r\n tokens[offset + 1] = tokenStartCharacter;\r\n tokens[offset + 2] = tokenEndCharacter;\r\n }\r\n }\r\n}\r\nclass LineTokens2 {\r\n constructor(tokens) {\r\n this._tokens = tokens;\r\n }\r\n getCount() {\r\n return this._tokens.length / 4;\r\n }\r\n getStartCharacter(tokenIndex) {\r\n return this._tokens[4 * tokenIndex + 1];\r\n }\r\n getEndCharacter(tokenIndex) {\r\n return this._tokens[4 * tokenIndex + 2];\r\n }\r\n getMetadata(tokenIndex) {\r\n return this._tokens[4 * tokenIndex + 3];\r\n }\r\n}\r\nclass MultilineTokens2 {\r\n constructor(startLineNumber, tokens) {\r\n this.startLineNumber = startLineNumber;\r\n this.tokens = tokens;\r\n this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine();\r\n }\r\n toString() {\r\n return this.tokens.toString(this.startLineNumber);\r\n }\r\n _updateEndLineNumber() {\r\n this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine();\r\n }\r\n isEmpty() {\r\n return this.tokens.isEmpty();\r\n }\r\n getLineTokens(lineNumber) {\r\n if (this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber) {\r\n return this.tokens.getLineTokens(lineNumber - this.startLineNumber);\r\n }\r\n return null;\r\n }\r\n getRange() {\r\n const deltaRange = this.tokens.getRange();\r\n if (!deltaRange) {\r\n return deltaRange;\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(this.startLineNumber + deltaRange.startLineNumber, deltaRange.startColumn, this.startLineNumber + deltaRange.endLineNumber, deltaRange.endColumn);\r\n }\r\n removeTokens(range) {\r\n const startLineIndex = range.startLineNumber - this.startLineNumber;\r\n const endLineIndex = range.endLineNumber - this.startLineNumber;\r\n this.startLineNumber += this.tokens.removeTokens(startLineIndex, range.startColumn - 1, endLineIndex, range.endColumn - 1);\r\n this._updateEndLineNumber();\r\n }\r\n split(range) {\r\n // split tokens to two:\r\n // a) all the tokens before `range`\r\n // b) all the tokens after `range`\r\n const startLineIndex = range.startLineNumber - this.startLineNumber;\r\n const endLineIndex = range.endLineNumber - this.startLineNumber;\r\n const [a, b, bDeltaLine] = this.tokens.split(startLineIndex, range.startColumn - 1, endLineIndex, range.endColumn - 1);\r\n return [new MultilineTokens2(this.startLineNumber, a), new MultilineTokens2(this.startLineNumber + bDeltaLine, b)];\r\n }\r\n applyEdit(range, text) {\r\n const [eolCount, firstLineLength, lastLineLength] = countEOL(text);\r\n this.acceptEdit(range, eolCount, firstLineLength, lastLineLength, text.length > 0 ? text.charCodeAt(0) : 0 /* Null */);\r\n }\r\n acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode) {\r\n this._acceptDeleteRange(range);\r\n this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(range.startLineNumber, range.startColumn), eolCount, firstLineLength, lastLineLength, firstCharCode);\r\n this._updateEndLineNumber();\r\n }\r\n _acceptDeleteRange(range) {\r\n if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) {\r\n // Nothing to delete\r\n return;\r\n }\r\n const firstLineIndex = range.startLineNumber - this.startLineNumber;\r\n const lastLineIndex = range.endLineNumber - this.startLineNumber;\r\n if (lastLineIndex < 0) {\r\n // this deletion occurs entirely before this block, so we only need to adjust line numbers\r\n const deletedLinesCount = lastLineIndex - firstLineIndex;\r\n this.startLineNumber -= deletedLinesCount;\r\n return;\r\n }\r\n const tokenMaxDeltaLine = this.tokens.getMaxDeltaLine();\r\n if (firstLineIndex >= tokenMaxDeltaLine + 1) {\r\n // this deletion occurs entirely after this block, so there is nothing to do\r\n return;\r\n }\r\n if (firstLineIndex < 0 && lastLineIndex >= tokenMaxDeltaLine + 1) {\r\n // this deletion completely encompasses this block\r\n this.startLineNumber = 0;\r\n this.tokens.clear();\r\n return;\r\n }\r\n if (firstLineIndex < 0) {\r\n const deletedBefore = -firstLineIndex;\r\n this.startLineNumber -= deletedBefore;\r\n this.tokens.acceptDeleteRange(range.startColumn - 1, 0, 0, lastLineIndex, range.endColumn - 1);\r\n }\r\n else {\r\n this.tokens.acceptDeleteRange(0, firstLineIndex, range.startColumn - 1, lastLineIndex, range.endColumn - 1);\r\n }\r\n }\r\n _acceptInsertText(position, eolCount, firstLineLength, lastLineLength, firstCharCode) {\r\n if (eolCount === 0 && firstLineLength === 0) {\r\n // Nothing to insert\r\n return;\r\n }\r\n const lineIndex = position.lineNumber - this.startLineNumber;\r\n if (lineIndex < 0) {\r\n // this insertion occurs before this block, so we only need to adjust line numbers\r\n this.startLineNumber += eolCount;\r\n return;\r\n }\r\n const tokenMaxDeltaLine = this.tokens.getMaxDeltaLine();\r\n if (lineIndex >= tokenMaxDeltaLine + 1) {\r\n // this insertion occurs after this block, so there is nothing to do\r\n return;\r\n }\r\n this.tokens.acceptInsertText(lineIndex, position.column - 1, eolCount, firstLineLength, lastLineLength, firstCharCode);\r\n }\r\n}\r\nclass MultilineTokens {\r\n constructor(startLineNumber, tokens) {\r\n this.startLineNumber = startLineNumber;\r\n this.tokens = tokens;\r\n }\r\n}\r\nfunction toUint32Array(arr) {\r\n if (arr instanceof Uint32Array) {\r\n return arr;\r\n }\r\n else {\r\n return new Uint32Array(arr);\r\n }\r\n}\r\nclass TokensStore2 {\r\n constructor() {\r\n this._pieces = [];\r\n this._isComplete = false;\r\n }\r\n flush() {\r\n this._pieces = [];\r\n this._isComplete = false;\r\n }\r\n isEmpty() {\r\n return (this._pieces.length === 0);\r\n }\r\n set(pieces, isComplete) {\r\n this._pieces = pieces || [];\r\n this._isComplete = isComplete;\r\n }\r\n setPartial(_range, pieces) {\r\n // console.log(`setPartial ${_range} ${pieces.map(p => p.toString()).join(', ')}`);\r\n let range = _range;\r\n if (pieces.length > 0) {\r\n const _firstRange = pieces[0].getRange();\r\n const _lastRange = pieces[pieces.length - 1].getRange();\r\n if (!_firstRange || !_lastRange) {\r\n return _range;\r\n }\r\n range = _range.plusRange(_firstRange).plusRange(_lastRange);\r\n }\r\n let insertPosition = null;\r\n for (let i = 0, len = this._pieces.length; i < len; i++) {\r\n const piece = this._pieces[i];\r\n if (piece.endLineNumber < range.startLineNumber) {\r\n // this piece is before the range\r\n continue;\r\n }\r\n if (piece.startLineNumber > range.endLineNumber) {\r\n // this piece is after the range, so mark the spot before this piece\r\n // as a good insertion position and stop looping\r\n insertPosition = insertPosition || { index: i };\r\n break;\r\n }\r\n // this piece might intersect with the range\r\n piece.removeTokens(range);\r\n if (piece.isEmpty()) {\r\n // remove the piece if it became empty\r\n this._pieces.splice(i, 1);\r\n i--;\r\n len--;\r\n continue;\r\n }\r\n if (piece.endLineNumber < range.startLineNumber) {\r\n // after removal, this piece is before the range\r\n continue;\r\n }\r\n if (piece.startLineNumber > range.endLineNumber) {\r\n // after removal, this piece is after the range\r\n insertPosition = insertPosition || { index: i };\r\n continue;\r\n }\r\n // after removal, this piece contains the range\r\n const [a, b] = piece.split(range);\r\n if (a.isEmpty()) {\r\n // this piece is actually after the range\r\n insertPosition = insertPosition || { index: i };\r\n continue;\r\n }\r\n if (b.isEmpty()) {\r\n // this piece is actually before the range\r\n continue;\r\n }\r\n this._pieces.splice(i, 1, a, b);\r\n i++;\r\n len++;\r\n insertPosition = insertPosition || { index: i };\r\n }\r\n insertPosition = insertPosition || { index: this._pieces.length };\r\n if (pieces.length > 0) {\r\n this._pieces = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.arrayInsert(this._pieces, insertPosition.index, pieces);\r\n }\r\n // console.log(`I HAVE ${this._pieces.length} pieces`);\r\n // console.log(`${this._pieces.map(p => p.toString()).join('\\n')}`);\r\n return range;\r\n }\r\n isComplete() {\r\n return this._isComplete;\r\n }\r\n addSemanticTokens(lineNumber, aTokens) {\r\n const pieces = this._pieces;\r\n if (pieces.length === 0) {\r\n return aTokens;\r\n }\r\n const pieceIndex = TokensStore2._findFirstPieceWithLine(pieces, lineNumber);\r\n const bTokens = pieces[pieceIndex].getLineTokens(lineNumber);\r\n if (!bTokens) {\r\n return aTokens;\r\n }\r\n const aLen = aTokens.getCount();\r\n const bLen = bTokens.getCount();\r\n let aIndex = 0;\r\n let result = [], resultLen = 0;\r\n let lastEndOffset = 0;\r\n const emitToken = (endOffset, metadata) => {\r\n if (endOffset === lastEndOffset) {\r\n return;\r\n }\r\n lastEndOffset = endOffset;\r\n result[resultLen++] = endOffset;\r\n result[resultLen++] = metadata;\r\n };\r\n for (let bIndex = 0; bIndex < bLen; bIndex++) {\r\n const bStartCharacter = bTokens.getStartCharacter(bIndex);\r\n const bEndCharacter = bTokens.getEndCharacter(bIndex);\r\n const bMetadata = bTokens.getMetadata(bIndex);\r\n const bMask = (((bMetadata & 1 /* SEMANTIC_USE_ITALIC */) ? 2048 /* ITALIC_MASK */ : 0)\r\n | ((bMetadata & 2 /* SEMANTIC_USE_BOLD */) ? 4096 /* BOLD_MASK */ : 0)\r\n | ((bMetadata & 4 /* SEMANTIC_USE_UNDERLINE */) ? 8192 /* UNDERLINE_MASK */ : 0)\r\n | ((bMetadata & 8 /* SEMANTIC_USE_FOREGROUND */) ? 8372224 /* FOREGROUND_MASK */ : 0)\r\n | ((bMetadata & 16 /* SEMANTIC_USE_BACKGROUND */) ? 4286578688 /* BACKGROUND_MASK */ : 0)) >>> 0;\r\n const aMask = (~bMask) >>> 0;\r\n // push any token from `a` that is before `b`\r\n while (aIndex < aLen && aTokens.getEndOffset(aIndex) <= bStartCharacter) {\r\n emitToken(aTokens.getEndOffset(aIndex), aTokens.getMetadata(aIndex));\r\n aIndex++;\r\n }\r\n // push the token from `a` if it intersects the token from `b`\r\n if (aIndex < aLen && aTokens.getStartOffset(aIndex) < bStartCharacter) {\r\n emitToken(bStartCharacter, aTokens.getMetadata(aIndex));\r\n }\r\n // skip any tokens from `a` that are contained inside `b`\r\n while (aIndex < aLen && aTokens.getEndOffset(aIndex) < bEndCharacter) {\r\n emitToken(aTokens.getEndOffset(aIndex), (aTokens.getMetadata(aIndex) & aMask) | (bMetadata & bMask));\r\n aIndex++;\r\n }\r\n if (aIndex < aLen) {\r\n emitToken(bEndCharacter, (aTokens.getMetadata(aIndex) & aMask) | (bMetadata & bMask));\r\n if (aTokens.getEndOffset(aIndex) === bEndCharacter) {\r\n // `a` ends exactly at the same spot as `b`!\r\n aIndex++;\r\n }\r\n }\r\n else {\r\n const aMergeIndex = Math.min(Math.max(0, aIndex - 1), aLen - 1);\r\n // push the token from `b`\r\n emitToken(bEndCharacter, (aTokens.getMetadata(aMergeIndex) & aMask) | (bMetadata & bMask));\r\n }\r\n }\r\n // push the remaining tokens from `a`\r\n while (aIndex < aLen) {\r\n emitToken(aTokens.getEndOffset(aIndex), aTokens.getMetadata(aIndex));\r\n aIndex++;\r\n }\r\n return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens(new Uint32Array(result), aTokens.getLineContent());\r\n }\r\n static _findFirstPieceWithLine(pieces, lineNumber) {\r\n let low = 0;\r\n let high = pieces.length - 1;\r\n while (low < high) {\r\n let mid = low + Math.floor((high - low) / 2);\r\n if (pieces[mid].endLineNumber < lineNumber) {\r\n low = mid + 1;\r\n }\r\n else if (pieces[mid].startLineNumber > lineNumber) {\r\n high = mid - 1;\r\n }\r\n else {\r\n while (mid > low && pieces[mid - 1].startLineNumber <= lineNumber && lineNumber <= pieces[mid - 1].endLineNumber) {\r\n mid--;\r\n }\r\n return mid;\r\n }\r\n }\r\n return low;\r\n }\r\n //#region Editing\r\n acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode) {\r\n for (const piece of this._pieces) {\r\n piece.acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode);\r\n }\r\n }\r\n}\r\nclass TokensStore {\r\n constructor() {\r\n this._lineTokens = [];\r\n this._len = 0;\r\n }\r\n flush() {\r\n this._lineTokens = [];\r\n this._len = 0;\r\n }\r\n getTokens(topLevelLanguageId, lineIndex, lineText) {\r\n let rawLineTokens = null;\r\n if (lineIndex < this._len) {\r\n rawLineTokens = this._lineTokens[lineIndex];\r\n }\r\n if (rawLineTokens !== null && rawLineTokens !== EMPTY_LINE_TOKENS) {\r\n return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens(toUint32Array(rawLineTokens), lineText);\r\n }\r\n let lineTokens = new Uint32Array(2);\r\n lineTokens[0] = lineText.length;\r\n lineTokens[1] = getDefaultMetadata(topLevelLanguageId);\r\n return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens(lineTokens, lineText);\r\n }\r\n static _massageTokens(topLevelLanguageId, lineTextLength, _tokens) {\r\n const tokens = _tokens ? toUint32Array(_tokens) : null;\r\n if (lineTextLength === 0) {\r\n let hasDifferentLanguageId = false;\r\n if (tokens && tokens.length > 1) {\r\n hasDifferentLanguageId = (_modes_js__WEBPACK_IMPORTED_MODULE_4__.TokenMetadata.getLanguageId(tokens[1]) !== topLevelLanguageId);\r\n }\r\n if (!hasDifferentLanguageId) {\r\n return EMPTY_LINE_TOKENS;\r\n }\r\n }\r\n if (!tokens || tokens.length === 0) {\r\n const tokens = new Uint32Array(2);\r\n tokens[0] = lineTextLength;\r\n tokens[1] = getDefaultMetadata(topLevelLanguageId);\r\n return tokens.buffer;\r\n }\r\n // Ensure the last token covers the end of the text\r\n tokens[tokens.length - 2] = lineTextLength;\r\n if (tokens.byteOffset === 0 && tokens.byteLength === tokens.buffer.byteLength) {\r\n // Store directly the ArrayBuffer pointer to save an object\r\n return tokens.buffer;\r\n }\r\n return tokens;\r\n }\r\n _ensureLine(lineIndex) {\r\n while (lineIndex >= this._len) {\r\n this._lineTokens[this._len] = null;\r\n this._len++;\r\n }\r\n }\r\n _deleteLines(start, deleteCount) {\r\n if (deleteCount === 0) {\r\n return;\r\n }\r\n if (start + deleteCount > this._len) {\r\n deleteCount = this._len - start;\r\n }\r\n this._lineTokens.splice(start, deleteCount);\r\n this._len -= deleteCount;\r\n }\r\n _insertLines(insertIndex, insertCount) {\r\n if (insertCount === 0) {\r\n return;\r\n }\r\n let lineTokens = [];\r\n for (let i = 0; i < insertCount; i++) {\r\n lineTokens[i] = null;\r\n }\r\n this._lineTokens = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.arrayInsert(this._lineTokens, insertIndex, lineTokens);\r\n this._len += insertCount;\r\n }\r\n setTokens(topLevelLanguageId, lineIndex, lineTextLength, _tokens, checkEquality) {\r\n const tokens = TokensStore._massageTokens(topLevelLanguageId, lineTextLength, _tokens);\r\n this._ensureLine(lineIndex);\r\n const oldTokens = this._lineTokens[lineIndex];\r\n this._lineTokens[lineIndex] = tokens;\r\n if (checkEquality) {\r\n return !TokensStore._equals(oldTokens, tokens);\r\n }\r\n return false;\r\n }\r\n static _equals(_a, _b) {\r\n if (!_a || !_b) {\r\n return !_a && !_b;\r\n }\r\n const a = toUint32Array(_a);\r\n const b = toUint32Array(_b);\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = a.length; i < len; i++) {\r\n if (a[i] !== b[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n //#region Editing\r\n acceptEdit(range, eolCount, firstLineLength) {\r\n this._acceptDeleteRange(range);\r\n this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(range.startLineNumber, range.startColumn), eolCount, firstLineLength);\r\n }\r\n _acceptDeleteRange(range) {\r\n const firstLineIndex = range.startLineNumber - 1;\r\n if (firstLineIndex >= this._len) {\r\n return;\r\n }\r\n if (range.startLineNumber === range.endLineNumber) {\r\n if (range.startColumn === range.endColumn) {\r\n // Nothing to delete\r\n return;\r\n }\r\n this._lineTokens[firstLineIndex] = TokensStore._delete(this._lineTokens[firstLineIndex], range.startColumn - 1, range.endColumn - 1);\r\n return;\r\n }\r\n this._lineTokens[firstLineIndex] = TokensStore._deleteEnding(this._lineTokens[firstLineIndex], range.startColumn - 1);\r\n const lastLineIndex = range.endLineNumber - 1;\r\n let lastLineTokens = null;\r\n if (lastLineIndex < this._len) {\r\n lastLineTokens = TokensStore._deleteBeginning(this._lineTokens[lastLineIndex], range.endColumn - 1);\r\n }\r\n // Take remaining text on last line and append it to remaining text on first line\r\n this._lineTokens[firstLineIndex] = TokensStore._append(this._lineTokens[firstLineIndex], lastLineTokens);\r\n // Delete middle lines\r\n this._deleteLines(range.startLineNumber, range.endLineNumber - range.startLineNumber);\r\n }\r\n _acceptInsertText(position, eolCount, firstLineLength) {\r\n if (eolCount === 0 && firstLineLength === 0) {\r\n // Nothing to insert\r\n return;\r\n }\r\n const lineIndex = position.lineNumber - 1;\r\n if (lineIndex >= this._len) {\r\n return;\r\n }\r\n if (eolCount === 0) {\r\n // Inserting text on one line\r\n this._lineTokens[lineIndex] = TokensStore._insert(this._lineTokens[lineIndex], position.column - 1, firstLineLength);\r\n return;\r\n }\r\n this._lineTokens[lineIndex] = TokensStore._deleteEnding(this._lineTokens[lineIndex], position.column - 1);\r\n this._lineTokens[lineIndex] = TokensStore._insert(this._lineTokens[lineIndex], position.column - 1, firstLineLength);\r\n this._insertLines(position.lineNumber, eolCount);\r\n }\r\n static _deleteBeginning(lineTokens, toChIndex) {\r\n if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) {\r\n return lineTokens;\r\n }\r\n return TokensStore._delete(lineTokens, 0, toChIndex);\r\n }\r\n static _deleteEnding(lineTokens, fromChIndex) {\r\n if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) {\r\n return lineTokens;\r\n }\r\n const tokens = toUint32Array(lineTokens);\r\n const lineTextLength = tokens[tokens.length - 2];\r\n return TokensStore._delete(lineTokens, fromChIndex, lineTextLength);\r\n }\r\n static _delete(lineTokens, fromChIndex, toChIndex) {\r\n if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS || fromChIndex === toChIndex) {\r\n return lineTokens;\r\n }\r\n const tokens = toUint32Array(lineTokens);\r\n const tokensCount = (tokens.length >>> 1);\r\n // special case: deleting everything\r\n if (fromChIndex === 0 && tokens[tokens.length - 2] === toChIndex) {\r\n return EMPTY_LINE_TOKENS;\r\n }\r\n const fromTokenIndex = _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens.findIndexInTokensArray(tokens, fromChIndex);\r\n const fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0);\r\n const fromTokenEndOffset = tokens[fromTokenIndex << 1];\r\n if (toChIndex < fromTokenEndOffset) {\r\n // the delete range is inside a single token\r\n const delta = (toChIndex - fromChIndex);\r\n for (let i = fromTokenIndex; i < tokensCount; i++) {\r\n tokens[i << 1] -= delta;\r\n }\r\n return lineTokens;\r\n }\r\n let dest;\r\n let lastEnd;\r\n if (fromTokenStartOffset !== fromChIndex) {\r\n tokens[fromTokenIndex << 1] = fromChIndex;\r\n dest = ((fromTokenIndex + 1) << 1);\r\n lastEnd = fromChIndex;\r\n }\r\n else {\r\n dest = (fromTokenIndex << 1);\r\n lastEnd = fromTokenStartOffset;\r\n }\r\n const delta = (toChIndex - fromChIndex);\r\n for (let tokenIndex = fromTokenIndex + 1; tokenIndex < tokensCount; tokenIndex++) {\r\n const tokenEndOffset = tokens[tokenIndex << 1] - delta;\r\n if (tokenEndOffset > lastEnd) {\r\n tokens[dest++] = tokenEndOffset;\r\n tokens[dest++] = tokens[(tokenIndex << 1) + 1];\r\n lastEnd = tokenEndOffset;\r\n }\r\n }\r\n if (dest === tokens.length) {\r\n // nothing to trim\r\n return lineTokens;\r\n }\r\n let tmp = new Uint32Array(dest);\r\n tmp.set(tokens.subarray(0, dest), 0);\r\n return tmp.buffer;\r\n }\r\n static _append(lineTokens, _otherTokens) {\r\n if (_otherTokens === EMPTY_LINE_TOKENS) {\r\n return lineTokens;\r\n }\r\n if (lineTokens === EMPTY_LINE_TOKENS) {\r\n return _otherTokens;\r\n }\r\n if (lineTokens === null) {\r\n return lineTokens;\r\n }\r\n if (_otherTokens === null) {\r\n // cannot determine combined line length...\r\n return null;\r\n }\r\n const myTokens = toUint32Array(lineTokens);\r\n const otherTokens = toUint32Array(_otherTokens);\r\n const otherTokensCount = (otherTokens.length >>> 1);\r\n let result = new Uint32Array(myTokens.length + otherTokens.length);\r\n result.set(myTokens, 0);\r\n let dest = myTokens.length;\r\n const delta = myTokens[myTokens.length - 2];\r\n for (let i = 0; i < otherTokensCount; i++) {\r\n result[dest++] = otherTokens[(i << 1)] + delta;\r\n result[dest++] = otherTokens[(i << 1) + 1];\r\n }\r\n return result.buffer;\r\n }\r\n static _insert(lineTokens, chIndex, textLength) {\r\n if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) {\r\n // nothing to do\r\n return lineTokens;\r\n }\r\n const tokens = toUint32Array(lineTokens);\r\n const tokensCount = (tokens.length >>> 1);\r\n let fromTokenIndex = _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens.findIndexInTokensArray(tokens, chIndex);\r\n if (fromTokenIndex > 0) {\r\n const fromTokenStartOffset = tokens[(fromTokenIndex - 1) << 1];\r\n if (fromTokenStartOffset === chIndex) {\r\n fromTokenIndex--;\r\n }\r\n }\r\n for (let tokenIndex = fromTokenIndex; tokenIndex < tokensCount; tokenIndex++) {\r\n tokens[tokenIndex << 1] += textLength;\r\n }\r\n return lineTokens;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"USUAL_WORD_SEPARATORS\": () => (/* binding */ USUAL_WORD_SEPARATORS),\n/* harmony export */ \"DEFAULT_WORD_REGEXP\": () => (/* binding */ DEFAULT_WORD_REGEXP),\n/* harmony export */ \"ensureValidWordDefinition\": () => (/* binding */ ensureValidWordDefinition),\n/* harmony export */ \"getWordAtText\": () => (/* binding */ getWordAtText)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?';\r\n/**\r\n * Create a word definition regular expression based on default word separators.\r\n * Optionally provide allowed separators that should be included in words.\r\n *\r\n * The default would look like this:\r\n * /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g\r\n */\r\nfunction createWordRegExp(allowInWords = '') {\r\n let source = '(-?\\\\d*\\\\.\\\\d\\\\w*)|([^';\r\n for (const sep of USUAL_WORD_SEPARATORS) {\r\n if (allowInWords.indexOf(sep) >= 0) {\r\n continue;\r\n }\r\n source += '\\\\' + sep;\r\n }\r\n source += '\\\\s]+)';\r\n return new RegExp(source, 'g');\r\n}\r\n// catches numbers (including floating numbers) in the first group, and alphanum in the second\r\nconst DEFAULT_WORD_REGEXP = createWordRegExp();\r\nfunction ensureValidWordDefinition(wordDefinition) {\r\n let result = DEFAULT_WORD_REGEXP;\r\n if (wordDefinition && (wordDefinition instanceof RegExp)) {\r\n if (!wordDefinition.global) {\r\n let flags = 'g';\r\n if (wordDefinition.ignoreCase) {\r\n flags += 'i';\r\n }\r\n if (wordDefinition.multiline) {\r\n flags += 'm';\r\n }\r\n if (wordDefinition.unicode) {\r\n flags += 'u';\r\n }\r\n result = new RegExp(wordDefinition.source, flags);\r\n }\r\n else {\r\n result = wordDefinition;\r\n }\r\n }\r\n result.lastIndex = 0;\r\n return result;\r\n}\r\nconst _defaultConfig = {\r\n maxLen: 1000,\r\n windowSize: 15,\r\n timeBudget: 150\r\n};\r\nfunction getWordAtText(column, wordDefinition, text, textOffset, config = _defaultConfig) {\r\n if (text.length > config.maxLen) {\r\n // don't throw strings that long at the regexp\r\n // but use a sub-string in which a word must occur\r\n let start = column - config.maxLen / 2;\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n else {\r\n textOffset += start;\r\n }\r\n text = text.substring(start, column + config.maxLen / 2);\r\n return getWordAtText(column, wordDefinition, text, textOffset, config);\r\n }\r\n const t1 = Date.now();\r\n const pos = column - 1 - textOffset;\r\n let prevRegexIndex = -1;\r\n let match = null;\r\n for (let i = 1;; i++) {\r\n // check time budget\r\n if (Date.now() - t1 >= config.timeBudget) {\r\n break;\r\n }\r\n // reset the index at which the regexp should start matching, also know where it\r\n // should stop so that subsequent search don't repeat previous searches\r\n const regexIndex = pos - config.windowSize * i;\r\n wordDefinition.lastIndex = Math.max(0, regexIndex);\r\n const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex);\r\n if (!thisMatch && match) {\r\n // stop: we have something\r\n break;\r\n }\r\n match = thisMatch;\r\n // stop: searched at start\r\n if (regexIndex <= 0) {\r\n break;\r\n }\r\n prevRegexIndex = regexIndex;\r\n }\r\n if (match) {\r\n let result = {\r\n word: match[0],\r\n startColumn: textOffset + 1 + match.index,\r\n endColumn: textOffset + 1 + match.index + match[0].length\r\n };\r\n wordDefinition.lastIndex = 0;\r\n return result;\r\n }\r\n return null;\r\n}\r\nfunction _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) {\r\n let match;\r\n while (match = wordDefinition.exec(text)) {\r\n const matchIndex = match.index || 0;\r\n if (matchIndex <= pos && wordDefinition.lastIndex >= pos) {\r\n return match;\r\n }\r\n else if (stopPos > 0 && matchIndex > stopPos) {\r\n return null;\r\n }\r\n }\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes.js ***!
|
||
\******************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LanguageIdentifier\": () => (/* binding */ LanguageIdentifier),\n/* harmony export */ \"TokenMetadata\": () => (/* binding */ TokenMetadata),\n/* harmony export */ \"completionKindToCssClass\": () => (/* binding */ completionKindToCssClass),\n/* harmony export */ \"completionKindFromString\": () => (/* binding */ completionKindFromString),\n/* harmony export */ \"SignatureHelpTriggerKind\": () => (/* binding */ SignatureHelpTriggerKind),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* binding */ DocumentHighlightKind),\n/* harmony export */ \"isLocationLink\": () => (/* binding */ isLocationLink),\n/* harmony export */ \"SymbolKinds\": () => (/* binding */ SymbolKinds),\n/* harmony export */ \"FoldingRangeKind\": () => (/* binding */ FoldingRangeKind),\n/* harmony export */ \"InlineHintKind\": () => (/* binding */ InlineHintKind),\n/* harmony export */ \"ReferenceProviderRegistry\": () => (/* binding */ ReferenceProviderRegistry),\n/* harmony export */ \"RenameProviderRegistry\": () => (/* binding */ RenameProviderRegistry),\n/* harmony export */ \"CompletionProviderRegistry\": () => (/* binding */ CompletionProviderRegistry),\n/* harmony export */ \"SignatureHelpProviderRegistry\": () => (/* binding */ SignatureHelpProviderRegistry),\n/* harmony export */ \"HoverProviderRegistry\": () => (/* binding */ HoverProviderRegistry),\n/* harmony export */ \"DocumentSymbolProviderRegistry\": () => (/* binding */ DocumentSymbolProviderRegistry),\n/* harmony export */ \"DocumentHighlightProviderRegistry\": () => (/* binding */ DocumentHighlightProviderRegistry),\n/* harmony export */ \"LinkedEditingRangeProviderRegistry\": () => (/* binding */ LinkedEditingRangeProviderRegistry),\n/* harmony export */ \"DefinitionProviderRegistry\": () => (/* binding */ DefinitionProviderRegistry),\n/* harmony export */ \"DeclarationProviderRegistry\": () => (/* binding */ DeclarationProviderRegistry),\n/* harmony export */ \"ImplementationProviderRegistry\": () => (/* binding */ ImplementationProviderRegistry),\n/* harmony export */ \"TypeDefinitionProviderRegistry\": () => (/* binding */ TypeDefinitionProviderRegistry),\n/* harmony export */ \"CodeLensProviderRegistry\": () => (/* binding */ CodeLensProviderRegistry),\n/* harmony export */ \"InlineHintsProviderRegistry\": () => (/* binding */ InlineHintsProviderRegistry),\n/* harmony export */ \"CodeActionProviderRegistry\": () => (/* binding */ CodeActionProviderRegistry),\n/* harmony export */ \"DocumentFormattingEditProviderRegistry\": () => (/* binding */ DocumentFormattingEditProviderRegistry),\n/* harmony export */ \"DocumentRangeFormattingEditProviderRegistry\": () => (/* binding */ DocumentRangeFormattingEditProviderRegistry),\n/* harmony export */ \"OnTypeFormattingEditProviderRegistry\": () => (/* binding */ OnTypeFormattingEditProviderRegistry),\n/* harmony export */ \"LinkProviderRegistry\": () => (/* binding */ LinkProviderRegistry),\n/* harmony export */ \"ColorProviderRegistry\": () => (/* binding */ ColorProviderRegistry),\n/* harmony export */ \"SelectionRangeRegistry\": () => (/* binding */ SelectionRangeRegistry),\n/* harmony export */ \"FoldingRangeProviderRegistry\": () => (/* binding */ FoldingRangeProviderRegistry),\n/* harmony export */ \"DocumentSemanticTokensProviderRegistry\": () => (/* binding */ DocumentSemanticTokensProviderRegistry),\n/* harmony export */ \"DocumentRangeSemanticTokensProviderRegistry\": () => (/* binding */ DocumentRangeSemanticTokensProviderRegistry),\n/* harmony export */ \"TokenizationRegistry\": () => (/* binding */ TokenizationRegistry)\n/* harmony export */ });\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modes/languageFeatureRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js\");\n/* harmony import */ var _modes_tokenizationRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modes/tokenizationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @internal\r\n */\r\nclass LanguageIdentifier {\r\n constructor(language, id) {\r\n this.language = language;\r\n this.id = id;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass TokenMetadata {\r\n static getLanguageId(metadata) {\r\n return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\r\n }\r\n static getTokenType(metadata) {\r\n return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\r\n }\r\n static getFontStyle(metadata) {\r\n return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\r\n }\r\n static getForeground(metadata) {\r\n return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */;\r\n }\r\n static getBackground(metadata) {\r\n return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */;\r\n }\r\n static getClassNameFromMetadata(metadata) {\r\n let foreground = this.getForeground(metadata);\r\n let className = 'mtk' + foreground;\r\n let fontStyle = this.getFontStyle(metadata);\r\n if (fontStyle & 1 /* Italic */) {\r\n className += ' mtki';\r\n }\r\n if (fontStyle & 2 /* Bold */) {\r\n className += ' mtkb';\r\n }\r\n if (fontStyle & 4 /* Underline */) {\r\n className += ' mtku';\r\n }\r\n return className;\r\n }\r\n static getInlineStyleFromMetadata(metadata, colorMap) {\r\n const foreground = this.getForeground(metadata);\r\n const fontStyle = this.getFontStyle(metadata);\r\n let result = `color: ${colorMap[foreground]};`;\r\n if (fontStyle & 1 /* Italic */) {\r\n result += 'font-style: italic;';\r\n }\r\n if (fontStyle & 2 /* Bold */) {\r\n result += 'font-weight: bold;';\r\n }\r\n if (fontStyle & 4 /* Underline */) {\r\n result += 'text-decoration: underline;';\r\n }\r\n return result;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nconst completionKindToCssClass = (function () {\r\n let data = Object.create(null);\r\n data[0 /* Method */] = 'symbol-method';\r\n data[1 /* Function */] = 'symbol-function';\r\n data[2 /* Constructor */] = 'symbol-constructor';\r\n data[3 /* Field */] = 'symbol-field';\r\n data[4 /* Variable */] = 'symbol-variable';\r\n data[5 /* Class */] = 'symbol-class';\r\n data[6 /* Struct */] = 'symbol-struct';\r\n data[7 /* Interface */] = 'symbol-interface';\r\n data[8 /* Module */] = 'symbol-module';\r\n data[9 /* Property */] = 'symbol-property';\r\n data[10 /* Event */] = 'symbol-event';\r\n data[11 /* Operator */] = 'symbol-operator';\r\n data[12 /* Unit */] = 'symbol-unit';\r\n data[13 /* Value */] = 'symbol-value';\r\n data[14 /* Constant */] = 'symbol-constant';\r\n data[15 /* Enum */] = 'symbol-enum';\r\n data[16 /* EnumMember */] = 'symbol-enum-member';\r\n data[17 /* Keyword */] = 'symbol-keyword';\r\n data[27 /* Snippet */] = 'symbol-snippet';\r\n data[18 /* Text */] = 'symbol-text';\r\n data[19 /* Color */] = 'symbol-color';\r\n data[20 /* File */] = 'symbol-file';\r\n data[21 /* Reference */] = 'symbol-reference';\r\n data[22 /* Customcolor */] = 'symbol-customcolor';\r\n data[23 /* Folder */] = 'symbol-folder';\r\n data[24 /* TypeParameter */] = 'symbol-type-parameter';\r\n data[25 /* User */] = 'account';\r\n data[26 /* Issue */] = 'issues';\r\n return function (kind) {\r\n const name = data[kind];\r\n let codicon = name && _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.iconRegistry.get(name);\r\n if (!codicon) {\r\n console.info('No codicon found for CompletionItemKind ' + kind);\r\n codicon = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.symbolProperty;\r\n }\r\n return codicon.classNames;\r\n };\r\n})();\r\n/**\r\n * @internal\r\n */\r\nlet completionKindFromString = (function () {\r\n let data = Object.create(null);\r\n data['method'] = 0 /* Method */;\r\n data['function'] = 1 /* Function */;\r\n data['constructor'] = 2 /* Constructor */;\r\n data['field'] = 3 /* Field */;\r\n data['variable'] = 4 /* Variable */;\r\n data['class'] = 5 /* Class */;\r\n data['struct'] = 6 /* Struct */;\r\n data['interface'] = 7 /* Interface */;\r\n data['module'] = 8 /* Module */;\r\n data['property'] = 9 /* Property */;\r\n data['event'] = 10 /* Event */;\r\n data['operator'] = 11 /* Operator */;\r\n data['unit'] = 12 /* Unit */;\r\n data['value'] = 13 /* Value */;\r\n data['constant'] = 14 /* Constant */;\r\n data['enum'] = 15 /* Enum */;\r\n data['enum-member'] = 16 /* EnumMember */;\r\n data['enumMember'] = 16 /* EnumMember */;\r\n data['keyword'] = 17 /* Keyword */;\r\n data['snippet'] = 27 /* Snippet */;\r\n data['text'] = 18 /* Text */;\r\n data['color'] = 19 /* Color */;\r\n data['file'] = 20 /* File */;\r\n data['reference'] = 21 /* Reference */;\r\n data['customcolor'] = 22 /* Customcolor */;\r\n data['folder'] = 23 /* Folder */;\r\n data['type-parameter'] = 24 /* TypeParameter */;\r\n data['typeParameter'] = 24 /* TypeParameter */;\r\n data['account'] = 25 /* User */;\r\n data['issue'] = 26 /* Issue */;\r\n return function (value, strict) {\r\n let res = data[value];\r\n if (typeof res === 'undefined' && !strict) {\r\n res = 9 /* Property */;\r\n }\r\n return res;\r\n };\r\n})();\r\nvar SignatureHelpTriggerKind;\r\n(function (SignatureHelpTriggerKind) {\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\r\n})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));\r\n/**\r\n * A document highlight kind.\r\n */\r\nvar DocumentHighlightKind;\r\n(function (DocumentHighlightKind) {\r\n /**\r\n * A textual occurrence.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\r\n /**\r\n * Read-access of a symbol, like reading a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\r\n /**\r\n * Write-access of a symbol, like writing to a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\r\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r\n/**\r\n * @internal\r\n */\r\nfunction isLocationLink(thing) {\r\n return thing\r\n && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.isUri(thing.uri)\r\n && _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.isIRange(thing.range)\r\n && (_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.isIRange(thing.originSelectionRange) || _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.isIRange(thing.targetSelectionRange));\r\n}\r\n/**\r\n * @internal\r\n */\r\nvar SymbolKinds;\r\n(function (SymbolKinds) {\r\n const byName = new Map();\r\n byName.set('file', 0 /* File */);\r\n byName.set('module', 1 /* Module */);\r\n byName.set('namespace', 2 /* Namespace */);\r\n byName.set('package', 3 /* Package */);\r\n byName.set('class', 4 /* Class */);\r\n byName.set('method', 5 /* Method */);\r\n byName.set('property', 6 /* Property */);\r\n byName.set('field', 7 /* Field */);\r\n byName.set('constructor', 8 /* Constructor */);\r\n byName.set('enum', 9 /* Enum */);\r\n byName.set('interface', 10 /* Interface */);\r\n byName.set('function', 11 /* Function */);\r\n byName.set('variable', 12 /* Variable */);\r\n byName.set('constant', 13 /* Constant */);\r\n byName.set('string', 14 /* String */);\r\n byName.set('number', 15 /* Number */);\r\n byName.set('boolean', 16 /* Boolean */);\r\n byName.set('array', 17 /* Array */);\r\n byName.set('object', 18 /* Object */);\r\n byName.set('key', 19 /* Key */);\r\n byName.set('null', 20 /* Null */);\r\n byName.set('enum-member', 21 /* EnumMember */);\r\n byName.set('struct', 22 /* Struct */);\r\n byName.set('event', 23 /* Event */);\r\n byName.set('operator', 24 /* Operator */);\r\n byName.set('type-parameter', 25 /* TypeParameter */);\r\n const byKind = new Map();\r\n byKind.set(0 /* File */, 'file');\r\n byKind.set(1 /* Module */, 'module');\r\n byKind.set(2 /* Namespace */, 'namespace');\r\n byKind.set(3 /* Package */, 'package');\r\n byKind.set(4 /* Class */, 'class');\r\n byKind.set(5 /* Method */, 'method');\r\n byKind.set(6 /* Property */, 'property');\r\n byKind.set(7 /* Field */, 'field');\r\n byKind.set(8 /* Constructor */, 'constructor');\r\n byKind.set(9 /* Enum */, 'enum');\r\n byKind.set(10 /* Interface */, 'interface');\r\n byKind.set(11 /* Function */, 'function');\r\n byKind.set(12 /* Variable */, 'variable');\r\n byKind.set(13 /* Constant */, 'constant');\r\n byKind.set(14 /* String */, 'string');\r\n byKind.set(15 /* Number */, 'number');\r\n byKind.set(16 /* Boolean */, 'boolean');\r\n byKind.set(17 /* Array */, 'array');\r\n byKind.set(18 /* Object */, 'object');\r\n byKind.set(19 /* Key */, 'key');\r\n byKind.set(20 /* Null */, 'null');\r\n byKind.set(21 /* EnumMember */, 'enum-member');\r\n byKind.set(22 /* Struct */, 'struct');\r\n byKind.set(23 /* Event */, 'event');\r\n byKind.set(24 /* Operator */, 'operator');\r\n byKind.set(25 /* TypeParameter */, 'type-parameter');\r\n /**\r\n * @internal\r\n */\r\n function fromString(value) {\r\n return byName.get(value);\r\n }\r\n SymbolKinds.fromString = fromString;\r\n /**\r\n * @internal\r\n */\r\n function toString(kind) {\r\n return byKind.get(kind);\r\n }\r\n SymbolKinds.toString = toString;\r\n /**\r\n * @internal\r\n */\r\n function toCssClassName(kind, inline) {\r\n const symbolName = byKind.get(kind);\r\n let codicon = symbolName && _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.iconRegistry.get('symbol-' + symbolName);\r\n if (!codicon) {\r\n console.info('No codicon found for SymbolKind ' + kind);\r\n codicon = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__.Codicon.symbolProperty;\r\n }\r\n return `${inline ? 'inline' : 'block'} ${codicon.classNames}`;\r\n }\r\n SymbolKinds.toCssClassName = toCssClassName;\r\n})(SymbolKinds || (SymbolKinds = {}));\r\nclass FoldingRangeKind {\r\n /**\r\n * Creates a new [FoldingRangeKind](#FoldingRangeKind).\r\n *\r\n * @param value of the kind.\r\n */\r\n constructor(value) {\r\n this.value = value;\r\n }\r\n}\r\n/**\r\n * Kind for folding range representing a comment. The value of the kind is 'comment'.\r\n */\r\nFoldingRangeKind.Comment = new FoldingRangeKind('comment');\r\n/**\r\n * Kind for folding range representing a import. The value of the kind is 'imports'.\r\n */\r\nFoldingRangeKind.Imports = new FoldingRangeKind('imports');\r\n/**\r\n * Kind for folding range representing regions (for example marked by `#region`, `#endregion`).\r\n * The value of the kind is 'region'.\r\n */\r\nFoldingRangeKind.Region = new FoldingRangeKind('region');\r\nvar InlineHintKind;\r\n(function (InlineHintKind) {\r\n InlineHintKind[InlineHintKind[\"Other\"] = 0] = \"Other\";\r\n InlineHintKind[InlineHintKind[\"Type\"] = 1] = \"Type\";\r\n InlineHintKind[InlineHintKind[\"Parameter\"] = 2] = \"Parameter\";\r\n})(InlineHintKind || (InlineHintKind = {}));\r\n// --- feature registries ------\r\n/**\r\n * @internal\r\n */\r\nconst ReferenceProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst RenameProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst CompletionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst SignatureHelpProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst HoverProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentSymbolProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentHighlightProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst LinkedEditingRangeProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DefinitionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DeclarationProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst ImplementationProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst TypeDefinitionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst CodeLensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst InlineHintsProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst CodeActionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentRangeFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst OnTypeFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst LinkProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst ColorProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst SelectionRangeRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst FoldingRangeProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentSemanticTokensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst DocumentRangeSemanticTokensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageFeatureRegistry();\r\n/**\r\n * @internal\r\n */\r\nconst TokenizationRegistry = new _modes_tokenizationRegistry_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistryImpl();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FrankensteinMode\": () => (/* binding */ FrankensteinMode)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass FrankensteinMode {\r\n constructor(languageIdentifier) {\r\n this._languageIdentifier = languageIdentifier;\r\n }\r\n getId() {\r\n return this._languageIdentifier.language;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IndentAction\": () => (/* binding */ IndentAction),\n/* harmony export */ \"StandardAutoClosingPairConditional\": () => (/* binding */ StandardAutoClosingPairConditional),\n/* harmony export */ \"AutoClosingPairs\": () => (/* binding */ AutoClosingPairs)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Describes what to do with the indentation when pressing Enter.\r\n */\r\nvar IndentAction;\r\n(function (IndentAction) {\r\n /**\r\n * Insert new line and copy the previous line's indentation.\r\n */\r\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\r\n /**\r\n * Insert new line and indent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\r\n /**\r\n * Insert two new lines:\r\n * - the first one indented which will hold the cursor\r\n * - the second one at the same indentation level\r\n */\r\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\r\n /**\r\n * Insert new line and outdent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\r\n})(IndentAction || (IndentAction = {}));\r\n/**\r\n * @internal\r\n */\r\nclass StandardAutoClosingPairConditional {\r\n constructor(source) {\r\n this.open = source.open;\r\n this.close = source.close;\r\n // initially allowed in all tokens\r\n this._standardTokenMask = 0;\r\n if (Array.isArray(source.notIn)) {\r\n for (let i = 0, len = source.notIn.length; i < len; i++) {\r\n const notIn = source.notIn[i];\r\n switch (notIn) {\r\n case 'string':\r\n this._standardTokenMask |= 2 /* String */;\r\n break;\r\n case 'comment':\r\n this._standardTokenMask |= 1 /* Comment */;\r\n break;\r\n case 'regex':\r\n this._standardTokenMask |= 4 /* RegEx */;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n isOK(standardToken) {\r\n return (this._standardTokenMask & standardToken) === 0;\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass AutoClosingPairs {\r\n constructor(autoClosingPairs) {\r\n this.autoClosingPairsOpenByStart = new Map();\r\n this.autoClosingPairsOpenByEnd = new Map();\r\n this.autoClosingPairsCloseByStart = new Map();\r\n this.autoClosingPairsCloseByEnd = new Map();\r\n this.autoClosingPairsCloseSingleChar = new Map();\r\n for (const pair of autoClosingPairs) {\r\n appendEntry(this.autoClosingPairsOpenByStart, pair.open.charAt(0), pair);\r\n appendEntry(this.autoClosingPairsOpenByEnd, pair.open.charAt(pair.open.length - 1), pair);\r\n appendEntry(this.autoClosingPairsCloseByStart, pair.close.charAt(0), pair);\r\n appendEntry(this.autoClosingPairsCloseByEnd, pair.close.charAt(pair.close.length - 1), pair);\r\n if (pair.close.length === 1 && pair.open.length === 1) {\r\n appendEntry(this.autoClosingPairsCloseSingleChar, pair.close, pair);\r\n }\r\n }\r\n }\r\n}\r\nfunction appendEntry(target, key, value) {\r\n if (target.has(key)) {\r\n target.get(key).push(value);\r\n }\r\n else {\r\n target.set(key, [value]);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RichEditSupport\": () => (/* binding */ RichEditSupport),\n/* harmony export */ \"LanguageConfigurationChangeEvent\": () => (/* binding */ LanguageConfigurationChangeEvent),\n/* harmony export */ \"LanguageConfigurationRegistryImpl\": () => (/* binding */ LanguageConfigurationRegistryImpl),\n/* harmony export */ \"LanguageConfigurationRegistry\": () => (/* binding */ LanguageConfigurationRegistry)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/wordHelper.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js\");\n/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./languageConfiguration.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js\");\n/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./supports.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js\");\n/* harmony import */ var _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./supports/characterPair.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js\");\n/* harmony import */ var _supports_electricCharacter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./supports/electricCharacter.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js\");\n/* harmony import */ var _supports_indentRules_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./supports/indentRules.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js\");\n/* harmony import */ var _supports_onEnter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./supports/onEnter.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js\");\n/* harmony import */ var _supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./supports/richEditBrackets.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass RichEditSupport {\r\n constructor(languageIdentifier, rawConf) {\r\n this._languageIdentifier = languageIdentifier;\r\n this._brackets = null;\r\n this._electricCharacter = null;\r\n this._conf = rawConf;\r\n this._onEnterSupport = (this._conf.brackets || this._conf.indentationRules || this._conf.onEnterRules ? new _supports_onEnter_js__WEBPACK_IMPORTED_MODULE_9__.OnEnterSupport(this._conf) : null);\r\n this.comments = RichEditSupport._handleComments(this._conf);\r\n this.characterPair = new _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__.CharacterPairSupport(this._conf);\r\n this.wordDefinition = this._conf.wordPattern || _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_WORD_REGEXP;\r\n this.indentationRules = this._conf.indentationRules;\r\n if (this._conf.indentationRules) {\r\n this.indentRulesSupport = new _supports_indentRules_js__WEBPACK_IMPORTED_MODULE_8__.IndentRulesSupport(this._conf.indentationRules);\r\n }\r\n else {\r\n this.indentRulesSupport = null;\r\n }\r\n this.foldingRules = this._conf.folding || {};\r\n }\r\n get brackets() {\r\n if (!this._brackets && this._conf.brackets) {\r\n this._brackets = new _supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_10__.RichEditBrackets(this._languageIdentifier, this._conf.brackets);\r\n }\r\n return this._brackets;\r\n }\r\n get electricCharacter() {\r\n if (!this._electricCharacter) {\r\n this._electricCharacter = new _supports_electricCharacter_js__WEBPACK_IMPORTED_MODULE_7__.BracketElectricCharacterSupport(this.brackets);\r\n }\r\n return this._electricCharacter;\r\n }\r\n onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText) {\r\n if (!this._onEnterSupport) {\r\n return null;\r\n }\r\n return this._onEnterSupport.onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText);\r\n }\r\n static _handleComments(conf) {\r\n let commentRule = conf.comments;\r\n if (!commentRule) {\r\n return null;\r\n }\r\n // comment configuration\r\n let comments = {};\r\n if (commentRule.lineComment) {\r\n comments.lineCommentToken = commentRule.lineComment;\r\n }\r\n if (commentRule.blockComment) {\r\n let [blockStart, blockEnd] = commentRule.blockComment;\r\n comments.blockCommentStartToken = blockStart;\r\n comments.blockCommentEndToken = blockEnd;\r\n }\r\n return comments;\r\n }\r\n}\r\nclass LanguageConfigurationChangeEvent {\r\n constructor(languageIdentifier) {\r\n this.languageIdentifier = languageIdentifier;\r\n }\r\n}\r\nclass LanguageConfigurationEntry {\r\n constructor(configuration, priority, order) {\r\n this.configuration = configuration;\r\n this.priority = priority;\r\n this.order = order;\r\n }\r\n static cmp(a, b) {\r\n if (a.priority === b.priority) {\r\n // higher order last\r\n return a.order - b.order;\r\n }\r\n // higher priority last\r\n return a.priority - b.priority;\r\n }\r\n}\r\nclass LanguageConfigurationEntries {\r\n constructor(languageIdentifier) {\r\n this.languageIdentifier = languageIdentifier;\r\n this._resolved = null;\r\n this._entries = [];\r\n this._order = 0;\r\n this._resolved = null;\r\n }\r\n register(configuration, priority) {\r\n const entry = new LanguageConfigurationEntry(configuration, priority, ++this._order);\r\n this._entries.push(entry);\r\n this._resolved = null;\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n for (let i = 0; i < this._entries.length; i++) {\r\n if (this._entries[i] === entry) {\r\n this._entries.splice(i, 1);\r\n this._resolved = null;\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n getRichEditSupport() {\r\n if (!this._resolved) {\r\n const config = this._resolve();\r\n if (config) {\r\n this._resolved = new RichEditSupport(this.languageIdentifier, config);\r\n }\r\n }\r\n return this._resolved;\r\n }\r\n _resolve() {\r\n if (this._entries.length === 0) {\r\n return null;\r\n }\r\n this._entries.sort(LanguageConfigurationEntry.cmp);\r\n const result = {};\r\n for (const entry of this._entries) {\r\n const conf = entry.configuration;\r\n result.comments = conf.comments || result.comments;\r\n result.brackets = conf.brackets || result.brackets;\r\n result.wordPattern = conf.wordPattern || result.wordPattern;\r\n result.indentationRules = conf.indentationRules || result.indentationRules;\r\n result.onEnterRules = conf.onEnterRules || result.onEnterRules;\r\n result.autoClosingPairs = conf.autoClosingPairs || result.autoClosingPairs;\r\n result.surroundingPairs = conf.surroundingPairs || result.surroundingPairs;\r\n result.autoCloseBefore = conf.autoCloseBefore || result.autoCloseBefore;\r\n result.folding = conf.folding || result.folding;\r\n result.__electricCharacterSupport = conf.__electricCharacterSupport || result.__electricCharacterSupport;\r\n }\r\n return result;\r\n }\r\n}\r\nclass LanguageConfigurationRegistryImpl {\r\n constructor() {\r\n this._entries2 = new Map();\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n }\r\n /**\r\n * @param priority Use a higher number for higher priority\r\n */\r\n register(languageIdentifier, configuration, priority = 0) {\r\n let entries = this._entries2.get(languageIdentifier.id);\r\n if (!entries) {\r\n entries = new LanguageConfigurationEntries(languageIdentifier);\r\n this._entries2.set(languageIdentifier.id, entries);\r\n }\r\n const disposable = entries.register(configuration, priority);\r\n this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageIdentifier));\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n disposable.dispose();\r\n this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageIdentifier));\r\n });\r\n }\r\n _getRichEditSupport(languageId) {\r\n const entries = this._entries2.get(languageId);\r\n return entries ? entries.getRichEditSupport() : null;\r\n }\r\n getIndentationRules(languageId) {\r\n const value = this._getRichEditSupport(languageId);\r\n return value ? value.indentationRules || null : null;\r\n }\r\n // begin electricCharacter\r\n _getElectricCharacterSupport(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return null;\r\n }\r\n return value.electricCharacter || null;\r\n }\r\n getElectricCharacters(languageId) {\r\n let electricCharacterSupport = this._getElectricCharacterSupport(languageId);\r\n if (!electricCharacterSupport) {\r\n return [];\r\n }\r\n return electricCharacterSupport.getElectricCharacters();\r\n }\r\n /**\r\n * Should return opening bracket type to match indentation with\r\n */\r\n onElectricCharacter(character, context, column) {\r\n let scopedLineTokens = (0,_supports_js__WEBPACK_IMPORTED_MODULE_5__.createScopedLineTokens)(context, column - 1);\r\n let electricCharacterSupport = this._getElectricCharacterSupport(scopedLineTokens.languageId);\r\n if (!electricCharacterSupport) {\r\n return null;\r\n }\r\n return electricCharacterSupport.onElectricCharacter(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset);\r\n }\r\n // end electricCharacter\r\n getComments(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return null;\r\n }\r\n return value.comments || null;\r\n }\r\n // begin characterPair\r\n _getCharacterPairSupport(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return null;\r\n }\r\n return value.characterPair || null;\r\n }\r\n getAutoClosingPairs(languageId) {\r\n const characterPairSupport = this._getCharacterPairSupport(languageId);\r\n return new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.AutoClosingPairs(characterPairSupport ? characterPairSupport.getAutoClosingPairs() : []);\r\n }\r\n getAutoCloseBeforeSet(languageId) {\r\n let characterPairSupport = this._getCharacterPairSupport(languageId);\r\n if (!characterPairSupport) {\r\n return _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED;\r\n }\r\n return characterPairSupport.getAutoCloseBeforeSet();\r\n }\r\n getSurroundingPairs(languageId) {\r\n let characterPairSupport = this._getCharacterPairSupport(languageId);\r\n if (!characterPairSupport) {\r\n return [];\r\n }\r\n return characterPairSupport.getSurroundingPairs();\r\n }\r\n shouldAutoClosePair(autoClosingPair, context, column) {\r\n const scopedLineTokens = (0,_supports_js__WEBPACK_IMPORTED_MODULE_5__.createScopedLineTokens)(context, column - 1);\r\n return _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__.CharacterPairSupport.shouldAutoClosePair(autoClosingPair, scopedLineTokens, column - scopedLineTokens.firstCharOffset);\r\n }\r\n // end characterPair\r\n getWordDefinition(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return (0,_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__.ensureValidWordDefinition)(null);\r\n }\r\n return (0,_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__.ensureValidWordDefinition)(value.wordDefinition || null);\r\n }\r\n getFoldingRules(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return {};\r\n }\r\n return value.foldingRules;\r\n }\r\n // begin Indent Rules\r\n getIndentRulesSupport(languageId) {\r\n let value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return null;\r\n }\r\n return value.indentRulesSupport || null;\r\n }\r\n /**\r\n * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace.\r\n * Result:\r\n * -1: run into the boundary of embedded languages\r\n * 0: every line above are invalid\r\n * else: nearest preceding line of the same language\r\n */\r\n getPrecedingValidLine(model, lineNumber, indentRulesSupport) {\r\n let languageID = model.getLanguageIdAtPosition(lineNumber, 0);\r\n if (lineNumber > 1) {\r\n let lastLineNumber;\r\n let resultLineNumber = -1;\r\n for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) {\r\n if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) {\r\n return resultLineNumber;\r\n }\r\n let text = model.getLineContent(lastLineNumber);\r\n if (indentRulesSupport.shouldIgnore(text) || /^\\s+$/.test(text) || text === '') {\r\n resultLineNumber = lastLineNumber;\r\n continue;\r\n }\r\n return lastLineNumber;\r\n }\r\n }\r\n return -1;\r\n }\r\n /**\r\n * Get inherited indentation from above lines.\r\n * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern.\r\n * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line.\r\n * 3. If this line doesn't match any indent rules\r\n * a. check whether the line above it matches indentNextLinePattern\r\n * b. If not, the indent level of this line is the result\r\n * 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).\r\n * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber`\r\n *\r\n * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not.\r\n */\r\n getInheritIndentForLine(autoIndent, model, lineNumber, honorIntentialIndent = true) {\r\n if (autoIndent < 4 /* Full */) {\r\n return null;\r\n }\r\n const indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id);\r\n if (!indentRulesSupport) {\r\n return null;\r\n }\r\n if (lineNumber <= 1) {\r\n return {\r\n indentation: '',\r\n action: null\r\n };\r\n }\r\n const precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport);\r\n if (precedingUnIgnoredLine < 0) {\r\n return null;\r\n }\r\n else if (precedingUnIgnoredLine < 1) {\r\n return {\r\n indentation: '',\r\n action: null\r\n };\r\n }\r\n const precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine);\r\n if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(precedingUnIgnoredLineContent),\r\n action: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent,\r\n line: precedingUnIgnoredLine\r\n };\r\n }\r\n else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(precedingUnIgnoredLineContent),\r\n action: null,\r\n line: precedingUnIgnoredLine\r\n };\r\n }\r\n else {\r\n // precedingUnIgnoredLine can not be ignored.\r\n // it doesn't increase indent of following lines\r\n // it doesn't increase just next line\r\n // so current line is not affect by precedingUnIgnoredLine\r\n // and then we should get a correct inheritted indentation from above lines\r\n if (precedingUnIgnoredLine === 1) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),\r\n action: null,\r\n line: precedingUnIgnoredLine\r\n };\r\n }\r\n const previousLine = precedingUnIgnoredLine - 1;\r\n const previousLineIndentMetadata = indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine));\r\n if (!(previousLineIndentMetadata & (1 /* INCREASE_MASK */ | 2 /* DECREASE_MASK */)) &&\r\n (previousLineIndentMetadata & 4 /* INDENT_NEXTLINE_MASK */)) {\r\n let stopLine = 0;\r\n for (let i = previousLine - 1; i > 0; i--) {\r\n if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) {\r\n continue;\r\n }\r\n stopLine = i;\r\n break;\r\n }\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(stopLine + 1)),\r\n action: null,\r\n line: stopLine + 1\r\n };\r\n }\r\n if (honorIntentialIndent) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),\r\n action: null,\r\n line: precedingUnIgnoredLine\r\n };\r\n }\r\n else {\r\n // search from precedingUnIgnoredLine until we find one whose indent is not temporary\r\n for (let i = precedingUnIgnoredLine; i > 0; i--) {\r\n const lineContent = model.getLineContent(i);\r\n if (indentRulesSupport.shouldIncrease(lineContent)) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(lineContent),\r\n action: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent,\r\n line: i\r\n };\r\n }\r\n else if (indentRulesSupport.shouldIndentNextLine(lineContent)) {\r\n let stopLine = 0;\r\n for (let j = i - 1; j > 0; j--) {\r\n if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) {\r\n continue;\r\n }\r\n stopLine = j;\r\n break;\r\n }\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(stopLine + 1)),\r\n action: null,\r\n line: stopLine + 1\r\n };\r\n }\r\n else if (indentRulesSupport.shouldDecrease(lineContent)) {\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(lineContent),\r\n action: null,\r\n line: i\r\n };\r\n }\r\n }\r\n return {\r\n indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(1)),\r\n action: null,\r\n line: 1\r\n };\r\n }\r\n }\r\n }\r\n getGoodIndentForLine(autoIndent, virtualModel, languageId, lineNumber, indentConverter) {\r\n if (autoIndent < 4 /* Full */) {\r\n return null;\r\n }\r\n const richEditSupport = this._getRichEditSupport(languageId);\r\n if (!richEditSupport) {\r\n return null;\r\n }\r\n const indentRulesSupport = this.getIndentRulesSupport(languageId);\r\n if (!indentRulesSupport) {\r\n return null;\r\n }\r\n const indent = this.getInheritIndentForLine(autoIndent, virtualModel, lineNumber);\r\n const lineContent = virtualModel.getLineContent(lineNumber);\r\n if (indent) {\r\n const inheritLine = indent.line;\r\n if (inheritLine !== undefined) {\r\n const enterResult = richEditSupport.onEnter(autoIndent, '', virtualModel.getLineContent(inheritLine), '');\r\n if (enterResult) {\r\n let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(virtualModel.getLineContent(inheritLine));\r\n if (enterResult.removeText) {\r\n indentation = indentation.substring(0, indentation.length - enterResult.removeText);\r\n }\r\n if ((enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) ||\r\n (enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.IndentOutdent)) {\r\n indentation = indentConverter.shiftIndent(indentation);\r\n }\r\n else if (enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Outdent) {\r\n indentation = indentConverter.unshiftIndent(indentation);\r\n }\r\n if (indentRulesSupport.shouldDecrease(lineContent)) {\r\n indentation = indentConverter.unshiftIndent(indentation);\r\n }\r\n if (enterResult.appendText) {\r\n indentation += enterResult.appendText;\r\n }\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(indentation);\r\n }\r\n }\r\n if (indentRulesSupport.shouldDecrease(lineContent)) {\r\n if (indent.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n return indent.indentation;\r\n }\r\n else {\r\n return indentConverter.unshiftIndent(indent.indentation);\r\n }\r\n }\r\n else {\r\n if (indent.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n return indentConverter.shiftIndent(indent.indentation);\r\n }\r\n else {\r\n return indent.indentation;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n getIndentForEnter(autoIndent, model, range, indentConverter) {\r\n if (autoIndent < 4 /* Full */) {\r\n return null;\r\n }\r\n model.forceTokenization(range.startLineNumber);\r\n const lineTokens = model.getLineTokens(range.startLineNumber);\r\n const scopedLineTokens = (0,_supports_js__WEBPACK_IMPORTED_MODULE_5__.createScopedLineTokens)(lineTokens, range.startColumn - 1);\r\n const scopedLineText = scopedLineTokens.getLineContent();\r\n let embeddedLanguage = false;\r\n let beforeEnterText;\r\n if (scopedLineTokens.firstCharOffset > 0 && lineTokens.getLanguageId(0) !== scopedLineTokens.languageId) {\r\n // we are in the embeded language content\r\n embeddedLanguage = true; // if embeddedLanguage is true, then we don't touch the indentation of current line\r\n beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n else {\r\n beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn - 1);\r\n }\r\n let afterEnterText;\r\n if (range.isEmpty()) {\r\n afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n else {\r\n const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\r\n afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n const indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId);\r\n if (!indentRulesSupport) {\r\n return null;\r\n }\r\n const beforeEnterResult = beforeEnterText;\r\n const beforeEnterIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(beforeEnterText);\r\n const virtualModel = {\r\n getLineTokens: (lineNumber) => {\r\n return model.getLineTokens(lineNumber);\r\n },\r\n getLanguageIdentifier: () => {\r\n return model.getLanguageIdentifier();\r\n },\r\n getLanguageIdAtPosition: (lineNumber, column) => {\r\n return model.getLanguageIdAtPosition(lineNumber, column);\r\n },\r\n getLineContent: (lineNumber) => {\r\n if (lineNumber === range.startLineNumber) {\r\n return beforeEnterResult;\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n }\r\n };\r\n const currentLineIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(lineTokens.getLineContent());\r\n const afterEnterAction = this.getInheritIndentForLine(autoIndent, virtualModel, range.startLineNumber + 1);\r\n if (!afterEnterAction) {\r\n const beforeEnter = embeddedLanguage ? currentLineIndent : beforeEnterIndent;\r\n return {\r\n beforeEnter: beforeEnter,\r\n afterEnter: beforeEnter\r\n };\r\n }\r\n let afterEnterIndent = embeddedLanguage ? currentLineIndent : afterEnterAction.indentation;\r\n if (afterEnterAction.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent);\r\n }\r\n if (indentRulesSupport.shouldDecrease(afterEnterText)) {\r\n afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent);\r\n }\r\n return {\r\n beforeEnter: embeddedLanguage ? currentLineIndent : beforeEnterIndent,\r\n afterEnter: afterEnterIndent\r\n };\r\n }\r\n /**\r\n * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of\r\n * this line doesn't match decreaseIndentPattern, we should not adjust the indentation.\r\n */\r\n getIndentActionForType(autoIndent, model, range, ch, indentConverter) {\r\n if (autoIndent < 4 /* Full */) {\r\n return null;\r\n }\r\n const scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn);\r\n if (scopedLineTokens.firstCharOffset) {\r\n // this line has mixed languages and indentation rules will not work\r\n return null;\r\n }\r\n const indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId);\r\n if (!indentRulesSupport) {\r\n return null;\r\n }\r\n const scopedLineText = scopedLineTokens.getLineContent();\r\n const beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n // selection support\r\n let afterTypeText;\r\n if (range.isEmpty()) {\r\n afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n else {\r\n const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\r\n afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n // If previous content already matches decreaseIndentPattern, it means indentation of this line should already be adjusted\r\n // Users might change the indentation by purpose and we should honor that instead of readjusting.\r\n if (!indentRulesSupport.shouldDecrease(beforeTypeText + afterTypeText) && indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) {\r\n // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner.\r\n // 1. Get inherited indent action\r\n const r = this.getInheritIndentForLine(autoIndent, model, range.startLineNumber, false);\r\n if (!r) {\r\n return null;\r\n }\r\n let indentation = r.indentation;\r\n if (r.action !== _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n indentation = indentConverter.unshiftIndent(indentation);\r\n }\r\n return indentation;\r\n }\r\n return null;\r\n }\r\n getIndentMetadata(model, lineNumber) {\r\n const indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id);\r\n if (!indentRulesSupport) {\r\n return null;\r\n }\r\n if (lineNumber < 1 || lineNumber > model.getLineCount()) {\r\n return null;\r\n }\r\n return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber));\r\n }\r\n // end Indent Rules\r\n // begin onEnter\r\n getEnterAction(autoIndent, model, range) {\r\n const scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn);\r\n const richEditSupport = this._getRichEditSupport(scopedLineTokens.languageId);\r\n if (!richEditSupport) {\r\n return null;\r\n }\r\n const scopedLineText = scopedLineTokens.getLineContent();\r\n const beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n // selection support\r\n let afterEnterText;\r\n if (range.isEmpty()) {\r\n afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n else {\r\n const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn);\r\n afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset);\r\n }\r\n let previousLineText = '';\r\n if (range.startLineNumber > 1 && scopedLineTokens.firstCharOffset === 0) {\r\n // This is not the first line and the entire line belongs to this mode\r\n const oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber - 1);\r\n if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) {\r\n // The line above ends with text belonging to the same mode\r\n previousLineText = oneLineAboveScopedLineTokens.getLineContent();\r\n }\r\n }\r\n const enterResult = richEditSupport.onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText);\r\n if (!enterResult) {\r\n return null;\r\n }\r\n const indentAction = enterResult.indentAction;\r\n let appendText = enterResult.appendText;\r\n const removeText = enterResult.removeText || 0;\r\n // Here we add `\\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation.\r\n if (!appendText) {\r\n if ((indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) ||\r\n (indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.IndentOutdent)) {\r\n appendText = '\\t';\r\n }\r\n else {\r\n appendText = '';\r\n }\r\n }\r\n else if (indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n appendText = '\\t' + appendText;\r\n }\r\n let indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn);\r\n if (removeText) {\r\n indentation = indentation.substring(0, indentation.length - removeText);\r\n }\r\n return {\r\n indentAction: indentAction,\r\n appendText: appendText,\r\n removeText: removeText,\r\n indentation: indentation\r\n };\r\n }\r\n getIndentationAtPosition(model, lineNumber, column) {\r\n const lineText = model.getLineContent(lineNumber);\r\n let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(lineText);\r\n if (indentation.length > column - 1) {\r\n indentation = indentation.substring(0, column - 1);\r\n }\r\n return indentation;\r\n }\r\n getScopedLineTokens(model, lineNumber, columnNumber) {\r\n model.forceTokenization(lineNumber);\r\n const lineTokens = model.getLineTokens(lineNumber);\r\n const column = (typeof columnNumber === 'undefined' ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber - 1);\r\n return (0,_supports_js__WEBPACK_IMPORTED_MODULE_5__.createScopedLineTokens)(lineTokens, column);\r\n }\r\n // end onEnter\r\n getBracketsSupport(languageId) {\r\n const value = this._getRichEditSupport(languageId);\r\n if (!value) {\r\n return null;\r\n }\r\n return value.brackets || null;\r\n }\r\n}\r\nconst LanguageConfigurationRegistry = new LanguageConfigurationRegistryImpl();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LanguageFeatureRegistry\": () => (/* binding */ LanguageFeatureRegistry),\n/* harmony export */ \"LanguageFeatureRequestDelays\": () => (/* binding */ LanguageFeatureRequestDelays)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _base_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/numbers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/numbers.js\");\n/* harmony import */ var _languageSelector_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./languageSelector.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js\");\n/* harmony import */ var _services_modelService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction isExclusive(selector) {\r\n if (typeof selector === 'string') {\r\n return false;\r\n }\r\n else if (Array.isArray(selector)) {\r\n return selector.every(isExclusive);\r\n }\r\n else {\r\n return !!selector.exclusive; // TODO: microsoft/TypeScript#42768\r\n }\r\n}\r\nclass LanguageFeatureRegistry {\r\n constructor() {\r\n this._clock = 0;\r\n this._entries = [];\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n }\r\n get onDidChange() {\r\n return this._onDidChange.event;\r\n }\r\n register(selector, provider) {\r\n let entry = {\r\n selector,\r\n provider,\r\n _score: -1,\r\n _time: this._clock++\r\n };\r\n this._entries.push(entry);\r\n this._lastCandidate = undefined;\r\n this._onDidChange.fire(this._entries.length);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => {\r\n if (entry) {\r\n let idx = this._entries.indexOf(entry);\r\n if (idx >= 0) {\r\n this._entries.splice(idx, 1);\r\n this._lastCandidate = undefined;\r\n this._onDidChange.fire(this._entries.length);\r\n entry = undefined;\r\n }\r\n }\r\n });\r\n }\r\n has(model) {\r\n return this.all(model).length > 0;\r\n }\r\n all(model) {\r\n if (!model) {\r\n return [];\r\n }\r\n this._updateScores(model);\r\n const result = [];\r\n // from registry\r\n for (let entry of this._entries) {\r\n if (entry._score > 0) {\r\n result.push(entry.provider);\r\n }\r\n }\r\n return result;\r\n }\r\n ordered(model) {\r\n const result = [];\r\n this._orderedForEach(model, entry => result.push(entry.provider));\r\n return result;\r\n }\r\n orderedGroups(model) {\r\n const result = [];\r\n let lastBucket;\r\n let lastBucketScore;\r\n this._orderedForEach(model, entry => {\r\n if (lastBucket && lastBucketScore === entry._score) {\r\n lastBucket.push(entry.provider);\r\n }\r\n else {\r\n lastBucketScore = entry._score;\r\n lastBucket = [entry.provider];\r\n result.push(lastBucket);\r\n }\r\n });\r\n return result;\r\n }\r\n _orderedForEach(model, callback) {\r\n if (!model) {\r\n return;\r\n }\r\n this._updateScores(model);\r\n for (const entry of this._entries) {\r\n if (entry._score > 0) {\r\n callback(entry);\r\n }\r\n }\r\n }\r\n _updateScores(model) {\r\n let candidate = {\r\n uri: model.uri.toString(),\r\n language: model.getLanguageIdentifier().language\r\n };\r\n if (this._lastCandidate\r\n && this._lastCandidate.language === candidate.language\r\n && this._lastCandidate.uri === candidate.uri) {\r\n // nothing has changed\r\n return;\r\n }\r\n this._lastCandidate = candidate;\r\n for (let entry of this._entries) {\r\n entry._score = (0,_languageSelector_js__WEBPACK_IMPORTED_MODULE_5__.score)(entry.selector, model.uri, model.getLanguageIdentifier().language, (0,_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__.shouldSynchronizeModel)(model));\r\n if (isExclusive(entry.selector) && entry._score > 0) {\r\n // support for one exclusive selector that overwrites\r\n // any other selector\r\n for (let entry of this._entries) {\r\n entry._score = 0;\r\n }\r\n entry._score = 1000;\r\n break;\r\n }\r\n }\r\n // needs sorting\r\n this._entries.sort(LanguageFeatureRegistry._compareByScoreAndTime);\r\n }\r\n static _compareByScoreAndTime(a, b) {\r\n if (a._score < b._score) {\r\n return 1;\r\n }\r\n else if (a._score > b._score) {\r\n return -1;\r\n }\r\n else if (a._time < b._time) {\r\n return 1;\r\n }\r\n else if (a._time > b._time) {\r\n return -1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n}\r\n/**\r\n * Keeps moving average per model and set of providers so that requests\r\n * can be debounce according to the provider performance\r\n */\r\nclass LanguageFeatureRequestDelays {\r\n constructor(_registry, min, max = Number.MAX_SAFE_INTEGER) {\r\n this._registry = _registry;\r\n this.min = min;\r\n this.max = max;\r\n this._cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__.LRUCache(50, 0.7);\r\n }\r\n _key(model) {\r\n return model.id + (0,_base_common_hash_js__WEBPACK_IMPORTED_MODULE_1__.hash)(this._registry.all(model));\r\n }\r\n _clamp(value) {\r\n if (value === undefined) {\r\n return this.min;\r\n }\r\n else {\r\n return Math.min(this.max, Math.max(this.min, Math.floor(value * 1.3)));\r\n }\r\n }\r\n get(model) {\r\n const key = this._key(model);\r\n const avg = this._cache.get(key);\r\n return this._clamp(avg === null || avg === void 0 ? void 0 : avg.value);\r\n }\r\n update(model, value) {\r\n const key = this._key(model);\r\n let avg = this._cache.get(key);\r\n if (!avg) {\r\n avg = new _base_common_numbers_js__WEBPACK_IMPORTED_MODULE_4__.MovingAverage();\r\n this._cache.set(key, avg);\r\n }\r\n avg.update(value);\r\n return this.get(model);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"score\": () => (/* binding */ score)\n/* harmony export */ });\n/* harmony import */ var _base_common_glob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/glob.js */ \"./node_modules/monaco-editor/esm/vs/base/common/glob.js\");\n/* harmony import */ var _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nfunction score(selector, candidateUri, candidateLanguage, candidateIsSynchronized) {\r\n if (Array.isArray(selector)) {\r\n // array -> take max individual value\r\n let ret = 0;\r\n for (const filter of selector) {\r\n const value = score(filter, candidateUri, candidateLanguage, candidateIsSynchronized);\r\n if (value === 10) {\r\n return value; // already at the highest\r\n }\r\n if (value > ret) {\r\n ret = value;\r\n }\r\n }\r\n return ret;\r\n }\r\n else if (typeof selector === 'string') {\r\n if (!candidateIsSynchronized) {\r\n return 0;\r\n }\r\n // short-hand notion, desugars to\r\n // 'fooLang' -> { language: 'fooLang'}\r\n // '*' -> { language: '*' }\r\n if (selector === '*') {\r\n return 5;\r\n }\r\n else if (selector === candidateLanguage) {\r\n return 10;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n else if (selector) {\r\n // filter -> select accordingly, use defaults for scheme\r\n const { language, pattern, scheme, hasAccessToAllModels } = selector; // TODO: microsoft/TypeScript#42768\r\n if (!candidateIsSynchronized && !hasAccessToAllModels) {\r\n return 0;\r\n }\r\n let ret = 0;\r\n if (scheme) {\r\n if (scheme === candidateUri.scheme) {\r\n ret = 10;\r\n }\r\n else if (scheme === '*') {\r\n ret = 5;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n if (language) {\r\n if (language === candidateLanguage) {\r\n ret = 10;\r\n }\r\n else if (language === '*') {\r\n ret = Math.max(ret, 5);\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n if (pattern) {\r\n let normalizedPattern;\r\n if (typeof pattern === 'string') {\r\n normalizedPattern = pattern;\r\n }\r\n else {\r\n // Since this pattern has a `base` property, we need\r\n // to normalize this path first before passing it on\r\n // because we will compare it against `Uri.fsPath`\r\n // which uses platform specific separators.\r\n // Refs: https://github.com/microsoft/vscode/issues/99938\r\n normalizedPattern = Object.assign(Object.assign({}, pattern), { base: (0,_base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.normalize)(pattern.base) });\r\n }\r\n if (normalizedPattern === candidateUri.fsPath || (0,_base_common_glob_js__WEBPACK_IMPORTED_MODULE_0__.match)(normalizedPattern, candidateUri.fsPath)) {\r\n ret = 10;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n return ret;\r\n }\r\n else {\r\n return 0;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Uint8Matrix\": () => (/* binding */ Uint8Matrix),\n/* harmony export */ \"StateMachine\": () => (/* binding */ StateMachine),\n/* harmony export */ \"LinkComputer\": () => (/* binding */ LinkComputer),\n/* harmony export */ \"computeLinks\": () => (/* binding */ computeLinks)\n/* harmony export */ });\n/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass Uint8Matrix {\r\n constructor(rows, cols, defaultValue) {\r\n const data = new Uint8Array(rows * cols);\r\n for (let i = 0, len = rows * cols; i < len; i++) {\r\n data[i] = defaultValue;\r\n }\r\n this._data = data;\r\n this.rows = rows;\r\n this.cols = cols;\r\n }\r\n get(row, col) {\r\n return this._data[row * this.cols + col];\r\n }\r\n set(row, col, value) {\r\n this._data[row * this.cols + col] = value;\r\n }\r\n}\r\nclass StateMachine {\r\n constructor(edges) {\r\n let maxCharCode = 0;\r\n let maxState = 0 /* Invalid */;\r\n for (let i = 0, len = edges.length; i < len; i++) {\r\n let [from, chCode, to] = edges[i];\r\n if (chCode > maxCharCode) {\r\n maxCharCode = chCode;\r\n }\r\n if (from > maxState) {\r\n maxState = from;\r\n }\r\n if (to > maxState) {\r\n maxState = to;\r\n }\r\n }\r\n maxCharCode++;\r\n maxState++;\r\n let states = new Uint8Matrix(maxState, maxCharCode, 0 /* Invalid */);\r\n for (let i = 0, len = edges.length; i < len; i++) {\r\n let [from, chCode, to] = edges[i];\r\n states.set(from, chCode, to);\r\n }\r\n this._states = states;\r\n this._maxCharCode = maxCharCode;\r\n }\r\n nextState(currentState, chCode) {\r\n if (chCode < 0 || chCode >= this._maxCharCode) {\r\n return 0 /* Invalid */;\r\n }\r\n return this._states.get(currentState, chCode);\r\n }\r\n}\r\n// State machine for http:// or https:// or file://\r\nlet _stateMachine = null;\r\nfunction getStateMachine() {\r\n if (_stateMachine === null) {\r\n _stateMachine = new StateMachine([\r\n [1 /* Start */, 104 /* h */, 2 /* H */],\r\n [1 /* Start */, 72 /* H */, 2 /* H */],\r\n [1 /* Start */, 102 /* f */, 6 /* F */],\r\n [1 /* Start */, 70 /* F */, 6 /* F */],\r\n [2 /* H */, 116 /* t */, 3 /* HT */],\r\n [2 /* H */, 84 /* T */, 3 /* HT */],\r\n [3 /* HT */, 116 /* t */, 4 /* HTT */],\r\n [3 /* HT */, 84 /* T */, 4 /* HTT */],\r\n [4 /* HTT */, 112 /* p */, 5 /* HTTP */],\r\n [4 /* HTT */, 80 /* P */, 5 /* HTTP */],\r\n [5 /* HTTP */, 115 /* s */, 9 /* BeforeColon */],\r\n [5 /* HTTP */, 83 /* S */, 9 /* BeforeColon */],\r\n [5 /* HTTP */, 58 /* Colon */, 10 /* AfterColon */],\r\n [6 /* F */, 105 /* i */, 7 /* FI */],\r\n [6 /* F */, 73 /* I */, 7 /* FI */],\r\n [7 /* FI */, 108 /* l */, 8 /* FIL */],\r\n [7 /* FI */, 76 /* L */, 8 /* FIL */],\r\n [8 /* FIL */, 101 /* e */, 9 /* BeforeColon */],\r\n [8 /* FIL */, 69 /* E */, 9 /* BeforeColon */],\r\n [9 /* BeforeColon */, 58 /* Colon */, 10 /* AfterColon */],\r\n [10 /* AfterColon */, 47 /* Slash */, 11 /* AlmostThere */],\r\n [11 /* AlmostThere */, 47 /* Slash */, 12 /* End */],\r\n ]);\r\n }\r\n return _stateMachine;\r\n}\r\nlet _classifier = null;\r\nfunction getClassifier() {\r\n if (_classifier === null) {\r\n _classifier = new _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__.CharacterClassifier(0 /* None */);\r\n const FORCE_TERMINATION_CHARACTERS = ' \\t<>\\'\\\"、。。、,.:;‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…';\r\n for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) {\r\n _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1 /* ForceTermination */);\r\n }\r\n const CANNOT_END_WITH_CHARACTERS = '.,;';\r\n for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) {\r\n _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2 /* CannotEndIn */);\r\n }\r\n }\r\n return _classifier;\r\n}\r\nclass LinkComputer {\r\n static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) {\r\n // Do not allow to end link in certain characters...\r\n let lastIncludedCharIndex = linkEndIndex - 1;\r\n do {\r\n const chCode = line.charCodeAt(lastIncludedCharIndex);\r\n const chClass = classifier.get(chCode);\r\n if (chClass !== 2 /* CannotEndIn */) {\r\n break;\r\n }\r\n lastIncludedCharIndex--;\r\n } while (lastIncludedCharIndex > linkBeginIndex);\r\n // Handle links enclosed in parens, square brackets and curlys.\r\n if (linkBeginIndex > 0) {\r\n const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);\r\n const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);\r\n if ((charCodeBeforeLink === 40 /* OpenParen */ && lastCharCodeInLink === 41 /* CloseParen */)\r\n || (charCodeBeforeLink === 91 /* OpenSquareBracket */ && lastCharCodeInLink === 93 /* CloseSquareBracket */)\r\n || (charCodeBeforeLink === 123 /* OpenCurlyBrace */ && lastCharCodeInLink === 125 /* CloseCurlyBrace */)) {\r\n // Do not end in ) if ( is before the link start\r\n // Do not end in ] if [ is before the link start\r\n // Do not end in } if { is before the link start\r\n lastIncludedCharIndex--;\r\n }\r\n }\r\n return {\r\n range: {\r\n startLineNumber: lineNumber,\r\n startColumn: linkBeginIndex + 1,\r\n endLineNumber: lineNumber,\r\n endColumn: lastIncludedCharIndex + 2\r\n },\r\n url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1)\r\n };\r\n }\r\n static computeLinks(model, stateMachine = getStateMachine()) {\r\n const classifier = getClassifier();\r\n let result = [];\r\n for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {\r\n const line = model.getLineContent(i);\r\n const len = line.length;\r\n let j = 0;\r\n let linkBeginIndex = 0;\r\n let linkBeginChCode = 0;\r\n let state = 1 /* Start */;\r\n let hasOpenParens = false;\r\n let hasOpenSquareBracket = false;\r\n let inSquareBrackets = false;\r\n let hasOpenCurlyBracket = false;\r\n while (j < len) {\r\n let resetStateMachine = false;\r\n const chCode = line.charCodeAt(j);\r\n if (state === 13 /* Accept */) {\r\n let chClass;\r\n switch (chCode) {\r\n case 40 /* OpenParen */:\r\n hasOpenParens = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 41 /* CloseParen */:\r\n chClass = (hasOpenParens ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n case 91 /* OpenSquareBracket */:\r\n inSquareBrackets = true;\r\n hasOpenSquareBracket = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 93 /* CloseSquareBracket */:\r\n inSquareBrackets = false;\r\n chClass = (hasOpenSquareBracket ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n case 123 /* OpenCurlyBrace */:\r\n hasOpenCurlyBracket = true;\r\n chClass = 0 /* None */;\r\n break;\r\n case 125 /* CloseCurlyBrace */:\r\n chClass = (hasOpenCurlyBracket ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n /* The following three rules make it that ' or \" or ` are allowed inside links if the link began with a different one */\r\n case 39 /* SingleQuote */:\r\n chClass = (linkBeginChCode === 34 /* DoubleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 34 /* DoubleQuote */:\r\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 96 /* BackTick */:\r\n chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 34 /* DoubleQuote */) ? 0 /* None */ : 1 /* ForceTermination */;\r\n break;\r\n case 42 /* Asterisk */:\r\n // `*` terminates a link if the link began with `*`\r\n chClass = (linkBeginChCode === 42 /* Asterisk */) ? 1 /* ForceTermination */ : 0 /* None */;\r\n break;\r\n case 124 /* Pipe */:\r\n // `|` terminates a link if the link began with `|`\r\n chClass = (linkBeginChCode === 124 /* Pipe */) ? 1 /* ForceTermination */ : 0 /* None */;\r\n break;\r\n case 32 /* Space */:\r\n // ` ` allow space in between [ and ]\r\n chClass = (inSquareBrackets ? 0 /* None */ : 1 /* ForceTermination */);\r\n break;\r\n default:\r\n chClass = classifier.get(chCode);\r\n }\r\n // Check if character terminates link\r\n if (chClass === 1 /* ForceTermination */) {\r\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j));\r\n resetStateMachine = true;\r\n }\r\n }\r\n else if (state === 12 /* End */) {\r\n let chClass;\r\n if (chCode === 91 /* OpenSquareBracket */) {\r\n // Allow for the authority part to contain ipv6 addresses which contain [ and ]\r\n hasOpenSquareBracket = true;\r\n chClass = 0 /* None */;\r\n }\r\n else {\r\n chClass = classifier.get(chCode);\r\n }\r\n // Check if character terminates link\r\n if (chClass === 1 /* ForceTermination */) {\r\n resetStateMachine = true;\r\n }\r\n else {\r\n state = 13 /* Accept */;\r\n }\r\n }\r\n else {\r\n state = stateMachine.nextState(state, chCode);\r\n if (state === 0 /* Invalid */) {\r\n resetStateMachine = true;\r\n }\r\n }\r\n if (resetStateMachine) {\r\n state = 1 /* Start */;\r\n hasOpenParens = false;\r\n hasOpenSquareBracket = false;\r\n hasOpenCurlyBracket = false;\r\n // Record where the link started\r\n linkBeginIndex = j + 1;\r\n linkBeginChCode = chCode;\r\n }\r\n j++;\r\n }\r\n if (state === 13 /* Accept */) {\r\n result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len));\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n/**\r\n * Returns an array of all links contains in the provided\r\n * document. *Note* that this operation is computational\r\n * expensive and should not run in the UI thread.\r\n */\r\nfunction computeLinks(model) {\r\n if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') {\r\n // Unknown caller!\r\n return [];\r\n }\r\n return LinkComputer.computeLinks(model);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"EditorModesRegistry\": () => (/* binding */ EditorModesRegistry),\n/* harmony export */ \"ModesRegistry\": () => (/* binding */ ModesRegistry),\n/* harmony export */ \"PLAINTEXT_MODE_ID\": () => (/* binding */ PLAINTEXT_MODE_ID),\n/* harmony export */ \"PLAINTEXT_EXTENSION\": () => (/* binding */ PLAINTEXT_EXTENSION),\n/* harmony export */ \"PLAINTEXT_LANGUAGE_IDENTIFIER\": () => (/* binding */ PLAINTEXT_LANGUAGE_IDENTIFIER)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n// Define extension point ids\r\nconst Extensions = {\r\n ModesRegistry: 'editor.modesRegistry'\r\n};\r\nclass EditorModesRegistry {\r\n constructor() {\r\n this._onDidChangeLanguages = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.onDidChangeLanguages = this._onDidChangeLanguages.event;\r\n this._languages = [];\r\n this._dynamicLanguages = [];\r\n }\r\n // --- languages\r\n registerLanguage(def) {\r\n this._languages.push(def);\r\n this._onDidChangeLanguages.fire(undefined);\r\n return {\r\n dispose: () => {\r\n for (let i = 0, len = this._languages.length; i < len; i++) {\r\n if (this._languages[i] === def) {\r\n this._languages.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n }\r\n getLanguages() {\r\n return [].concat(this._languages).concat(this._dynamicLanguages);\r\n }\r\n}\r\nconst ModesRegistry = new EditorModesRegistry();\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.Registry.add(Extensions.ModesRegistry, ModesRegistry);\r\nconst PLAINTEXT_MODE_ID = 'plaintext';\r\nconst PLAINTEXT_EXTENSION = '.txt';\r\nconst PLAINTEXT_LANGUAGE_IDENTIFIER = new _modes_js__WEBPACK_IMPORTED_MODULE_2__.LanguageIdentifier(PLAINTEXT_MODE_ID, 1 /* PlainText */);\r\nModesRegistry.registerLanguage({\r\n id: PLAINTEXT_MODE_ID,\r\n extensions: [PLAINTEXT_EXTENSION],\r\n aliases: [_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('plainText.alias', \"Plain Text\"), 'text'],\r\n mimetypes: ['text/plain']\r\n});\r\n_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__.LanguageConfigurationRegistry.register(PLAINTEXT_LANGUAGE_IDENTIFIER, {\r\n brackets: [\r\n ['(', ')'],\r\n ['[', ']'],\r\n ['{', '}'],\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: '\\\"', close: '\\\"' },\r\n { open: '\\'', close: '\\'' },\r\n { open: '`', close: '`' },\r\n ],\r\n folding: {\r\n offSide: true\r\n }\r\n}, 0);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"NULL_STATE\": () => (/* binding */ NULL_STATE),\n/* harmony export */ \"NULL_MODE_ID\": () => (/* binding */ NULL_MODE_ID),\n/* harmony export */ \"NULL_LANGUAGE_IDENTIFIER\": () => (/* binding */ NULL_LANGUAGE_IDENTIFIER),\n/* harmony export */ \"nullTokenize\": () => (/* binding */ nullTokenize),\n/* harmony export */ \"nullTokenize2\": () => (/* binding */ nullTokenize2)\n/* harmony export */ });\n/* harmony import */ var _core_token_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/token.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/token.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass NullStateImpl {\r\n clone() {\r\n return this;\r\n }\r\n equals(other) {\r\n return (this === other);\r\n }\r\n}\r\nconst NULL_STATE = new NullStateImpl();\r\nconst NULL_MODE_ID = 'vs.editor.nullMode';\r\nconst NULL_LANGUAGE_IDENTIFIER = new _modes_js__WEBPACK_IMPORTED_MODULE_1__.LanguageIdentifier(NULL_MODE_ID, 0 /* Null */);\r\nfunction nullTokenize(modeId, buffer, state, deltaOffset) {\r\n return new _core_token_js__WEBPACK_IMPORTED_MODULE_0__.TokenizationResult([new _core_token_js__WEBPACK_IMPORTED_MODULE_0__.Token(deltaOffset, '', modeId)], state);\r\n}\r\nfunction nullTokenize2(languageId, buffer, state, deltaOffset) {\r\n let tokens = new Uint32Array(2);\r\n tokens[0] = deltaOffset;\r\n tokens[1] = ((languageId << 0 /* LANGUAGEID_OFFSET */)\r\n | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */)\r\n | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\r\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\r\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n return new _core_token_js__WEBPACK_IMPORTED_MODULE_0__.TokenizationResult2(tokens, state === null ? NULL_STATE : state);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createScopedLineTokens\": () => (/* binding */ createScopedLineTokens),\n/* harmony export */ \"ScopedLineTokens\": () => (/* binding */ ScopedLineTokens),\n/* harmony export */ \"ignoreBracketsInToken\": () => (/* binding */ ignoreBracketsInToken)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction createScopedLineTokens(context, offset) {\r\n let tokenCount = context.getCount();\r\n let tokenIndex = context.findTokenIndexAtOffset(offset);\r\n let desiredLanguageId = context.getLanguageId(tokenIndex);\r\n let lastTokenIndex = tokenIndex;\r\n while (lastTokenIndex + 1 < tokenCount && context.getLanguageId(lastTokenIndex + 1) === desiredLanguageId) {\r\n lastTokenIndex++;\r\n }\r\n let firstTokenIndex = tokenIndex;\r\n while (firstTokenIndex > 0 && context.getLanguageId(firstTokenIndex - 1) === desiredLanguageId) {\r\n firstTokenIndex--;\r\n }\r\n return new ScopedLineTokens(context, desiredLanguageId, firstTokenIndex, lastTokenIndex + 1, context.getStartOffset(firstTokenIndex), context.getEndOffset(lastTokenIndex));\r\n}\r\nclass ScopedLineTokens {\r\n constructor(actual, languageId, firstTokenIndex, lastTokenIndex, firstCharOffset, lastCharOffset) {\r\n this._actual = actual;\r\n this.languageId = languageId;\r\n this._firstTokenIndex = firstTokenIndex;\r\n this._lastTokenIndex = lastTokenIndex;\r\n this.firstCharOffset = firstCharOffset;\r\n this._lastCharOffset = lastCharOffset;\r\n }\r\n getLineContent() {\r\n const actualLineContent = this._actual.getLineContent();\r\n return actualLineContent.substring(this.firstCharOffset, this._lastCharOffset);\r\n }\r\n getActualLineContentBefore(offset) {\r\n const actualLineContent = this._actual.getLineContent();\r\n return actualLineContent.substring(0, this.firstCharOffset + offset);\r\n }\r\n getTokenCount() {\r\n return this._lastTokenIndex - this._firstTokenIndex;\r\n }\r\n findTokenIndexAtOffset(offset) {\r\n return this._actual.findTokenIndexAtOffset(offset + this.firstCharOffset) - this._firstTokenIndex;\r\n }\r\n getStandardTokenType(tokenIndex) {\r\n return this._actual.getStandardTokenType(tokenIndex + this._firstTokenIndex);\r\n }\r\n}\r\nfunction ignoreBracketsInToken(standardTokenType) {\r\n return (standardTokenType & 7 /* value */) !== 0;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CharacterPairSupport\": () => (/* binding */ CharacterPairSupport)\n/* harmony export */ });\n/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../languageConfiguration.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass CharacterPairSupport {\r\n constructor(config) {\r\n if (config.autoClosingPairs) {\r\n this._autoClosingPairs = config.autoClosingPairs.map(el => new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__.StandardAutoClosingPairConditional(el));\r\n }\r\n else if (config.brackets) {\r\n this._autoClosingPairs = config.brackets.map(b => new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__.StandardAutoClosingPairConditional({ open: b[0], close: b[1] }));\r\n }\r\n else {\r\n this._autoClosingPairs = [];\r\n }\r\n if (config.__electricCharacterSupport && config.__electricCharacterSupport.docComment) {\r\n const docComment = config.__electricCharacterSupport.docComment;\r\n // IDocComment is legacy, only partially supported\r\n this._autoClosingPairs.push(new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__.StandardAutoClosingPairConditional({ open: docComment.open, close: docComment.close || '' }));\r\n }\r\n this._autoCloseBefore = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED;\r\n this._surroundingPairs = config.surroundingPairs || this._autoClosingPairs;\r\n }\r\n getAutoClosingPairs() {\r\n return this._autoClosingPairs;\r\n }\r\n getAutoCloseBeforeSet() {\r\n return this._autoCloseBefore;\r\n }\r\n static shouldAutoClosePair(autoClosingPair, context, column) {\r\n // Always complete on empty line\r\n if (context.getTokenCount() === 0) {\r\n return true;\r\n }\r\n const tokenIndex = context.findTokenIndexAtOffset(column - 2);\r\n const standardTokenType = context.getStandardTokenType(tokenIndex);\r\n return autoClosingPair.isOK(standardTokenType);\r\n }\r\n getSurroundingPairs() {\r\n return this._surroundingPairs;\r\n }\r\n}\r\nCharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ';:.,=}])> \\n\\t';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BracketElectricCharacterSupport\": () => (/* binding */ BracketElectricCharacterSupport)\n/* harmony export */ });\n/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../supports.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js\");\n/* harmony import */ var _richEditBrackets_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./richEditBrackets.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass BracketElectricCharacterSupport {\r\n constructor(richEditBrackets) {\r\n this._richEditBrackets = richEditBrackets;\r\n }\r\n getElectricCharacters() {\r\n let result = [];\r\n if (this._richEditBrackets) {\r\n for (const bracket of this._richEditBrackets.brackets) {\r\n for (const close of bracket.close) {\r\n const lastChar = close.charAt(close.length - 1);\r\n result.push(lastChar);\r\n }\r\n }\r\n }\r\n // Filter duplicate entries\r\n result = result.filter((item, pos, array) => {\r\n return array.indexOf(item) === pos;\r\n });\r\n return result;\r\n }\r\n onElectricCharacter(character, context, column) {\r\n if (!this._richEditBrackets || this._richEditBrackets.brackets.length === 0) {\r\n return null;\r\n }\r\n const tokenIndex = context.findTokenIndexAtOffset(column - 1);\r\n if ((0,_supports_js__WEBPACK_IMPORTED_MODULE_0__.ignoreBracketsInToken)(context.getStandardTokenType(tokenIndex))) {\r\n return null;\r\n }\r\n const reversedBracketRegex = this._richEditBrackets.reversedRegex;\r\n const text = context.getLineContent().substring(0, column - 1) + character;\r\n const r = _richEditBrackets_js__WEBPACK_IMPORTED_MODULE_1__.BracketsUtils.findPrevBracketInRange(reversedBracketRegex, 1, text, 0, text.length);\r\n if (!r) {\r\n return null;\r\n }\r\n const bracketText = text.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase();\r\n const isOpen = this._richEditBrackets.textIsOpenBracket[bracketText];\r\n if (isOpen) {\r\n return null;\r\n }\r\n const textBeforeBracket = context.getActualLineContentBefore(r.startColumn - 1);\r\n if (!/^\\s*$/.test(textBeforeBracket)) {\r\n // There is other text on the line before the bracket\r\n return null;\r\n }\r\n return {\r\n matchOpenBracket: bracketText\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IndentRulesSupport\": () => (/* binding */ IndentRulesSupport)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction resetGlobalRegex(reg) {\r\n if (reg.global) {\r\n reg.lastIndex = 0;\r\n }\r\n return true;\r\n}\r\nclass IndentRulesSupport {\r\n constructor(indentationRules) {\r\n this._indentationRules = indentationRules;\r\n }\r\n shouldIncrease(text) {\r\n if (this._indentationRules) {\r\n if (this._indentationRules.increaseIndentPattern && resetGlobalRegex(this._indentationRules.increaseIndentPattern) && this._indentationRules.increaseIndentPattern.test(text)) {\r\n return true;\r\n }\r\n // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) {\r\n // \treturn true;\r\n // }\r\n }\r\n return false;\r\n }\r\n shouldDecrease(text) {\r\n if (this._indentationRules && this._indentationRules.decreaseIndentPattern && resetGlobalRegex(this._indentationRules.decreaseIndentPattern) && this._indentationRules.decreaseIndentPattern.test(text)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n shouldIndentNextLine(text) {\r\n if (this._indentationRules && this._indentationRules.indentNextLinePattern && resetGlobalRegex(this._indentationRules.indentNextLinePattern) && this._indentationRules.indentNextLinePattern.test(text)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n shouldIgnore(text) {\r\n // the text matches `unIndentedLinePattern`\r\n if (this._indentationRules && this._indentationRules.unIndentedLinePattern && resetGlobalRegex(this._indentationRules.unIndentedLinePattern) && this._indentationRules.unIndentedLinePattern.test(text)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n getIndentMetadata(text) {\r\n let ret = 0;\r\n if (this.shouldIncrease(text)) {\r\n ret += 1 /* INCREASE_MASK */;\r\n }\r\n if (this.shouldDecrease(text)) {\r\n ret += 2 /* DECREASE_MASK */;\r\n }\r\n if (this.shouldIndentNextLine(text)) {\r\n ret += 4 /* INDENT_NEXTLINE_MASK */;\r\n }\r\n if (this.shouldIgnore(text)) {\r\n ret += 8 /* UNINDENT_MASK */;\r\n }\r\n return ret;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BasicInplaceReplace\": () => (/* binding */ BasicInplaceReplace)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass BasicInplaceReplace {\r\n constructor() {\r\n this._defaultValueSet = [\r\n ['true', 'false'],\r\n ['True', 'False'],\r\n ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'],\r\n ['public', 'protected', 'private'],\r\n ];\r\n }\r\n navigateValueSet(range1, text1, range2, text2, up) {\r\n if (range1 && text1) {\r\n let result = this.doNavigateValueSet(text1, up);\r\n if (result) {\r\n return {\r\n range: range1,\r\n value: result\r\n };\r\n }\r\n }\r\n if (range2 && text2) {\r\n let result = this.doNavigateValueSet(text2, up);\r\n if (result) {\r\n return {\r\n range: range2,\r\n value: result\r\n };\r\n }\r\n }\r\n return null;\r\n }\r\n doNavigateValueSet(text, up) {\r\n let numberResult = this.numberReplace(text, up);\r\n if (numberResult !== null) {\r\n return numberResult;\r\n }\r\n return this.textReplace(text, up);\r\n }\r\n numberReplace(value, up) {\r\n let precision = Math.pow(10, value.length - (value.lastIndexOf('.') + 1));\r\n let n1 = Number(value);\r\n let n2 = parseFloat(value);\r\n if (!isNaN(n1) && !isNaN(n2) && n1 === n2) {\r\n if (n1 === 0 && !up) {\r\n return null; // don't do negative\r\n //\t\t\t} else if(n1 === 9 && up) {\r\n //\t\t\t\treturn null; // don't insert 10 into a number\r\n }\r\n else {\r\n n1 = Math.floor(n1 * precision);\r\n n1 += up ? precision : -precision;\r\n return String(n1 / precision);\r\n }\r\n }\r\n return null;\r\n }\r\n textReplace(value, up) {\r\n return this.valueSetsReplace(this._defaultValueSet, value, up);\r\n }\r\n valueSetsReplace(valueSets, value, up) {\r\n let result = null;\r\n for (let i = 0, len = valueSets.length; result === null && i < len; i++) {\r\n result = this.valueSetReplace(valueSets[i], value, up);\r\n }\r\n return result;\r\n }\r\n valueSetReplace(valueSet, value, up) {\r\n let idx = valueSet.indexOf(value);\r\n if (idx >= 0) {\r\n idx += up ? +1 : -1;\r\n if (idx < 0) {\r\n idx = valueSet.length - 1;\r\n }\r\n else {\r\n idx %= valueSet.length;\r\n }\r\n return valueSet[idx];\r\n }\r\n return null;\r\n }\r\n}\r\nBasicInplaceReplace.INSTANCE = new BasicInplaceReplace();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OnEnterSupport\": () => (/* binding */ OnEnterSupport)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../languageConfiguration.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass OnEnterSupport {\r\n constructor(opts) {\r\n opts = opts || {};\r\n opts.brackets = opts.brackets || [\r\n ['(', ')'],\r\n ['{', '}'],\r\n ['[', ']']\r\n ];\r\n this._brackets = [];\r\n opts.brackets.forEach((bracket) => {\r\n const openRegExp = OnEnterSupport._createOpenBracketRegExp(bracket[0]);\r\n const closeRegExp = OnEnterSupport._createCloseBracketRegExp(bracket[1]);\r\n if (openRegExp && closeRegExp) {\r\n this._brackets.push({\r\n open: bracket[0],\r\n openRegExp: openRegExp,\r\n close: bracket[1],\r\n closeRegExp: closeRegExp,\r\n });\r\n }\r\n });\r\n this._regExpRules = opts.onEnterRules || [];\r\n }\r\n onEnter(autoIndent, previousLineText, beforeEnterText, afterEnterText) {\r\n // (1): `regExpRules`\r\n if (autoIndent >= 3 /* Advanced */) {\r\n for (let i = 0, len = this._regExpRules.length; i < len; i++) {\r\n let rule = this._regExpRules[i];\r\n const regResult = [{\r\n reg: rule.beforeText,\r\n text: beforeEnterText\r\n }, {\r\n reg: rule.afterText,\r\n text: afterEnterText\r\n }, {\r\n reg: rule.previousLineText,\r\n text: previousLineText\r\n }].every((obj) => {\r\n return obj.reg ? obj.reg.test(obj.text) : true;\r\n });\r\n if (regResult) {\r\n return rule.action;\r\n }\r\n }\r\n }\r\n // (2): Special indent-outdent\r\n if (autoIndent >= 2 /* Brackets */) {\r\n if (beforeEnterText.length > 0 && afterEnterText.length > 0) {\r\n for (let i = 0, len = this._brackets.length; i < len; i++) {\r\n let bracket = this._brackets[i];\r\n if (bracket.openRegExp.test(beforeEnterText) && bracket.closeRegExp.test(afterEnterText)) {\r\n return { indentAction: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__.IndentAction.IndentOutdent };\r\n }\r\n }\r\n }\r\n }\r\n // (4): Open bracket based logic\r\n if (autoIndent >= 2 /* Brackets */) {\r\n if (beforeEnterText.length > 0) {\r\n for (let i = 0, len = this._brackets.length; i < len; i++) {\r\n let bracket = this._brackets[i];\r\n if (bracket.openRegExp.test(beforeEnterText)) {\r\n return { indentAction: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__.IndentAction.Indent };\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n static _createOpenBracketRegExp(bracket) {\r\n let str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.escapeRegExpCharacters(bracket);\r\n if (!/\\B/.test(str.charAt(0))) {\r\n str = '\\\\b' + str;\r\n }\r\n str += '\\\\s*$';\r\n return OnEnterSupport._safeRegExp(str);\r\n }\r\n static _createCloseBracketRegExp(bracket) {\r\n let str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.escapeRegExpCharacters(bracket);\r\n if (!/\\B/.test(str.charAt(str.length - 1))) {\r\n str = str + '\\\\b';\r\n }\r\n str = '^\\\\s*' + str;\r\n return OnEnterSupport._safeRegExp(str);\r\n }\r\n static _safeRegExp(def) {\r\n try {\r\n return new RegExp(def);\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(err);\r\n return null;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RichEditBracket\": () => (/* binding */ RichEditBracket),\n/* harmony export */ \"RichEditBrackets\": () => (/* binding */ RichEditBrackets),\n/* harmony export */ \"BracketsUtils\": () => (/* binding */ BracketsUtils)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass RichEditBracket {\r\n constructor(languageIdentifier, index, open, close, forwardRegex, reversedRegex) {\r\n this.languageIdentifier = languageIdentifier;\r\n this.index = index;\r\n this.open = open;\r\n this.close = close;\r\n this.forwardRegex = forwardRegex;\r\n this.reversedRegex = reversedRegex;\r\n this._openSet = RichEditBracket._toSet(this.open);\r\n this._closeSet = RichEditBracket._toSet(this.close);\r\n }\r\n isOpen(text) {\r\n return this._openSet.has(text);\r\n }\r\n isClose(text) {\r\n return this._closeSet.has(text);\r\n }\r\n static _toSet(arr) {\r\n const result = new Set();\r\n for (const element of arr) {\r\n result.add(element);\r\n }\r\n return result;\r\n }\r\n}\r\nfunction groupFuzzyBrackets(brackets) {\r\n const N = brackets.length;\r\n brackets = brackets.map(b => [b[0].toLowerCase(), b[1].toLowerCase()]);\r\n const group = [];\r\n for (let i = 0; i < N; i++) {\r\n group[i] = i;\r\n }\r\n const areOverlapping = (a, b) => {\r\n const [aOpen, aClose] = a;\r\n const [bOpen, bClose] = b;\r\n return (aOpen === bOpen || aOpen === bClose || aClose === bOpen || aClose === bClose);\r\n };\r\n const mergeGroups = (g1, g2) => {\r\n const newG = Math.min(g1, g2);\r\n const oldG = Math.max(g1, g2);\r\n for (let i = 0; i < N; i++) {\r\n if (group[i] === oldG) {\r\n group[i] = newG;\r\n }\r\n }\r\n };\r\n // group together brackets that have the same open or the same close sequence\r\n for (let i = 0; i < N; i++) {\r\n const a = brackets[i];\r\n for (let j = i + 1; j < N; j++) {\r\n const b = brackets[j];\r\n if (areOverlapping(a, b)) {\r\n mergeGroups(group[i], group[j]);\r\n }\r\n }\r\n }\r\n const result = [];\r\n for (let g = 0; g < N; g++) {\r\n let currentOpen = [];\r\n let currentClose = [];\r\n for (let i = 0; i < N; i++) {\r\n if (group[i] === g) {\r\n const [open, close] = brackets[i];\r\n currentOpen.push(open);\r\n currentClose.push(close);\r\n }\r\n }\r\n if (currentOpen.length > 0) {\r\n result.push({\r\n open: currentOpen,\r\n close: currentClose\r\n });\r\n }\r\n }\r\n return result;\r\n}\r\nclass RichEditBrackets {\r\n constructor(languageIdentifier, _brackets) {\r\n const brackets = groupFuzzyBrackets(_brackets);\r\n this.brackets = brackets.map((b, index) => {\r\n return new RichEditBracket(languageIdentifier, index, b.open, b.close, getRegexForBracketPair(b.open, b.close, brackets, index), getReversedRegexForBracketPair(b.open, b.close, brackets, index));\r\n });\r\n this.forwardRegex = getRegexForBrackets(this.brackets);\r\n this.reversedRegex = getReversedRegexForBrackets(this.brackets);\r\n this.textIsBracket = {};\r\n this.textIsOpenBracket = {};\r\n this.maxBracketLength = 0;\r\n for (const bracket of this.brackets) {\r\n for (const open of bracket.open) {\r\n this.textIsBracket[open] = bracket;\r\n this.textIsOpenBracket[open] = true;\r\n this.maxBracketLength = Math.max(this.maxBracketLength, open.length);\r\n }\r\n for (const close of bracket.close) {\r\n this.textIsBracket[close] = bracket;\r\n this.textIsOpenBracket[close] = false;\r\n this.maxBracketLength = Math.max(this.maxBracketLength, close.length);\r\n }\r\n }\r\n }\r\n}\r\nfunction collectSuperstrings(str, brackets, currentIndex, dest) {\r\n for (let i = 0, len = brackets.length; i < len; i++) {\r\n if (i === currentIndex) {\r\n continue;\r\n }\r\n const bracket = brackets[i];\r\n for (const open of bracket.open) {\r\n if (open.indexOf(str) >= 0) {\r\n dest.push(open);\r\n }\r\n }\r\n for (const close of bracket.close) {\r\n if (close.indexOf(str) >= 0) {\r\n dest.push(close);\r\n }\r\n }\r\n }\r\n}\r\nfunction lengthcmp(a, b) {\r\n return a.length - b.length;\r\n}\r\nfunction unique(arr) {\r\n if (arr.length <= 1) {\r\n return arr;\r\n }\r\n const result = [];\r\n const seen = new Set();\r\n for (const element of arr) {\r\n if (seen.has(element)) {\r\n continue;\r\n }\r\n result.push(element);\r\n seen.add(element);\r\n }\r\n return result;\r\n}\r\nfunction getRegexForBracketPair(open, close, brackets, currentIndex) {\r\n // search in all brackets for other brackets that are a superstring of these brackets\r\n let pieces = [];\r\n pieces = pieces.concat(open);\r\n pieces = pieces.concat(close);\r\n for (let i = 0, len = pieces.length; i < len; i++) {\r\n collectSuperstrings(pieces[i], brackets, currentIndex, pieces);\r\n }\r\n pieces = unique(pieces);\r\n pieces.sort(lengthcmp);\r\n pieces.reverse();\r\n return createBracketOrRegExp(pieces);\r\n}\r\nfunction getReversedRegexForBracketPair(open, close, brackets, currentIndex) {\r\n // search in all brackets for other brackets that are a superstring of these brackets\r\n let pieces = [];\r\n pieces = pieces.concat(open);\r\n pieces = pieces.concat(close);\r\n for (let i = 0, len = pieces.length; i < len; i++) {\r\n collectSuperstrings(pieces[i], brackets, currentIndex, pieces);\r\n }\r\n pieces = unique(pieces);\r\n pieces.sort(lengthcmp);\r\n pieces.reverse();\r\n return createBracketOrRegExp(pieces.map(toReversedString));\r\n}\r\nfunction getRegexForBrackets(brackets) {\r\n let pieces = [];\r\n for (const bracket of brackets) {\r\n for (const open of bracket.open) {\r\n pieces.push(open);\r\n }\r\n for (const close of bracket.close) {\r\n pieces.push(close);\r\n }\r\n }\r\n pieces = unique(pieces);\r\n return createBracketOrRegExp(pieces);\r\n}\r\nfunction getReversedRegexForBrackets(brackets) {\r\n let pieces = [];\r\n for (const bracket of brackets) {\r\n for (const open of bracket.open) {\r\n pieces.push(open);\r\n }\r\n for (const close of bracket.close) {\r\n pieces.push(close);\r\n }\r\n }\r\n pieces = unique(pieces);\r\n return createBracketOrRegExp(pieces.map(toReversedString));\r\n}\r\nfunction prepareBracketForRegExp(str) {\r\n // This bracket pair uses letters like e.g. \"begin\" - \"end\"\r\n const insertWordBoundaries = (/^[\\w ]+$/.test(str));\r\n str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.escapeRegExpCharacters(str);\r\n return (insertWordBoundaries ? `\\\\b${str}\\\\b` : str);\r\n}\r\nfunction createBracketOrRegExp(pieces) {\r\n let regexStr = `(${pieces.map(prepareBracketForRegExp).join(')|(')})`;\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.createRegExp(regexStr, true);\r\n}\r\nconst toReversedString = (function () {\r\n function reverse(str) {\r\n if (_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__.hasTextDecoder) {\r\n // create a Uint16Array and then use a TextDecoder to create a string\r\n const arr = new Uint16Array(str.length);\r\n let offset = 0;\r\n for (let i = str.length - 1; i >= 0; i--) {\r\n arr[offset++] = str.charCodeAt(i);\r\n }\r\n return _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__.getPlatformTextDecoder().decode(arr);\r\n }\r\n else {\r\n let result = [], resultLen = 0;\r\n for (let i = str.length - 1; i >= 0; i--) {\r\n result[resultLen++] = str.charAt(i);\r\n }\r\n return result.join('');\r\n }\r\n }\r\n let lastInput = null;\r\n let lastOutput = null;\r\n return function toReversedString(str) {\r\n if (lastInput !== str) {\r\n lastInput = str;\r\n lastOutput = reverse(lastInput);\r\n }\r\n return lastOutput;\r\n };\r\n})();\r\nclass BracketsUtils {\r\n static _findPrevBracketInText(reversedBracketRegex, lineNumber, reversedText, offset) {\r\n let m = reversedText.match(reversedBracketRegex);\r\n if (!m) {\r\n return null;\r\n }\r\n let matchOffset = reversedText.length - (m.index || 0);\r\n let matchLength = m[0].length;\r\n let absoluteMatchOffset = offset + matchOffset;\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, absoluteMatchOffset - matchLength + 1, lineNumber, absoluteMatchOffset + 1);\r\n }\r\n static findPrevBracketInRange(reversedBracketRegex, lineNumber, lineText, startOffset, endOffset) {\r\n // Because JS does not support backwards regex search, we search forwards in a reversed string with a reversed regex ;)\r\n const reversedLineText = toReversedString(lineText);\r\n const reversedSubstr = reversedLineText.substring(lineText.length - endOffset, lineText.length - startOffset);\r\n return this._findPrevBracketInText(reversedBracketRegex, lineNumber, reversedSubstr, startOffset);\r\n }\r\n static findNextBracketInText(bracketRegex, lineNumber, text, offset) {\r\n let m = text.match(bracketRegex);\r\n if (!m) {\r\n return null;\r\n }\r\n let matchOffset = m.index || 0;\r\n let matchLength = m[0].length;\r\n if (matchLength === 0) {\r\n return null;\r\n }\r\n let absoluteMatchOffset = offset + matchOffset;\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, absoluteMatchOffset + 1, lineNumber, absoluteMatchOffset + 1 + matchLength);\r\n }\r\n static findNextBracketInRange(bracketRegex, lineNumber, lineText, startOffset, endOffset) {\r\n const substr = lineText.substring(startOffset, endOffset);\r\n return this.findNextBracketInText(bracketRegex, lineNumber, substr, startOffset);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParsedTokenThemeRule\": () => (/* binding */ ParsedTokenThemeRule),\n/* harmony export */ \"parseTokenTheme\": () => (/* binding */ parseTokenTheme),\n/* harmony export */ \"ColorMap\": () => (/* binding */ ColorMap),\n/* harmony export */ \"TokenTheme\": () => (/* binding */ TokenTheme),\n/* harmony export */ \"toStandardTokenType\": () => (/* binding */ toStandardTokenType),\n/* harmony export */ \"strcmp\": () => (/* binding */ strcmp),\n/* harmony export */ \"ThemeTrieElementRule\": () => (/* binding */ ThemeTrieElementRule),\n/* harmony export */ \"ThemeTrieElement\": () => (/* binding */ ThemeTrieElement),\n/* harmony export */ \"generateTokensCSSForColorMap\": () => (/* binding */ generateTokensCSSForColorMap)\n/* harmony export */ });\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ParsedTokenThemeRule {\r\n constructor(token, index, fontStyle, foreground, background) {\r\n this.token = token;\r\n this.index = index;\r\n this.fontStyle = fontStyle;\r\n this.foreground = foreground;\r\n this.background = background;\r\n }\r\n}\r\n/**\r\n * Parse a raw theme into rules.\r\n */\r\nfunction parseTokenTheme(source) {\r\n if (!source || !Array.isArray(source)) {\r\n return [];\r\n }\r\n let result = [], resultLen = 0;\r\n for (let i = 0, len = source.length; i < len; i++) {\r\n let entry = source[i];\r\n let fontStyle = -1 /* NotSet */;\r\n if (typeof entry.fontStyle === 'string') {\r\n fontStyle = 0 /* None */;\r\n let segments = entry.fontStyle.split(' ');\r\n for (let j = 0, lenJ = segments.length; j < lenJ; j++) {\r\n let segment = segments[j];\r\n switch (segment) {\r\n case 'italic':\r\n fontStyle = fontStyle | 1 /* Italic */;\r\n break;\r\n case 'bold':\r\n fontStyle = fontStyle | 2 /* Bold */;\r\n break;\r\n case 'underline':\r\n fontStyle = fontStyle | 4 /* Underline */;\r\n break;\r\n }\r\n }\r\n }\r\n let foreground = null;\r\n if (typeof entry.foreground === 'string') {\r\n foreground = entry.foreground;\r\n }\r\n let background = null;\r\n if (typeof entry.background === 'string') {\r\n background = entry.background;\r\n }\r\n result[resultLen++] = new ParsedTokenThemeRule(entry.token || '', i, fontStyle, foreground, background);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Resolve rules (i.e. inheritance).\r\n */\r\nfunction resolveParsedTokenThemeRules(parsedThemeRules, customTokenColors) {\r\n // Sort rules lexicographically, and then by index if necessary\r\n parsedThemeRules.sort((a, b) => {\r\n let r = strcmp(a.token, b.token);\r\n if (r !== 0) {\r\n return r;\r\n }\r\n return a.index - b.index;\r\n });\r\n // Determine defaults\r\n let defaultFontStyle = 0 /* None */;\r\n let defaultForeground = '000000';\r\n let defaultBackground = 'ffffff';\r\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].token === '') {\r\n let incomingDefaults = parsedThemeRules.shift();\r\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\r\n defaultFontStyle = incomingDefaults.fontStyle;\r\n }\r\n if (incomingDefaults.foreground !== null) {\r\n defaultForeground = incomingDefaults.foreground;\r\n }\r\n if (incomingDefaults.background !== null) {\r\n defaultBackground = incomingDefaults.background;\r\n }\r\n }\r\n let colorMap = new ColorMap();\r\n // start with token colors from custom token themes\r\n for (let color of customTokenColors) {\r\n colorMap.getId(color);\r\n }\r\n let foregroundColorId = colorMap.getId(defaultForeground);\r\n let backgroundColorId = colorMap.getId(defaultBackground);\r\n let defaults = new ThemeTrieElementRule(defaultFontStyle, foregroundColorId, backgroundColorId);\r\n let root = new ThemeTrieElement(defaults);\r\n for (let i = 0, len = parsedThemeRules.length; i < len; i++) {\r\n let rule = parsedThemeRules[i];\r\n root.insert(rule.token, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\r\n }\r\n return new TokenTheme(colorMap, root);\r\n}\r\nconst colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;\r\nclass ColorMap {\r\n constructor() {\r\n this._lastColorId = 0;\r\n this._id2color = [];\r\n this._color2id = new Map();\r\n }\r\n getId(color) {\r\n if (color === null) {\r\n return 0;\r\n }\r\n const match = color.match(colorRegExp);\r\n if (!match) {\r\n throw new Error('Illegal value for token color: ' + color);\r\n }\r\n color = match[1].toUpperCase();\r\n let value = this._color2id.get(color);\r\n if (value) {\r\n return value;\r\n }\r\n value = ++this._lastColorId;\r\n this._color2id.set(color, value);\r\n this._id2color[value] = _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__.Color.fromHex('#' + color);\r\n return value;\r\n }\r\n getColorMap() {\r\n return this._id2color.slice(0);\r\n }\r\n}\r\nclass TokenTheme {\r\n constructor(colorMap, root) {\r\n this._colorMap = colorMap;\r\n this._root = root;\r\n this._cache = new Map();\r\n }\r\n static createFromRawTokenTheme(source, customTokenColors) {\r\n return this.createFromParsedTokenTheme(parseTokenTheme(source), customTokenColors);\r\n }\r\n static createFromParsedTokenTheme(source, customTokenColors) {\r\n return resolveParsedTokenThemeRules(source, customTokenColors);\r\n }\r\n getColorMap() {\r\n return this._colorMap.getColorMap();\r\n }\r\n _match(token) {\r\n return this._root.match(token);\r\n }\r\n match(languageId, token) {\r\n // The cache contains the metadata without the language bits set.\r\n let result = this._cache.get(token);\r\n if (typeof result === 'undefined') {\r\n let rule = this._match(token);\r\n let standardToken = toStandardTokenType(token);\r\n result = (rule.metadata\r\n | (standardToken << 8 /* TOKEN_TYPE_OFFSET */)) >>> 0;\r\n this._cache.set(token, result);\r\n }\r\n return (result\r\n | (languageId << 0 /* LANGUAGEID_OFFSET */)) >>> 0;\r\n }\r\n}\r\nconst STANDARD_TOKEN_TYPE_REGEXP = /\\b(comment|string|regex|regexp)\\b/;\r\nfunction toStandardTokenType(tokenType) {\r\n let m = tokenType.match(STANDARD_TOKEN_TYPE_REGEXP);\r\n if (!m) {\r\n return 0 /* Other */;\r\n }\r\n switch (m[1]) {\r\n case 'comment':\r\n return 1 /* Comment */;\r\n case 'string':\r\n return 2 /* String */;\r\n case 'regex':\r\n return 4 /* RegEx */;\r\n case 'regexp':\r\n return 4 /* RegEx */;\r\n }\r\n throw new Error('Unexpected match for standard token type!');\r\n}\r\nfunction strcmp(a, b) {\r\n if (a < b) {\r\n return -1;\r\n }\r\n if (a > b) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nclass ThemeTrieElementRule {\r\n constructor(fontStyle, foreground, background) {\r\n this._fontStyle = fontStyle;\r\n this._foreground = foreground;\r\n this._background = background;\r\n this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */)\r\n | (this._foreground << 14 /* FOREGROUND_OFFSET */)\r\n | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n }\r\n clone() {\r\n return new ThemeTrieElementRule(this._fontStyle, this._foreground, this._background);\r\n }\r\n acceptOverwrite(fontStyle, foreground, background) {\r\n if (fontStyle !== -1 /* NotSet */) {\r\n this._fontStyle = fontStyle;\r\n }\r\n if (foreground !== 0 /* None */) {\r\n this._foreground = foreground;\r\n }\r\n if (background !== 0 /* None */) {\r\n this._background = background;\r\n }\r\n this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */)\r\n | (this._foreground << 14 /* FOREGROUND_OFFSET */)\r\n | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n }\r\n}\r\nclass ThemeTrieElement {\r\n constructor(mainRule) {\r\n this._mainRule = mainRule;\r\n this._children = new Map();\r\n }\r\n match(token) {\r\n if (token === '') {\r\n return this._mainRule;\r\n }\r\n let dotIndex = token.indexOf('.');\r\n let head;\r\n let tail;\r\n if (dotIndex === -1) {\r\n head = token;\r\n tail = '';\r\n }\r\n else {\r\n head = token.substring(0, dotIndex);\r\n tail = token.substring(dotIndex + 1);\r\n }\r\n let child = this._children.get(head);\r\n if (typeof child !== 'undefined') {\r\n return child.match(tail);\r\n }\r\n return this._mainRule;\r\n }\r\n insert(token, fontStyle, foreground, background) {\r\n if (token === '') {\r\n // Merge into the main rule\r\n this._mainRule.acceptOverwrite(fontStyle, foreground, background);\r\n return;\r\n }\r\n let dotIndex = token.indexOf('.');\r\n let head;\r\n let tail;\r\n if (dotIndex === -1) {\r\n head = token;\r\n tail = '';\r\n }\r\n else {\r\n head = token.substring(0, dotIndex);\r\n tail = token.substring(dotIndex + 1);\r\n }\r\n let child = this._children.get(head);\r\n if (typeof child === 'undefined') {\r\n child = new ThemeTrieElement(this._mainRule.clone());\r\n this._children.set(head, child);\r\n }\r\n child.insert(tail, fontStyle, foreground, background);\r\n }\r\n}\r\nfunction generateTokensCSSForColorMap(colorMap) {\r\n let rules = [];\r\n for (let i = 1, len = colorMap.length; i < len; i++) {\r\n let color = colorMap[i];\r\n rules[i] = `.mtk${i} { color: ${color}; }`;\r\n }\r\n rules.push('.mtki { font-style: italic; }');\r\n rules.push('.mtkb { font-weight: bold; }');\r\n rules.push('.mtku { text-decoration: underline; text-underline-position: under; }');\r\n return rules.join('\\n');\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"tokenizeToString\": () => (/* binding */ tokenizeToString),\n/* harmony export */ \"tokenizeLineToHTML\": () => (/* binding */ tokenizeLineToHTML)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/lineTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js\");\n/* harmony import */ var _nullMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst fallback = {\r\n getInitialState: () => _nullMode_js__WEBPACK_IMPORTED_MODULE_2__.NULL_STATE,\r\n tokenize2: (buffer, hasEOL, state, deltaOffset) => (0,_nullMode_js__WEBPACK_IMPORTED_MODULE_2__.nullTokenize2)(0 /* Null */, buffer, state, deltaOffset)\r\n};\r\nfunction tokenizeToString(text, tokenizationSupport = fallback) {\r\n return _tokenizeToString(text, tokenizationSupport || fallback);\r\n}\r\nfunction tokenizeLineToHTML(text, viewLineTokens, colorMap, startOffset, endOffset, tabSize, useNbsp) {\r\n let result = `<div>`;\r\n let charIndex = startOffset;\r\n let tabsCharDelta = 0;\r\n for (let tokenIndex = 0, tokenCount = viewLineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) {\r\n const tokenEndIndex = viewLineTokens.getEndOffset(tokenIndex);\r\n if (tokenEndIndex <= startOffset) {\r\n continue;\r\n }\r\n let partContent = '';\r\n for (; charIndex < tokenEndIndex && charIndex < endOffset; charIndex++) {\r\n const charCode = text.charCodeAt(charIndex);\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n let insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\r\n tabsCharDelta += insertSpacesCount - 1;\r\n while (insertSpacesCount > 0) {\r\n partContent += useNbsp ? ' ' : ' ';\r\n insertSpacesCount--;\r\n }\r\n break;\r\n case 60 /* LessThan */:\r\n partContent += '<';\r\n break;\r\n case 62 /* GreaterThan */:\r\n partContent += '>';\r\n break;\r\n case 38 /* Ampersand */:\r\n partContent += '&';\r\n break;\r\n case 0 /* Null */:\r\n partContent += '�';\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR */:\r\n case 8233 /* PARAGRAPH_SEPARATOR */:\r\n case 133 /* NEXT_LINE */:\r\n partContent += '\\ufffd';\r\n break;\r\n case 13 /* CarriageReturn */:\r\n // zero width space, because carriage return would introduce a line break\r\n partContent += '​';\r\n break;\r\n case 32 /* Space */:\r\n partContent += useNbsp ? ' ' : ' ';\r\n break;\r\n default:\r\n partContent += String.fromCharCode(charCode);\r\n }\r\n }\r\n result += `<span style=\"${viewLineTokens.getInlineStyle(tokenIndex, colorMap)}\">${partContent}</span>`;\r\n if (tokenEndIndex > endOffset || charIndex >= endOffset) {\r\n break;\r\n }\r\n }\r\n result += `</div>`;\r\n return result;\r\n}\r\nfunction _tokenizeToString(text, tokenizationSupport) {\r\n let result = `<div class=\"monaco-tokenized-source\">`;\r\n let lines = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.splitLines(text);\r\n let currentState = tokenizationSupport.getInitialState();\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n let line = lines[i];\r\n if (i > 0) {\r\n result += `<br/>`;\r\n }\r\n let tokenizationResult = tokenizationSupport.tokenize2(line, true, currentState, 0);\r\n _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens.convertToEndOffset(tokenizationResult.tokens, line.length);\r\n let lineTokens = new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__.LineTokens(tokenizationResult.tokens, line);\r\n let viewLineTokens = lineTokens.inflate();\r\n let startOffset = 0;\r\n for (let j = 0, lenJ = viewLineTokens.getCount(); j < lenJ; j++) {\r\n const type = viewLineTokens.getClassName(j);\r\n const endIndex = viewLineTokens.getEndOffset(j);\r\n result += `<span class=\"${type}\">${_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.escape(line.substring(startOffset, endIndex))}</span>`;\r\n startOffset = endIndex;\r\n }\r\n currentState = tokenizationResult.endState;\r\n }\r\n result += `</div>`;\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TokenizationRegistryImpl\": () => (/* binding */ TokenizationRegistryImpl)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass TokenizationRegistryImpl {\r\n constructor() {\r\n this._map = new Map();\r\n this._promises = new Map();\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._colorMap = null;\r\n }\r\n fire(languages) {\r\n this._onDidChange.fire({\r\n changedLanguages: languages,\r\n changedColorMap: false\r\n });\r\n }\r\n register(language, support) {\r\n this._map.set(language, support);\r\n this.fire([language]);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n if (this._map.get(language) !== support) {\r\n return;\r\n }\r\n this._map.delete(language);\r\n this.fire([language]);\r\n });\r\n }\r\n registerPromise(language, supportPromise) {\r\n let registration = null;\r\n let isDisposed = false;\r\n this._promises.set(language, supportPromise.then(support => {\r\n this._promises.delete(language);\r\n if (isDisposed || !support) {\r\n return;\r\n }\r\n registration = this.register(language, support);\r\n }));\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n isDisposed = true;\r\n if (registration) {\r\n registration.dispose();\r\n }\r\n });\r\n }\r\n getPromise(language) {\r\n const support = this.get(language);\r\n if (support) {\r\n return Promise.resolve(support);\r\n }\r\n const promise = this._promises.get(language);\r\n if (promise) {\r\n return promise.then(_ => this.get(language));\r\n }\r\n return null;\r\n }\r\n get(language) {\r\n return (this._map.get(language) || null);\r\n }\r\n setColorMap(colorMap) {\r\n this._colorMap = colorMap;\r\n this._onDidChange.fire({\r\n changedLanguages: Array.from(this._map.keys()),\r\n changedColorMap: true\r\n });\r\n }\r\n getColorMap() {\r\n return this._colorMap;\r\n }\r\n getDefaultBackground() {\r\n if (this._colorMap && this._colorMap.length > 2 /* DefaultBackground */) {\r\n return this._colorMap[2 /* DefaultBackground */];\r\n }\r\n return null;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorSimpleWorker\": () => (/* binding */ EditorSimpleWorker),\n/* harmony export */ \"create\": () => (/* binding */ create)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/diff/diff.js */ \"./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _diff_diffComputer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../diff/diffComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js\");\n/* harmony import */ var _model_mirrorTextModel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../model/mirrorTextModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js\");\n/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../model/wordHelper.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js\");\n/* harmony import */ var _modes_linkComputer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modes/linkComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js\");\n/* harmony import */ var _modes_supports_inplaceReplaceSupport_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modes/supports/inplaceReplaceSupport.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js\");\n/* harmony import */ var _standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../standalone/standaloneBase.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @internal\r\n */\r\nclass MirrorModel extends _model_mirrorTextModel_js__WEBPACK_IMPORTED_MODULE_7__.MirrorTextModel {\r\n get uri() {\r\n return this._uri;\r\n }\r\n get version() {\r\n return this._versionId;\r\n }\r\n get eol() {\r\n return this._eol;\r\n }\r\n getValue() {\r\n return this.getText();\r\n }\r\n getLinesContent() {\r\n return this._lines.slice(0);\r\n }\r\n getLineCount() {\r\n return this._lines.length;\r\n }\r\n getLineContent(lineNumber) {\r\n return this._lines[lineNumber - 1];\r\n }\r\n getWordAtPosition(position, wordDefinition) {\r\n let wordAtText = (0,_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__.getWordAtText)(position.column, (0,_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__.ensureValidWordDefinition)(wordDefinition), this._lines[position.lineNumber - 1], 0);\r\n if (wordAtText) {\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn);\r\n }\r\n return null;\r\n }\r\n words(wordDefinition) {\r\n const lines = this._lines;\r\n const wordenize = this._wordenize.bind(this);\r\n let lineNumber = 0;\r\n let lineText = '';\r\n let wordRangesIdx = 0;\r\n let wordRanges = [];\r\n return {\r\n *[Symbol.iterator]() {\r\n while (true) {\r\n if (wordRangesIdx < wordRanges.length) {\r\n const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end);\r\n wordRangesIdx += 1;\r\n yield value;\r\n }\r\n else {\r\n if (lineNumber < lines.length) {\r\n lineText = lines[lineNumber];\r\n wordRanges = wordenize(lineText, wordDefinition);\r\n wordRangesIdx = 0;\r\n lineNumber += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }\r\n getLineWords(lineNumber, wordDefinition) {\r\n let content = this._lines[lineNumber - 1];\r\n let ranges = this._wordenize(content, wordDefinition);\r\n let words = [];\r\n for (const range of ranges) {\r\n words.push({\r\n word: content.substring(range.start, range.end),\r\n startColumn: range.start + 1,\r\n endColumn: range.end + 1\r\n });\r\n }\r\n return words;\r\n }\r\n _wordenize(content, wordDefinition) {\r\n const result = [];\r\n let match;\r\n wordDefinition.lastIndex = 0; // reset lastIndex just to be sure\r\n while (match = wordDefinition.exec(content)) {\r\n if (match[0].length === 0) {\r\n // it did match the empty string\r\n break;\r\n }\r\n result.push({ start: match.index, end: match.index + match[0].length });\r\n }\r\n return result;\r\n }\r\n getValueInRange(range) {\r\n range = this._validateRange(range);\r\n if (range.startLineNumber === range.endLineNumber) {\r\n return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1);\r\n }\r\n let lineEnding = this._eol;\r\n let startLineIndex = range.startLineNumber - 1;\r\n let endLineIndex = range.endLineNumber - 1;\r\n let resultLines = [];\r\n resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1));\r\n for (let i = startLineIndex + 1; i < endLineIndex; i++) {\r\n resultLines.push(this._lines[i]);\r\n }\r\n resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1));\r\n return resultLines.join(lineEnding);\r\n }\r\n offsetAt(position) {\r\n position = this._validatePosition(position);\r\n this._ensureLineStarts();\r\n return this._lineStarts.getAccumulatedValue(position.lineNumber - 2) + (position.column - 1);\r\n }\r\n positionAt(offset) {\r\n offset = Math.floor(offset);\r\n offset = Math.max(0, offset);\r\n this._ensureLineStarts();\r\n let out = this._lineStarts.getIndexOf(offset);\r\n let lineLength = this._lines[out.index].length;\r\n // Ensure we return a valid position\r\n return {\r\n lineNumber: 1 + out.index,\r\n column: 1 + Math.min(out.remainder, lineLength)\r\n };\r\n }\r\n _validateRange(range) {\r\n const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn });\r\n const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn });\r\n if (start.lineNumber !== range.startLineNumber\r\n || start.column !== range.startColumn\r\n || end.lineNumber !== range.endLineNumber\r\n || end.column !== range.endColumn) {\r\n return {\r\n startLineNumber: start.lineNumber,\r\n startColumn: start.column,\r\n endLineNumber: end.lineNumber,\r\n endColumn: end.column\r\n };\r\n }\r\n return range;\r\n }\r\n _validatePosition(position) {\r\n if (!_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position.isIPosition(position)) {\r\n throw new Error('bad position');\r\n }\r\n let { lineNumber, column } = position;\r\n let hasChanged = false;\r\n if (lineNumber < 1) {\r\n lineNumber = 1;\r\n column = 1;\r\n hasChanged = true;\r\n }\r\n else if (lineNumber > this._lines.length) {\r\n lineNumber = this._lines.length;\r\n column = this._lines[lineNumber - 1].length + 1;\r\n hasChanged = true;\r\n }\r\n else {\r\n let maxCharacter = this._lines[lineNumber - 1].length + 1;\r\n if (column < 1) {\r\n column = 1;\r\n hasChanged = true;\r\n }\r\n else if (column > maxCharacter) {\r\n column = maxCharacter;\r\n hasChanged = true;\r\n }\r\n }\r\n if (!hasChanged) {\r\n return position;\r\n }\r\n else {\r\n return { lineNumber, column };\r\n }\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass EditorSimpleWorker {\r\n constructor(host, foreignModuleFactory) {\r\n this._host = host;\r\n this._models = Object.create(null);\r\n this._foreignModuleFactory = foreignModuleFactory;\r\n this._foreignModule = null;\r\n }\r\n dispose() {\r\n this._models = Object.create(null);\r\n }\r\n _getModel(uri) {\r\n return this._models[uri];\r\n }\r\n _getModels() {\r\n let all = [];\r\n Object.keys(this._models).forEach((key) => all.push(this._models[key]));\r\n return all;\r\n }\r\n acceptNewModel(data) {\r\n this._models[data.url] = new MirrorModel(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.parse(data.url), data.lines, data.EOL, data.versionId);\r\n }\r\n acceptModelChanged(strURL, e) {\r\n if (!this._models[strURL]) {\r\n return;\r\n }\r\n let model = this._models[strURL];\r\n model.onEvents(e);\r\n }\r\n acceptRemovedModel(strURL) {\r\n if (!this._models[strURL]) {\r\n return;\r\n }\r\n delete this._models[strURL];\r\n }\r\n // ---- BEGIN diff --------------------------------------------------------------------------\r\n computeDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace, maxComputationTime) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const original = this._getModel(originalUrl);\r\n const modified = this._getModel(modifiedUrl);\r\n if (!original || !modified) {\r\n return null;\r\n }\r\n const originalLines = original.getLinesContent();\r\n const modifiedLines = modified.getLinesContent();\r\n const diffComputer = new _diff_diffComputer_js__WEBPACK_IMPORTED_MODULE_6__.DiffComputer(originalLines, modifiedLines, {\r\n shouldComputeCharChanges: true,\r\n shouldPostProcessCharChanges: true,\r\n shouldIgnoreTrimWhitespace: ignoreTrimWhitespace,\r\n shouldMakePrettyDiff: true,\r\n maxComputationTime: maxComputationTime\r\n });\r\n const diffResult = diffComputer.computeDiff();\r\n const identical = (diffResult.changes.length > 0 ? false : this._modelsAreIdentical(original, modified));\r\n return {\r\n quitEarly: diffResult.quitEarly,\r\n identical: identical,\r\n changes: diffResult.changes\r\n };\r\n });\r\n }\r\n _modelsAreIdentical(original, modified) {\r\n const originalLineCount = original.getLineCount();\r\n const modifiedLineCount = modified.getLineCount();\r\n if (originalLineCount !== modifiedLineCount) {\r\n return false;\r\n }\r\n for (let line = 1; line <= originalLineCount; line++) {\r\n const originalLine = original.getLineContent(line);\r\n const modifiedLine = modified.getLineContent(line);\r\n if (originalLine !== modifiedLine) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n computeMoreMinimalEdits(modelUrl, edits) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = this._getModel(modelUrl);\r\n if (!model) {\r\n return edits;\r\n }\r\n const result = [];\r\n let lastEol = undefined;\r\n edits = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.mergeSort)(edits, (a, b) => {\r\n if (a.range && b.range) {\r\n return _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts(a.range, b.range);\r\n }\r\n // eol only changes should go to the end\r\n let aRng = a.range ? 0 : 1;\r\n let bRng = b.range ? 0 : 1;\r\n return aRng - bRng;\r\n });\r\n for (let { range, text, eol } of edits) {\r\n if (typeof eol === 'number') {\r\n lastEol = eol;\r\n }\r\n if (_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.isEmpty(range) && !text) {\r\n // empty change\r\n continue;\r\n }\r\n const original = model.getValueInRange(range);\r\n text = text.replace(/\\r\\n|\\n|\\r/g, model.eol);\r\n if (original === text) {\r\n // noop\r\n continue;\r\n }\r\n // make sure diff won't take too long\r\n if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) {\r\n result.push({ range, text });\r\n continue;\r\n }\r\n // compute diff between original and edit.text\r\n const changes = (0,_base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_1__.stringDiff)(original, text, false);\r\n const editOffset = model.offsetAt(_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(range).getStartPosition());\r\n for (const change of changes) {\r\n const start = model.positionAt(editOffset + change.originalStart);\r\n const end = model.positionAt(editOffset + change.originalStart + change.originalLength);\r\n const newEdit = {\r\n text: text.substr(change.modifiedStart, change.modifiedLength),\r\n range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column }\r\n };\r\n if (model.getValueInRange(newEdit.range) !== newEdit.text) {\r\n result.push(newEdit);\r\n }\r\n }\r\n }\r\n if (typeof lastEol === 'number') {\r\n result.push({ eol: lastEol, text: '', range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } });\r\n }\r\n return result;\r\n });\r\n }\r\n // ---- END minimal edits ---------------------------------------------------------------\r\n computeLinks(modelUrl) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return null;\r\n }\r\n return (0,_modes_linkComputer_js__WEBPACK_IMPORTED_MODULE_9__.computeLinks)(model);\r\n });\r\n }\r\n textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__.StopWatch(true);\r\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n const seen = new Set();\r\n outer: for (let url of modelUrls) {\r\n const model = this._getModel(url);\r\n if (!model) {\r\n continue;\r\n }\r\n for (let word of model.words(wordDefRegExp)) {\r\n if (word === leadingWord || !isNaN(Number(word))) {\r\n continue;\r\n }\r\n seen.add(word);\r\n if (seen.size > EditorSimpleWorker._suggestionsLimit) {\r\n break outer;\r\n }\r\n }\r\n }\r\n return { words: Array.from(seen), duration: sw.elapsed() };\r\n });\r\n }\r\n // ---- END suggest --------------------------------------------------------------------------\r\n //#region -- word ranges --\r\n computeWordRanges(modelUrl, range, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return Object.create(null);\r\n }\r\n const wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n const result = Object.create(null);\r\n for (let line = range.startLineNumber; line < range.endLineNumber; line++) {\r\n let words = model.getLineWords(line, wordDefRegExp);\r\n for (const word of words) {\r\n if (!isNaN(Number(word.word))) {\r\n continue;\r\n }\r\n let array = result[word.word];\r\n if (!array) {\r\n array = [];\r\n result[word.word] = array;\r\n }\r\n array.push({\r\n startLineNumber: line,\r\n startColumn: word.startColumn,\r\n endLineNumber: line,\r\n endColumn: word.endColumn\r\n });\r\n }\r\n }\r\n return result;\r\n });\r\n }\r\n //#endregion\r\n navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let model = this._getModel(modelUrl);\r\n if (!model) {\r\n return null;\r\n }\r\n let wordDefRegExp = new RegExp(wordDef, wordDefFlags);\r\n if (range.startColumn === range.endColumn) {\r\n range = {\r\n startLineNumber: range.startLineNumber,\r\n startColumn: range.startColumn,\r\n endLineNumber: range.endLineNumber,\r\n endColumn: range.endColumn + 1\r\n };\r\n }\r\n let selectionText = model.getValueInRange(range);\r\n let wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp);\r\n if (!wordRange) {\r\n return null;\r\n }\r\n let word = model.getValueInRange(wordRange);\r\n let result = _modes_supports_inplaceReplaceSupport_js__WEBPACK_IMPORTED_MODULE_10__.BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up);\r\n return result;\r\n });\r\n }\r\n // ---- BEGIN foreign module support --------------------------------------------------------------------------\r\n loadForeignModule(moduleId, createData, foreignHostMethods) {\r\n const proxyMethodRequest = (method, args) => {\r\n return this._host.fhr(method, args);\r\n };\r\n const foreignHost = _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.createProxyObject(foreignHostMethods, proxyMethodRequest);\r\n let ctx = {\r\n host: foreignHost,\r\n getMirrorModels: () => {\r\n return this._getModels();\r\n }\r\n };\r\n if (this._foreignModuleFactory) {\r\n this._foreignModule = this._foreignModuleFactory(ctx, createData);\r\n // static foreing module\r\n return Promise.resolve(_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.getAllMethodNames(this._foreignModule));\r\n }\r\n // ESM-comment-begin\r\n // \t\treturn new Promise<any>((resolve, reject) => {\r\n // \t\t\trequire([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {\r\n // \t\t\t\tthis._foreignModule = foreignModule.create(ctx, createData);\r\n // \r\n // \t\t\t\tresolve(types.getAllMethodNames(this._foreignModule));\r\n // \r\n // \t\t\t}, reject);\r\n // \t\t});\r\n // ESM-comment-end\r\n // ESM-uncomment-begin\r\n return Promise.reject(new Error(`Unexpected usage`));\r\n // ESM-uncomment-end\r\n }\r\n // foreign method request\r\n fmr(method, args) {\r\n if (!this._foreignModule || typeof this._foreignModule[method] !== 'function') {\r\n return Promise.reject(new Error('Missing requestHandler or method: ' + method));\r\n }\r\n try {\r\n return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n}\r\n// ---- END diff --------------------------------------------------------------------------\r\n// ---- BEGIN minimal edits ---------------------------------------------------------------\r\nEditorSimpleWorker._diffLimit = 100000;\r\n// ---- BEGIN suggest --------------------------------------------------------------------------\r\nEditorSimpleWorker._suggestionsLimit = 10000;\r\n/**\r\n * Called on the worker side\r\n * @internal\r\n */\r\nfunction create(host) {\r\n return new EditorSimpleWorker(host, null);\r\n}\r\nif (typeof importScripts === 'function') {\r\n // Running in a web worker\r\n _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.globals.monaco = (0,_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_11__.createMonacoBaseAPI)();\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ID_EDITOR_WORKER_SERVICE\": () => (/* binding */ ID_EDITOR_WORKER_SERVICE),\n/* harmony export */ \"IEditorWorkerService\": () => (/* binding */ IEditorWorkerService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ID_EDITOR_WORKER_SERVICE = 'editorWorkerService';\r\nconst IEditorWorkerService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)(ID_EDITOR_WORKER_SERVICE);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorWorkerServiceImpl\": () => (/* binding */ EditorWorkerServiceImpl),\n/* harmony export */ \"EditorWorkerHost\": () => (/* binding */ EditorWorkerHost),\n/* harmony export */ \"EditorWorkerClient\": () => (/* binding */ EditorWorkerClient)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/worker/simpleWorker.js */ \"./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js\");\n/* harmony import */ var _base_worker_defaultWorkerFactory_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/worker/defaultWorkerFactory.js */ \"./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./editorSimpleWorker.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js\");\n/* harmony import */ var _modelService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./textResourceConfigurationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Stop syncing a model to the worker if it was not needed for 1 min.\r\n */\r\nconst STOP_SYNC_MODEL_DELTA_TIME_MS = 60 * 1000;\r\n/**\r\n * Stop the worker if it was not needed for 5 min.\r\n */\r\nconst STOP_WORKER_DELTA_TIME_MS = 5 * 60 * 1000;\r\nfunction canSyncModel(modelService, resource) {\r\n let model = modelService.getModel(resource);\r\n if (!model) {\r\n return false;\r\n }\r\n if (model.isTooLargeForSyncing()) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nlet EditorWorkerServiceImpl = class EditorWorkerServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(modelService, configurationService, logService) {\r\n super();\r\n this._modelService = modelService;\r\n this._workerManager = this._register(new WorkerManager(this._modelService));\r\n this._logService = logService;\r\n // register default link-provider and default completions-provider\r\n this._register(_modes_js__WEBPACK_IMPORTED_MODULE_5__.LinkProviderRegistry.register('*', {\r\n provideLinks: (model, token) => {\r\n if (!canSyncModel(this._modelService, model.uri)) {\r\n return Promise.resolve({ links: [] }); // File too large\r\n }\r\n return this._workerManager.withWorker().then(client => client.computeLinks(model.uri)).then(links => {\r\n return links && { links };\r\n });\r\n }\r\n }));\r\n this._register(_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.register('*', new WordBasedCompletionItemProvider(this._workerManager, configurationService, this._modelService)));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n canComputeDiff(original, modified) {\r\n return (canSyncModel(this._modelService, original) && canSyncModel(this._modelService, modified));\r\n }\r\n computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime) {\r\n return this._workerManager.withWorker().then(client => client.computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime));\r\n }\r\n computeMoreMinimalEdits(resource, edits) {\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__.isNonEmptyArray)(edits)) {\r\n if (!canSyncModel(this._modelService, resource)) {\r\n return Promise.resolve(edits); // File too large\r\n }\r\n const sw = _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__.StopWatch.create(true);\r\n const result = this._workerManager.withWorker().then(client => client.computeMoreMinimalEdits(resource, edits));\r\n result.finally(() => this._logService.trace('FORMAT#computeMoreMinimalEdits', resource.toString(true), sw.elapsed()));\r\n return Promise.race([result, (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.timeout)(1000).then(() => edits)]);\r\n }\r\n else {\r\n return Promise.resolve(undefined);\r\n }\r\n }\r\n canNavigateValueSet(resource) {\r\n return (canSyncModel(this._modelService, resource));\r\n }\r\n navigateValueSet(resource, range, up) {\r\n return this._workerManager.withWorker().then(client => client.navigateValueSet(resource, range, up));\r\n }\r\n canComputeWordRanges(resource) {\r\n return canSyncModel(this._modelService, resource);\r\n }\r\n computeWordRanges(resource, range) {\r\n return this._workerManager.withWorker().then(client => client.computeWordRanges(resource, range));\r\n }\r\n};\r\nEditorWorkerServiceImpl = __decorate([\r\n __param(0, _modelService_js__WEBPACK_IMPORTED_MODULE_8__.IModelService),\r\n __param(1, _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__.ITextResourceConfigurationService),\r\n __param(2, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_12__.ILogService)\r\n], EditorWorkerServiceImpl);\r\n\r\nclass WordBasedCompletionItemProvider {\r\n constructor(workerManager, configurationService, modelService) {\r\n this._debugDisplayName = 'wordbasedCompletions';\r\n this._workerManager = workerManager;\r\n this._configurationService = configurationService;\r\n this._modelService = modelService;\r\n }\r\n provideCompletionItems(model, position) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const config = this._configurationService.getValue(model.uri, position, 'editor');\r\n if (!config.wordBasedSuggestions) {\r\n return undefined;\r\n }\r\n const models = [];\r\n if (config.wordBasedSuggestionsMode === 'currentDocument') {\r\n // only current file and only if not too large\r\n if (canSyncModel(this._modelService, model.uri)) {\r\n models.push(model.uri);\r\n }\r\n }\r\n else {\r\n // either all files or files of same language\r\n for (const candidate of this._modelService.getModels()) {\r\n if (!canSyncModel(this._modelService, candidate.uri)) {\r\n continue;\r\n }\r\n if (candidate === model) {\r\n models.unshift(candidate.uri);\r\n }\r\n else if (config.wordBasedSuggestionsMode === 'allDocuments' || candidate.getLanguageIdentifier().id === model.getLanguageIdentifier().id) {\r\n models.push(candidate.uri);\r\n }\r\n }\r\n }\r\n if (models.length === 0) {\r\n return undefined; // File too large, no other files\r\n }\r\n const wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n const word = model.getWordAtPosition(position);\r\n const replace = !word ? _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.fromPositions(position) : new _core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\r\n const insert = replace.setEndPosition(position.lineNumber, position.column);\r\n const client = yield this._workerManager.withWorker();\r\n const data = yield client.textualSuggest(models, word === null || word === void 0 ? void 0 : word.word, wordDefRegExp);\r\n if (!data) {\r\n return undefined;\r\n }\r\n return {\r\n duration: data.duration,\r\n suggestions: data.words.map((word) => {\r\n return {\r\n kind: 18 /* Text */,\r\n label: word,\r\n insertText: word,\r\n range: { insert, replace }\r\n };\r\n }),\r\n };\r\n });\r\n }\r\n}\r\nclass WorkerManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(modelService) {\r\n super();\r\n this._modelService = modelService;\r\n this._editorWorkerClient = null;\r\n this._lastWorkerUsedTime = (new Date()).getTime();\r\n let stopWorkerInterval = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.IntervalTimer());\r\n stopWorkerInterval.cancelAndSet(() => this._checkStopIdleWorker(), Math.round(STOP_WORKER_DELTA_TIME_MS / 2));\r\n this._register(this._modelService.onModelRemoved(_ => this._checkStopEmptyWorker()));\r\n }\r\n dispose() {\r\n if (this._editorWorkerClient) {\r\n this._editorWorkerClient.dispose();\r\n this._editorWorkerClient = null;\r\n }\r\n super.dispose();\r\n }\r\n /**\r\n * Check if the model service has no more models and stop the worker if that is the case.\r\n */\r\n _checkStopEmptyWorker() {\r\n if (!this._editorWorkerClient) {\r\n return;\r\n }\r\n let models = this._modelService.getModels();\r\n if (models.length === 0) {\r\n // There are no more models => nothing possible for me to do\r\n this._editorWorkerClient.dispose();\r\n this._editorWorkerClient = null;\r\n }\r\n }\r\n /**\r\n * Check if the worker has been idle for a while and then stop it.\r\n */\r\n _checkStopIdleWorker() {\r\n if (!this._editorWorkerClient) {\r\n return;\r\n }\r\n let timeSinceLastWorkerUsedTime = (new Date()).getTime() - this._lastWorkerUsedTime;\r\n if (timeSinceLastWorkerUsedTime > STOP_WORKER_DELTA_TIME_MS) {\r\n this._editorWorkerClient.dispose();\r\n this._editorWorkerClient = null;\r\n }\r\n }\r\n withWorker() {\r\n this._lastWorkerUsedTime = (new Date()).getTime();\r\n if (!this._editorWorkerClient) {\r\n this._editorWorkerClient = new EditorWorkerClient(this._modelService, false, 'editorWorkerService');\r\n }\r\n return Promise.resolve(this._editorWorkerClient);\r\n }\r\n}\r\nclass EditorModelManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(proxy, modelService, keepIdleModels) {\r\n super();\r\n this._syncedModels = Object.create(null);\r\n this._syncedModelsLastUsedTime = Object.create(null);\r\n this._proxy = proxy;\r\n this._modelService = modelService;\r\n if (!keepIdleModels) {\r\n let timer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.IntervalTimer();\r\n timer.cancelAndSet(() => this._checkStopModelSync(), Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS / 2));\r\n this._register(timer);\r\n }\r\n }\r\n dispose() {\r\n for (let modelUrl in this._syncedModels) {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this._syncedModels[modelUrl]);\r\n }\r\n this._syncedModels = Object.create(null);\r\n this._syncedModelsLastUsedTime = Object.create(null);\r\n super.dispose();\r\n }\r\n ensureSyncedResources(resources) {\r\n for (const resource of resources) {\r\n let resourceStr = resource.toString();\r\n if (!this._syncedModels[resourceStr]) {\r\n this._beginModelSync(resource);\r\n }\r\n if (this._syncedModels[resourceStr]) {\r\n this._syncedModelsLastUsedTime[resourceStr] = (new Date()).getTime();\r\n }\r\n }\r\n }\r\n _checkStopModelSync() {\r\n let currentTime = (new Date()).getTime();\r\n let toRemove = [];\r\n for (let modelUrl in this._syncedModelsLastUsedTime) {\r\n let elapsedTime = currentTime - this._syncedModelsLastUsedTime[modelUrl];\r\n if (elapsedTime > STOP_SYNC_MODEL_DELTA_TIME_MS) {\r\n toRemove.push(modelUrl);\r\n }\r\n }\r\n for (const e of toRemove) {\r\n this._stopModelSync(e);\r\n }\r\n }\r\n _beginModelSync(resource) {\r\n let model = this._modelService.getModel(resource);\r\n if (!model) {\r\n return;\r\n }\r\n if (model.isTooLargeForSyncing()) {\r\n return;\r\n }\r\n let modelUrl = resource.toString();\r\n this._proxy.acceptNewModel({\r\n url: model.uri.toString(),\r\n lines: model.getLinesContent(),\r\n EOL: model.getEOL(),\r\n versionId: model.getVersionId()\r\n });\r\n const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n toDispose.add(model.onDidChangeContent((e) => {\r\n this._proxy.acceptModelChanged(modelUrl.toString(), e);\r\n }));\r\n toDispose.add(model.onWillDispose(() => {\r\n this._stopModelSync(modelUrl);\r\n }));\r\n toDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n this._proxy.acceptRemovedModel(modelUrl);\r\n }));\r\n this._syncedModels[modelUrl] = toDispose;\r\n }\r\n _stopModelSync(modelUrl) {\r\n let toDispose = this._syncedModels[modelUrl];\r\n delete this._syncedModels[modelUrl];\r\n delete this._syncedModelsLastUsedTime[modelUrl];\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(toDispose);\r\n }\r\n}\r\nclass SynchronousWorkerClient {\r\n constructor(instance) {\r\n this._instance = instance;\r\n this._proxyObj = Promise.resolve(this._instance);\r\n }\r\n dispose() {\r\n this._instance.dispose();\r\n }\r\n getProxyObject() {\r\n return this._proxyObj;\r\n }\r\n}\r\nclass EditorWorkerHost {\r\n constructor(workerClient) {\r\n this._workerClient = workerClient;\r\n }\r\n // foreign host request\r\n fhr(method, args) {\r\n return this._workerClient.fhr(method, args);\r\n }\r\n}\r\nclass EditorWorkerClient extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(modelService, keepIdleModels, label) {\r\n super();\r\n this._disposed = false;\r\n this._modelService = modelService;\r\n this._keepIdleModels = keepIdleModels;\r\n this._workerFactory = new _base_worker_defaultWorkerFactory_js__WEBPACK_IMPORTED_MODULE_3__.DefaultWorkerFactory(label);\r\n this._worker = null;\r\n this._modelManager = null;\r\n }\r\n // foreign host request\r\n fhr(method, args) {\r\n throw new Error(`Not implemented!`);\r\n }\r\n _getOrCreateWorker() {\r\n if (!this._worker) {\r\n try {\r\n this._worker = this._register(new _base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__.SimpleWorkerClient(this._workerFactory, 'vs/editor/common/services/editorSimpleWorker', new EditorWorkerHost(this)));\r\n }\r\n catch (err) {\r\n (0,_base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__.logOnceWebWorkerWarning)(err);\r\n this._worker = new SynchronousWorkerClient(new _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__.EditorSimpleWorker(new EditorWorkerHost(this), null));\r\n }\r\n }\r\n return this._worker;\r\n }\r\n _getProxy() {\r\n return this._getOrCreateWorker().getProxyObject().then(undefined, (err) => {\r\n (0,_base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__.logOnceWebWorkerWarning)(err);\r\n this._worker = new SynchronousWorkerClient(new _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__.EditorSimpleWorker(new EditorWorkerHost(this), null));\r\n return this._getOrCreateWorker().getProxyObject();\r\n });\r\n }\r\n _getOrCreateModelManager(proxy) {\r\n if (!this._modelManager) {\r\n this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, this._keepIdleModels));\r\n }\r\n return this._modelManager;\r\n }\r\n _withSyncedResources(resources) {\r\n if (this._disposed) {\r\n return Promise.reject((0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__.canceled)());\r\n }\r\n return this._getProxy().then((proxy) => {\r\n this._getOrCreateModelManager(proxy).ensureSyncedResources(resources);\r\n return proxy;\r\n });\r\n }\r\n computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime) {\r\n return this._withSyncedResources([original, modified]).then(proxy => {\r\n return proxy.computeDiff(original.toString(), modified.toString(), ignoreTrimWhitespace, maxComputationTime);\r\n });\r\n }\r\n computeMoreMinimalEdits(resource, edits) {\r\n return this._withSyncedResources([resource]).then(proxy => {\r\n return proxy.computeMoreMinimalEdits(resource.toString(), edits);\r\n });\r\n }\r\n computeLinks(resource) {\r\n return this._withSyncedResources([resource]).then(proxy => {\r\n return proxy.computeLinks(resource.toString());\r\n });\r\n }\r\n textualSuggest(resources, leadingWord, wordDefRegExp) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const proxy = yield this._withSyncedResources(resources);\r\n const wordDef = wordDefRegExp.source;\r\n const wordDefFlags = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__.regExpFlags)(wordDefRegExp);\r\n return proxy.textualSuggest(resources.map(r => r.toString()), leadingWord, wordDef, wordDefFlags);\r\n });\r\n }\r\n computeWordRanges(resource, range) {\r\n return this._withSyncedResources([resource]).then(proxy => {\r\n let model = this._modelService.getModel(resource);\r\n if (!model) {\r\n return Promise.resolve(null);\r\n }\r\n let wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n let wordDef = wordDefRegExp.source;\r\n let wordDefFlags = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__.regExpFlags)(wordDefRegExp);\r\n return proxy.computeWordRanges(resource.toString(), range, wordDef, wordDefFlags);\r\n });\r\n }\r\n navigateValueSet(resource, range, up) {\r\n return this._withSyncedResources([resource]).then(proxy => {\r\n let model = this._modelService.getModel(resource);\r\n if (!model) {\r\n return null;\r\n }\r\n let wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__.LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n let wordDef = wordDefRegExp.source;\r\n let wordDefFlags = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__.regExpFlags)(wordDefRegExp);\r\n return proxy.navigateValueSet(resource.toString(), range, up, wordDef, wordDefFlags);\r\n });\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._disposed = true;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getIconClasses\": () => (/* binding */ getIconClasses),\n/* harmony export */ \"detectModeId\": () => (/* binding */ detectModeId),\n/* harmony export */ \"cssEscape\": () => (/* binding */ cssEscape)\n/* harmony export */ });\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes/modesRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js\");\n/* harmony import */ var _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/files/common/files.js */ \"./node_modules/monaco-editor/esm/vs/platform/files/common/files.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nfunction getIconClasses(modelService, modeService, resource, fileKind) {\r\n // we always set these base classes even if we do not have a path\r\n const classes = fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__.FileKind.ROOT_FOLDER ? ['rootfolder-icon'] : fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__.FileKind.FOLDER ? ['folder-icon'] : ['file-icon'];\r\n if (resource) {\r\n // Get the path and name of the resource. For data-URIs, we need to parse specially\r\n let name;\r\n if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__.Schemas.data) {\r\n const metadata = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__.DataUri.parseMetaData(resource);\r\n name = metadata.get(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__.DataUri.META_DATA_LABEL);\r\n }\r\n else {\r\n name = cssEscape((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__.basenameOrAuthority)(resource).toLowerCase());\r\n }\r\n // Folders\r\n if (fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__.FileKind.FOLDER) {\r\n classes.push(`${name}-name-folder-icon`);\r\n }\r\n // Files\r\n else {\r\n // Name & Extension(s)\r\n if (name) {\r\n classes.push(`${name}-name-file-icon`);\r\n // Avoid doing an explosive combination of extensions for very long filenames\r\n // (most file systems do not allow files > 255 length) with lots of `.` characters\r\n // https://github.com/microsoft/vscode/issues/116199\r\n if (name.length <= 255) {\r\n const dotSegments = name.split('.');\r\n for (let i = 1; i < dotSegments.length; i++) {\r\n classes.push(`${dotSegments.slice(i).join('.')}-ext-file-icon`); // add each combination of all found extensions if more than one\r\n }\r\n }\r\n classes.push(`ext-file-icon`); // extra segment to increase file-ext score\r\n }\r\n // Detected Mode\r\n const detectedModeId = detectModeId(modelService, modeService, resource);\r\n if (detectedModeId) {\r\n classes.push(`${cssEscape(detectedModeId)}-lang-file-icon`);\r\n }\r\n }\r\n }\r\n return classes;\r\n}\r\nfunction detectModeId(modelService, modeService, resource) {\r\n if (!resource) {\r\n return null; // we need a resource at least\r\n }\r\n let modeId = null;\r\n // Data URI: check for encoded metadata\r\n if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__.Schemas.data) {\r\n const metadata = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__.DataUri.parseMetaData(resource);\r\n const mime = metadata.get(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__.DataUri.META_DATA_MIME);\r\n if (mime) {\r\n modeId = modeService.getModeId(mime);\r\n }\r\n }\r\n // Any other URI: check for model if existing\r\n else {\r\n const model = modelService.getModel(resource);\r\n if (model) {\r\n modeId = model.getModeId();\r\n }\r\n }\r\n // only take if the mode is specific (aka no just plain text)\r\n if (modeId && modeId !== _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_2__.PLAINTEXT_MODE_ID) {\r\n return modeId;\r\n }\r\n // otherwise fallback to path based detection\r\n return modeService.getModeIdByFilepathOrFirstLine(resource);\r\n}\r\nfunction cssEscape(str) {\r\n return str.replace(/[\\11\\12\\14\\15\\40]/g, '/'); // HTML class names can not contain certain whitespace characters, use / instead, which doesn't exist in file names.\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/getSemanticTokens.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/getSemanticTokens.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isSemanticTokens\": () => (/* binding */ isSemanticTokens),\n/* harmony export */ \"isSemanticTokensEdits\": () => (/* binding */ isSemanticTokensEdits),\n/* harmony export */ \"getDocumentSemanticTokens\": () => (/* binding */ getDocumentSemanticTokens),\n/* harmony export */ \"getDocumentRangeSemanticTokensProvider\": () => (/* binding */ getDocumentRangeSemanticTokensProvider)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modelService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _semanticTokensDto_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./semanticTokensDto.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction isSemanticTokens(v) {\r\n return v && !!(v.data);\r\n}\r\nfunction isSemanticTokensEdits(v) {\r\n return v && Array.isArray(v.edits);\r\n}\r\nfunction getDocumentSemanticTokens(model, lastResultId, token) {\r\n const provider = _getDocumentSemanticTokensProvider(model);\r\n if (!provider) {\r\n return null;\r\n }\r\n return {\r\n provider: provider,\r\n request: Promise.resolve(provider.provideDocumentSemanticTokens(model, lastResultId, token))\r\n };\r\n}\r\nfunction _getDocumentSemanticTokensProvider(model) {\r\n const result = _modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentSemanticTokensProviderRegistry.ordered(model);\r\n return (result.length > 0 ? result[0] : null);\r\n}\r\nfunction getDocumentRangeSemanticTokensProvider(model) {\r\n const result = _modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentRangeSemanticTokensProviderRegistry.ordered(model);\r\n return (result.length > 0 ? result[0] : null);\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_provideDocumentSemanticTokensLegend', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI);\r\n const model = accessor.get(_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = _getDocumentSemanticTokensProvider(model);\r\n if (!provider) {\r\n // there is no provider => fall back to a document range semantic tokens provider\r\n return accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.ICommandService).executeCommand('_provideDocumentRangeSemanticTokensLegend', uri);\r\n }\r\n return provider.getLegend();\r\n}));\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_provideDocumentSemanticTokens', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI);\r\n const model = accessor.get(_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const r = getDocumentSemanticTokens(model, null, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None);\r\n if (!r) {\r\n // there is no provider => fall back to a document range semantic tokens provider\r\n return accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.ICommandService).executeCommand('_provideDocumentRangeSemanticTokens', uri, model.getFullModelRange());\r\n }\r\n const { provider, request } = r;\r\n let result;\r\n try {\r\n result = yield request;\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError)(err);\r\n return undefined;\r\n }\r\n if (!result || !isSemanticTokens(result)) {\r\n return undefined;\r\n }\r\n const buff = (0,_semanticTokensDto_js__WEBPACK_IMPORTED_MODULE_7__.encodeSemanticTokensDto)({\r\n id: 0,\r\n type: 'full',\r\n data: result.data\r\n });\r\n if (result.resultId) {\r\n provider.releaseDocumentSemanticTokens(result.resultId);\r\n }\r\n return buff;\r\n}));\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_provideDocumentRangeSemanticTokensLegend', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI);\r\n const model = accessor.get(_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = getDocumentRangeSemanticTokensProvider(model);\r\n if (!provider) {\r\n return undefined;\r\n }\r\n return provider.getLegend();\r\n}));\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_provideDocumentRangeSemanticTokens', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, range] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI);\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.isIRange(range));\r\n const model = accessor.get(_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = getDocumentRangeSemanticTokensProvider(model);\r\n if (!provider) {\r\n // there is no provider\r\n return undefined;\r\n }\r\n let result;\r\n try {\r\n result = yield provider.provideDocumentRangeSemanticTokens(model, _core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(range), _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None);\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError)(err);\r\n return undefined;\r\n }\r\n if (!result || !isSemanticTokens(result)) {\r\n return undefined;\r\n }\r\n return (0,_semanticTokensDto_js__WEBPACK_IMPORTED_MODULE_7__.encodeSemanticTokensDto)({\r\n id: 0,\r\n type: 'full',\r\n data: result.data\r\n });\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/getSemanticTokens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LanguagesRegistry\": () => (/* binding */ LanguagesRegistry)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/mime.js */ \"./node_modules/monaco-editor/esm/vs/base/common/mime.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/modesRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js\");\n/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nclass LanguagesRegistry extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(useModesRegistry = true, warnOnOverwrite = false) {\r\n super();\r\n this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._warnOnOverwrite = warnOnOverwrite;\r\n this._nextLanguageId2 = 1;\r\n this._languageIdToLanguage = [];\r\n this._languageToLanguageId = Object.create(null);\r\n this._languages = {};\r\n this._mimeTypesMap = {};\r\n this._nameMap = {};\r\n this._lowercaseNameMap = {};\r\n if (useModesRegistry) {\r\n this._initializeFromRegistry();\r\n this._register(_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__.ModesRegistry.onDidChangeLanguages((m) => this._initializeFromRegistry()));\r\n }\r\n }\r\n _initializeFromRegistry() {\r\n this._languages = {};\r\n this._mimeTypesMap = {};\r\n this._nameMap = {};\r\n this._lowercaseNameMap = {};\r\n const desc = _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__.ModesRegistry.getLanguages();\r\n this._registerLanguages(desc);\r\n }\r\n _registerLanguages(desc) {\r\n for (const d of desc) {\r\n this._registerLanguage(d);\r\n }\r\n // Rebuild fast path maps\r\n this._mimeTypesMap = {};\r\n this._nameMap = {};\r\n this._lowercaseNameMap = {};\r\n Object.keys(this._languages).forEach((langId) => {\r\n let language = this._languages[langId];\r\n if (language.name) {\r\n this._nameMap[language.name] = language.identifier;\r\n }\r\n language.aliases.forEach((alias) => {\r\n this._lowercaseNameMap[alias.toLowerCase()] = language.identifier;\r\n });\r\n language.mimetypes.forEach((mimetype) => {\r\n this._mimeTypesMap[mimetype] = language.identifier;\r\n });\r\n });\r\n _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__.Registry.as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__.Extensions.Configuration).registerOverrideIdentifiers(_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__.ModesRegistry.getLanguages().map(language => language.id));\r\n this._onDidChange.fire();\r\n }\r\n _getLanguageId(language) {\r\n if (this._languageToLanguageId[language]) {\r\n return this._languageToLanguageId[language];\r\n }\r\n const languageId = this._nextLanguageId2++;\r\n this._languageIdToLanguage[languageId] = language;\r\n this._languageToLanguageId[language] = languageId;\r\n return languageId;\r\n }\r\n _registerLanguage(lang) {\r\n const langId = lang.id;\r\n let resolvedLanguage;\r\n if (hasOwnProperty.call(this._languages, langId)) {\r\n resolvedLanguage = this._languages[langId];\r\n }\r\n else {\r\n const languageId = this._getLanguageId(langId);\r\n resolvedLanguage = {\r\n identifier: new _modes_js__WEBPACK_IMPORTED_MODULE_5__.LanguageIdentifier(langId, languageId),\r\n name: null,\r\n mimetypes: [],\r\n aliases: [],\r\n extensions: [],\r\n filenames: [],\r\n configurationFiles: []\r\n };\r\n this._languages[langId] = resolvedLanguage;\r\n }\r\n this._mergeLanguage(resolvedLanguage, lang);\r\n }\r\n _mergeLanguage(resolvedLanguage, lang) {\r\n const langId = lang.id;\r\n let primaryMime = null;\r\n if (Array.isArray(lang.mimetypes) && lang.mimetypes.length > 0) {\r\n resolvedLanguage.mimetypes.push(...lang.mimetypes);\r\n primaryMime = lang.mimetypes[0];\r\n }\r\n if (!primaryMime) {\r\n primaryMime = `text/x-${langId}`;\r\n resolvedLanguage.mimetypes.push(primaryMime);\r\n }\r\n if (Array.isArray(lang.extensions)) {\r\n if (lang.configuration) {\r\n // insert first as this appears to be the 'primary' language definition\r\n resolvedLanguage.extensions = lang.extensions.concat(resolvedLanguage.extensions);\r\n }\r\n else {\r\n resolvedLanguage.extensions = resolvedLanguage.extensions.concat(lang.extensions);\r\n }\r\n for (let extension of lang.extensions) {\r\n _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__.registerTextMime({ id: langId, mime: primaryMime, extension: extension }, this._warnOnOverwrite);\r\n }\r\n }\r\n if (Array.isArray(lang.filenames)) {\r\n for (let filename of lang.filenames) {\r\n _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__.registerTextMime({ id: langId, mime: primaryMime, filename: filename }, this._warnOnOverwrite);\r\n resolvedLanguage.filenames.push(filename);\r\n }\r\n }\r\n if (Array.isArray(lang.filenamePatterns)) {\r\n for (let filenamePattern of lang.filenamePatterns) {\r\n _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__.registerTextMime({ id: langId, mime: primaryMime, filepattern: filenamePattern }, this._warnOnOverwrite);\r\n }\r\n }\r\n if (typeof lang.firstLine === 'string' && lang.firstLine.length > 0) {\r\n let firstLineRegexStr = lang.firstLine;\r\n if (firstLineRegexStr.charAt(0) !== '^') {\r\n firstLineRegexStr = '^' + firstLineRegexStr;\r\n }\r\n try {\r\n let firstLineRegex = new RegExp(firstLineRegexStr);\r\n if (!_base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__.regExpLeadsToEndlessLoop(firstLineRegex)) {\r\n _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__.registerTextMime({ id: langId, mime: primaryMime, firstline: firstLineRegex }, this._warnOnOverwrite);\r\n }\r\n }\r\n catch (err) {\r\n // Most likely, the regex was bad\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(err);\r\n }\r\n }\r\n resolvedLanguage.aliases.push(langId);\r\n let langAliases = null;\r\n if (typeof lang.aliases !== 'undefined' && Array.isArray(lang.aliases)) {\r\n if (lang.aliases.length === 0) {\r\n // signal that this language should not get a name\r\n langAliases = [null];\r\n }\r\n else {\r\n langAliases = lang.aliases;\r\n }\r\n }\r\n if (langAliases !== null) {\r\n for (const langAlias of langAliases) {\r\n if (!langAlias || langAlias.length === 0) {\r\n continue;\r\n }\r\n resolvedLanguage.aliases.push(langAlias);\r\n }\r\n }\r\n let containsAliases = (langAliases !== null && langAliases.length > 0);\r\n if (containsAliases && langAliases[0] === null) {\r\n // signal that this language should not get a name\r\n }\r\n else {\r\n let bestName = (containsAliases ? langAliases[0] : null) || langId;\r\n if (containsAliases || !resolvedLanguage.name) {\r\n resolvedLanguage.name = bestName;\r\n }\r\n }\r\n if (lang.configuration) {\r\n resolvedLanguage.configurationFiles.push(lang.configuration);\r\n }\r\n }\r\n isRegisteredMode(mimetypeOrModeId) {\r\n // Is this a known mime type ?\r\n if (hasOwnProperty.call(this._mimeTypesMap, mimetypeOrModeId)) {\r\n return true;\r\n }\r\n // Is this a known mode id ?\r\n return hasOwnProperty.call(this._languages, mimetypeOrModeId);\r\n }\r\n getModeIdForLanguageNameLowercase(languageNameLower) {\r\n if (!hasOwnProperty.call(this._lowercaseNameMap, languageNameLower)) {\r\n return null;\r\n }\r\n return this._lowercaseNameMap[languageNameLower].language;\r\n }\r\n extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds) {\r\n if (!commaSeparatedMimetypesOrCommaSeparatedIds) {\r\n return [];\r\n }\r\n return (commaSeparatedMimetypesOrCommaSeparatedIds.\r\n split(',').\r\n map((mimeTypeOrId) => mimeTypeOrId.trim()).\r\n map((mimeTypeOrId) => {\r\n if (hasOwnProperty.call(this._mimeTypesMap, mimeTypeOrId)) {\r\n return this._mimeTypesMap[mimeTypeOrId].language;\r\n }\r\n return mimeTypeOrId;\r\n }).\r\n filter((modeId) => {\r\n return hasOwnProperty.call(this._languages, modeId);\r\n }));\r\n }\r\n getLanguageIdentifier(_modeId) {\r\n if (_modeId === _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__.NULL_MODE_ID || _modeId === 0 /* Null */) {\r\n return _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__.NULL_LANGUAGE_IDENTIFIER;\r\n }\r\n let modeId;\r\n if (typeof _modeId === 'string') {\r\n modeId = _modeId;\r\n }\r\n else {\r\n modeId = this._languageIdToLanguage[_modeId];\r\n if (!modeId) {\r\n return null;\r\n }\r\n }\r\n if (!hasOwnProperty.call(this._languages, modeId)) {\r\n return null;\r\n }\r\n return this._languages[modeId].identifier;\r\n }\r\n getModeIdsFromFilepathOrFirstLine(resource, firstLine) {\r\n if (!resource && !firstLine) {\r\n return [];\r\n }\r\n let mimeTypes = _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__.guessMimeTypes(resource, firstLine);\r\n return this.extractModeIds(mimeTypes.join(','));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerDecorationsService\": () => (/* binding */ MarkerDecorationsService)\n/* harmony export */ });\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction MODEL_ID(resource) {\r\n return resource.toString();\r\n}\r\nclass MarkerDecorations extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(model) {\r\n super();\r\n this.model = model;\r\n this._markersData = new Map();\r\n this._register((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n this.model.deltaDecorations([...this._markersData.keys()], []);\r\n this._markersData.clear();\r\n }));\r\n }\r\n update(markers, newDecorations) {\r\n const oldIds = [...this._markersData.keys()];\r\n this._markersData.clear();\r\n const ids = this.model.deltaDecorations(oldIds, newDecorations);\r\n for (let index = 0; index < ids.length; index++) {\r\n this._markersData.set(ids[index], markers[index]);\r\n }\r\n return oldIds.length !== 0 || ids.length !== 0;\r\n }\r\n getMarker(decoration) {\r\n return this._markersData.get(decoration.id);\r\n }\r\n}\r\nlet MarkerDecorationsService = class MarkerDecorationsService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(modelService, _markerService) {\r\n super();\r\n this._markerService = _markerService;\r\n this._onDidChangeMarker = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter());\r\n this._markerDecorations = new Map();\r\n modelService.getModels().forEach(model => this._onModelAdded(model));\r\n this._register(modelService.onModelAdded(this._onModelAdded, this));\r\n this._register(modelService.onModelRemoved(this._onModelRemoved, this));\r\n this._register(this._markerService.onMarkerChanged(this._handleMarkerChange, this));\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._markerDecorations.forEach(value => value.dispose());\r\n this._markerDecorations.clear();\r\n }\r\n getMarker(uri, decoration) {\r\n const markerDecorations = this._markerDecorations.get(MODEL_ID(uri));\r\n return markerDecorations ? (markerDecorations.getMarker(decoration) || null) : null;\r\n }\r\n _handleMarkerChange(changedResources) {\r\n changedResources.forEach((resource) => {\r\n const markerDecorations = this._markerDecorations.get(MODEL_ID(resource));\r\n if (markerDecorations) {\r\n this._updateDecorations(markerDecorations);\r\n }\r\n });\r\n }\r\n _onModelAdded(model) {\r\n const markerDecorations = new MarkerDecorations(model);\r\n this._markerDecorations.set(MODEL_ID(model.uri), markerDecorations);\r\n this._updateDecorations(markerDecorations);\r\n }\r\n _onModelRemoved(model) {\r\n const markerDecorations = this._markerDecorations.get(MODEL_ID(model.uri));\r\n if (markerDecorations) {\r\n markerDecorations.dispose();\r\n this._markerDecorations.delete(MODEL_ID(model.uri));\r\n }\r\n // clean up markers for internal, transient models\r\n if (model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__.Schemas.inMemory\r\n || model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__.Schemas.internal\r\n || model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__.Schemas.vscode) {\r\n if (this._markerService) {\r\n this._markerService.read({ resource: model.uri }).map(marker => marker.owner).forEach(owner => this._markerService.remove(owner, [model.uri]));\r\n }\r\n }\r\n }\r\n _updateDecorations(markerDecorations) {\r\n // Limit to the first 500 errors/warnings\r\n const markers = this._markerService.read({ resource: markerDecorations.model.uri, take: 500 });\r\n let newModelDecorations = markers.map((marker) => {\r\n return {\r\n range: this._createDecorationRange(markerDecorations.model, marker),\r\n options: this._createDecorationOption(marker)\r\n };\r\n });\r\n if (markerDecorations.update(markers, newModelDecorations)) {\r\n this._onDidChangeMarker.fire(markerDecorations.model);\r\n }\r\n }\r\n _createDecorationRange(model, rawMarker) {\r\n let ret = _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.lift(rawMarker);\r\n if (rawMarker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Hint && !this._hasMarkerTag(rawMarker, 1 /* Unnecessary */) && !this._hasMarkerTag(rawMarker, 2 /* Deprecated */)) {\r\n // * never render hints on multiple lines\r\n // * make enough space for three dots\r\n ret = ret.setEndPosition(ret.startLineNumber, ret.startColumn + 2);\r\n }\r\n ret = model.validateRange(ret);\r\n if (ret.isEmpty()) {\r\n let word = model.getWordAtPosition(ret.getStartPosition());\r\n if (word) {\r\n ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(ret.startLineNumber, word.startColumn, ret.endLineNumber, word.endColumn);\r\n }\r\n else {\r\n let maxColumn = model.getLineLastNonWhitespaceColumn(ret.startLineNumber) ||\r\n model.getLineMaxColumn(ret.startLineNumber);\r\n if (maxColumn === 1) {\r\n // empty line\r\n // console.warn('marker on empty line:', marker);\r\n }\r\n else if (ret.endColumn >= maxColumn) {\r\n // behind eol\r\n ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(ret.startLineNumber, maxColumn - 1, ret.endLineNumber, maxColumn);\r\n }\r\n else {\r\n // extend marker to width = 1\r\n ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(ret.startLineNumber, ret.startColumn, ret.endLineNumber, ret.endColumn + 1);\r\n }\r\n }\r\n }\r\n else if (rawMarker.endColumn === Number.MAX_VALUE && rawMarker.startColumn === 1 && ret.startLineNumber === ret.endLineNumber) {\r\n let minColumn = model.getLineFirstNonWhitespaceColumn(rawMarker.startLineNumber);\r\n if (minColumn < ret.endColumn) {\r\n ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(ret.startLineNumber, minColumn, ret.endLineNumber, ret.endColumn);\r\n rawMarker.startColumn = minColumn;\r\n }\r\n }\r\n return ret;\r\n }\r\n _createDecorationOption(marker) {\r\n let className;\r\n let color = undefined;\r\n let zIndex;\r\n let inlineClassName = undefined;\r\n let minimap;\r\n switch (marker.severity) {\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Hint:\r\n if (this._hasMarkerTag(marker, 2 /* Deprecated */)) {\r\n className = undefined;\r\n }\r\n else if (this._hasMarkerTag(marker, 1 /* Unnecessary */)) {\r\n className = \"squiggly-unnecessary\" /* EditorUnnecessaryDecoration */;\r\n }\r\n else {\r\n className = \"squiggly-hint\" /* EditorHintDecoration */;\r\n }\r\n zIndex = 0;\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Warning:\r\n className = \"squiggly-warning\" /* EditorWarningDecoration */;\r\n color = (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.themeColorFromId)(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.overviewRulerWarning);\r\n zIndex = 20;\r\n minimap = {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.minimapWarning),\r\n position: _model_js__WEBPACK_IMPORTED_MODULE_2__.MinimapPosition.Inline\r\n };\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info:\r\n className = \"squiggly-info\" /* EditorInfoDecoration */;\r\n color = (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.themeColorFromId)(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.overviewRulerInfo);\r\n zIndex = 10;\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Error:\r\n default:\r\n className = \"squiggly-error\" /* EditorErrorDecoration */;\r\n color = (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.themeColorFromId)(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.overviewRulerError);\r\n zIndex = 30;\r\n minimap = {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.minimapError),\r\n position: _model_js__WEBPACK_IMPORTED_MODULE_2__.MinimapPosition.Inline\r\n };\r\n break;\r\n }\r\n if (marker.tags) {\r\n if (marker.tags.indexOf(1 /* Unnecessary */) !== -1) {\r\n inlineClassName = \"squiggly-inline-unnecessary\" /* EditorUnnecessaryInlineDecoration */;\r\n }\r\n if (marker.tags.indexOf(2 /* Deprecated */) !== -1) {\r\n inlineClassName = \"squiggly-inline-deprecated\" /* EditorDeprecatedInlineDecoration */;\r\n }\r\n }\r\n return {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className,\r\n showIfCollapsed: true,\r\n overviewRuler: {\r\n color,\r\n position: _model_js__WEBPACK_IMPORTED_MODULE_2__.OverviewRulerLane.Right\r\n },\r\n minimap,\r\n zIndex,\r\n inlineClassName,\r\n };\r\n }\r\n _hasMarkerTag(marker, tag) {\r\n if (marker.tags) {\r\n return marker.tags.indexOf(tag) >= 0;\r\n }\r\n return false;\r\n }\r\n};\r\nMarkerDecorationsService = __decorate([\r\n __param(0, _modelService_js__WEBPACK_IMPORTED_MODULE_5__.IModelService),\r\n __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.IMarkerService)\r\n], MarkerDecorationsService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IMarkerDecorationsService\": () => (/* binding */ IMarkerDecorationsService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IMarkerDecorationsService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('markerDecorationsService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IModeService\": () => (/* binding */ IModeService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IModeService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('modeService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModeServiceImpl\": () => (/* binding */ ModeServiceImpl)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _modes_abstractMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes/abstractMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js\");\n/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _languagesRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./languagesRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass LanguageSelection extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(onLanguagesMaybeChanged, selector) {\r\n super();\r\n this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._selector = selector;\r\n this.languageIdentifier = this._selector();\r\n this._register(onLanguagesMaybeChanged(() => this._evaluate()));\r\n }\r\n _evaluate() {\r\n let languageIdentifier = this._selector();\r\n if (languageIdentifier.id === this.languageIdentifier.id) {\r\n // no change\r\n return;\r\n }\r\n this.languageIdentifier = languageIdentifier;\r\n this._onDidChange.fire(this.languageIdentifier);\r\n }\r\n}\r\nclass ModeServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(warnOnOverwrite = false) {\r\n super();\r\n this._onDidCreateMode = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onDidCreateMode = this._onDidCreateMode.event;\r\n this._onLanguagesMaybeChanged = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onLanguagesMaybeChanged = this._onLanguagesMaybeChanged.event;\r\n this._instantiatedModes = {};\r\n this._registry = this._register(new _languagesRegistry_js__WEBPACK_IMPORTED_MODULE_4__.LanguagesRegistry(true, warnOnOverwrite));\r\n this._register(this._registry.onDidChange(() => this._onLanguagesMaybeChanged.fire()));\r\n }\r\n isRegisteredMode(mimetypeOrModeId) {\r\n return this._registry.isRegisteredMode(mimetypeOrModeId);\r\n }\r\n getModeIdForLanguageName(alias) {\r\n return this._registry.getModeIdForLanguageNameLowercase(alias);\r\n }\r\n getModeIdByFilepathOrFirstLine(resource, firstLine) {\r\n const modeIds = this._registry.getModeIdsFromFilepathOrFirstLine(resource, firstLine);\r\n return (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.firstOrDefault)(modeIds, null);\r\n }\r\n getModeId(commaSeparatedMimetypesOrCommaSeparatedIds) {\r\n const modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds);\r\n return (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__.firstOrDefault)(modeIds, null);\r\n }\r\n getLanguageIdentifier(modeId) {\r\n return this._registry.getLanguageIdentifier(modeId);\r\n }\r\n // --- instantiation\r\n create(commaSeparatedMimetypesOrCommaSeparatedIds) {\r\n return new LanguageSelection(this.onLanguagesMaybeChanged, () => {\r\n const modeId = this.getModeId(commaSeparatedMimetypesOrCommaSeparatedIds);\r\n return this._createModeAndGetLanguageIdentifier(modeId);\r\n });\r\n }\r\n createByFilepathOrFirstLine(resource, firstLine) {\r\n return new LanguageSelection(this.onLanguagesMaybeChanged, () => {\r\n const modeId = this.getModeIdByFilepathOrFirstLine(resource, firstLine);\r\n return this._createModeAndGetLanguageIdentifier(modeId);\r\n });\r\n }\r\n _createModeAndGetLanguageIdentifier(modeId) {\r\n // Fall back to plain text if no mode was found\r\n const languageIdentifier = this.getLanguageIdentifier(modeId || 'plaintext') || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__.NULL_LANGUAGE_IDENTIFIER;\r\n this._getOrCreateMode(languageIdentifier.language);\r\n return languageIdentifier;\r\n }\r\n triggerMode(commaSeparatedMimetypesOrCommaSeparatedIds) {\r\n const modeId = this.getModeId(commaSeparatedMimetypesOrCommaSeparatedIds);\r\n // Fall back to plain text if no mode was found\r\n this._getOrCreateMode(modeId || 'plaintext');\r\n }\r\n _getOrCreateMode(modeId) {\r\n if (!this._instantiatedModes.hasOwnProperty(modeId)) {\r\n let languageIdentifier = this.getLanguageIdentifier(modeId) || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__.NULL_LANGUAGE_IDENTIFIER;\r\n this._instantiatedModes[modeId] = new _modes_abstractMode_js__WEBPACK_IMPORTED_MODULE_2__.FrankensteinMode(languageIdentifier);\r\n this._onDidCreateMode.fire(this._instantiatedModes[modeId]);\r\n }\r\n return this._instantiatedModes[modeId];\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IModelService\": () => (/* binding */ IModelService),\n/* harmony export */ \"shouldSynchronizeModel\": () => (/* binding */ shouldSynchronizeModel)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IModelService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('modelService');\r\nfunction shouldSynchronizeModel(model) {\r\n return (!model.isTooLargeForSyncing() && !model.isForSimpleWidget);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModelServiceImpl\": () => (/* binding */ ModelServiceImpl),\n/* harmony export */ \"SEMANTIC_HIGHLIGHTING_SETTING_ID\": () => (/* binding */ SEMANTIC_HIGHLIGHTING_SETTING_ID),\n/* harmony export */ \"isSemanticColoringEnabled\": () => (/* binding */ isSemanticColoringEnabled),\n/* harmony export */ \"ModelSemanticColoring\": () => (/* binding */ ModelSemanticColoring)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/modesRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js\");\n/* harmony import */ var _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./textResourceConfigurationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedo.js */ \"./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js\");\n/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/* harmony import */ var _model_editStack_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../model/editStack.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./semanticTokensProviderStyling.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js\");\n/* harmony import */ var _getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./getSemanticTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/getSemanticTokens.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction MODEL_ID(resource) {\r\n return resource.toString();\r\n}\r\nfunction computeModelSha1(model) {\r\n // compute the sha1\r\n const shaComputer = new _base_common_hash_js__WEBPACK_IMPORTED_MODULE_15__.StringSHA1();\r\n const snapshot = model.createSnapshot();\r\n let text;\r\n while ((text = snapshot.read())) {\r\n shaComputer.update(text);\r\n }\r\n return shaComputer.digest();\r\n}\r\nclass ModelData {\r\n constructor(model, onWillDispose, onDidChangeLanguage) {\r\n this._modelEventListeners = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.model = model;\r\n this._languageSelection = null;\r\n this._languageSelectionListener = null;\r\n this._modelEventListeners.add(model.onWillDispose(() => onWillDispose(model)));\r\n this._modelEventListeners.add(model.onDidChangeLanguage((e) => onDidChangeLanguage(model, e)));\r\n }\r\n _disposeLanguageSelection() {\r\n if (this._languageSelectionListener) {\r\n this._languageSelectionListener.dispose();\r\n this._languageSelectionListener = null;\r\n }\r\n if (this._languageSelection) {\r\n this._languageSelection.dispose();\r\n this._languageSelection = null;\r\n }\r\n }\r\n dispose() {\r\n this._modelEventListeners.dispose();\r\n this._disposeLanguageSelection();\r\n }\r\n setLanguage(languageSelection) {\r\n this._disposeLanguageSelection();\r\n this._languageSelection = languageSelection;\r\n this._languageSelectionListener = this._languageSelection.onDidChange(() => this.model.setMode(languageSelection.languageIdentifier));\r\n this.model.setMode(languageSelection.languageIdentifier);\r\n }\r\n}\r\nconst DEFAULT_EOL = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isLinux || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) ? 1 /* LF */ : 2 /* CRLF */;\r\nclass DisposedModelInfo {\r\n constructor(uri, initialUndoRedoSnapshot, time, sharesUndoRedoStack, heapSize, sha1, versionId, alternativeVersionId) {\r\n this.uri = uri;\r\n this.initialUndoRedoSnapshot = initialUndoRedoSnapshot;\r\n this.time = time;\r\n this.sharesUndoRedoStack = sharesUndoRedoStack;\r\n this.heapSize = heapSize;\r\n this.sha1 = sha1;\r\n this.versionId = versionId;\r\n this.alternativeVersionId = alternativeVersionId;\r\n }\r\n}\r\nfunction schemaShouldMaintainUndoRedoElements(resource) {\r\n return (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_17__.Schemas.file\r\n || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_17__.Schemas.vscodeRemote\r\n || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_17__.Schemas.userData\r\n || resource.scheme === 'fake-fs' // for tests\r\n );\r\n}\r\nlet ModelServiceImpl = class ModelServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(_configurationService, _resourcePropertiesService, _themeService, _logService, _undoRedoService) {\r\n super();\r\n this._configurationService = _configurationService;\r\n this._resourcePropertiesService = _resourcePropertiesService;\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._undoRedoService = _undoRedoService;\r\n this._onModelAdded = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onModelAdded = this._onModelAdded.event;\r\n this._onModelRemoved = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onModelRemoved = this._onModelRemoved.event;\r\n this._onModelModeChanged = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onModelModeChanged = this._onModelModeChanged.event;\r\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\r\n this._models = {};\r\n this._disposedModels = new Map();\r\n this._disposedModelsHeapSize = 0;\r\n this._semanticStyling = this._register(new SemanticStyling(this._themeService, this._logService));\r\n this._register(this._configurationService.onDidChangeConfiguration(() => this._updateModelOptions()));\r\n this._updateModelOptions();\r\n this._register(new SemanticColoringFeature(this, this._themeService, this._configurationService, this._semanticStyling));\r\n }\r\n static _readModelOptions(config, isForSimpleWidget) {\r\n let tabSize = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EDITOR_MODEL_DEFAULTS.tabSize;\r\n if (config.editor && typeof config.editor.tabSize !== 'undefined') {\r\n const parsedTabSize = parseInt(config.editor.tabSize, 10);\r\n if (!isNaN(parsedTabSize)) {\r\n tabSize = parsedTabSize;\r\n }\r\n if (tabSize < 1) {\r\n tabSize = 1;\r\n }\r\n }\r\n let indentSize = tabSize;\r\n if (config.editor && typeof config.editor.indentSize !== 'undefined' && config.editor.indentSize !== 'tabSize') {\r\n const parsedIndentSize = parseInt(config.editor.indentSize, 10);\r\n if (!isNaN(parsedIndentSize)) {\r\n indentSize = parsedIndentSize;\r\n }\r\n if (indentSize < 1) {\r\n indentSize = 1;\r\n }\r\n }\r\n let insertSpaces = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EDITOR_MODEL_DEFAULTS.insertSpaces;\r\n if (config.editor && typeof config.editor.insertSpaces !== 'undefined') {\r\n insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces));\r\n }\r\n let newDefaultEOL = DEFAULT_EOL;\r\n const eol = config.eol;\r\n if (eol === '\\r\\n') {\r\n newDefaultEOL = 2 /* CRLF */;\r\n }\r\n else if (eol === '\\n') {\r\n newDefaultEOL = 1 /* LF */;\r\n }\r\n let trimAutoWhitespace = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;\r\n if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') {\r\n trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace));\r\n }\r\n let detectIndentation = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EDITOR_MODEL_DEFAULTS.detectIndentation;\r\n if (config.editor && typeof config.editor.detectIndentation !== 'undefined') {\r\n detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation));\r\n }\r\n let largeFileOptimizations = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;\r\n if (config.editor && typeof config.editor.largeFileOptimizations !== 'undefined') {\r\n largeFileOptimizations = (config.editor.largeFileOptimizations === 'false' ? false : Boolean(config.editor.largeFileOptimizations));\r\n }\r\n return {\r\n isForSimpleWidget: isForSimpleWidget,\r\n tabSize: tabSize,\r\n indentSize: indentSize,\r\n insertSpaces: insertSpaces,\r\n detectIndentation: detectIndentation,\r\n defaultEOL: newDefaultEOL,\r\n trimAutoWhitespace: trimAutoWhitespace,\r\n largeFileOptimizations: largeFileOptimizations\r\n };\r\n }\r\n _getEOL(resource, language) {\r\n if (resource) {\r\n return this._resourcePropertiesService.getEOL(resource, language);\r\n }\r\n const eol = this._configurationService.getValue('files.eol', { overrideIdentifier: language });\r\n if (eol && eol !== 'auto') {\r\n return eol;\r\n }\r\n return _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.OS === 3 /* Linux */ || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.OS === 2 /* Macintosh */ ? '\\n' : '\\r\\n';\r\n }\r\n _shouldRestoreUndoStack() {\r\n const result = this._configurationService.getValue('files.restoreUndoStack');\r\n if (typeof result === 'boolean') {\r\n return result;\r\n }\r\n return true;\r\n }\r\n getCreationOptions(language, resource, isForSimpleWidget) {\r\n let creationOptions = this._modelCreationOptionsByLanguageAndResource[language + resource];\r\n if (!creationOptions) {\r\n const editor = this._configurationService.getValue('editor', { overrideIdentifier: language, resource });\r\n const eol = this._getEOL(resource, language);\r\n creationOptions = ModelServiceImpl._readModelOptions({ editor, eol }, isForSimpleWidget);\r\n this._modelCreationOptionsByLanguageAndResource[language + resource] = creationOptions;\r\n }\r\n return creationOptions;\r\n }\r\n _updateModelOptions() {\r\n const oldOptionsByLanguageAndResource = this._modelCreationOptionsByLanguageAndResource;\r\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\r\n // Update options on all models\r\n const keys = Object.keys(this._models);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const modelId = keys[i];\r\n const modelData = this._models[modelId];\r\n const language = modelData.model.getLanguageIdentifier().language;\r\n const uri = modelData.model.uri;\r\n const oldOptions = oldOptionsByLanguageAndResource[language + uri];\r\n const newOptions = this.getCreationOptions(language, uri, modelData.model.isForSimpleWidget);\r\n ModelServiceImpl._setModelOptionsForModel(modelData.model, newOptions, oldOptions);\r\n }\r\n }\r\n static _setModelOptionsForModel(model, newOptions, currentOptions) {\r\n if (currentOptions && currentOptions.defaultEOL !== newOptions.defaultEOL && model.getLineCount() === 1) {\r\n model.setEOL(newOptions.defaultEOL === 1 /* LF */ ? 0 /* LF */ : 1 /* CRLF */);\r\n }\r\n if (currentOptions\r\n && (currentOptions.detectIndentation === newOptions.detectIndentation)\r\n && (currentOptions.insertSpaces === newOptions.insertSpaces)\r\n && (currentOptions.tabSize === newOptions.tabSize)\r\n && (currentOptions.indentSize === newOptions.indentSize)\r\n && (currentOptions.trimAutoWhitespace === newOptions.trimAutoWhitespace)) {\r\n // Same indent opts, no need to touch the model\r\n return;\r\n }\r\n if (newOptions.detectIndentation) {\r\n model.detectIndentation(newOptions.insertSpaces, newOptions.tabSize);\r\n model.updateOptions({\r\n trimAutoWhitespace: newOptions.trimAutoWhitespace\r\n });\r\n }\r\n else {\r\n model.updateOptions({\r\n insertSpaces: newOptions.insertSpaces,\r\n tabSize: newOptions.tabSize,\r\n indentSize: newOptions.indentSize,\r\n trimAutoWhitespace: newOptions.trimAutoWhitespace\r\n });\r\n }\r\n }\r\n // --- begin IModelService\r\n _insertDisposedModel(disposedModelData) {\r\n this._disposedModels.set(MODEL_ID(disposedModelData.uri), disposedModelData);\r\n this._disposedModelsHeapSize += disposedModelData.heapSize;\r\n }\r\n _removeDisposedModel(resource) {\r\n const disposedModelData = this._disposedModels.get(MODEL_ID(resource));\r\n if (disposedModelData) {\r\n this._disposedModelsHeapSize -= disposedModelData.heapSize;\r\n }\r\n this._disposedModels.delete(MODEL_ID(resource));\r\n return disposedModelData;\r\n }\r\n _ensureDisposedModelsHeapSize(maxModelsHeapSize) {\r\n if (this._disposedModelsHeapSize > maxModelsHeapSize) {\r\n // we must remove some old undo stack elements to free up some memory\r\n const disposedModels = [];\r\n this._disposedModels.forEach(entry => {\r\n if (!entry.sharesUndoRedoStack) {\r\n disposedModels.push(entry);\r\n }\r\n });\r\n disposedModels.sort((a, b) => a.time - b.time);\r\n while (disposedModels.length > 0 && this._disposedModelsHeapSize > maxModelsHeapSize) {\r\n const disposedModel = disposedModels.shift();\r\n this._removeDisposedModel(disposedModel.uri);\r\n if (disposedModel.initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(disposedModel.initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n }\r\n _createModelData(value, languageIdentifier, resource, isForSimpleWidget) {\r\n // create & save the model\r\n const options = this.getCreationOptions(languageIdentifier.language, resource, isForSimpleWidget);\r\n const model = new _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__.TextModel(value, options, languageIdentifier, resource, this._undoRedoService);\r\n if (resource && this._disposedModels.has(MODEL_ID(resource))) {\r\n const disposedModelData = this._removeDisposedModel(resource);\r\n const elements = this._undoRedoService.getElements(resource);\r\n const sha1IsEqual = (computeModelSha1(model) === disposedModelData.sha1);\r\n if (sha1IsEqual || disposedModelData.sharesUndoRedoStack) {\r\n for (const element of elements.past) {\r\n if ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(resource)) {\r\n element.setModel(model);\r\n }\r\n }\r\n for (const element of elements.future) {\r\n if ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(resource)) {\r\n element.setModel(model);\r\n }\r\n }\r\n this._undoRedoService.setElementsValidFlag(resource, true, (element) => ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(resource)));\r\n if (sha1IsEqual) {\r\n model._overwriteVersionId(disposedModelData.versionId);\r\n model._overwriteAlternativeVersionId(disposedModelData.alternativeVersionId);\r\n model._overwriteInitialUndoRedoSnapshot(disposedModelData.initialUndoRedoSnapshot);\r\n }\r\n }\r\n else {\r\n if (disposedModelData.initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(disposedModelData.initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n const modelId = MODEL_ID(model.uri);\r\n if (this._models[modelId]) {\r\n // There already exists a model with this id => this is a programmer error\r\n throw new Error('ModelService: Cannot add model because it already exists!');\r\n }\r\n const modelData = new ModelData(model, (model) => this._onWillDispose(model), (model, e) => this._onDidChangeLanguage(model, e));\r\n this._models[modelId] = modelData;\r\n return modelData;\r\n }\r\n createModel(value, languageSelection, resource, isForSimpleWidget = false) {\r\n let modelData;\r\n if (languageSelection) {\r\n modelData = this._createModelData(value, languageSelection.languageIdentifier, resource, isForSimpleWidget);\r\n this.setMode(modelData.model, languageSelection);\r\n }\r\n else {\r\n modelData = this._createModelData(value, _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_7__.PLAINTEXT_LANGUAGE_IDENTIFIER, resource, isForSimpleWidget);\r\n }\r\n this._onModelAdded.fire(modelData.model);\r\n return modelData.model;\r\n }\r\n setMode(model, languageSelection) {\r\n if (!languageSelection) {\r\n return;\r\n }\r\n const modelData = this._models[MODEL_ID(model.uri)];\r\n if (!modelData) {\r\n return;\r\n }\r\n modelData.setLanguage(languageSelection);\r\n }\r\n getModels() {\r\n const ret = [];\r\n const keys = Object.keys(this._models);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const modelId = keys[i];\r\n ret.push(this._models[modelId].model);\r\n }\r\n return ret;\r\n }\r\n getModel(resource) {\r\n const modelId = MODEL_ID(resource);\r\n const modelData = this._models[modelId];\r\n if (!modelData) {\r\n return null;\r\n }\r\n return modelData.model;\r\n }\r\n getSemanticTokensProviderStyling(provider) {\r\n return this._semanticStyling.get(provider);\r\n }\r\n // --- end IModelService\r\n _onWillDispose(model) {\r\n const modelId = MODEL_ID(model.uri);\r\n const modelData = this._models[modelId];\r\n const sharesUndoRedoStack = (this._undoRedoService.getUriComparisonKey(model.uri) !== model.uri.toString());\r\n let maintainUndoRedoStack = false;\r\n let heapSize = 0;\r\n if (sharesUndoRedoStack || (this._shouldRestoreUndoStack() && schemaShouldMaintainUndoRedoElements(model.uri))) {\r\n const elements = this._undoRedoService.getElements(model.uri);\r\n if (elements.past.length > 0 || elements.future.length > 0) {\r\n for (const element of elements.past) {\r\n if ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(model.uri)) {\r\n maintainUndoRedoStack = true;\r\n heapSize += element.heapSize(model.uri);\r\n element.setModel(model.uri); // remove reference from text buffer instance\r\n }\r\n }\r\n for (const element of elements.future) {\r\n if ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(model.uri)) {\r\n maintainUndoRedoStack = true;\r\n heapSize += element.heapSize(model.uri);\r\n element.setModel(model.uri); // remove reference from text buffer instance\r\n }\r\n }\r\n }\r\n }\r\n const maxMemory = ModelServiceImpl.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;\r\n if (!maintainUndoRedoStack) {\r\n if (!sharesUndoRedoStack) {\r\n const initialUndoRedoSnapshot = modelData.model.getInitialUndoRedoSnapshot();\r\n if (initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n else if (!sharesUndoRedoStack && heapSize > maxMemory) {\r\n // the undo stack for this file would never fit in the configured memory, so don't bother with it.\r\n const initialUndoRedoSnapshot = modelData.model.getInitialUndoRedoSnapshot();\r\n if (initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot);\r\n }\r\n }\r\n else {\r\n this._ensureDisposedModelsHeapSize(maxMemory - heapSize);\r\n // We only invalidate the elements, but they remain in the undo-redo service.\r\n this._undoRedoService.setElementsValidFlag(model.uri, false, (element) => ((0,_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__.isEditStackElement)(element) && element.matchesResource(model.uri)));\r\n this._insertDisposedModel(new DisposedModelInfo(model.uri, modelData.model.getInitialUndoRedoSnapshot(), Date.now(), sharesUndoRedoStack, heapSize, computeModelSha1(model), model.getVersionId(), model.getAlternativeVersionId()));\r\n }\r\n delete this._models[modelId];\r\n modelData.dispose();\r\n // clean up cache\r\n delete this._modelCreationOptionsByLanguageAndResource[model.getLanguageIdentifier().language + model.uri];\r\n this._onModelRemoved.fire(model);\r\n }\r\n _onDidChangeLanguage(model, e) {\r\n const oldModeId = e.oldLanguage;\r\n const newModeId = model.getLanguageIdentifier().language;\r\n const oldOptions = this.getCreationOptions(oldModeId, model.uri, model.isForSimpleWidget);\r\n const newOptions = this.getCreationOptions(newModeId, model.uri, model.isForSimpleWidget);\r\n ModelServiceImpl._setModelOptionsForModel(model, newOptions, oldOptions);\r\n this._onModelModeChanged.fire({ model, oldModeId });\r\n }\r\n};\r\nModelServiceImpl.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK = 20 * 1024 * 1024;\r\nModelServiceImpl = __decorate([\r\n __param(0, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_9__.IConfigurationService),\r\n __param(1, _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_8__.ITextResourcePropertiesService),\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__.IThemeService),\r\n __param(3, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_13__.ILogService),\r\n __param(4, _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_14__.IUndoRedoService)\r\n], ModelServiceImpl);\r\n\r\nconst SEMANTIC_HIGHLIGHTING_SETTING_ID = 'editor.semanticHighlighting';\r\nfunction isSemanticColoringEnabled(model, themeService, configurationService) {\r\n var _a;\r\n const setting = (_a = configurationService.getValue(SEMANTIC_HIGHLIGHTING_SETTING_ID, { overrideIdentifier: model.getLanguageIdentifier().language, resource: model.uri })) === null || _a === void 0 ? void 0 : _a.enabled;\r\n if (typeof setting === 'boolean') {\r\n return setting;\r\n }\r\n return themeService.getColorTheme().semanticHighlighting;\r\n}\r\nclass SemanticColoringFeature extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(modelService, themeService, configurationService, semanticStyling) {\r\n super();\r\n this._watchers = Object.create(null);\r\n this._semanticStyling = semanticStyling;\r\n const register = (model) => {\r\n this._watchers[model.uri.toString()] = new ModelSemanticColoring(model, themeService, this._semanticStyling);\r\n };\r\n const deregister = (model, modelSemanticColoring) => {\r\n modelSemanticColoring.dispose();\r\n delete this._watchers[model.uri.toString()];\r\n };\r\n const handleSettingOrThemeChange = () => {\r\n for (let model of modelService.getModels()) {\r\n const curr = this._watchers[model.uri.toString()];\r\n if (isSemanticColoringEnabled(model, themeService, configurationService)) {\r\n if (!curr) {\r\n register(model);\r\n }\r\n }\r\n else {\r\n if (curr) {\r\n deregister(model, curr);\r\n }\r\n }\r\n }\r\n };\r\n this._register(modelService.onModelAdded((model) => {\r\n if (isSemanticColoringEnabled(model, themeService, configurationService)) {\r\n register(model);\r\n }\r\n }));\r\n this._register(modelService.onModelRemoved((model) => {\r\n const curr = this._watchers[model.uri.toString()];\r\n if (curr) {\r\n deregister(model, curr);\r\n }\r\n }));\r\n this._register(configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)) {\r\n handleSettingOrThemeChange();\r\n }\r\n }));\r\n this._register(themeService.onDidColorThemeChange(handleSettingOrThemeChange));\r\n }\r\n}\r\nclass SemanticStyling extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(_themeService, _logService) {\r\n super();\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._caches = new WeakMap();\r\n this._register(this._themeService.onDidColorThemeChange(() => {\r\n this._caches = new WeakMap();\r\n }));\r\n }\r\n get(provider) {\r\n if (!this._caches.has(provider)) {\r\n this._caches.set(provider, new _semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_18__.SemanticTokensProviderStyling(provider.getLegend(), this._themeService, this._logService));\r\n }\r\n return this._caches.get(provider);\r\n }\r\n}\r\nclass SemanticTokensResponse {\r\n constructor(_provider, resultId, data) {\r\n this._provider = _provider;\r\n this.resultId = resultId;\r\n this.data = data;\r\n }\r\n dispose() {\r\n this._provider.releaseDocumentSemanticTokens(this.resultId);\r\n }\r\n}\r\nclass ModelSemanticColoring extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(model, themeService, stylingProvider) {\r\n super();\r\n this._isDisposed = false;\r\n this._model = model;\r\n this._semanticStyling = stylingProvider;\r\n this._fetchDocumentSemanticTokens = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_10__.RunOnceScheduler(() => this._fetchDocumentSemanticTokensNow(), ModelSemanticColoring.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY));\r\n this._currentDocumentResponse = null;\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n this._documentProvidersChangeListeners = [];\r\n this._register(this._model.onDidChangeContent(() => {\r\n if (!this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n }));\r\n const bindDocumentChangeListeners = () => {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this._documentProvidersChangeListeners);\r\n this._documentProvidersChangeListeners = [];\r\n for (const provider of _modes_js__WEBPACK_IMPORTED_MODULE_6__.DocumentSemanticTokensProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChange === 'function') {\r\n this._documentProvidersChangeListeners.push(provider.onDidChange(() => this._fetchDocumentSemanticTokens.schedule(0)));\r\n }\r\n }\r\n };\r\n bindDocumentChangeListeners();\r\n this._register(_modes_js__WEBPACK_IMPORTED_MODULE_6__.DocumentSemanticTokensProviderRegistry.onDidChange(() => {\r\n bindDocumentChangeListeners();\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }));\r\n this._register(themeService.onDidColorThemeChange(_ => {\r\n // clear out existing tokens\r\n this._setDocumentSemanticTokens(null, null, null, []);\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }));\r\n this._fetchDocumentSemanticTokens.schedule(0);\r\n }\r\n dispose() {\r\n if (this._currentDocumentResponse) {\r\n this._currentDocumentResponse.dispose();\r\n this._currentDocumentResponse = null;\r\n }\r\n if (this._currentDocumentRequestCancellationTokenSource) {\r\n this._currentDocumentRequestCancellationTokenSource.cancel();\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n }\r\n this._setDocumentSemanticTokens(null, null, null, []);\r\n this._isDisposed = true;\r\n super.dispose();\r\n }\r\n _fetchDocumentSemanticTokensNow() {\r\n if (this._currentDocumentRequestCancellationTokenSource) {\r\n // there is already a request running, let it finish...\r\n return;\r\n }\r\n const cancellationTokenSource = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_11__.CancellationTokenSource();\r\n const lastResultId = this._currentDocumentResponse ? this._currentDocumentResponse.resultId || null : null;\r\n const r = (0,_getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_19__.getDocumentSemanticTokens)(this._model, lastResultId, cancellationTokenSource.token);\r\n if (!r) {\r\n // there is no provider\r\n if (this._currentDocumentResponse) {\r\n // there are semantic tokens set\r\n this._model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const { provider, request } = r;\r\n this._currentDocumentRequestCancellationTokenSource = cancellationTokenSource;\r\n const pendingChanges = [];\r\n const contentChangeListener = this._model.onDidChangeContent((e) => {\r\n pendingChanges.push(e);\r\n });\r\n const styling = this._semanticStyling.get(provider);\r\n request.then((res) => {\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n contentChangeListener.dispose();\r\n this._setDocumentSemanticTokens(provider, res || null, styling, pendingChanges);\r\n }, (err) => {\r\n const isExpectedError = err && (_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.isPromiseCanceledError(err) || (typeof err.message === 'string' && err.message.indexOf('busy') !== -1));\r\n if (!isExpectedError) {\r\n _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedError(err);\r\n }\r\n // Semantic tokens eats up all errors and considers errors to mean that the result is temporarily not available\r\n // The API does not have a special error kind to express this...\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n contentChangeListener.dispose();\r\n if (pendingChanges.length > 0) {\r\n // More changes occurred while the request was running\r\n if (!this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n }\r\n });\r\n }\r\n static _copy(src, srcOffset, dest, destOffset, length) {\r\n for (let i = 0; i < length; i++) {\r\n dest[destOffset + i] = src[srcOffset + i];\r\n }\r\n }\r\n _setDocumentSemanticTokens(provider, tokens, styling, pendingChanges) {\r\n const currentResponse = this._currentDocumentResponse;\r\n const rescheduleIfNeeded = () => {\r\n if (pendingChanges.length > 0 && !this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n };\r\n if (this._currentDocumentResponse) {\r\n this._currentDocumentResponse.dispose();\r\n this._currentDocumentResponse = null;\r\n }\r\n if (this._isDisposed) {\r\n // disposed!\r\n if (provider && tokens) {\r\n provider.releaseDocumentSemanticTokens(tokens.resultId);\r\n }\r\n return;\r\n }\r\n if (!provider || !styling) {\r\n this._model.setSemanticTokens(null, false);\r\n return;\r\n }\r\n if (!tokens) {\r\n this._model.setSemanticTokens(null, true);\r\n rescheduleIfNeeded();\r\n return;\r\n }\r\n if ((0,_getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_19__.isSemanticTokensEdits)(tokens)) {\r\n if (!currentResponse) {\r\n // not possible!\r\n this._model.setSemanticTokens(null, true);\r\n return;\r\n }\r\n if (tokens.edits.length === 0) {\r\n // nothing to do!\r\n tokens = {\r\n resultId: tokens.resultId,\r\n data: currentResponse.data\r\n };\r\n }\r\n else {\r\n let deltaLength = 0;\r\n for (const edit of tokens.edits) {\r\n deltaLength += (edit.data ? edit.data.length : 0) - edit.deleteCount;\r\n }\r\n const srcData = currentResponse.data;\r\n const destData = new Uint32Array(srcData.length + deltaLength);\r\n let srcLastStart = srcData.length;\r\n let destLastStart = destData.length;\r\n for (let i = tokens.edits.length - 1; i >= 0; i--) {\r\n const edit = tokens.edits[i];\r\n const copyCount = srcLastStart - (edit.start + edit.deleteCount);\r\n if (copyCount > 0) {\r\n ModelSemanticColoring._copy(srcData, srcLastStart - copyCount, destData, destLastStart - copyCount, copyCount);\r\n destLastStart -= copyCount;\r\n }\r\n if (edit.data) {\r\n ModelSemanticColoring._copy(edit.data, 0, destData, destLastStart - edit.data.length, edit.data.length);\r\n destLastStart -= edit.data.length;\r\n }\r\n srcLastStart = edit.start;\r\n }\r\n if (srcLastStart > 0) {\r\n ModelSemanticColoring._copy(srcData, 0, destData, 0, srcLastStart);\r\n }\r\n tokens = {\r\n resultId: tokens.resultId,\r\n data: destData\r\n };\r\n }\r\n }\r\n if ((0,_getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_19__.isSemanticTokens)(tokens)) {\r\n this._currentDocumentResponse = new SemanticTokensResponse(provider, tokens.resultId, tokens.data);\r\n const result = (0,_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_18__.toMultilineTokens2)(tokens, styling, this._model.getLanguageIdentifier());\r\n // Adjust incoming semantic tokens\r\n if (pendingChanges.length > 0) {\r\n // More changes occurred while the request was running\r\n // We need to:\r\n // 1. Adjust incoming semantic tokens\r\n // 2. Request them again\r\n for (const change of pendingChanges) {\r\n for (const area of result) {\r\n for (const singleChange of change.changes) {\r\n area.applyEdit(singleChange.range, singleChange.text);\r\n }\r\n }\r\n }\r\n }\r\n this._model.setSemanticTokens(result, true);\r\n }\r\n else {\r\n this._model.setSemanticTokens(null, true);\r\n }\r\n rescheduleIfNeeded();\r\n }\r\n}\r\nModelSemanticColoring.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY = 300;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ITextModelService\": () => (/* binding */ ITextModelService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ITextModelService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('textModelService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"encodeSemanticTokensDto\": () => (/* binding */ encodeSemanticTokensDto)\n/* harmony export */ });\n/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/buffer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/buffer.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nfunction reverseEndianness(arr) {\r\n for (let i = 0, len = arr.length; i < len; i += 4) {\r\n // flip bytes 0<->3 and 1<->2\r\n const b0 = arr[i + 0];\r\n const b1 = arr[i + 1];\r\n const b2 = arr[i + 2];\r\n const b3 = arr[i + 3];\r\n arr[i + 0] = b3;\r\n arr[i + 1] = b2;\r\n arr[i + 2] = b1;\r\n arr[i + 3] = b0;\r\n }\r\n}\r\nfunction toLittleEndianBuffer(arr) {\r\n const uint8Arr = new Uint8Array(arr.buffer, arr.byteOffset, arr.length * 4);\r\n if (!_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.isLittleEndian()) {\r\n // the byte order must be changed\r\n reverseEndianness(uint8Arr);\r\n }\r\n return _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__.VSBuffer.wrap(uint8Arr);\r\n}\r\nfunction encodeSemanticTokensDto(semanticTokens) {\r\n const dest = new Uint32Array(encodeSemanticTokensDtoSize(semanticTokens));\r\n let offset = 0;\r\n dest[offset++] = semanticTokens.id;\r\n if (semanticTokens.type === 'full') {\r\n dest[offset++] = 1 /* Full */;\r\n dest[offset++] = semanticTokens.data.length;\r\n dest.set(semanticTokens.data, offset);\r\n offset += semanticTokens.data.length;\r\n }\r\n else {\r\n dest[offset++] = 2 /* Delta */;\r\n dest[offset++] = semanticTokens.deltas.length;\r\n for (const delta of semanticTokens.deltas) {\r\n dest[offset++] = delta.start;\r\n dest[offset++] = delta.deleteCount;\r\n if (delta.data) {\r\n dest[offset++] = delta.data.length;\r\n dest.set(delta.data, offset);\r\n offset += delta.data.length;\r\n }\r\n else {\r\n dest[offset++] = 0;\r\n }\r\n }\r\n }\r\n return toLittleEndianBuffer(dest);\r\n}\r\nfunction encodeSemanticTokensDtoSize(semanticTokens) {\r\n let result = 0;\r\n result += (+1 // id\r\n + 1 // type\r\n );\r\n if (semanticTokens.type === 'full') {\r\n result += (+1 // data length\r\n + semanticTokens.data.length);\r\n }\r\n else {\r\n result += (+1 // delta count\r\n );\r\n result += (+1 // start\r\n + 1 // deleteCount\r\n + 1 // data length\r\n ) * semanticTokens.deltas.length;\r\n for (const delta of semanticTokens.deltas) {\r\n if (delta.data) {\r\n result += delta.data.length;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SemanticTokensProviderStyling\": () => (/* binding */ SemanticTokensProviderStyling),\n/* harmony export */ \"toMultilineTokens2\": () => (/* binding */ toMultilineTokens2)\n/* harmony export */ });\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/tokensStore.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass SemanticTokensProviderStyling {\r\n constructor(_legend, _themeService, _logService) {\r\n this._legend = _legend;\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._hashTable = new HashTable();\r\n this._hasWarnedOverlappingTokens = false;\r\n }\r\n getMetadata(tokenTypeIndex, tokenModifierSet, languageId) {\r\n const entry = this._hashTable.get(tokenTypeIndex, tokenModifierSet, languageId.id);\r\n let metadata;\r\n if (entry) {\r\n metadata = entry.metadata;\r\n if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__.LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${tokenTypeIndex} / ${tokenModifierSet}: foreground ${_modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getForeground(metadata)}, fontStyle ${_modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getFontStyle(metadata).toString(2)}`);\r\n }\r\n }\r\n else {\r\n let tokenType = this._legend.tokenTypes[tokenTypeIndex];\r\n const tokenModifiers = [];\r\n if (tokenType) {\r\n let modifierSet = tokenModifierSet;\r\n for (let modifierIndex = 0; modifierSet > 0 && modifierIndex < this._legend.tokenModifiers.length; modifierIndex++) {\r\n if (modifierSet & 1) {\r\n tokenModifiers.push(this._legend.tokenModifiers[modifierIndex]);\r\n }\r\n modifierSet = modifierSet >> 1;\r\n }\r\n if (modifierSet > 0 && this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__.LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${tokenModifierSet.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`);\r\n tokenModifiers.push('not-in-legend');\r\n }\r\n const tokenStyle = this._themeService.getColorTheme().getTokenStyleMetadata(tokenType, tokenModifiers, languageId.language);\r\n if (typeof tokenStyle === 'undefined') {\r\n metadata = 2147483647 /* NO_STYLING */;\r\n }\r\n else {\r\n metadata = 0;\r\n if (typeof tokenStyle.italic !== 'undefined') {\r\n const italicBit = (tokenStyle.italic ? 1 /* Italic */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= italicBit | 1 /* SEMANTIC_USE_ITALIC */;\r\n }\r\n if (typeof tokenStyle.bold !== 'undefined') {\r\n const boldBit = (tokenStyle.bold ? 2 /* Bold */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= boldBit | 2 /* SEMANTIC_USE_BOLD */;\r\n }\r\n if (typeof tokenStyle.underline !== 'undefined') {\r\n const underlineBit = (tokenStyle.underline ? 4 /* Underline */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= underlineBit | 4 /* SEMANTIC_USE_UNDERLINE */;\r\n }\r\n if (tokenStyle.foreground) {\r\n const foregroundBits = (tokenStyle.foreground) << 14 /* FOREGROUND_OFFSET */;\r\n metadata |= foregroundBits | 8 /* SEMANTIC_USE_FOREGROUND */;\r\n }\r\n if (metadata === 0) {\r\n // Nothing!\r\n metadata = 2147483647 /* NO_STYLING */;\r\n }\r\n }\r\n }\r\n else {\r\n if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__.LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${tokenTypeIndex} for legend: ${JSON.stringify(this._legend.tokenTypes)}`);\r\n }\r\n metadata = 2147483647 /* NO_STYLING */;\r\n tokenType = 'not-in-legend';\r\n }\r\n this._hashTable.add(tokenTypeIndex, tokenModifierSet, languageId.id, metadata);\r\n if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__.LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling ${tokenTypeIndex} (${tokenType}) / ${tokenModifierSet} (${tokenModifiers.join(' ')}): foreground ${_modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getForeground(metadata)}, fontStyle ${_modes_js__WEBPACK_IMPORTED_MODULE_0__.TokenMetadata.getFontStyle(metadata).toString(2)}`);\r\n }\r\n }\r\n return metadata;\r\n }\r\n warnOverlappingSemanticTokens(lineNumber, startColumn) {\r\n if (!this._hasWarnedOverlappingTokens) {\r\n this._hasWarnedOverlappingTokens = true;\r\n console.warn(`Overlapping semantic tokens detected at lineNumber ${lineNumber}, column ${startColumn}`);\r\n }\r\n }\r\n}\r\nfunction toMultilineTokens2(tokens, styling, languageId) {\r\n const srcData = tokens.data;\r\n const tokenCount = (tokens.data.length / 5) | 0;\r\n const tokensPerArea = Math.max(Math.ceil(tokenCount / 1024 /* DesiredMaxAreas */), 400 /* DesiredTokensPerArea */);\r\n const result = [];\r\n let tokenIndex = 0;\r\n let lastLineNumber = 1;\r\n let lastStartCharacter = 0;\r\n while (tokenIndex < tokenCount) {\r\n const tokenStartIndex = tokenIndex;\r\n let tokenEndIndex = Math.min(tokenStartIndex + tokensPerArea, tokenCount);\r\n // Keep tokens on the same line in the same area...\r\n if (tokenEndIndex < tokenCount) {\r\n let smallTokenEndIndex = tokenEndIndex;\r\n while (smallTokenEndIndex - 1 > tokenStartIndex && srcData[5 * smallTokenEndIndex] === 0) {\r\n smallTokenEndIndex--;\r\n }\r\n if (smallTokenEndIndex - 1 === tokenStartIndex) {\r\n // there are so many tokens on this line that our area would be empty, we must now go right\r\n let bigTokenEndIndex = tokenEndIndex;\r\n while (bigTokenEndIndex + 1 < tokenCount && srcData[5 * bigTokenEndIndex] === 0) {\r\n bigTokenEndIndex++;\r\n }\r\n tokenEndIndex = bigTokenEndIndex;\r\n }\r\n else {\r\n tokenEndIndex = smallTokenEndIndex;\r\n }\r\n }\r\n let destData = new Uint32Array((tokenEndIndex - tokenStartIndex) * 4);\r\n let destOffset = 0;\r\n let areaLine = 0;\r\n let prevLineNumber = 0;\r\n let prevStartCharacter = 0;\r\n let prevEndCharacter = 0;\r\n while (tokenIndex < tokenEndIndex) {\r\n const srcOffset = 5 * tokenIndex;\r\n const deltaLine = srcData[srcOffset];\r\n const deltaCharacter = srcData[srcOffset + 1];\r\n const lineNumber = lastLineNumber + deltaLine;\r\n const startCharacter = (deltaLine === 0 ? lastStartCharacter + deltaCharacter : deltaCharacter);\r\n const length = srcData[srcOffset + 2];\r\n const tokenTypeIndex = srcData[srcOffset + 3];\r\n const tokenModifierSet = srcData[srcOffset + 4];\r\n const metadata = styling.getMetadata(tokenTypeIndex, tokenModifierSet, languageId);\r\n if (metadata !== 2147483647 /* NO_STYLING */) {\r\n if (areaLine === 0) {\r\n areaLine = lineNumber;\r\n }\r\n if (prevLineNumber === lineNumber && prevEndCharacter > startCharacter) {\r\n styling.warnOverlappingSemanticTokens(lineNumber, startCharacter + 1);\r\n if (prevStartCharacter < startCharacter) {\r\n // the previous token survives after the overlapping one\r\n destData[destOffset - 4 + 2] = startCharacter;\r\n }\r\n else {\r\n // the previous token is entirely covered by the overlapping one\r\n destOffset -= 4;\r\n }\r\n }\r\n destData[destOffset] = lineNumber - areaLine;\r\n destData[destOffset + 1] = startCharacter;\r\n destData[destOffset + 2] = startCharacter + length;\r\n destData[destOffset + 3] = metadata;\r\n destOffset += 4;\r\n prevLineNumber = lineNumber;\r\n prevStartCharacter = startCharacter;\r\n prevEndCharacter = startCharacter + length;\r\n }\r\n lastLineNumber = lineNumber;\r\n lastStartCharacter = startCharacter;\r\n tokenIndex++;\r\n }\r\n if (destOffset !== destData.length) {\r\n destData = destData.subarray(0, destOffset);\r\n }\r\n const tokens = new _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__.MultilineTokens2(areaLine, new _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__.SparseEncodedTokens(destData));\r\n result.push(tokens);\r\n }\r\n return result;\r\n}\r\nclass HashTableEntry {\r\n constructor(tokenTypeIndex, tokenModifierSet, languageId, metadata) {\r\n this.tokenTypeIndex = tokenTypeIndex;\r\n this.tokenModifierSet = tokenModifierSet;\r\n this.languageId = languageId;\r\n this.metadata = metadata;\r\n this.next = null;\r\n }\r\n}\r\nclass HashTable {\r\n constructor() {\r\n this._elementsCount = 0;\r\n this._currentLengthIndex = 0;\r\n this._currentLength = HashTable._SIZES[this._currentLengthIndex];\r\n this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0);\r\n this._elements = [];\r\n HashTable._nullOutEntries(this._elements, this._currentLength);\r\n }\r\n static _nullOutEntries(entries, length) {\r\n for (let i = 0; i < length; i++) {\r\n entries[i] = null;\r\n }\r\n }\r\n _hash2(n1, n2) {\r\n return (((n1 << 5) - n1) + n2) | 0; // n1 * 31 + n2, keep as int32\r\n }\r\n _hashFunc(tokenTypeIndex, tokenModifierSet, languageId) {\r\n return this._hash2(this._hash2(tokenTypeIndex, tokenModifierSet), languageId) % this._currentLength;\r\n }\r\n get(tokenTypeIndex, tokenModifierSet, languageId) {\r\n const hash = this._hashFunc(tokenTypeIndex, tokenModifierSet, languageId);\r\n let p = this._elements[hash];\r\n while (p) {\r\n if (p.tokenTypeIndex === tokenTypeIndex && p.tokenModifierSet === tokenModifierSet && p.languageId === languageId) {\r\n return p;\r\n }\r\n p = p.next;\r\n }\r\n return null;\r\n }\r\n add(tokenTypeIndex, tokenModifierSet, languageId, metadata) {\r\n this._elementsCount++;\r\n if (this._growCount !== 0 && this._elementsCount >= this._growCount) {\r\n // expand!\r\n const oldElements = this._elements;\r\n this._currentLengthIndex++;\r\n this._currentLength = HashTable._SIZES[this._currentLengthIndex];\r\n this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0);\r\n this._elements = [];\r\n HashTable._nullOutEntries(this._elements, this._currentLength);\r\n for (const first of oldElements) {\r\n let p = first;\r\n while (p) {\r\n const oldNext = p.next;\r\n p.next = null;\r\n this._add(p);\r\n p = oldNext;\r\n }\r\n }\r\n }\r\n this._add(new HashTableEntry(tokenTypeIndex, tokenModifierSet, languageId, metadata));\r\n }\r\n _add(element) {\r\n const hash = this._hashFunc(element.tokenTypeIndex, element.tokenModifierSet, element.languageId);\r\n element.next = this._elements[hash];\r\n this._elements[hash] = element;\r\n }\r\n}\r\nHashTable._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143];\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js":
|
||
/*!******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js ***!
|
||
\******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ITextResourceConfigurationService\": () => (/* binding */ ITextResourceConfigurationService),\n/* harmony export */ \"ITextResourcePropertiesService\": () => (/* binding */ ITextResourcePropertiesService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n\r\nconst ITextResourceConfigurationService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('textResourceConfigurationService');\r\nconst ITextResourcePropertiesService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('textResourcePropertiesService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createWebWorker\": () => (/* binding */ createWebWorker)\n/* harmony export */ });\n/* harmony import */ var _editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editorWorkerServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/**\r\n * Create a new web worker that has model syncing capabilities built in.\r\n * Specify an AMD module to load that will `create` an object that will be proxied.\r\n */\r\nfunction createWebWorker(modelService, opts) {\r\n return new MonacoWebWorkerImpl(modelService, opts);\r\n}\r\nclass MonacoWebWorkerImpl extends _editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_0__.EditorWorkerClient {\r\n constructor(modelService, opts) {\r\n super(modelService, opts.keepIdleModels || false, opts.label);\r\n this._foreignModuleId = opts.moduleId;\r\n this._foreignModuleCreateData = opts.createData || null;\r\n this._foreignModuleHost = opts.host || null;\r\n this._foreignProxy = null;\r\n }\r\n // foreign host request\r\n fhr(method, args) {\r\n if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') {\r\n return Promise.reject(new Error('Missing method ' + method + ' or missing main thread foreign host.'));\r\n }\r\n try {\r\n return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost, args));\r\n }\r\n catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n _getForeignProxy() {\r\n if (!this._foreignProxy) {\r\n this._foreignProxy = this._getProxy().then((proxy) => {\r\n const foreignHostMethods = this._foreignModuleHost ? _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__.getAllMethodNames(this._foreignModuleHost) : [];\r\n return proxy.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, foreignHostMethods).then((foreignMethods) => {\r\n this._foreignModuleCreateData = null;\r\n const proxyMethodRequest = (method, args) => {\r\n return proxy.fmr(method, args);\r\n };\r\n const createProxyMethod = (method, proxyMethodRequest) => {\r\n return function () {\r\n const args = Array.prototype.slice.call(arguments, 0);\r\n return proxyMethodRequest(method, args);\r\n };\r\n };\r\n let foreignProxy = {};\r\n for (const foreignMethod of foreignMethods) {\r\n foreignProxy[foreignMethod] = createProxyMethod(foreignMethod, proxyMethodRequest);\r\n }\r\n return foreignProxy;\r\n });\r\n });\r\n }\r\n return this._foreignProxy;\r\n }\r\n getProxy() {\r\n return this._getForeignProxy();\r\n }\r\n withSyncedResources(resources) {\r\n return this._withSyncedResources(resources).then(_ => this.getProxy());\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KeyMod\": () => (/* binding */ KeyMod),\n/* harmony export */ \"createMonacoBaseAPI\": () => (/* binding */ createMonacoBaseAPI)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _core_token_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/token.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/token.js\");\n/* harmony import */ var _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./standaloneEnums.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass KeyMod {\r\n static chord(firstPart, secondPart) {\r\n return (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.KeyChord)(firstPart, secondPart);\r\n }\r\n}\r\nKeyMod.CtrlCmd = 2048 /* CtrlCmd */;\r\nKeyMod.Shift = 1024 /* Shift */;\r\nKeyMod.Alt = 512 /* Alt */;\r\nKeyMod.WinCtrl = 256 /* WinCtrl */;\r\nfunction createMonacoBaseAPI() {\r\n return {\r\n editor: undefined,\r\n languages: undefined,\r\n CancellationTokenSource: _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource,\r\n Emitter: _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter,\r\n KeyCode: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__.KeyCode,\r\n KeyMod: KeyMod,\r\n Position: _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position,\r\n Range: _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range,\r\n Selection: _core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection,\r\n SelectionDirection: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__.SelectionDirection,\r\n MarkerSeverity: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__.MarkerSeverity,\r\n MarkerTag: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__.MarkerTag,\r\n Uri: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI,\r\n Token: _core_token_js__WEBPACK_IMPORTED_MODULE_7__.Token\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AccessibilitySupport\": () => (/* binding */ AccessibilitySupport),\n/* harmony export */ \"CompletionItemInsertTextRule\": () => (/* binding */ CompletionItemInsertTextRule),\n/* harmony export */ \"CompletionItemKind\": () => (/* binding */ CompletionItemKind),\n/* harmony export */ \"CompletionItemTag\": () => (/* binding */ CompletionItemTag),\n/* harmony export */ \"CompletionTriggerKind\": () => (/* binding */ CompletionTriggerKind),\n/* harmony export */ \"ContentWidgetPositionPreference\": () => (/* binding */ ContentWidgetPositionPreference),\n/* harmony export */ \"CursorChangeReason\": () => (/* binding */ CursorChangeReason),\n/* harmony export */ \"DefaultEndOfLine\": () => (/* binding */ DefaultEndOfLine),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* binding */ DocumentHighlightKind),\n/* harmony export */ \"EditorAutoIndentStrategy\": () => (/* binding */ EditorAutoIndentStrategy),\n/* harmony export */ \"EditorOption\": () => (/* binding */ EditorOption),\n/* harmony export */ \"EndOfLinePreference\": () => (/* binding */ EndOfLinePreference),\n/* harmony export */ \"EndOfLineSequence\": () => (/* binding */ EndOfLineSequence),\n/* harmony export */ \"IndentAction\": () => (/* binding */ IndentAction),\n/* harmony export */ \"InlineHintKind\": () => (/* binding */ InlineHintKind),\n/* harmony export */ \"KeyCode\": () => (/* binding */ KeyCode),\n/* harmony export */ \"MarkerSeverity\": () => (/* binding */ MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* binding */ MarkerTag),\n/* harmony export */ \"MinimapPosition\": () => (/* binding */ MinimapPosition),\n/* harmony export */ \"MouseTargetType\": () => (/* binding */ MouseTargetType),\n/* harmony export */ \"OverlayWidgetPositionPreference\": () => (/* binding */ OverlayWidgetPositionPreference),\n/* harmony export */ \"OverviewRulerLane\": () => (/* binding */ OverviewRulerLane),\n/* harmony export */ \"RenderLineNumbersType\": () => (/* binding */ RenderLineNumbersType),\n/* harmony export */ \"RenderMinimap\": () => (/* binding */ RenderMinimap),\n/* harmony export */ \"ScrollType\": () => (/* binding */ ScrollType),\n/* harmony export */ \"ScrollbarVisibility\": () => (/* binding */ ScrollbarVisibility),\n/* harmony export */ \"SelectionDirection\": () => (/* binding */ SelectionDirection),\n/* harmony export */ \"SignatureHelpTriggerKind\": () => (/* binding */ SignatureHelpTriggerKind),\n/* harmony export */ \"SymbolKind\": () => (/* binding */ SymbolKind),\n/* harmony export */ \"SymbolTag\": () => (/* binding */ SymbolTag),\n/* harmony export */ \"TextEditorCursorBlinkingStyle\": () => (/* binding */ TextEditorCursorBlinkingStyle),\n/* harmony export */ \"TextEditorCursorStyle\": () => (/* binding */ TextEditorCursorStyle),\n/* harmony export */ \"TrackedRangeStickiness\": () => (/* binding */ TrackedRangeStickiness),\n/* harmony export */ \"WrappingIndent\": () => (/* binding */ WrappingIndent)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.\r\nvar AccessibilitySupport;\r\n(function (AccessibilitySupport) {\r\n /**\r\n * This should be the browser case where it is not known if a screen reader is attached or no.\r\n */\r\n AccessibilitySupport[AccessibilitySupport[\"Unknown\"] = 0] = \"Unknown\";\r\n AccessibilitySupport[AccessibilitySupport[\"Disabled\"] = 1] = \"Disabled\";\r\n AccessibilitySupport[AccessibilitySupport[\"Enabled\"] = 2] = \"Enabled\";\r\n})(AccessibilitySupport || (AccessibilitySupport = {}));\r\nvar CompletionItemInsertTextRule;\r\n(function (CompletionItemInsertTextRule) {\r\n /**\r\n * Adjust whitespace/indentation of multiline insert texts to\r\n * match the current line indentation.\r\n */\r\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"KeepWhitespace\"] = 1] = \"KeepWhitespace\";\r\n /**\r\n * `insertText` is a snippet.\r\n */\r\n CompletionItemInsertTextRule[CompletionItemInsertTextRule[\"InsertAsSnippet\"] = 4] = \"InsertAsSnippet\";\r\n})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {}));\r\nvar CompletionItemKind;\r\n(function (CompletionItemKind) {\r\n CompletionItemKind[CompletionItemKind[\"Method\"] = 0] = \"Method\";\r\n CompletionItemKind[CompletionItemKind[\"Function\"] = 1] = \"Function\";\r\n CompletionItemKind[CompletionItemKind[\"Constructor\"] = 2] = \"Constructor\";\r\n CompletionItemKind[CompletionItemKind[\"Field\"] = 3] = \"Field\";\r\n CompletionItemKind[CompletionItemKind[\"Variable\"] = 4] = \"Variable\";\r\n CompletionItemKind[CompletionItemKind[\"Class\"] = 5] = \"Class\";\r\n CompletionItemKind[CompletionItemKind[\"Struct\"] = 6] = \"Struct\";\r\n CompletionItemKind[CompletionItemKind[\"Interface\"] = 7] = \"Interface\";\r\n CompletionItemKind[CompletionItemKind[\"Module\"] = 8] = \"Module\";\r\n CompletionItemKind[CompletionItemKind[\"Property\"] = 9] = \"Property\";\r\n CompletionItemKind[CompletionItemKind[\"Event\"] = 10] = \"Event\";\r\n CompletionItemKind[CompletionItemKind[\"Operator\"] = 11] = \"Operator\";\r\n CompletionItemKind[CompletionItemKind[\"Unit\"] = 12] = \"Unit\";\r\n CompletionItemKind[CompletionItemKind[\"Value\"] = 13] = \"Value\";\r\n CompletionItemKind[CompletionItemKind[\"Constant\"] = 14] = \"Constant\";\r\n CompletionItemKind[CompletionItemKind[\"Enum\"] = 15] = \"Enum\";\r\n CompletionItemKind[CompletionItemKind[\"EnumMember\"] = 16] = \"EnumMember\";\r\n CompletionItemKind[CompletionItemKind[\"Keyword\"] = 17] = \"Keyword\";\r\n CompletionItemKind[CompletionItemKind[\"Text\"] = 18] = \"Text\";\r\n CompletionItemKind[CompletionItemKind[\"Color\"] = 19] = \"Color\";\r\n CompletionItemKind[CompletionItemKind[\"File\"] = 20] = \"File\";\r\n CompletionItemKind[CompletionItemKind[\"Reference\"] = 21] = \"Reference\";\r\n CompletionItemKind[CompletionItemKind[\"Customcolor\"] = 22] = \"Customcolor\";\r\n CompletionItemKind[CompletionItemKind[\"Folder\"] = 23] = \"Folder\";\r\n CompletionItemKind[CompletionItemKind[\"TypeParameter\"] = 24] = \"TypeParameter\";\r\n CompletionItemKind[CompletionItemKind[\"User\"] = 25] = \"User\";\r\n CompletionItemKind[CompletionItemKind[\"Issue\"] = 26] = \"Issue\";\r\n CompletionItemKind[CompletionItemKind[\"Snippet\"] = 27] = \"Snippet\";\r\n})(CompletionItemKind || (CompletionItemKind = {}));\r\nvar CompletionItemTag;\r\n(function (CompletionItemTag) {\r\n CompletionItemTag[CompletionItemTag[\"Deprecated\"] = 1] = \"Deprecated\";\r\n})(CompletionItemTag || (CompletionItemTag = {}));\r\n/**\r\n * How a suggest provider was triggered.\r\n */\r\nvar CompletionTriggerKind;\r\n(function (CompletionTriggerKind) {\r\n CompletionTriggerKind[CompletionTriggerKind[\"Invoke\"] = 0] = \"Invoke\";\r\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerCharacter\"] = 1] = \"TriggerCharacter\";\r\n CompletionTriggerKind[CompletionTriggerKind[\"TriggerForIncompleteCompletions\"] = 2] = \"TriggerForIncompleteCompletions\";\r\n})(CompletionTriggerKind || (CompletionTriggerKind = {}));\r\n/**\r\n * A positioning preference for rendering content widgets.\r\n */\r\nvar ContentWidgetPositionPreference;\r\n(function (ContentWidgetPositionPreference) {\r\n /**\r\n * Place the content widget exactly at a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"EXACT\"] = 0] = \"EXACT\";\r\n /**\r\n * Place the content widget above a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"ABOVE\"] = 1] = \"ABOVE\";\r\n /**\r\n * Place the content widget below a position\r\n */\r\n ContentWidgetPositionPreference[ContentWidgetPositionPreference[\"BELOW\"] = 2] = \"BELOW\";\r\n})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {}));\r\n/**\r\n * Describes the reason the cursor has changed its position.\r\n */\r\nvar CursorChangeReason;\r\n(function (CursorChangeReason) {\r\n /**\r\n * Unknown or not set.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"NotSet\"] = 0] = \"NotSet\";\r\n /**\r\n * A `model.setValue()` was called.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"ContentFlush\"] = 1] = \"ContentFlush\";\r\n /**\r\n * The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"RecoverFromMarkers\"] = 2] = \"RecoverFromMarkers\";\r\n /**\r\n * There was an explicit user gesture.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Explicit\"] = 3] = \"Explicit\";\r\n /**\r\n * There was a Paste.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Paste\"] = 4] = \"Paste\";\r\n /**\r\n * There was an Undo.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Undo\"] = 5] = \"Undo\";\r\n /**\r\n * There was a Redo.\r\n */\r\n CursorChangeReason[CursorChangeReason[\"Redo\"] = 6] = \"Redo\";\r\n})(CursorChangeReason || (CursorChangeReason = {}));\r\n/**\r\n * The default end of line to use when instantiating models.\r\n */\r\nvar DefaultEndOfLine;\r\n(function (DefaultEndOfLine) {\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n DefaultEndOfLine[DefaultEndOfLine[\"LF\"] = 1] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n DefaultEndOfLine[DefaultEndOfLine[\"CRLF\"] = 2] = \"CRLF\";\r\n})(DefaultEndOfLine || (DefaultEndOfLine = {}));\r\n/**\r\n * A document highlight kind.\r\n */\r\nvar DocumentHighlightKind;\r\n(function (DocumentHighlightKind) {\r\n /**\r\n * A textual occurrence.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Text\"] = 0] = \"Text\";\r\n /**\r\n * Read-access of a symbol, like reading a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Read\"] = 1] = \"Read\";\r\n /**\r\n * Write-access of a symbol, like writing to a variable.\r\n */\r\n DocumentHighlightKind[DocumentHighlightKind[\"Write\"] = 2] = \"Write\";\r\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r\n/**\r\n * Configuration options for auto indentation in the editor\r\n */\r\nvar EditorAutoIndentStrategy;\r\n(function (EditorAutoIndentStrategy) {\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"None\"] = 0] = \"None\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Keep\"] = 1] = \"Keep\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Brackets\"] = 2] = \"Brackets\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Advanced\"] = 3] = \"Advanced\";\r\n EditorAutoIndentStrategy[EditorAutoIndentStrategy[\"Full\"] = 4] = \"Full\";\r\n})(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {}));\r\nvar EditorOption;\r\n(function (EditorOption) {\r\n EditorOption[EditorOption[\"acceptSuggestionOnCommitCharacter\"] = 0] = \"acceptSuggestionOnCommitCharacter\";\r\n EditorOption[EditorOption[\"acceptSuggestionOnEnter\"] = 1] = \"acceptSuggestionOnEnter\";\r\n EditorOption[EditorOption[\"accessibilitySupport\"] = 2] = \"accessibilitySupport\";\r\n EditorOption[EditorOption[\"accessibilityPageSize\"] = 3] = \"accessibilityPageSize\";\r\n EditorOption[EditorOption[\"ariaLabel\"] = 4] = \"ariaLabel\";\r\n EditorOption[EditorOption[\"autoClosingBrackets\"] = 5] = \"autoClosingBrackets\";\r\n EditorOption[EditorOption[\"autoClosingOvertype\"] = 6] = \"autoClosingOvertype\";\r\n EditorOption[EditorOption[\"autoClosingQuotes\"] = 7] = \"autoClosingQuotes\";\r\n EditorOption[EditorOption[\"autoIndent\"] = 8] = \"autoIndent\";\r\n EditorOption[EditorOption[\"automaticLayout\"] = 9] = \"automaticLayout\";\r\n EditorOption[EditorOption[\"autoSurround\"] = 10] = \"autoSurround\";\r\n EditorOption[EditorOption[\"codeLens\"] = 11] = \"codeLens\";\r\n EditorOption[EditorOption[\"codeLensFontFamily\"] = 12] = \"codeLensFontFamily\";\r\n EditorOption[EditorOption[\"codeLensFontSize\"] = 13] = \"codeLensFontSize\";\r\n EditorOption[EditorOption[\"colorDecorators\"] = 14] = \"colorDecorators\";\r\n EditorOption[EditorOption[\"columnSelection\"] = 15] = \"columnSelection\";\r\n EditorOption[EditorOption[\"comments\"] = 16] = \"comments\";\r\n EditorOption[EditorOption[\"contextmenu\"] = 17] = \"contextmenu\";\r\n EditorOption[EditorOption[\"copyWithSyntaxHighlighting\"] = 18] = \"copyWithSyntaxHighlighting\";\r\n EditorOption[EditorOption[\"cursorBlinking\"] = 19] = \"cursorBlinking\";\r\n EditorOption[EditorOption[\"cursorSmoothCaretAnimation\"] = 20] = \"cursorSmoothCaretAnimation\";\r\n EditorOption[EditorOption[\"cursorStyle\"] = 21] = \"cursorStyle\";\r\n EditorOption[EditorOption[\"cursorSurroundingLines\"] = 22] = \"cursorSurroundingLines\";\r\n EditorOption[EditorOption[\"cursorSurroundingLinesStyle\"] = 23] = \"cursorSurroundingLinesStyle\";\r\n EditorOption[EditorOption[\"cursorWidth\"] = 24] = \"cursorWidth\";\r\n EditorOption[EditorOption[\"disableLayerHinting\"] = 25] = \"disableLayerHinting\";\r\n EditorOption[EditorOption[\"disableMonospaceOptimizations\"] = 26] = \"disableMonospaceOptimizations\";\r\n EditorOption[EditorOption[\"dragAndDrop\"] = 27] = \"dragAndDrop\";\r\n EditorOption[EditorOption[\"emptySelectionClipboard\"] = 28] = \"emptySelectionClipboard\";\r\n EditorOption[EditorOption[\"extraEditorClassName\"] = 29] = \"extraEditorClassName\";\r\n EditorOption[EditorOption[\"fastScrollSensitivity\"] = 30] = \"fastScrollSensitivity\";\r\n EditorOption[EditorOption[\"find\"] = 31] = \"find\";\r\n EditorOption[EditorOption[\"fixedOverflowWidgets\"] = 32] = \"fixedOverflowWidgets\";\r\n EditorOption[EditorOption[\"folding\"] = 33] = \"folding\";\r\n EditorOption[EditorOption[\"foldingStrategy\"] = 34] = \"foldingStrategy\";\r\n EditorOption[EditorOption[\"foldingHighlight\"] = 35] = \"foldingHighlight\";\r\n EditorOption[EditorOption[\"unfoldOnClickAfterEndOfLine\"] = 36] = \"unfoldOnClickAfterEndOfLine\";\r\n EditorOption[EditorOption[\"fontFamily\"] = 37] = \"fontFamily\";\r\n EditorOption[EditorOption[\"fontInfo\"] = 38] = \"fontInfo\";\r\n EditorOption[EditorOption[\"fontLigatures\"] = 39] = \"fontLigatures\";\r\n EditorOption[EditorOption[\"fontSize\"] = 40] = \"fontSize\";\r\n EditorOption[EditorOption[\"fontWeight\"] = 41] = \"fontWeight\";\r\n EditorOption[EditorOption[\"formatOnPaste\"] = 42] = \"formatOnPaste\";\r\n EditorOption[EditorOption[\"formatOnType\"] = 43] = \"formatOnType\";\r\n EditorOption[EditorOption[\"glyphMargin\"] = 44] = \"glyphMargin\";\r\n EditorOption[EditorOption[\"gotoLocation\"] = 45] = \"gotoLocation\";\r\n EditorOption[EditorOption[\"hideCursorInOverviewRuler\"] = 46] = \"hideCursorInOverviewRuler\";\r\n EditorOption[EditorOption[\"highlightActiveIndentGuide\"] = 47] = \"highlightActiveIndentGuide\";\r\n EditorOption[EditorOption[\"hover\"] = 48] = \"hover\";\r\n EditorOption[EditorOption[\"inDiffEditor\"] = 49] = \"inDiffEditor\";\r\n EditorOption[EditorOption[\"letterSpacing\"] = 50] = \"letterSpacing\";\r\n EditorOption[EditorOption[\"lightbulb\"] = 51] = \"lightbulb\";\r\n EditorOption[EditorOption[\"lineDecorationsWidth\"] = 52] = \"lineDecorationsWidth\";\r\n EditorOption[EditorOption[\"lineHeight\"] = 53] = \"lineHeight\";\r\n EditorOption[EditorOption[\"lineNumbers\"] = 54] = \"lineNumbers\";\r\n EditorOption[EditorOption[\"lineNumbersMinChars\"] = 55] = \"lineNumbersMinChars\";\r\n EditorOption[EditorOption[\"linkedEditing\"] = 56] = \"linkedEditing\";\r\n EditorOption[EditorOption[\"links\"] = 57] = \"links\";\r\n EditorOption[EditorOption[\"matchBrackets\"] = 58] = \"matchBrackets\";\r\n EditorOption[EditorOption[\"minimap\"] = 59] = \"minimap\";\r\n EditorOption[EditorOption[\"mouseStyle\"] = 60] = \"mouseStyle\";\r\n EditorOption[EditorOption[\"mouseWheelScrollSensitivity\"] = 61] = \"mouseWheelScrollSensitivity\";\r\n EditorOption[EditorOption[\"mouseWheelZoom\"] = 62] = \"mouseWheelZoom\";\r\n EditorOption[EditorOption[\"multiCursorMergeOverlapping\"] = 63] = \"multiCursorMergeOverlapping\";\r\n EditorOption[EditorOption[\"multiCursorModifier\"] = 64] = \"multiCursorModifier\";\r\n EditorOption[EditorOption[\"multiCursorPaste\"] = 65] = \"multiCursorPaste\";\r\n EditorOption[EditorOption[\"occurrencesHighlight\"] = 66] = \"occurrencesHighlight\";\r\n EditorOption[EditorOption[\"overviewRulerBorder\"] = 67] = \"overviewRulerBorder\";\r\n EditorOption[EditorOption[\"overviewRulerLanes\"] = 68] = \"overviewRulerLanes\";\r\n EditorOption[EditorOption[\"padding\"] = 69] = \"padding\";\r\n EditorOption[EditorOption[\"parameterHints\"] = 70] = \"parameterHints\";\r\n EditorOption[EditorOption[\"peekWidgetDefaultFocus\"] = 71] = \"peekWidgetDefaultFocus\";\r\n EditorOption[EditorOption[\"definitionLinkOpensInPeek\"] = 72] = \"definitionLinkOpensInPeek\";\r\n EditorOption[EditorOption[\"quickSuggestions\"] = 73] = \"quickSuggestions\";\r\n EditorOption[EditorOption[\"quickSuggestionsDelay\"] = 74] = \"quickSuggestionsDelay\";\r\n EditorOption[EditorOption[\"readOnly\"] = 75] = \"readOnly\";\r\n EditorOption[EditorOption[\"renameOnType\"] = 76] = \"renameOnType\";\r\n EditorOption[EditorOption[\"renderControlCharacters\"] = 77] = \"renderControlCharacters\";\r\n EditorOption[EditorOption[\"renderIndentGuides\"] = 78] = \"renderIndentGuides\";\r\n EditorOption[EditorOption[\"renderFinalNewline\"] = 79] = \"renderFinalNewline\";\r\n EditorOption[EditorOption[\"renderLineHighlight\"] = 80] = \"renderLineHighlight\";\r\n EditorOption[EditorOption[\"renderLineHighlightOnlyWhenFocus\"] = 81] = \"renderLineHighlightOnlyWhenFocus\";\r\n EditorOption[EditorOption[\"renderValidationDecorations\"] = 82] = \"renderValidationDecorations\";\r\n EditorOption[EditorOption[\"renderWhitespace\"] = 83] = \"renderWhitespace\";\r\n EditorOption[EditorOption[\"revealHorizontalRightPadding\"] = 84] = \"revealHorizontalRightPadding\";\r\n EditorOption[EditorOption[\"roundedSelection\"] = 85] = \"roundedSelection\";\r\n EditorOption[EditorOption[\"rulers\"] = 86] = \"rulers\";\r\n EditorOption[EditorOption[\"scrollbar\"] = 87] = \"scrollbar\";\r\n EditorOption[EditorOption[\"scrollBeyondLastColumn\"] = 88] = \"scrollBeyondLastColumn\";\r\n EditorOption[EditorOption[\"scrollBeyondLastLine\"] = 89] = \"scrollBeyondLastLine\";\r\n EditorOption[EditorOption[\"scrollPredominantAxis\"] = 90] = \"scrollPredominantAxis\";\r\n EditorOption[EditorOption[\"selectionClipboard\"] = 91] = \"selectionClipboard\";\r\n EditorOption[EditorOption[\"selectionHighlight\"] = 92] = \"selectionHighlight\";\r\n EditorOption[EditorOption[\"selectOnLineNumbers\"] = 93] = \"selectOnLineNumbers\";\r\n EditorOption[EditorOption[\"showFoldingControls\"] = 94] = \"showFoldingControls\";\r\n EditorOption[EditorOption[\"showUnused\"] = 95] = \"showUnused\";\r\n EditorOption[EditorOption[\"snippetSuggestions\"] = 96] = \"snippetSuggestions\";\r\n EditorOption[EditorOption[\"smartSelect\"] = 97] = \"smartSelect\";\r\n EditorOption[EditorOption[\"smoothScrolling\"] = 98] = \"smoothScrolling\";\r\n EditorOption[EditorOption[\"stickyTabStops\"] = 99] = \"stickyTabStops\";\r\n EditorOption[EditorOption[\"stopRenderingLineAfter\"] = 100] = \"stopRenderingLineAfter\";\r\n EditorOption[EditorOption[\"suggest\"] = 101] = \"suggest\";\r\n EditorOption[EditorOption[\"suggestFontSize\"] = 102] = \"suggestFontSize\";\r\n EditorOption[EditorOption[\"suggestLineHeight\"] = 103] = \"suggestLineHeight\";\r\n EditorOption[EditorOption[\"suggestOnTriggerCharacters\"] = 104] = \"suggestOnTriggerCharacters\";\r\n EditorOption[EditorOption[\"suggestSelection\"] = 105] = \"suggestSelection\";\r\n EditorOption[EditorOption[\"tabCompletion\"] = 106] = \"tabCompletion\";\r\n EditorOption[EditorOption[\"tabIndex\"] = 107] = \"tabIndex\";\r\n EditorOption[EditorOption[\"unusualLineTerminators\"] = 108] = \"unusualLineTerminators\";\r\n EditorOption[EditorOption[\"useTabStops\"] = 109] = \"useTabStops\";\r\n EditorOption[EditorOption[\"wordSeparators\"] = 110] = \"wordSeparators\";\r\n EditorOption[EditorOption[\"wordWrap\"] = 111] = \"wordWrap\";\r\n EditorOption[EditorOption[\"wordWrapBreakAfterCharacters\"] = 112] = \"wordWrapBreakAfterCharacters\";\r\n EditorOption[EditorOption[\"wordWrapBreakBeforeCharacters\"] = 113] = \"wordWrapBreakBeforeCharacters\";\r\n EditorOption[EditorOption[\"wordWrapColumn\"] = 114] = \"wordWrapColumn\";\r\n EditorOption[EditorOption[\"wordWrapOverride1\"] = 115] = \"wordWrapOverride1\";\r\n EditorOption[EditorOption[\"wordWrapOverride2\"] = 116] = \"wordWrapOverride2\";\r\n EditorOption[EditorOption[\"wrappingIndent\"] = 117] = \"wrappingIndent\";\r\n EditorOption[EditorOption[\"wrappingStrategy\"] = 118] = \"wrappingStrategy\";\r\n EditorOption[EditorOption[\"showDeprecated\"] = 119] = \"showDeprecated\";\r\n EditorOption[EditorOption[\"inlineHints\"] = 120] = \"inlineHints\";\r\n EditorOption[EditorOption[\"editorClassName\"] = 121] = \"editorClassName\";\r\n EditorOption[EditorOption[\"pixelRatio\"] = 122] = \"pixelRatio\";\r\n EditorOption[EditorOption[\"tabFocusMode\"] = 123] = \"tabFocusMode\";\r\n EditorOption[EditorOption[\"layoutInfo\"] = 124] = \"layoutInfo\";\r\n EditorOption[EditorOption[\"wrappingInfo\"] = 125] = \"wrappingInfo\";\r\n})(EditorOption || (EditorOption = {}));\r\n/**\r\n * End of line character preference.\r\n */\r\nvar EndOfLinePreference;\r\n(function (EndOfLinePreference) {\r\n /**\r\n * Use the end of line character identified in the text buffer.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"TextDefined\"] = 0] = \"TextDefined\";\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"LF\"] = 1] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n EndOfLinePreference[EndOfLinePreference[\"CRLF\"] = 2] = \"CRLF\";\r\n})(EndOfLinePreference || (EndOfLinePreference = {}));\r\n/**\r\n * End of line character preference.\r\n */\r\nvar EndOfLineSequence;\r\n(function (EndOfLineSequence) {\r\n /**\r\n * Use line feed (\\n) as the end of line character.\r\n */\r\n EndOfLineSequence[EndOfLineSequence[\"LF\"] = 0] = \"LF\";\r\n /**\r\n * Use carriage return and line feed (\\r\\n) as the end of line character.\r\n */\r\n EndOfLineSequence[EndOfLineSequence[\"CRLF\"] = 1] = \"CRLF\";\r\n})(EndOfLineSequence || (EndOfLineSequence = {}));\r\n/**\r\n * Describes what to do with the indentation when pressing Enter.\r\n */\r\nvar IndentAction;\r\n(function (IndentAction) {\r\n /**\r\n * Insert new line and copy the previous line's indentation.\r\n */\r\n IndentAction[IndentAction[\"None\"] = 0] = \"None\";\r\n /**\r\n * Insert new line and indent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Indent\"] = 1] = \"Indent\";\r\n /**\r\n * Insert two new lines:\r\n * - the first one indented which will hold the cursor\r\n * - the second one at the same indentation level\r\n */\r\n IndentAction[IndentAction[\"IndentOutdent\"] = 2] = \"IndentOutdent\";\r\n /**\r\n * Insert new line and outdent once (relative to the previous line's indentation).\r\n */\r\n IndentAction[IndentAction[\"Outdent\"] = 3] = \"Outdent\";\r\n})(IndentAction || (IndentAction = {}));\r\nvar InlineHintKind;\r\n(function (InlineHintKind) {\r\n InlineHintKind[InlineHintKind[\"Other\"] = 0] = \"Other\";\r\n InlineHintKind[InlineHintKind[\"Type\"] = 1] = \"Type\";\r\n InlineHintKind[InlineHintKind[\"Parameter\"] = 2] = \"Parameter\";\r\n})(InlineHintKind || (InlineHintKind = {}));\r\n/**\r\n * Virtual Key Codes, the value does not hold any inherent meaning.\r\n * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx\r\n * But these are \"more general\", as they should work across browsers & OS`s.\r\n */\r\nvar KeyCode;\r\n(function (KeyCode) {\r\n /**\r\n * Placed first to cover the 0 value of the enum.\r\n */\r\n KeyCode[KeyCode[\"Unknown\"] = 0] = \"Unknown\";\r\n KeyCode[KeyCode[\"Backspace\"] = 1] = \"Backspace\";\r\n KeyCode[KeyCode[\"Tab\"] = 2] = \"Tab\";\r\n KeyCode[KeyCode[\"Enter\"] = 3] = \"Enter\";\r\n KeyCode[KeyCode[\"Shift\"] = 4] = \"Shift\";\r\n KeyCode[KeyCode[\"Ctrl\"] = 5] = \"Ctrl\";\r\n KeyCode[KeyCode[\"Alt\"] = 6] = \"Alt\";\r\n KeyCode[KeyCode[\"PauseBreak\"] = 7] = \"PauseBreak\";\r\n KeyCode[KeyCode[\"CapsLock\"] = 8] = \"CapsLock\";\r\n KeyCode[KeyCode[\"Escape\"] = 9] = \"Escape\";\r\n KeyCode[KeyCode[\"Space\"] = 10] = \"Space\";\r\n KeyCode[KeyCode[\"PageUp\"] = 11] = \"PageUp\";\r\n KeyCode[KeyCode[\"PageDown\"] = 12] = \"PageDown\";\r\n KeyCode[KeyCode[\"End\"] = 13] = \"End\";\r\n KeyCode[KeyCode[\"Home\"] = 14] = \"Home\";\r\n KeyCode[KeyCode[\"LeftArrow\"] = 15] = \"LeftArrow\";\r\n KeyCode[KeyCode[\"UpArrow\"] = 16] = \"UpArrow\";\r\n KeyCode[KeyCode[\"RightArrow\"] = 17] = \"RightArrow\";\r\n KeyCode[KeyCode[\"DownArrow\"] = 18] = \"DownArrow\";\r\n KeyCode[KeyCode[\"Insert\"] = 19] = \"Insert\";\r\n KeyCode[KeyCode[\"Delete\"] = 20] = \"Delete\";\r\n KeyCode[KeyCode[\"KEY_0\"] = 21] = \"KEY_0\";\r\n KeyCode[KeyCode[\"KEY_1\"] = 22] = \"KEY_1\";\r\n KeyCode[KeyCode[\"KEY_2\"] = 23] = \"KEY_2\";\r\n KeyCode[KeyCode[\"KEY_3\"] = 24] = \"KEY_3\";\r\n KeyCode[KeyCode[\"KEY_4\"] = 25] = \"KEY_4\";\r\n KeyCode[KeyCode[\"KEY_5\"] = 26] = \"KEY_5\";\r\n KeyCode[KeyCode[\"KEY_6\"] = 27] = \"KEY_6\";\r\n KeyCode[KeyCode[\"KEY_7\"] = 28] = \"KEY_7\";\r\n KeyCode[KeyCode[\"KEY_8\"] = 29] = \"KEY_8\";\r\n KeyCode[KeyCode[\"KEY_9\"] = 30] = \"KEY_9\";\r\n KeyCode[KeyCode[\"KEY_A\"] = 31] = \"KEY_A\";\r\n KeyCode[KeyCode[\"KEY_B\"] = 32] = \"KEY_B\";\r\n KeyCode[KeyCode[\"KEY_C\"] = 33] = \"KEY_C\";\r\n KeyCode[KeyCode[\"KEY_D\"] = 34] = \"KEY_D\";\r\n KeyCode[KeyCode[\"KEY_E\"] = 35] = \"KEY_E\";\r\n KeyCode[KeyCode[\"KEY_F\"] = 36] = \"KEY_F\";\r\n KeyCode[KeyCode[\"KEY_G\"] = 37] = \"KEY_G\";\r\n KeyCode[KeyCode[\"KEY_H\"] = 38] = \"KEY_H\";\r\n KeyCode[KeyCode[\"KEY_I\"] = 39] = \"KEY_I\";\r\n KeyCode[KeyCode[\"KEY_J\"] = 40] = \"KEY_J\";\r\n KeyCode[KeyCode[\"KEY_K\"] = 41] = \"KEY_K\";\r\n KeyCode[KeyCode[\"KEY_L\"] = 42] = \"KEY_L\";\r\n KeyCode[KeyCode[\"KEY_M\"] = 43] = \"KEY_M\";\r\n KeyCode[KeyCode[\"KEY_N\"] = 44] = \"KEY_N\";\r\n KeyCode[KeyCode[\"KEY_O\"] = 45] = \"KEY_O\";\r\n KeyCode[KeyCode[\"KEY_P\"] = 46] = \"KEY_P\";\r\n KeyCode[KeyCode[\"KEY_Q\"] = 47] = \"KEY_Q\";\r\n KeyCode[KeyCode[\"KEY_R\"] = 48] = \"KEY_R\";\r\n KeyCode[KeyCode[\"KEY_S\"] = 49] = \"KEY_S\";\r\n KeyCode[KeyCode[\"KEY_T\"] = 50] = \"KEY_T\";\r\n KeyCode[KeyCode[\"KEY_U\"] = 51] = \"KEY_U\";\r\n KeyCode[KeyCode[\"KEY_V\"] = 52] = \"KEY_V\";\r\n KeyCode[KeyCode[\"KEY_W\"] = 53] = \"KEY_W\";\r\n KeyCode[KeyCode[\"KEY_X\"] = 54] = \"KEY_X\";\r\n KeyCode[KeyCode[\"KEY_Y\"] = 55] = \"KEY_Y\";\r\n KeyCode[KeyCode[\"KEY_Z\"] = 56] = \"KEY_Z\";\r\n KeyCode[KeyCode[\"Meta\"] = 57] = \"Meta\";\r\n KeyCode[KeyCode[\"ContextMenu\"] = 58] = \"ContextMenu\";\r\n KeyCode[KeyCode[\"F1\"] = 59] = \"F1\";\r\n KeyCode[KeyCode[\"F2\"] = 60] = \"F2\";\r\n KeyCode[KeyCode[\"F3\"] = 61] = \"F3\";\r\n KeyCode[KeyCode[\"F4\"] = 62] = \"F4\";\r\n KeyCode[KeyCode[\"F5\"] = 63] = \"F5\";\r\n KeyCode[KeyCode[\"F6\"] = 64] = \"F6\";\r\n KeyCode[KeyCode[\"F7\"] = 65] = \"F7\";\r\n KeyCode[KeyCode[\"F8\"] = 66] = \"F8\";\r\n KeyCode[KeyCode[\"F9\"] = 67] = \"F9\";\r\n KeyCode[KeyCode[\"F10\"] = 68] = \"F10\";\r\n KeyCode[KeyCode[\"F11\"] = 69] = \"F11\";\r\n KeyCode[KeyCode[\"F12\"] = 70] = \"F12\";\r\n KeyCode[KeyCode[\"F13\"] = 71] = \"F13\";\r\n KeyCode[KeyCode[\"F14\"] = 72] = \"F14\";\r\n KeyCode[KeyCode[\"F15\"] = 73] = \"F15\";\r\n KeyCode[KeyCode[\"F16\"] = 74] = \"F16\";\r\n KeyCode[KeyCode[\"F17\"] = 75] = \"F17\";\r\n KeyCode[KeyCode[\"F18\"] = 76] = \"F18\";\r\n KeyCode[KeyCode[\"F19\"] = 77] = \"F19\";\r\n KeyCode[KeyCode[\"NumLock\"] = 78] = \"NumLock\";\r\n KeyCode[KeyCode[\"ScrollLock\"] = 79] = \"ScrollLock\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ';:' key\r\n */\r\n KeyCode[KeyCode[\"US_SEMICOLON\"] = 80] = \"US_SEMICOLON\";\r\n /**\r\n * For any country/region, the '+' key\r\n * For the US standard keyboard, the '=+' key\r\n */\r\n KeyCode[KeyCode[\"US_EQUAL\"] = 81] = \"US_EQUAL\";\r\n /**\r\n * For any country/region, the ',' key\r\n * For the US standard keyboard, the ',<' key\r\n */\r\n KeyCode[KeyCode[\"US_COMMA\"] = 82] = \"US_COMMA\";\r\n /**\r\n * For any country/region, the '-' key\r\n * For the US standard keyboard, the '-_' key\r\n */\r\n KeyCode[KeyCode[\"US_MINUS\"] = 83] = \"US_MINUS\";\r\n /**\r\n * For any country/region, the '.' key\r\n * For the US standard keyboard, the '.>' key\r\n */\r\n KeyCode[KeyCode[\"US_DOT\"] = 84] = \"US_DOT\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '/?' key\r\n */\r\n KeyCode[KeyCode[\"US_SLASH\"] = 85] = \"US_SLASH\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '`~' key\r\n */\r\n KeyCode[KeyCode[\"US_BACKTICK\"] = 86] = \"US_BACKTICK\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '[{' key\r\n */\r\n KeyCode[KeyCode[\"US_OPEN_SQUARE_BRACKET\"] = 87] = \"US_OPEN_SQUARE_BRACKET\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the '\\|' key\r\n */\r\n KeyCode[KeyCode[\"US_BACKSLASH\"] = 88] = \"US_BACKSLASH\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ']}' key\r\n */\r\n KeyCode[KeyCode[\"US_CLOSE_SQUARE_BRACKET\"] = 89] = \"US_CLOSE_SQUARE_BRACKET\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n * For the US standard keyboard, the ''\"' key\r\n */\r\n KeyCode[KeyCode[\"US_QUOTE\"] = 90] = \"US_QUOTE\";\r\n /**\r\n * Used for miscellaneous characters; it can vary by keyboard.\r\n */\r\n KeyCode[KeyCode[\"OEM_8\"] = 91] = \"OEM_8\";\r\n /**\r\n * Either the angle bracket key or the backslash key on the RT 102-key keyboard.\r\n */\r\n KeyCode[KeyCode[\"OEM_102\"] = 92] = \"OEM_102\";\r\n KeyCode[KeyCode[\"NUMPAD_0\"] = 93] = \"NUMPAD_0\";\r\n KeyCode[KeyCode[\"NUMPAD_1\"] = 94] = \"NUMPAD_1\";\r\n KeyCode[KeyCode[\"NUMPAD_2\"] = 95] = \"NUMPAD_2\";\r\n KeyCode[KeyCode[\"NUMPAD_3\"] = 96] = \"NUMPAD_3\";\r\n KeyCode[KeyCode[\"NUMPAD_4\"] = 97] = \"NUMPAD_4\";\r\n KeyCode[KeyCode[\"NUMPAD_5\"] = 98] = \"NUMPAD_5\";\r\n KeyCode[KeyCode[\"NUMPAD_6\"] = 99] = \"NUMPAD_6\";\r\n KeyCode[KeyCode[\"NUMPAD_7\"] = 100] = \"NUMPAD_7\";\r\n KeyCode[KeyCode[\"NUMPAD_8\"] = 101] = \"NUMPAD_8\";\r\n KeyCode[KeyCode[\"NUMPAD_9\"] = 102] = \"NUMPAD_9\";\r\n KeyCode[KeyCode[\"NUMPAD_MULTIPLY\"] = 103] = \"NUMPAD_MULTIPLY\";\r\n KeyCode[KeyCode[\"NUMPAD_ADD\"] = 104] = \"NUMPAD_ADD\";\r\n KeyCode[KeyCode[\"NUMPAD_SEPARATOR\"] = 105] = \"NUMPAD_SEPARATOR\";\r\n KeyCode[KeyCode[\"NUMPAD_SUBTRACT\"] = 106] = \"NUMPAD_SUBTRACT\";\r\n KeyCode[KeyCode[\"NUMPAD_DECIMAL\"] = 107] = \"NUMPAD_DECIMAL\";\r\n KeyCode[KeyCode[\"NUMPAD_DIVIDE\"] = 108] = \"NUMPAD_DIVIDE\";\r\n /**\r\n * Cover all key codes when IME is processing input.\r\n */\r\n KeyCode[KeyCode[\"KEY_IN_COMPOSITION\"] = 109] = \"KEY_IN_COMPOSITION\";\r\n KeyCode[KeyCode[\"ABNT_C1\"] = 110] = \"ABNT_C1\";\r\n KeyCode[KeyCode[\"ABNT_C2\"] = 111] = \"ABNT_C2\";\r\n /**\r\n * Placed last to cover the length of the enum.\r\n * Please do not depend on this value!\r\n */\r\n KeyCode[KeyCode[\"MAX_VALUE\"] = 112] = \"MAX_VALUE\";\r\n})(KeyCode || (KeyCode = {}));\r\nvar MarkerSeverity;\r\n(function (MarkerSeverity) {\r\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\r\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\r\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\r\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\r\n})(MarkerSeverity || (MarkerSeverity = {}));\r\nvar MarkerTag;\r\n(function (MarkerTag) {\r\n MarkerTag[MarkerTag[\"Unnecessary\"] = 1] = \"Unnecessary\";\r\n MarkerTag[MarkerTag[\"Deprecated\"] = 2] = \"Deprecated\";\r\n})(MarkerTag || (MarkerTag = {}));\r\n/**\r\n * Position in the minimap to render the decoration.\r\n */\r\nvar MinimapPosition;\r\n(function (MinimapPosition) {\r\n MinimapPosition[MinimapPosition[\"Inline\"] = 1] = \"Inline\";\r\n MinimapPosition[MinimapPosition[\"Gutter\"] = 2] = \"Gutter\";\r\n})(MinimapPosition || (MinimapPosition = {}));\r\n/**\r\n * Type of hit element with the mouse in the editor.\r\n */\r\nvar MouseTargetType;\r\n(function (MouseTargetType) {\r\n /**\r\n * Mouse is on top of an unknown element.\r\n */\r\n MouseTargetType[MouseTargetType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\r\n /**\r\n * Mouse is on top of the textarea used for input.\r\n */\r\n MouseTargetType[MouseTargetType[\"TEXTAREA\"] = 1] = \"TEXTAREA\";\r\n /**\r\n * Mouse is on top of the glyph margin\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_GLYPH_MARGIN\"] = 2] = \"GUTTER_GLYPH_MARGIN\";\r\n /**\r\n * Mouse is on top of the line numbers\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_NUMBERS\"] = 3] = \"GUTTER_LINE_NUMBERS\";\r\n /**\r\n * Mouse is on top of the line decorations\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_LINE_DECORATIONS\"] = 4] = \"GUTTER_LINE_DECORATIONS\";\r\n /**\r\n * Mouse is on top of the whitespace left in the gutter by a view zone.\r\n */\r\n MouseTargetType[MouseTargetType[\"GUTTER_VIEW_ZONE\"] = 5] = \"GUTTER_VIEW_ZONE\";\r\n /**\r\n * Mouse is on top of text in the content.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_TEXT\"] = 6] = \"CONTENT_TEXT\";\r\n /**\r\n * Mouse is on top of empty space in the content (e.g. after line text or below last line)\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_EMPTY\"] = 7] = \"CONTENT_EMPTY\";\r\n /**\r\n * Mouse is on top of a view zone in the content.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_VIEW_ZONE\"] = 8] = \"CONTENT_VIEW_ZONE\";\r\n /**\r\n * Mouse is on top of a content widget.\r\n */\r\n MouseTargetType[MouseTargetType[\"CONTENT_WIDGET\"] = 9] = \"CONTENT_WIDGET\";\r\n /**\r\n * Mouse is on top of the decorations overview ruler.\r\n */\r\n MouseTargetType[MouseTargetType[\"OVERVIEW_RULER\"] = 10] = \"OVERVIEW_RULER\";\r\n /**\r\n * Mouse is on top of a scrollbar.\r\n */\r\n MouseTargetType[MouseTargetType[\"SCROLLBAR\"] = 11] = \"SCROLLBAR\";\r\n /**\r\n * Mouse is on top of an overlay widget.\r\n */\r\n MouseTargetType[MouseTargetType[\"OVERLAY_WIDGET\"] = 12] = \"OVERLAY_WIDGET\";\r\n /**\r\n * Mouse is outside of the editor.\r\n */\r\n MouseTargetType[MouseTargetType[\"OUTSIDE_EDITOR\"] = 13] = \"OUTSIDE_EDITOR\";\r\n})(MouseTargetType || (MouseTargetType = {}));\r\n/**\r\n * A positioning preference for rendering overlay widgets.\r\n */\r\nvar OverlayWidgetPositionPreference;\r\n(function (OverlayWidgetPositionPreference) {\r\n /**\r\n * Position the overlay widget in the top right corner\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_RIGHT_CORNER\"] = 0] = \"TOP_RIGHT_CORNER\";\r\n /**\r\n * Position the overlay widget in the bottom right corner\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"BOTTOM_RIGHT_CORNER\"] = 1] = \"BOTTOM_RIGHT_CORNER\";\r\n /**\r\n * Position the overlay widget in the top center\r\n */\r\n OverlayWidgetPositionPreference[OverlayWidgetPositionPreference[\"TOP_CENTER\"] = 2] = \"TOP_CENTER\";\r\n})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {}));\r\n/**\r\n * Vertical Lane in the overview ruler of the editor.\r\n */\r\nvar OverviewRulerLane;\r\n(function (OverviewRulerLane) {\r\n OverviewRulerLane[OverviewRulerLane[\"Left\"] = 1] = \"Left\";\r\n OverviewRulerLane[OverviewRulerLane[\"Center\"] = 2] = \"Center\";\r\n OverviewRulerLane[OverviewRulerLane[\"Right\"] = 4] = \"Right\";\r\n OverviewRulerLane[OverviewRulerLane[\"Full\"] = 7] = \"Full\";\r\n})(OverviewRulerLane || (OverviewRulerLane = {}));\r\nvar RenderLineNumbersType;\r\n(function (RenderLineNumbersType) {\r\n RenderLineNumbersType[RenderLineNumbersType[\"Off\"] = 0] = \"Off\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"On\"] = 1] = \"On\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Relative\"] = 2] = \"Relative\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Interval\"] = 3] = \"Interval\";\r\n RenderLineNumbersType[RenderLineNumbersType[\"Custom\"] = 4] = \"Custom\";\r\n})(RenderLineNumbersType || (RenderLineNumbersType = {}));\r\nvar RenderMinimap;\r\n(function (RenderMinimap) {\r\n RenderMinimap[RenderMinimap[\"None\"] = 0] = \"None\";\r\n RenderMinimap[RenderMinimap[\"Text\"] = 1] = \"Text\";\r\n RenderMinimap[RenderMinimap[\"Blocks\"] = 2] = \"Blocks\";\r\n})(RenderMinimap || (RenderMinimap = {}));\r\nvar ScrollType;\r\n(function (ScrollType) {\r\n ScrollType[ScrollType[\"Smooth\"] = 0] = \"Smooth\";\r\n ScrollType[ScrollType[\"Immediate\"] = 1] = \"Immediate\";\r\n})(ScrollType || (ScrollType = {}));\r\nvar ScrollbarVisibility;\r\n(function (ScrollbarVisibility) {\r\n ScrollbarVisibility[ScrollbarVisibility[\"Auto\"] = 1] = \"Auto\";\r\n ScrollbarVisibility[ScrollbarVisibility[\"Hidden\"] = 2] = \"Hidden\";\r\n ScrollbarVisibility[ScrollbarVisibility[\"Visible\"] = 3] = \"Visible\";\r\n})(ScrollbarVisibility || (ScrollbarVisibility = {}));\r\n/**\r\n * The direction of a selection.\r\n */\r\nvar SelectionDirection;\r\n(function (SelectionDirection) {\r\n /**\r\n * The selection starts above where it ends.\r\n */\r\n SelectionDirection[SelectionDirection[\"LTR\"] = 0] = \"LTR\";\r\n /**\r\n * The selection starts below where it ends.\r\n */\r\n SelectionDirection[SelectionDirection[\"RTL\"] = 1] = \"RTL\";\r\n})(SelectionDirection || (SelectionDirection = {}));\r\nvar SignatureHelpTriggerKind;\r\n(function (SignatureHelpTriggerKind) {\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\r\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\r\n})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));\r\n/**\r\n * A symbol kind.\r\n */\r\nvar SymbolKind;\r\n(function (SymbolKind) {\r\n SymbolKind[SymbolKind[\"File\"] = 0] = \"File\";\r\n SymbolKind[SymbolKind[\"Module\"] = 1] = \"Module\";\r\n SymbolKind[SymbolKind[\"Namespace\"] = 2] = \"Namespace\";\r\n SymbolKind[SymbolKind[\"Package\"] = 3] = \"Package\";\r\n SymbolKind[SymbolKind[\"Class\"] = 4] = \"Class\";\r\n SymbolKind[SymbolKind[\"Method\"] = 5] = \"Method\";\r\n SymbolKind[SymbolKind[\"Property\"] = 6] = \"Property\";\r\n SymbolKind[SymbolKind[\"Field\"] = 7] = \"Field\";\r\n SymbolKind[SymbolKind[\"Constructor\"] = 8] = \"Constructor\";\r\n SymbolKind[SymbolKind[\"Enum\"] = 9] = \"Enum\";\r\n SymbolKind[SymbolKind[\"Interface\"] = 10] = \"Interface\";\r\n SymbolKind[SymbolKind[\"Function\"] = 11] = \"Function\";\r\n SymbolKind[SymbolKind[\"Variable\"] = 12] = \"Variable\";\r\n SymbolKind[SymbolKind[\"Constant\"] = 13] = \"Constant\";\r\n SymbolKind[SymbolKind[\"String\"] = 14] = \"String\";\r\n SymbolKind[SymbolKind[\"Number\"] = 15] = \"Number\";\r\n SymbolKind[SymbolKind[\"Boolean\"] = 16] = \"Boolean\";\r\n SymbolKind[SymbolKind[\"Array\"] = 17] = \"Array\";\r\n SymbolKind[SymbolKind[\"Object\"] = 18] = \"Object\";\r\n SymbolKind[SymbolKind[\"Key\"] = 19] = \"Key\";\r\n SymbolKind[SymbolKind[\"Null\"] = 20] = \"Null\";\r\n SymbolKind[SymbolKind[\"EnumMember\"] = 21] = \"EnumMember\";\r\n SymbolKind[SymbolKind[\"Struct\"] = 22] = \"Struct\";\r\n SymbolKind[SymbolKind[\"Event\"] = 23] = \"Event\";\r\n SymbolKind[SymbolKind[\"Operator\"] = 24] = \"Operator\";\r\n SymbolKind[SymbolKind[\"TypeParameter\"] = 25] = \"TypeParameter\";\r\n})(SymbolKind || (SymbolKind = {}));\r\nvar SymbolTag;\r\n(function (SymbolTag) {\r\n SymbolTag[SymbolTag[\"Deprecated\"] = 1] = \"Deprecated\";\r\n})(SymbolTag || (SymbolTag = {}));\r\n/**\r\n * The kind of animation in which the editor's cursor should be rendered.\r\n */\r\nvar TextEditorCursorBlinkingStyle;\r\n(function (TextEditorCursorBlinkingStyle) {\r\n /**\r\n * Hidden\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Hidden\"] = 0] = \"Hidden\";\r\n /**\r\n * Blinking\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Blink\"] = 1] = \"Blink\";\r\n /**\r\n * Blinking with smooth fading\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Smooth\"] = 2] = \"Smooth\";\r\n /**\r\n * Blinking with prolonged filled state and smooth fading\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Phase\"] = 3] = \"Phase\";\r\n /**\r\n * Expand collapse animation on the y axis\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Expand\"] = 4] = \"Expand\";\r\n /**\r\n * No-Blinking\r\n */\r\n TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle[\"Solid\"] = 5] = \"Solid\";\r\n})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {}));\r\n/**\r\n * The style in which the editor's cursor should be rendered.\r\n */\r\nvar TextEditorCursorStyle;\r\n(function (TextEditorCursorStyle) {\r\n /**\r\n * As a vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Line\"] = 1] = \"Line\";\r\n /**\r\n * As a block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Block\"] = 2] = \"Block\";\r\n /**\r\n * As a horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"Underline\"] = 3] = \"Underline\";\r\n /**\r\n * As a thin vertical line (sitting between two characters).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"LineThin\"] = 4] = \"LineThin\";\r\n /**\r\n * As an outlined block (sitting on top of a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"BlockOutline\"] = 5] = \"BlockOutline\";\r\n /**\r\n * As a thin horizontal line (sitting under a character).\r\n */\r\n TextEditorCursorStyle[TextEditorCursorStyle[\"UnderlineThin\"] = 6] = \"UnderlineThin\";\r\n})(TextEditorCursorStyle || (TextEditorCursorStyle = {}));\r\n/**\r\n * Describes the behavior of decorations when typing/editing near their edges.\r\n * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`\r\n */\r\nvar TrackedRangeStickiness;\r\n(function (TrackedRangeStickiness) {\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"AlwaysGrowsWhenTypingAtEdges\"] = 0] = \"AlwaysGrowsWhenTypingAtEdges\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"NeverGrowsWhenTypingAtEdges\"] = 1] = \"NeverGrowsWhenTypingAtEdges\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingBefore\"] = 2] = \"GrowsOnlyWhenTypingBefore\";\r\n TrackedRangeStickiness[TrackedRangeStickiness[\"GrowsOnlyWhenTypingAfter\"] = 3] = \"GrowsOnlyWhenTypingAfter\";\r\n})(TrackedRangeStickiness || (TrackedRangeStickiness = {}));\r\n/**\r\n * Describes how to indent wrapped lines.\r\n */\r\nvar WrappingIndent;\r\n(function (WrappingIndent) {\r\n /**\r\n * No indentation => wrapped lines begin at column 1.\r\n */\r\n WrappingIndent[WrappingIndent[\"None\"] = 0] = \"None\";\r\n /**\r\n * Same => wrapped lines get the same indentation as the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"Same\"] = 1] = \"Same\";\r\n /**\r\n * Indent => wrapped lines get +1 indentation toward the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"Indent\"] = 2] = \"Indent\";\r\n /**\r\n * DeepIndent => wrapped lines get +2 indentation toward the parent.\r\n */\r\n WrappingIndent[WrappingIndent[\"DeepIndent\"] = 3] = \"DeepIndent\";\r\n})(WrappingIndent || (WrappingIndent = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AccessibilityHelpNLS\": () => (/* binding */ AccessibilityHelpNLS),\n/* harmony export */ \"InspectTokensNLS\": () => (/* binding */ InspectTokensNLS),\n/* harmony export */ \"GoToLineNLS\": () => (/* binding */ GoToLineNLS),\n/* harmony export */ \"QuickHelpNLS\": () => (/* binding */ QuickHelpNLS),\n/* harmony export */ \"QuickCommandNLS\": () => (/* binding */ QuickCommandNLS),\n/* harmony export */ \"QuickOutlineNLS\": () => (/* binding */ QuickOutlineNLS),\n/* harmony export */ \"StandaloneCodeEditorNLS\": () => (/* binding */ StandaloneCodeEditorNLS),\n/* harmony export */ \"ToggleHighContrastNLS\": () => (/* binding */ ToggleHighContrastNLS),\n/* harmony export */ \"SimpleServicesNLS\": () => (/* binding */ SimpleServicesNLS)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar AccessibilityHelpNLS;\r\n(function (AccessibilityHelpNLS) {\r\n AccessibilityHelpNLS.noSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"noSelection\", \"No selection\");\r\n AccessibilityHelpNLS.singleSelectionRange = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"singleSelectionRange\", \"Line {0}, Column {1} ({2} selected)\");\r\n AccessibilityHelpNLS.singleSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"singleSelection\", \"Line {0}, Column {1}\");\r\n AccessibilityHelpNLS.multiSelectionRange = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"multiSelectionRange\", \"{0} selections ({1} characters selected)\");\r\n AccessibilityHelpNLS.multiSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"multiSelection\", \"{0} selections\");\r\n AccessibilityHelpNLS.emergencyConfOn = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"emergencyConfOn\", \"Now changing the setting `accessibilitySupport` to 'on'.\");\r\n AccessibilityHelpNLS.openingDocs = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"openingDocs\", \"Now opening the Editor Accessibility documentation page.\");\r\n AccessibilityHelpNLS.readonlyDiffEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"readonlyDiffEditor\", \" in a read-only pane of a diff editor.\");\r\n AccessibilityHelpNLS.editableDiffEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"editableDiffEditor\", \" in a pane of a diff editor.\");\r\n AccessibilityHelpNLS.readonlyEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"readonlyEditor\", \" in a read-only code editor\");\r\n AccessibilityHelpNLS.editableEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"editableEditor\", \" in a code editor\");\r\n AccessibilityHelpNLS.changeConfigToOnMac = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"changeConfigToOnMac\", \"To configure the editor to be optimized for usage with a Screen Reader press Command+E now.\");\r\n AccessibilityHelpNLS.changeConfigToOnWinLinux = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"changeConfigToOnWinLinux\", \"To configure the editor to be optimized for usage with a Screen Reader press Control+E now.\");\r\n AccessibilityHelpNLS.auto_on = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"auto_on\", \"The editor is configured to be optimized for usage with a Screen Reader.\");\r\n AccessibilityHelpNLS.auto_off = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"auto_off\", \"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.\");\r\n AccessibilityHelpNLS.tabFocusModeOnMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"tabFocusModeOnMsg\", \"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.\");\r\n AccessibilityHelpNLS.tabFocusModeOnMsgNoKb = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"tabFocusModeOnMsgNoKb\", \"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.\");\r\n AccessibilityHelpNLS.tabFocusModeOffMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"tabFocusModeOffMsg\", \"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.\");\r\n AccessibilityHelpNLS.tabFocusModeOffMsgNoKb = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"tabFocusModeOffMsgNoKb\", \"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.\");\r\n AccessibilityHelpNLS.openDocMac = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"openDocMac\", \"Press Command+H now to open a browser window with more information related to editor accessibility.\");\r\n AccessibilityHelpNLS.openDocWinLinux = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"openDocWinLinux\", \"Press Control+H now to open a browser window with more information related to editor accessibility.\");\r\n AccessibilityHelpNLS.outroMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"outroMsg\", \"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.\");\r\n AccessibilityHelpNLS.showAccessibilityHelpAction = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize(\"showAccessibilityHelpAction\", \"Show Accessibility Help\");\r\n})(AccessibilityHelpNLS || (AccessibilityHelpNLS = {}));\r\nvar InspectTokensNLS;\r\n(function (InspectTokensNLS) {\r\n InspectTokensNLS.inspectTokensAction = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('inspectTokens', \"Developer: Inspect Tokens\");\r\n})(InspectTokensNLS || (InspectTokensNLS = {}));\r\nvar GoToLineNLS;\r\n(function (GoToLineNLS) {\r\n GoToLineNLS.gotoLineActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('gotoLineActionLabel', \"Go to Line/Column...\");\r\n})(GoToLineNLS || (GoToLineNLS = {}));\r\nvar QuickHelpNLS;\r\n(function (QuickHelpNLS) {\r\n QuickHelpNLS.helpQuickAccessActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('helpQuickAccess', \"Show all Quick Access Providers\");\r\n})(QuickHelpNLS || (QuickHelpNLS = {}));\r\nvar QuickCommandNLS;\r\n(function (QuickCommandNLS) {\r\n QuickCommandNLS.quickCommandActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickCommandActionLabel', \"Command Palette\");\r\n QuickCommandNLS.quickCommandHelp = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickCommandActionHelp', \"Show And Run Commands\");\r\n})(QuickCommandNLS || (QuickCommandNLS = {}));\r\nvar QuickOutlineNLS;\r\n(function (QuickOutlineNLS) {\r\n QuickOutlineNLS.quickOutlineActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickOutlineActionLabel', \"Go to Symbol...\");\r\n QuickOutlineNLS.quickOutlineByCategoryActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quickOutlineByCategoryActionLabel', \"Go to Symbol by Category...\");\r\n})(QuickOutlineNLS || (QuickOutlineNLS = {}));\r\nvar StandaloneCodeEditorNLS;\r\n(function (StandaloneCodeEditorNLS) {\r\n StandaloneCodeEditorNLS.editorViewAccessibleLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorViewAccessibleLabel', \"Editor content\");\r\n StandaloneCodeEditorNLS.accessibilityHelpMessage = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('accessibilityHelpMessage', \"Press Alt+F1 for Accessibility Options.\");\r\n})(StandaloneCodeEditorNLS || (StandaloneCodeEditorNLS = {}));\r\nvar ToggleHighContrastNLS;\r\n(function (ToggleHighContrastNLS) {\r\n ToggleHighContrastNLS.toggleHighContrast = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('toggleHighContrast', \"Toggle High Contrast Theme\");\r\n})(ToggleHighContrastNLS || (ToggleHighContrastNLS = {}));\r\nvar SimpleServicesNLS;\r\n(function (SimpleServicesNLS) {\r\n SimpleServicesNLS.bulkEditServiceSummary = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('bulkEditServiceSummary', \"Made {0} edits in {1} files\");\r\n})(SimpleServicesNLS || (SimpleServicesNLS = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"editorLineHighlight\": () => (/* binding */ editorLineHighlight),\n/* harmony export */ \"editorLineHighlightBorder\": () => (/* binding */ editorLineHighlightBorder),\n/* harmony export */ \"editorRangeHighlight\": () => (/* binding */ editorRangeHighlight),\n/* harmony export */ \"editorRangeHighlightBorder\": () => (/* binding */ editorRangeHighlightBorder),\n/* harmony export */ \"editorSymbolHighlight\": () => (/* binding */ editorSymbolHighlight),\n/* harmony export */ \"editorSymbolHighlightBorder\": () => (/* binding */ editorSymbolHighlightBorder),\n/* harmony export */ \"editorCursorForeground\": () => (/* binding */ editorCursorForeground),\n/* harmony export */ \"editorCursorBackground\": () => (/* binding */ editorCursorBackground),\n/* harmony export */ \"editorWhitespaces\": () => (/* binding */ editorWhitespaces),\n/* harmony export */ \"editorIndentGuides\": () => (/* binding */ editorIndentGuides),\n/* harmony export */ \"editorActiveIndentGuides\": () => (/* binding */ editorActiveIndentGuides),\n/* harmony export */ \"editorLineNumbers\": () => (/* binding */ editorLineNumbers),\n/* harmony export */ \"editorActiveLineNumber\": () => (/* binding */ editorActiveLineNumber),\n/* harmony export */ \"editorRuler\": () => (/* binding */ editorRuler),\n/* harmony export */ \"editorCodeLensForeground\": () => (/* binding */ editorCodeLensForeground),\n/* harmony export */ \"editorBracketMatchBackground\": () => (/* binding */ editorBracketMatchBackground),\n/* harmony export */ \"editorBracketMatchBorder\": () => (/* binding */ editorBracketMatchBorder),\n/* harmony export */ \"editorOverviewRulerBorder\": () => (/* binding */ editorOverviewRulerBorder),\n/* harmony export */ \"editorOverviewRulerBackground\": () => (/* binding */ editorOverviewRulerBackground),\n/* harmony export */ \"editorGutter\": () => (/* binding */ editorGutter),\n/* harmony export */ \"editorUnnecessaryCodeBorder\": () => (/* binding */ editorUnnecessaryCodeBorder),\n/* harmony export */ \"editorUnnecessaryCodeOpacity\": () => (/* binding */ editorUnnecessaryCodeOpacity),\n/* harmony export */ \"overviewRulerRangeHighlight\": () => (/* binding */ overviewRulerRangeHighlight),\n/* harmony export */ \"overviewRulerError\": () => (/* binding */ overviewRulerError),\n/* harmony export */ \"overviewRulerWarning\": () => (/* binding */ overviewRulerWarning),\n/* harmony export */ \"overviewRulerInfo\": () => (/* binding */ overviewRulerInfo)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n/**\r\n * Definition of the editor colors\r\n */\r\nconst editorLineHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.'));\r\nconst editorLineHighlightBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.'));\r\nconst editorRangeHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.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);\r\nconst editorRangeHighlightBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.rangeHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rangeHighlightBorder', 'Background color of the border around highlighted ranges.'), true);\r\nconst editorSymbolHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.symbolHighlightBackground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorFindMatchHighlight, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorFindMatchHighlight, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('symbolHighlight', 'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorSymbolHighlightBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editor.symbolHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('symbolHighlightBorder', 'Background color of the border around highlighted symbols.'), true);\r\nconst editorCursorForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorCursor.foreground', { dark: '#AEAFAD', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('caret', 'Color of the editor cursor.'));\r\nconst editorCursorBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorCursor.background', null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorCursorBackground', 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));\r\nconst editorWhitespaces = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorWhitespaces', 'Color of whitespace characters in the editor.'));\r\nconst editorIndentGuides = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorIndentGuides', 'Color of the editor indentation guides.'));\r\nconst editorActiveIndentGuides = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorIndentGuide.activeBackground', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorActiveIndentGuide', 'Color of the active editor indentation guides.'));\r\nconst editorLineNumbers = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorLineNumbers', 'Color of editor line numbers.'));\r\nconst deprecatedEditorActiveLineNumber = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorActiveLineNumber', 'Color of editor active line number'), false, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('deprecatedEditorActiveLineNumber', 'Id is deprecated. Use \\'editorLineNumber.activeForeground\\' instead.'));\r\nconst editorActiveLineNumber = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorLineNumber.activeForeground', { dark: deprecatedEditorActiveLineNumber, light: deprecatedEditorActiveLineNumber, hc: deprecatedEditorActiveLineNumber }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorActiveLineNumber', 'Color of editor active line number'));\r\nconst editorRuler = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorRuler.foreground', { dark: '#5A5A5A', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.lightgrey, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorRuler', 'Color of the editor rulers.'));\r\nconst editorCodeLensForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorCodeLensForeground', 'Foreground color of editor CodeLens'));\r\nconst editorBracketMatchBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorBracketMatchBackground', 'Background color behind matching brackets'));\r\nconst editorBracketMatchBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorBracketMatchBorder', 'Color for matching brackets boxes'));\r\nconst editorOverviewRulerBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.'));\r\nconst editorOverviewRulerBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.background', null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorOverviewRulerBackground', 'Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.'));\r\nconst editorGutter = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorGutter.background', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorBackground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorBackground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));\r\nconst editorUnnecessaryCodeBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorUnnecessaryCode.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#fff').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unnecessaryCodeBorder', 'Border color of unnecessary (unused) source code in the editor.'));\r\nconst editorUnnecessaryCodeOpacity = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorUnnecessaryCode.opacity', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#000a'), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#0007'), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.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.'));\r\nconst rulerRangeDefault = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(0, 122, 204, 0.6));\r\nconst overviewRulerRangeHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.rangeHighlightForeground', { dark: rulerRangeDefault, light: rulerRangeDefault, hc: rulerRangeDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRulerRangeHighlight', 'Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst overviewRulerError = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.errorForeground', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 18, 18, 0.7)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 18, 18, 0.7)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 50, 50, 1)) }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRuleError', 'Overview ruler marker color for errors.'));\r\nconst overviewRulerWarning = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.warningForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorWarningForeground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorWarningForeground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorWarningBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRuleWarning', 'Overview ruler marker color for warnings.'));\r\nconst overviewRulerInfo = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('editorOverviewRuler.infoForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorInfoForeground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorInfoForeground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorInfoBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRuleInfo', 'Overview ruler marker color for infos.'));\r\n// contains all color rules that used to defined in editor/browser/widget/editor.css\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__.registerThemingParticipant)((theme, collector) => {\r\n const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`);\r\n }\r\n const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.editorForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${foreground}; }`);\r\n }\r\n const gutter = theme.getColor(editorGutter);\r\n if (gutter) {\r\n collector.addRule(`.monaco-editor .margin { background-color: ${gutter}; }`);\r\n }\r\n const rangeHighlight = theme.getColor(editorRangeHighlight);\r\n if (rangeHighlight) {\r\n collector.addRule(`.monaco-editor .rangeHighlight { background-color: ${rangeHighlight}; }`);\r\n }\r\n const rangeHighlightBorder = theme.getColor(editorRangeHighlightBorder);\r\n if (rangeHighlightBorder) {\r\n collector.addRule(`.monaco-editor .rangeHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${rangeHighlightBorder}; }`);\r\n }\r\n const symbolHighlight = theme.getColor(editorSymbolHighlight);\r\n if (symbolHighlight) {\r\n collector.addRule(`.monaco-editor .symbolHighlight { background-color: ${symbolHighlight}; }`);\r\n }\r\n const symbolHighlightBorder = theme.getColor(editorSymbolHighlightBorder);\r\n if (symbolHighlightBorder) {\r\n collector.addRule(`.monaco-editor .symbolHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${symbolHighlightBorder}; }`);\r\n }\r\n const invisibles = theme.getColor(editorWhitespaces);\r\n if (invisibles) {\r\n collector.addRule(`.monaco-editor .mtkw { color: ${invisibles} !important; }`);\r\n collector.addRule(`.monaco-editor .mtkz { color: ${invisibles} !important; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorZone\": () => (/* binding */ ColorZone),\n/* harmony export */ \"OverviewRulerZone\": () => (/* binding */ OverviewRulerZone),\n/* harmony export */ \"OverviewZoneManager\": () => (/* binding */ OverviewZoneManager)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ColorZone {\r\n constructor(from, to, colorId) {\r\n this.from = from | 0;\r\n this.to = to | 0;\r\n this.colorId = colorId | 0;\r\n }\r\n static compare(a, b) {\r\n if (a.colorId === b.colorId) {\r\n if (a.from === b.from) {\r\n return a.to - b.to;\r\n }\r\n return a.from - b.from;\r\n }\r\n return a.colorId - b.colorId;\r\n }\r\n}\r\n/**\r\n * A zone in the overview ruler\r\n */\r\nclass OverviewRulerZone {\r\n constructor(startLineNumber, endLineNumber, color) {\r\n this.startLineNumber = startLineNumber;\r\n this.endLineNumber = endLineNumber;\r\n this.color = color;\r\n this._colorZone = null;\r\n }\r\n static compare(a, b) {\r\n if (a.color === b.color) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return a.color < b.color ? -1 : 1;\r\n }\r\n setColorZone(colorZone) {\r\n this._colorZone = colorZone;\r\n }\r\n getColorZones() {\r\n return this._colorZone;\r\n }\r\n}\r\nclass OverviewZoneManager {\r\n constructor(getVerticalOffsetForLine) {\r\n this._getVerticalOffsetForLine = getVerticalOffsetForLine;\r\n this._zones = [];\r\n this._colorZonesInvalid = false;\r\n this._lineHeight = 0;\r\n this._domWidth = 0;\r\n this._domHeight = 0;\r\n this._outerHeight = 0;\r\n this._pixelRatio = 1;\r\n this._lastAssignedId = 0;\r\n this._color2Id = Object.create(null);\r\n this._id2Color = [];\r\n }\r\n getId2Color() {\r\n return this._id2Color;\r\n }\r\n setZones(newZones) {\r\n this._zones = newZones;\r\n this._zones.sort(OverviewRulerZone.compare);\r\n }\r\n setLineHeight(lineHeight) {\r\n if (this._lineHeight === lineHeight) {\r\n return false;\r\n }\r\n this._lineHeight = lineHeight;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n setPixelRatio(pixelRatio) {\r\n this._pixelRatio = pixelRatio;\r\n this._colorZonesInvalid = true;\r\n }\r\n getDOMWidth() {\r\n return this._domWidth;\r\n }\r\n getCanvasWidth() {\r\n return this._domWidth * this._pixelRatio;\r\n }\r\n setDOMWidth(width) {\r\n if (this._domWidth === width) {\r\n return false;\r\n }\r\n this._domWidth = width;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n getDOMHeight() {\r\n return this._domHeight;\r\n }\r\n getCanvasHeight() {\r\n return this._domHeight * this._pixelRatio;\r\n }\r\n setDOMHeight(height) {\r\n if (this._domHeight === height) {\r\n return false;\r\n }\r\n this._domHeight = height;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n getOuterHeight() {\r\n return this._outerHeight;\r\n }\r\n setOuterHeight(outerHeight) {\r\n if (this._outerHeight === outerHeight) {\r\n return false;\r\n }\r\n this._outerHeight = outerHeight;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n resolveColorZones() {\r\n const colorZonesInvalid = this._colorZonesInvalid;\r\n const lineHeight = Math.floor(this._lineHeight); // @perf\r\n const totalHeight = Math.floor(this.getCanvasHeight()); // @perf\r\n const outerHeight = Math.floor(this._outerHeight); // @perf\r\n const heightRatio = totalHeight / outerHeight;\r\n const halfMinimumHeight = Math.floor(4 /* MINIMUM_HEIGHT */ * this._pixelRatio / 2);\r\n let allColorZones = [];\r\n for (let i = 0, len = this._zones.length; i < len; i++) {\r\n const zone = this._zones[i];\r\n if (!colorZonesInvalid) {\r\n const colorZone = zone.getColorZones();\r\n if (colorZone) {\r\n allColorZones.push(colorZone);\r\n continue;\r\n }\r\n }\r\n const y1 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.startLineNumber)));\r\n const y2 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.endLineNumber) + lineHeight));\r\n let ycenter = Math.floor((y1 + y2) / 2);\r\n let halfHeight = (y2 - ycenter);\r\n if (halfHeight < halfMinimumHeight) {\r\n halfHeight = halfMinimumHeight;\r\n }\r\n if (ycenter - halfHeight < 0) {\r\n ycenter = halfHeight;\r\n }\r\n if (ycenter + halfHeight > totalHeight) {\r\n ycenter = totalHeight - halfHeight;\r\n }\r\n const color = zone.color;\r\n let colorId = this._color2Id[color];\r\n if (!colorId) {\r\n colorId = (++this._lastAssignedId);\r\n this._color2Id[color] = colorId;\r\n this._id2Color[colorId] = color;\r\n }\r\n const colorZone = new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId);\r\n zone.setColorZone(colorZone);\r\n allColorZones.push(colorZone);\r\n }\r\n this._colorZonesInvalid = false;\r\n allColorZones.sort(ColorZone.compare);\r\n return allColorZones;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RestrictedRenderingContext\": () => (/* binding */ RestrictedRenderingContext),\n/* harmony export */ \"RenderingContext\": () => (/* binding */ RenderingContext),\n/* harmony export */ \"LineVisibleRanges\": () => (/* binding */ LineVisibleRanges),\n/* harmony export */ \"HorizontalRange\": () => (/* binding */ HorizontalRange),\n/* harmony export */ \"HorizontalPosition\": () => (/* binding */ HorizontalPosition),\n/* harmony export */ \"VisibleRanges\": () => (/* binding */ VisibleRanges)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass RestrictedRenderingContext {\r\n constructor(viewLayout, viewportData) {\r\n this._viewLayout = viewLayout;\r\n this.viewportData = viewportData;\r\n this.scrollWidth = this._viewLayout.getScrollWidth();\r\n this.scrollHeight = this._viewLayout.getScrollHeight();\r\n this.visibleRange = this.viewportData.visibleRange;\r\n this.bigNumbersDelta = this.viewportData.bigNumbersDelta;\r\n const vInfo = this._viewLayout.getCurrentViewport();\r\n this.scrollTop = vInfo.top;\r\n this.scrollLeft = vInfo.left;\r\n this.viewportWidth = vInfo.width;\r\n this.viewportHeight = vInfo.height;\r\n }\r\n getScrolledTopFromAbsoluteTop(absoluteTop) {\r\n return absoluteTop - this.scrollTop;\r\n }\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n return this._viewLayout.getVerticalOffsetForLineNumber(lineNumber);\r\n }\r\n getDecorationsInViewport() {\r\n return this.viewportData.getDecorationsInViewport();\r\n }\r\n}\r\nclass RenderingContext extends RestrictedRenderingContext {\r\n constructor(viewLayout, viewportData, viewLines) {\r\n super(viewLayout, viewportData);\r\n this._viewLines = viewLines;\r\n }\r\n linesVisibleRangesForRange(range, includeNewLines) {\r\n return this._viewLines.linesVisibleRangesForRange(range, includeNewLines);\r\n }\r\n visibleRangeForPosition(position) {\r\n return this._viewLines.visibleRangeForPosition(position);\r\n }\r\n}\r\nclass LineVisibleRanges {\r\n constructor(outsideRenderedLine, lineNumber, ranges) {\r\n this.outsideRenderedLine = outsideRenderedLine;\r\n this.lineNumber = lineNumber;\r\n this.ranges = ranges;\r\n }\r\n}\r\nclass HorizontalRange {\r\n constructor(left, width) {\r\n this.left = Math.round(left);\r\n this.width = Math.round(width);\r\n }\r\n toString() {\r\n return `[${this.left},${this.width}]`;\r\n }\r\n}\r\nclass HorizontalPosition {\r\n constructor(outsideRenderedLine, left) {\r\n this.outsideRenderedLine = outsideRenderedLine;\r\n this.left = Math.round(left);\r\n }\r\n}\r\nclass VisibleRanges {\r\n constructor(outsideRenderedLine, ranges) {\r\n this.outsideRenderedLine = outsideRenderedLine;\r\n this.ranges = ranges;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorTheme\": () => (/* binding */ EditorTheme),\n/* harmony export */ \"ViewContext\": () => (/* binding */ ViewContext)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass EditorTheme {\r\n constructor(theme) {\r\n this._theme = theme;\r\n }\r\n get type() {\r\n return this._theme.type;\r\n }\r\n update(theme) {\r\n this._theme = theme;\r\n }\r\n getColor(color) {\r\n return this._theme.getColor(color);\r\n }\r\n}\r\nclass ViewContext {\r\n constructor(configuration, theme, model) {\r\n this.configuration = configuration;\r\n this.theme = new EditorTheme(theme);\r\n this.model = model;\r\n this.viewLayout = model.viewLayout;\r\n }\r\n addEventHandler(eventHandler) {\r\n this.model.addViewEventHandler(eventHandler);\r\n }\r\n removeEventHandler(eventHandler) {\r\n this.model.removeViewEventHandler(eventHandler);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewCompositionStartEvent\": () => (/* binding */ ViewCompositionStartEvent),\n/* harmony export */ \"ViewCompositionEndEvent\": () => (/* binding */ ViewCompositionEndEvent),\n/* harmony export */ \"ViewConfigurationChangedEvent\": () => (/* binding */ ViewConfigurationChangedEvent),\n/* harmony export */ \"ViewCursorStateChangedEvent\": () => (/* binding */ ViewCursorStateChangedEvent),\n/* harmony export */ \"ViewDecorationsChangedEvent\": () => (/* binding */ ViewDecorationsChangedEvent),\n/* harmony export */ \"ViewFlushedEvent\": () => (/* binding */ ViewFlushedEvent),\n/* harmony export */ \"ViewFocusChangedEvent\": () => (/* binding */ ViewFocusChangedEvent),\n/* harmony export */ \"ViewLanguageConfigurationEvent\": () => (/* binding */ ViewLanguageConfigurationEvent),\n/* harmony export */ \"ViewLineMappingChangedEvent\": () => (/* binding */ ViewLineMappingChangedEvent),\n/* harmony export */ \"ViewLinesChangedEvent\": () => (/* binding */ ViewLinesChangedEvent),\n/* harmony export */ \"ViewLinesDeletedEvent\": () => (/* binding */ ViewLinesDeletedEvent),\n/* harmony export */ \"ViewLinesInsertedEvent\": () => (/* binding */ ViewLinesInsertedEvent),\n/* harmony export */ \"ViewRevealRangeRequestEvent\": () => (/* binding */ ViewRevealRangeRequestEvent),\n/* harmony export */ \"ViewScrollChangedEvent\": () => (/* binding */ ViewScrollChangedEvent),\n/* harmony export */ \"ViewThemeChangedEvent\": () => (/* binding */ ViewThemeChangedEvent),\n/* harmony export */ \"ViewTokensChangedEvent\": () => (/* binding */ ViewTokensChangedEvent),\n/* harmony export */ \"ViewTokensColorsChangedEvent\": () => (/* binding */ ViewTokensColorsChangedEvent),\n/* harmony export */ \"ViewZonesChangedEvent\": () => (/* binding */ ViewZonesChangedEvent)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ViewCompositionStartEvent {\r\n constructor() {\r\n this.type = 0 /* ViewCompositionStart */;\r\n }\r\n}\r\nclass ViewCompositionEndEvent {\r\n constructor() {\r\n this.type = 1 /* ViewCompositionEnd */;\r\n }\r\n}\r\nclass ViewConfigurationChangedEvent {\r\n constructor(source) {\r\n this.type = 2 /* ViewConfigurationChanged */;\r\n this._source = source;\r\n }\r\n hasChanged(id) {\r\n return this._source.hasChanged(id);\r\n }\r\n}\r\nclass ViewCursorStateChangedEvent {\r\n constructor(selections, modelSelections) {\r\n this.type = 3 /* ViewCursorStateChanged */;\r\n this.selections = selections;\r\n this.modelSelections = modelSelections;\r\n }\r\n}\r\nclass ViewDecorationsChangedEvent {\r\n constructor(source) {\r\n this.type = 4 /* ViewDecorationsChanged */;\r\n if (source) {\r\n this.affectsMinimap = source.affectsMinimap;\r\n this.affectsOverviewRuler = source.affectsOverviewRuler;\r\n }\r\n else {\r\n this.affectsMinimap = true;\r\n this.affectsOverviewRuler = true;\r\n }\r\n }\r\n}\r\nclass ViewFlushedEvent {\r\n constructor() {\r\n this.type = 5 /* ViewFlushed */;\r\n // Nothing to do\r\n }\r\n}\r\nclass ViewFocusChangedEvent {\r\n constructor(isFocused) {\r\n this.type = 6 /* ViewFocusChanged */;\r\n this.isFocused = isFocused;\r\n }\r\n}\r\nclass ViewLanguageConfigurationEvent {\r\n constructor() {\r\n this.type = 7 /* ViewLanguageConfigurationChanged */;\r\n }\r\n}\r\nclass ViewLineMappingChangedEvent {\r\n constructor() {\r\n this.type = 8 /* ViewLineMappingChanged */;\r\n // Nothing to do\r\n }\r\n}\r\nclass ViewLinesChangedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 9 /* ViewLinesChanged */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nclass ViewLinesDeletedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 10 /* ViewLinesDeleted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nclass ViewLinesInsertedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 11 /* ViewLinesInserted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nclass ViewRevealRangeRequestEvent {\r\n constructor(source, range, selections, verticalType, revealHorizontal, scrollType) {\r\n this.type = 12 /* ViewRevealRangeRequest */;\r\n this.source = source;\r\n this.range = range;\r\n this.selections = selections;\r\n this.verticalType = verticalType;\r\n this.revealHorizontal = revealHorizontal;\r\n this.scrollType = scrollType;\r\n }\r\n}\r\nclass ViewScrollChangedEvent {\r\n constructor(source) {\r\n this.type = 13 /* ViewScrollChanged */;\r\n this.scrollWidth = source.scrollWidth;\r\n this.scrollLeft = source.scrollLeft;\r\n this.scrollHeight = source.scrollHeight;\r\n this.scrollTop = source.scrollTop;\r\n this.scrollWidthChanged = source.scrollWidthChanged;\r\n this.scrollLeftChanged = source.scrollLeftChanged;\r\n this.scrollHeightChanged = source.scrollHeightChanged;\r\n this.scrollTopChanged = source.scrollTopChanged;\r\n }\r\n}\r\nclass ViewThemeChangedEvent {\r\n constructor() {\r\n this.type = 14 /* ViewThemeChanged */;\r\n }\r\n}\r\nclass ViewTokensChangedEvent {\r\n constructor(ranges) {\r\n this.type = 15 /* ViewTokensChanged */;\r\n this.ranges = ranges;\r\n }\r\n}\r\nclass ViewTokensColorsChangedEvent {\r\n constructor() {\r\n this.type = 16 /* ViewTokensColorsChanged */;\r\n // Nothing to do\r\n }\r\n}\r\nclass ViewZonesChangedEvent {\r\n constructor() {\r\n this.type = 17 /* ViewZonesChanged */;\r\n // Nothing to do\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineDecoration\": () => (/* binding */ LineDecoration),\n/* harmony export */ \"DecorationSegment\": () => (/* binding */ DecorationSegment),\n/* harmony export */ \"LineDecorationsNormalizer\": () => (/* binding */ LineDecorationsNormalizer)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass LineDecoration {\r\n constructor(startColumn, endColumn, className, type) {\r\n this.startColumn = startColumn;\r\n this.endColumn = endColumn;\r\n this.className = className;\r\n this.type = type;\r\n }\r\n static _equals(a, b) {\r\n return (a.startColumn === b.startColumn\r\n && a.endColumn === b.endColumn\r\n && a.className === b.className\r\n && a.type === b.type);\r\n }\r\n static equalsArr(a, b) {\r\n const aLen = a.length;\r\n const bLen = b.length;\r\n if (aLen !== bLen) {\r\n return false;\r\n }\r\n for (let i = 0; i < aLen; i++) {\r\n if (!LineDecoration._equals(a[i], b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static extractWrapped(arr, startOffset, endOffset) {\r\n if (arr.length === 0) {\r\n return arr;\r\n }\r\n const startColumn = startOffset + 1;\r\n const endColumn = endOffset + 1;\r\n const lineLength = endOffset - startOffset;\r\n const r = [];\r\n let rLength = 0;\r\n for (const dec of arr) {\r\n if (dec.endColumn <= startColumn || dec.startColumn >= endColumn) {\r\n continue;\r\n }\r\n r[rLength++] = new LineDecoration(Math.max(1, dec.startColumn - startColumn + 1), Math.min(lineLength + 1, dec.endColumn - startColumn + 1), dec.className, dec.type);\r\n }\r\n return r;\r\n }\r\n static filter(lineDecorations, lineNumber, minLineColumn, maxLineColumn) {\r\n if (lineDecorations.length === 0) {\r\n return [];\r\n }\r\n let result = [], resultLen = 0;\r\n for (let i = 0, len = lineDecorations.length; i < len; i++) {\r\n const d = lineDecorations[i];\r\n const range = d.range;\r\n if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) {\r\n // Ignore decorations that sit outside this line\r\n continue;\r\n }\r\n if (range.isEmpty() && (d.type === 0 /* Regular */ || d.type === 3 /* RegularAffectingLetterSpacing */)) {\r\n // Ignore empty range decorations\r\n continue;\r\n }\r\n const startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn);\r\n const endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn);\r\n result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type);\r\n }\r\n return result;\r\n }\r\n static _typeCompare(a, b) {\r\n const ORDER = [2, 0, 1, 3];\r\n return ORDER[a] - ORDER[b];\r\n }\r\n static compare(a, b) {\r\n if (a.startColumn === b.startColumn) {\r\n if (a.endColumn === b.endColumn) {\r\n const typeCmp = LineDecoration._typeCompare(a.type, b.type);\r\n if (typeCmp === 0) {\r\n if (a.className < b.className) {\r\n return -1;\r\n }\r\n if (a.className > b.className) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n return typeCmp;\r\n }\r\n return a.endColumn - b.endColumn;\r\n }\r\n return a.startColumn - b.startColumn;\r\n }\r\n}\r\nclass DecorationSegment {\r\n constructor(startOffset, endOffset, className, metadata) {\r\n this.startOffset = startOffset;\r\n this.endOffset = endOffset;\r\n this.className = className;\r\n this.metadata = metadata;\r\n }\r\n}\r\nclass Stack {\r\n constructor() {\r\n this.stopOffsets = [];\r\n this.classNames = [];\r\n this.metadata = [];\r\n this.count = 0;\r\n }\r\n static _metadata(metadata) {\r\n let result = 0;\r\n for (let i = 0, len = metadata.length; i < len; i++) {\r\n result |= metadata[i];\r\n }\r\n return result;\r\n }\r\n consumeLowerThan(maxStopOffset, nextStartOffset, result) {\r\n while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) {\r\n let i = 0;\r\n // Take all equal stopping offsets\r\n while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) {\r\n i++;\r\n }\r\n // Basically we are consuming the first i + 1 elements of the stack\r\n result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' '), Stack._metadata(this.metadata)));\r\n nextStartOffset = this.stopOffsets[i] + 1;\r\n // Consume them\r\n this.stopOffsets.splice(0, i + 1);\r\n this.classNames.splice(0, i + 1);\r\n this.metadata.splice(0, i + 1);\r\n this.count -= (i + 1);\r\n }\r\n if (this.count > 0 && nextStartOffset < maxStopOffset) {\r\n result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' '), Stack._metadata(this.metadata)));\r\n nextStartOffset = maxStopOffset;\r\n }\r\n return nextStartOffset;\r\n }\r\n insert(stopOffset, className, metadata) {\r\n if (this.count === 0 || this.stopOffsets[this.count - 1] <= stopOffset) {\r\n // Insert at the end\r\n this.stopOffsets.push(stopOffset);\r\n this.classNames.push(className);\r\n this.metadata.push(metadata);\r\n }\r\n else {\r\n // Find the insertion position for `stopOffset`\r\n for (let i = 0; i < this.count; i++) {\r\n if (this.stopOffsets[i] >= stopOffset) {\r\n this.stopOffsets.splice(i, 0, stopOffset);\r\n this.classNames.splice(i, 0, className);\r\n this.metadata.splice(i, 0, metadata);\r\n break;\r\n }\r\n }\r\n }\r\n this.count++;\r\n return;\r\n }\r\n}\r\nclass LineDecorationsNormalizer {\r\n /**\r\n * Normalize line decorations. Overlapping decorations will generate multiple segments\r\n */\r\n static normalize(lineContent, lineDecorations) {\r\n if (lineDecorations.length === 0) {\r\n return [];\r\n }\r\n let result = [];\r\n const stack = new Stack();\r\n let nextStartOffset = 0;\r\n for (let i = 0, len = lineDecorations.length; i < len; i++) {\r\n const d = lineDecorations[i];\r\n let startColumn = d.startColumn;\r\n let endColumn = d.endColumn;\r\n const className = d.className;\r\n const metadata = (d.type === 1 /* Before */\r\n ? 2 /* PSEUDO_BEFORE */\r\n : d.type === 2 /* After */\r\n ? 4 /* PSEUDO_AFTER */\r\n : 0);\r\n // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair\r\n if (startColumn > 1) {\r\n const charCodeBefore = lineContent.charCodeAt(startColumn - 2);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCodeBefore)) {\r\n startColumn--;\r\n }\r\n }\r\n if (endColumn > 1) {\r\n const charCodeBefore = lineContent.charCodeAt(endColumn - 2);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCodeBefore)) {\r\n endColumn--;\r\n }\r\n }\r\n const currentStartOffset = startColumn - 1;\r\n const currentEndOffset = endColumn - 2;\r\n nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);\r\n if (stack.count === 0) {\r\n nextStartOffset = currentStartOffset;\r\n }\r\n stack.insert(currentEndOffset, className, metadata);\r\n }\r\n stack.consumeLowerThan(1073741824 /* MAX_SAFE_SMALL_INTEGER */, nextStartOffset, result);\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorWhitespace\": () => (/* binding */ EditorWhitespace),\n/* harmony export */ \"LinesLayout\": () => (/* binding */ LinesLayout)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass PendingChanges {\r\n constructor() {\r\n this._hasPending = false;\r\n this._inserts = [];\r\n this._changes = [];\r\n this._removes = [];\r\n }\r\n insert(x) {\r\n this._hasPending = true;\r\n this._inserts.push(x);\r\n }\r\n change(x) {\r\n this._hasPending = true;\r\n this._changes.push(x);\r\n }\r\n remove(x) {\r\n this._hasPending = true;\r\n this._removes.push(x);\r\n }\r\n mustCommit() {\r\n return this._hasPending;\r\n }\r\n commit(linesLayout) {\r\n if (!this._hasPending) {\r\n return;\r\n }\r\n const inserts = this._inserts;\r\n const changes = this._changes;\r\n const removes = this._removes;\r\n this._hasPending = false;\r\n this._inserts = [];\r\n this._changes = [];\r\n this._removes = [];\r\n linesLayout._commitPendingChanges(inserts, changes, removes);\r\n }\r\n}\r\nclass EditorWhitespace {\r\n constructor(id, afterLineNumber, ordinal, height, minWidth) {\r\n this.id = id;\r\n this.afterLineNumber = afterLineNumber;\r\n this.ordinal = ordinal;\r\n this.height = height;\r\n this.minWidth = minWidth;\r\n this.prefixSum = 0;\r\n }\r\n}\r\n/**\r\n * Layouting of objects that take vertical space (by having a height) and push down other objects.\r\n *\r\n * These objects are basically either text (lines) or spaces between those lines (whitespaces).\r\n * This provides commodity operations for working with lines that contain whitespace that pushes lines lower (vertically).\r\n */\r\nclass LinesLayout {\r\n constructor(lineCount, lineHeight, paddingTop, paddingBottom) {\r\n this._instanceId = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.singleLetterHash(++LinesLayout.INSTANCE_COUNT);\r\n this._pendingChanges = new PendingChanges();\r\n this._lastWhitespaceId = 0;\r\n this._arr = [];\r\n this._prefixSumValidIndex = -1;\r\n this._minWidth = -1; /* marker for not being computed */\r\n this._lineCount = lineCount;\r\n this._lineHeight = lineHeight;\r\n this._paddingTop = paddingTop;\r\n this._paddingBottom = paddingBottom;\r\n }\r\n /**\r\n * Find the insertion index for a new value inside a sorted array of values.\r\n * If the value is already present in the sorted array, the insertion index will be after the already existing value.\r\n */\r\n static findInsertionIndex(arr, afterLineNumber, ordinal) {\r\n let low = 0;\r\n let high = arr.length;\r\n while (low < high) {\r\n const mid = ((low + high) >>> 1);\r\n if (afterLineNumber === arr[mid].afterLineNumber) {\r\n if (ordinal < arr[mid].ordinal) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n else if (afterLineNumber < arr[mid].afterLineNumber) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n return low;\r\n }\r\n /**\r\n * Change the height of a line in pixels.\r\n */\r\n setLineHeight(lineHeight) {\r\n this._checkPendingChanges();\r\n this._lineHeight = lineHeight;\r\n }\r\n /**\r\n * Changes the padding used to calculate vertical offsets.\r\n */\r\n setPadding(paddingTop, paddingBottom) {\r\n this._paddingTop = paddingTop;\r\n this._paddingBottom = paddingBottom;\r\n }\r\n /**\r\n * Set the number of lines.\r\n *\r\n * @param lineCount New number of lines.\r\n */\r\n onFlushed(lineCount) {\r\n this._checkPendingChanges();\r\n this._lineCount = lineCount;\r\n }\r\n changeWhitespace(callback) {\r\n let hadAChange = false;\r\n try {\r\n const accessor = {\r\n insertWhitespace: (afterLineNumber, ordinal, heightInPx, minWidth) => {\r\n hadAChange = true;\r\n afterLineNumber = afterLineNumber | 0;\r\n ordinal = ordinal | 0;\r\n heightInPx = heightInPx | 0;\r\n minWidth = minWidth | 0;\r\n const id = this._instanceId + (++this._lastWhitespaceId);\r\n this._pendingChanges.insert(new EditorWhitespace(id, afterLineNumber, ordinal, heightInPx, minWidth));\r\n return id;\r\n },\r\n changeOneWhitespace: (id, newAfterLineNumber, newHeight) => {\r\n hadAChange = true;\r\n newAfterLineNumber = newAfterLineNumber | 0;\r\n newHeight = newHeight | 0;\r\n this._pendingChanges.change({ id, newAfterLineNumber, newHeight });\r\n },\r\n removeWhitespace: (id) => {\r\n hadAChange = true;\r\n this._pendingChanges.remove({ id });\r\n }\r\n };\r\n callback(accessor);\r\n }\r\n finally {\r\n this._pendingChanges.commit(this);\r\n }\r\n return hadAChange;\r\n }\r\n _commitPendingChanges(inserts, changes, removes) {\r\n if (inserts.length > 0 || removes.length > 0) {\r\n this._minWidth = -1; /* marker for not being computed */\r\n }\r\n if (inserts.length + changes.length + removes.length <= 1) {\r\n // when only one thing happened, handle it \"delicately\"\r\n for (const insert of inserts) {\r\n this._insertWhitespace(insert);\r\n }\r\n for (const change of changes) {\r\n this._changeOneWhitespace(change.id, change.newAfterLineNumber, change.newHeight);\r\n }\r\n for (const remove of removes) {\r\n const index = this._findWhitespaceIndex(remove.id);\r\n if (index === -1) {\r\n continue;\r\n }\r\n this._removeWhitespace(index);\r\n }\r\n return;\r\n }\r\n // simply rebuild the entire datastructure\r\n const toRemove = new Set();\r\n for (const remove of removes) {\r\n toRemove.add(remove.id);\r\n }\r\n const toChange = new Map();\r\n for (const change of changes) {\r\n toChange.set(change.id, change);\r\n }\r\n const applyRemoveAndChange = (whitespaces) => {\r\n let result = [];\r\n for (const whitespace of whitespaces) {\r\n if (toRemove.has(whitespace.id)) {\r\n continue;\r\n }\r\n if (toChange.has(whitespace.id)) {\r\n const change = toChange.get(whitespace.id);\r\n whitespace.afterLineNumber = change.newAfterLineNumber;\r\n whitespace.height = change.newHeight;\r\n }\r\n result.push(whitespace);\r\n }\r\n return result;\r\n };\r\n const result = applyRemoveAndChange(this._arr).concat(applyRemoveAndChange(inserts));\r\n result.sort((a, b) => {\r\n if (a.afterLineNumber === b.afterLineNumber) {\r\n return a.ordinal - b.ordinal;\r\n }\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n this._arr = result;\r\n this._prefixSumValidIndex = -1;\r\n }\r\n _checkPendingChanges() {\r\n if (this._pendingChanges.mustCommit()) {\r\n this._pendingChanges.commit(this);\r\n }\r\n }\r\n _insertWhitespace(whitespace) {\r\n const insertIndex = LinesLayout.findInsertionIndex(this._arr, whitespace.afterLineNumber, whitespace.ordinal);\r\n this._arr.splice(insertIndex, 0, whitespace);\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, insertIndex - 1);\r\n }\r\n _findWhitespaceIndex(id) {\r\n const arr = this._arr;\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (arr[i].id === id) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n _changeOneWhitespace(id, newAfterLineNumber, newHeight) {\r\n const index = this._findWhitespaceIndex(id);\r\n if (index === -1) {\r\n return;\r\n }\r\n if (this._arr[index].height !== newHeight) {\r\n this._arr[index].height = newHeight;\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, index - 1);\r\n }\r\n if (this._arr[index].afterLineNumber !== newAfterLineNumber) {\r\n // `afterLineNumber` changed for this whitespace\r\n // Record old whitespace\r\n const whitespace = this._arr[index];\r\n // Since changing `afterLineNumber` can trigger a reordering, we're gonna remove this whitespace\r\n this._removeWhitespace(index);\r\n whitespace.afterLineNumber = newAfterLineNumber;\r\n // And add it again\r\n this._insertWhitespace(whitespace);\r\n }\r\n }\r\n _removeWhitespace(removeIndex) {\r\n this._arr.splice(removeIndex, 1);\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, removeIndex - 1);\r\n }\r\n /**\r\n * Notify the layouter that lines have been deleted (a continuous zone of lines).\r\n *\r\n * @param fromLineNumber The line number at which the deletion started, inclusive\r\n * @param toLineNumber The line number at which the deletion ended, inclusive\r\n */\r\n onLinesDeleted(fromLineNumber, toLineNumber) {\r\n this._checkPendingChanges();\r\n fromLineNumber = fromLineNumber | 0;\r\n toLineNumber = toLineNumber | 0;\r\n this._lineCount -= (toLineNumber - fromLineNumber + 1);\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n const afterLineNumber = this._arr[i].afterLineNumber;\r\n if (fromLineNumber <= afterLineNumber && afterLineNumber <= toLineNumber) {\r\n // The line this whitespace was after has been deleted\r\n // => move whitespace to before first deleted line\r\n this._arr[i].afterLineNumber = fromLineNumber - 1;\r\n }\r\n else if (afterLineNumber > toLineNumber) {\r\n // The line this whitespace was after has been moved up\r\n // => move whitespace up\r\n this._arr[i].afterLineNumber -= (toLineNumber - fromLineNumber + 1);\r\n }\r\n }\r\n }\r\n /**\r\n * Notify the layouter that lines have been inserted (a continuous zone of lines).\r\n *\r\n * @param fromLineNumber The line number at which the insertion started, inclusive\r\n * @param toLineNumber The line number at which the insertion ended, inclusive.\r\n */\r\n onLinesInserted(fromLineNumber, toLineNumber) {\r\n this._checkPendingChanges();\r\n fromLineNumber = fromLineNumber | 0;\r\n toLineNumber = toLineNumber | 0;\r\n this._lineCount += (toLineNumber - fromLineNumber + 1);\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n const afterLineNumber = this._arr[i].afterLineNumber;\r\n if (fromLineNumber <= afterLineNumber) {\r\n this._arr[i].afterLineNumber += (toLineNumber - fromLineNumber + 1);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the sum of all the whitespaces.\r\n */\r\n getWhitespacesTotalHeight() {\r\n this._checkPendingChanges();\r\n if (this._arr.length === 0) {\r\n return 0;\r\n }\r\n return this.getWhitespacesAccumulatedHeight(this._arr.length - 1);\r\n }\r\n /**\r\n * Return the sum of the heights of the whitespaces at [0..index].\r\n * This includes the whitespace at `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return The sum of the heights of all whitespaces before the one at `index`, including the one at `index`.\r\n */\r\n getWhitespacesAccumulatedHeight(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n let startIndex = Math.max(0, this._prefixSumValidIndex + 1);\r\n if (startIndex === 0) {\r\n this._arr[0].prefixSum = this._arr[0].height;\r\n startIndex++;\r\n }\r\n for (let i = startIndex; i <= index; i++) {\r\n this._arr[i].prefixSum = this._arr[i - 1].prefixSum + this._arr[i].height;\r\n }\r\n this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, index);\r\n return this._arr[index].prefixSum;\r\n }\r\n /**\r\n * Get the sum of heights for all objects.\r\n *\r\n * @return The sum of heights for all objects.\r\n */\r\n getLinesTotalHeight() {\r\n this._checkPendingChanges();\r\n const linesHeight = this._lineHeight * this._lineCount;\r\n const whitespacesHeight = this.getWhitespacesTotalHeight();\r\n return linesHeight + whitespacesHeight + this._paddingTop + this._paddingBottom;\r\n }\r\n /**\r\n * Returns the accumulated height of whitespaces before the given line number.\r\n *\r\n * @param lineNumber The line number\r\n */\r\n getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\r\n if (lastWhitespaceBeforeLineNumber === -1) {\r\n return 0;\r\n }\r\n return this.getWhitespacesAccumulatedHeight(lastWhitespaceBeforeLineNumber);\r\n }\r\n _findLastWhitespaceBeforeLineNumber(lineNumber) {\r\n lineNumber = lineNumber | 0;\r\n // Find the whitespace before line number\r\n const arr = this._arr;\r\n let low = 0;\r\n let high = arr.length - 1;\r\n while (low <= high) {\r\n const delta = (high - low) | 0;\r\n const halfDelta = (delta / 2) | 0;\r\n const mid = (low + halfDelta) | 0;\r\n if (arr[mid].afterLineNumber < lineNumber) {\r\n if (mid + 1 >= arr.length || arr[mid + 1].afterLineNumber >= lineNumber) {\r\n return mid;\r\n }\r\n else {\r\n low = (mid + 1) | 0;\r\n }\r\n }\r\n else {\r\n high = (mid - 1) | 0;\r\n }\r\n }\r\n return -1;\r\n }\r\n _findFirstWhitespaceAfterLineNumber(lineNumber) {\r\n lineNumber = lineNumber | 0;\r\n const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\r\n const firstWhitespaceAfterLineNumber = lastWhitespaceBeforeLineNumber + 1;\r\n if (firstWhitespaceAfterLineNumber < this._arr.length) {\r\n return firstWhitespaceAfterLineNumber;\r\n }\r\n return -1;\r\n }\r\n /**\r\n * Find the index of the first whitespace which has `afterLineNumber` >= `lineNumber`.\r\n * @return The index of the first whitespace with `afterLineNumber` >= `lineNumber` or -1 if no whitespace is found.\r\n */\r\n getFirstWhitespaceIndexAfterLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n return this._findFirstWhitespaceAfterLineNumber(lineNumber);\r\n }\r\n /**\r\n * Get the vertical offset (the sum of heights for all objects above) a certain line number.\r\n *\r\n * @param lineNumber The line number\r\n * @return The sum of heights for all objects above `lineNumber`.\r\n */\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n let previousLinesHeight;\r\n if (lineNumber > 1) {\r\n previousLinesHeight = this._lineHeight * (lineNumber - 1);\r\n }\r\n else {\r\n previousLinesHeight = 0;\r\n }\r\n const previousWhitespacesHeight = this.getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber);\r\n return previousLinesHeight + previousWhitespacesHeight + this._paddingTop;\r\n }\r\n /**\r\n * The maximum min width for all whitespaces.\r\n */\r\n getWhitespaceMinWidth() {\r\n this._checkPendingChanges();\r\n if (this._minWidth === -1) {\r\n let minWidth = 0;\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n minWidth = Math.max(minWidth, this._arr[i].minWidth);\r\n }\r\n this._minWidth = minWidth;\r\n }\r\n return this._minWidth;\r\n }\r\n /**\r\n * Check if `verticalOffset` is below all lines.\r\n */\r\n isAfterLines(verticalOffset) {\r\n this._checkPendingChanges();\r\n const totalHeight = this.getLinesTotalHeight();\r\n return verticalOffset > totalHeight;\r\n }\r\n isInTopPadding(verticalOffset) {\r\n if (this._paddingTop === 0) {\r\n return false;\r\n }\r\n this._checkPendingChanges();\r\n return (verticalOffset < this._paddingTop);\r\n }\r\n isInBottomPadding(verticalOffset) {\r\n if (this._paddingBottom === 0) {\r\n return false;\r\n }\r\n this._checkPendingChanges();\r\n const totalHeight = this.getLinesTotalHeight();\r\n return (verticalOffset >= totalHeight - this._paddingBottom);\r\n }\r\n /**\r\n * Find the first line number that is at or after vertical offset `verticalOffset`.\r\n * i.e. if getVerticalOffsetForLine(line) is x and getVerticalOffsetForLine(line + 1) is y, then\r\n * getLineNumberAtOrAfterVerticalOffset(i) = line, x <= i < y.\r\n *\r\n * @param verticalOffset The vertical offset to search at.\r\n * @return The line number at or after vertical offset `verticalOffset`.\r\n */\r\n getLineNumberAtOrAfterVerticalOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n if (verticalOffset < 0) {\r\n return 1;\r\n }\r\n const linesCount = this._lineCount | 0;\r\n const lineHeight = this._lineHeight;\r\n let minLineNumber = 1;\r\n let maxLineNumber = linesCount;\r\n while (minLineNumber < maxLineNumber) {\r\n const midLineNumber = ((minLineNumber + maxLineNumber) / 2) | 0;\r\n const midLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(midLineNumber) | 0;\r\n if (verticalOffset >= midLineNumberVerticalOffset + lineHeight) {\r\n // vertical offset is after mid line number\r\n minLineNumber = midLineNumber + 1;\r\n }\r\n else if (verticalOffset >= midLineNumberVerticalOffset) {\r\n // Hit\r\n return midLineNumber;\r\n }\r\n else {\r\n // vertical offset is before mid line number, but mid line number could still be what we're searching for\r\n maxLineNumber = midLineNumber;\r\n }\r\n }\r\n if (minLineNumber > linesCount) {\r\n return linesCount;\r\n }\r\n return minLineNumber;\r\n }\r\n /**\r\n * Get all the lines and their relative vertical offsets that are positioned between `verticalOffset1` and `verticalOffset2`.\r\n *\r\n * @param verticalOffset1 The beginning of the viewport.\r\n * @param verticalOffset2 The end of the viewport.\r\n * @return A structure describing the lines positioned between `verticalOffset1` and `verticalOffset2`.\r\n */\r\n getLinesViewportData(verticalOffset1, verticalOffset2) {\r\n this._checkPendingChanges();\r\n verticalOffset1 = verticalOffset1 | 0;\r\n verticalOffset2 = verticalOffset2 | 0;\r\n const lineHeight = this._lineHeight;\r\n // Find first line number\r\n // We don't live in a perfect world, so the line number might start before or after verticalOffset1\r\n const startLineNumber = this.getLineNumberAtOrAfterVerticalOffset(verticalOffset1) | 0;\r\n const startLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(startLineNumber) | 0;\r\n let endLineNumber = this._lineCount | 0;\r\n // Also keep track of what whitespace we've got\r\n let whitespaceIndex = this.getFirstWhitespaceIndexAfterLineNumber(startLineNumber) | 0;\r\n const whitespaceCount = this.getWhitespacesCount() | 0;\r\n let currentWhitespaceHeight;\r\n let currentWhitespaceAfterLineNumber;\r\n if (whitespaceIndex === -1) {\r\n whitespaceIndex = whitespaceCount;\r\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\r\n currentWhitespaceHeight = 0;\r\n }\r\n else {\r\n currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\r\n currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\r\n }\r\n let currentVerticalOffset = startLineNumberVerticalOffset;\r\n let currentLineRelativeOffset = currentVerticalOffset;\r\n // IE (all versions) cannot handle units above about 1,533,908 px, so every 500k pixels bring numbers down\r\n const STEP_SIZE = 500000;\r\n let bigNumbersDelta = 0;\r\n if (startLineNumberVerticalOffset >= STEP_SIZE) {\r\n // Compute a delta that guarantees that lines are positioned at `lineHeight` increments\r\n bigNumbersDelta = Math.floor(startLineNumberVerticalOffset / STEP_SIZE) * STEP_SIZE;\r\n bigNumbersDelta = Math.floor(bigNumbersDelta / lineHeight) * lineHeight;\r\n currentLineRelativeOffset -= bigNumbersDelta;\r\n }\r\n const linesOffsets = [];\r\n const verticalCenter = verticalOffset1 + (verticalOffset2 - verticalOffset1) / 2;\r\n let centeredLineNumber = -1;\r\n // Figure out how far the lines go\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n if (centeredLineNumber === -1) {\r\n const currentLineTop = currentVerticalOffset;\r\n const currentLineBottom = currentVerticalOffset + lineHeight;\r\n if ((currentLineTop <= verticalCenter && verticalCenter < currentLineBottom) || currentLineTop > verticalCenter) {\r\n centeredLineNumber = lineNumber;\r\n }\r\n }\r\n // Count current line height in the vertical offsets\r\n currentVerticalOffset += lineHeight;\r\n linesOffsets[lineNumber - startLineNumber] = currentLineRelativeOffset;\r\n // Next line starts immediately after this one\r\n currentLineRelativeOffset += lineHeight;\r\n while (currentWhitespaceAfterLineNumber === lineNumber) {\r\n // Push down next line with the height of the current whitespace\r\n currentLineRelativeOffset += currentWhitespaceHeight;\r\n // Count current whitespace in the vertical offsets\r\n currentVerticalOffset += currentWhitespaceHeight;\r\n whitespaceIndex++;\r\n if (whitespaceIndex >= whitespaceCount) {\r\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\r\n }\r\n else {\r\n currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\r\n currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\r\n }\r\n }\r\n if (currentVerticalOffset >= verticalOffset2) {\r\n // We have covered the entire viewport area, time to stop\r\n endLineNumber = lineNumber;\r\n break;\r\n }\r\n }\r\n if (centeredLineNumber === -1) {\r\n centeredLineNumber = endLineNumber;\r\n }\r\n const endLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(endLineNumber) | 0;\r\n let completelyVisibleStartLineNumber = startLineNumber;\r\n let completelyVisibleEndLineNumber = endLineNumber;\r\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\r\n if (startLineNumberVerticalOffset < verticalOffset1) {\r\n completelyVisibleStartLineNumber++;\r\n }\r\n }\r\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\r\n if (endLineNumberVerticalOffset + lineHeight > verticalOffset2) {\r\n completelyVisibleEndLineNumber--;\r\n }\r\n }\r\n return {\r\n bigNumbersDelta: bigNumbersDelta,\r\n startLineNumber: startLineNumber,\r\n endLineNumber: endLineNumber,\r\n relativeVerticalOffset: linesOffsets,\r\n centeredLineNumber: centeredLineNumber,\r\n completelyVisibleStartLineNumber: completelyVisibleStartLineNumber,\r\n completelyVisibleEndLineNumber: completelyVisibleEndLineNumber\r\n };\r\n }\r\n getVerticalOffsetForWhitespaceIndex(whitespaceIndex) {\r\n this._checkPendingChanges();\r\n whitespaceIndex = whitespaceIndex | 0;\r\n const afterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex);\r\n let previousLinesHeight;\r\n if (afterLineNumber >= 1) {\r\n previousLinesHeight = this._lineHeight * afterLineNumber;\r\n }\r\n else {\r\n previousLinesHeight = 0;\r\n }\r\n let previousWhitespacesHeight;\r\n if (whitespaceIndex > 0) {\r\n previousWhitespacesHeight = this.getWhitespacesAccumulatedHeight(whitespaceIndex - 1);\r\n }\r\n else {\r\n previousWhitespacesHeight = 0;\r\n }\r\n return previousLinesHeight + previousWhitespacesHeight + this._paddingTop;\r\n }\r\n getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n let minWhitespaceIndex = 0;\r\n let maxWhitespaceIndex = this.getWhitespacesCount() - 1;\r\n if (maxWhitespaceIndex < 0) {\r\n return -1;\r\n }\r\n // Special case: nothing to be found\r\n const maxWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(maxWhitespaceIndex);\r\n const maxWhitespaceHeight = this.getHeightForWhitespaceIndex(maxWhitespaceIndex);\r\n if (verticalOffset >= maxWhitespaceVerticalOffset + maxWhitespaceHeight) {\r\n return -1;\r\n }\r\n while (minWhitespaceIndex < maxWhitespaceIndex) {\r\n const midWhitespaceIndex = Math.floor((minWhitespaceIndex + maxWhitespaceIndex) / 2);\r\n const midWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(midWhitespaceIndex);\r\n const midWhitespaceHeight = this.getHeightForWhitespaceIndex(midWhitespaceIndex);\r\n if (verticalOffset >= midWhitespaceVerticalOffset + midWhitespaceHeight) {\r\n // vertical offset is after whitespace\r\n minWhitespaceIndex = midWhitespaceIndex + 1;\r\n }\r\n else if (verticalOffset >= midWhitespaceVerticalOffset) {\r\n // Hit\r\n return midWhitespaceIndex;\r\n }\r\n else {\r\n // vertical offset is before whitespace, but midWhitespaceIndex might still be what we're searching for\r\n maxWhitespaceIndex = midWhitespaceIndex;\r\n }\r\n }\r\n return minWhitespaceIndex;\r\n }\r\n /**\r\n * Get exactly the whitespace that is layouted at `verticalOffset`.\r\n *\r\n * @param verticalOffset The vertical offset.\r\n * @return Precisely the whitespace that is layouted at `verticaloffset` or null.\r\n */\r\n getWhitespaceAtVerticalOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n const candidateIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset);\r\n if (candidateIndex < 0) {\r\n return null;\r\n }\r\n if (candidateIndex >= this.getWhitespacesCount()) {\r\n return null;\r\n }\r\n const candidateTop = this.getVerticalOffsetForWhitespaceIndex(candidateIndex);\r\n if (candidateTop > verticalOffset) {\r\n return null;\r\n }\r\n const candidateHeight = this.getHeightForWhitespaceIndex(candidateIndex);\r\n const candidateId = this.getIdForWhitespaceIndex(candidateIndex);\r\n const candidateAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(candidateIndex);\r\n return {\r\n id: candidateId,\r\n afterLineNumber: candidateAfterLineNumber,\r\n verticalOffset: candidateTop,\r\n height: candidateHeight\r\n };\r\n }\r\n /**\r\n * Get a list of whitespaces that are positioned between `verticalOffset1` and `verticalOffset2`.\r\n *\r\n * @param verticalOffset1 The beginning of the viewport.\r\n * @param verticalOffset2 The end of the viewport.\r\n * @return An array with all the whitespaces in the viewport. If no whitespace is in viewport, the array is empty.\r\n */\r\n getWhitespaceViewportData(verticalOffset1, verticalOffset2) {\r\n this._checkPendingChanges();\r\n verticalOffset1 = verticalOffset1 | 0;\r\n verticalOffset2 = verticalOffset2 | 0;\r\n const startIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset1);\r\n const endIndex = this.getWhitespacesCount() - 1;\r\n if (startIndex < 0) {\r\n return [];\r\n }\r\n let result = [];\r\n for (let i = startIndex; i <= endIndex; i++) {\r\n const top = this.getVerticalOffsetForWhitespaceIndex(i);\r\n const height = this.getHeightForWhitespaceIndex(i);\r\n if (top >= verticalOffset2) {\r\n break;\r\n }\r\n result.push({\r\n id: this.getIdForWhitespaceIndex(i),\r\n afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i),\r\n verticalOffset: top,\r\n height: height\r\n });\r\n }\r\n return result;\r\n }\r\n /**\r\n * Get all whitespaces.\r\n */\r\n getWhitespaces() {\r\n this._checkPendingChanges();\r\n return this._arr.slice(0);\r\n }\r\n /**\r\n * The number of whitespaces.\r\n */\r\n getWhitespacesCount() {\r\n this._checkPendingChanges();\r\n return this._arr.length;\r\n }\r\n /**\r\n * Get the `id` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `id` of whitespace at `index`.\r\n */\r\n getIdForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].id;\r\n }\r\n /**\r\n * Get the `afterLineNumber` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `afterLineNumber` of whitespace at `index`.\r\n */\r\n getAfterLineNumberForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].afterLineNumber;\r\n }\r\n /**\r\n * Get the `height` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `height` of whitespace at `index`.\r\n */\r\n getHeightForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].height;\r\n }\r\n}\r\nLinesLayout.INSTANCE_COUNT = 0;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewLayout\": () => (/* binding */ ViewLayout)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_scrollable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/scrollable.js */ \"./node_modules/monaco-editor/esm/vs/base/common/scrollable.js\");\n/* harmony import */ var _linesLayout_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linesLayout.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js\");\n/* harmony import */ var _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../viewModel/viewModelEventDispatcher.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst SMOOTH_SCROLLING_TIME = 125;\r\nclass EditorScrollDimensions {\r\n constructor(width, contentWidth, height, contentHeight) {\r\n width = width | 0;\r\n contentWidth = contentWidth | 0;\r\n height = height | 0;\r\n contentHeight = contentHeight | 0;\r\n if (width < 0) {\r\n width = 0;\r\n }\r\n if (contentWidth < 0) {\r\n contentWidth = 0;\r\n }\r\n if (height < 0) {\r\n height = 0;\r\n }\r\n if (contentHeight < 0) {\r\n contentHeight = 0;\r\n }\r\n this.width = width;\r\n this.contentWidth = contentWidth;\r\n this.scrollWidth = Math.max(width, contentWidth);\r\n this.height = height;\r\n this.contentHeight = contentHeight;\r\n this.scrollHeight = Math.max(height, contentHeight);\r\n }\r\n equals(other) {\r\n return (this.width === other.width\r\n && this.contentWidth === other.contentWidth\r\n && this.height === other.height\r\n && this.contentHeight === other.contentHeight);\r\n }\r\n}\r\nclass EditorScrollable extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(smoothScrollDuration, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onDidContentSizeChange = this._onDidContentSizeChange.event;\r\n this._dimensions = new EditorScrollDimensions(0, 0, 0, 0);\r\n this._scrollable = this._register(new _base_common_scrollable_js__WEBPACK_IMPORTED_MODULE_2__.Scrollable(smoothScrollDuration, scheduleAtNextAnimationFrame));\r\n this.onDidScroll = this._scrollable.onScroll;\r\n }\r\n getScrollable() {\r\n return this._scrollable;\r\n }\r\n setSmoothScrollDuration(smoothScrollDuration) {\r\n this._scrollable.setSmoothScrollDuration(smoothScrollDuration);\r\n }\r\n validateScrollPosition(scrollPosition) {\r\n return this._scrollable.validateScrollPosition(scrollPosition);\r\n }\r\n getScrollDimensions() {\r\n return this._dimensions;\r\n }\r\n setScrollDimensions(dimensions) {\r\n if (this._dimensions.equals(dimensions)) {\r\n return;\r\n }\r\n const oldDimensions = this._dimensions;\r\n this._dimensions = dimensions;\r\n this._scrollable.setScrollDimensions({\r\n width: dimensions.width,\r\n scrollWidth: dimensions.scrollWidth,\r\n height: dimensions.height,\r\n scrollHeight: dimensions.scrollHeight\r\n }, true);\r\n const contentWidthChanged = (oldDimensions.contentWidth !== dimensions.contentWidth);\r\n const contentHeightChanged = (oldDimensions.contentHeight !== dimensions.contentHeight);\r\n if (contentWidthChanged || contentHeightChanged) {\r\n this._onDidContentSizeChange.fire(new _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_5__.ContentSizeChangedEvent(oldDimensions.contentWidth, oldDimensions.contentHeight, dimensions.contentWidth, dimensions.contentHeight));\r\n }\r\n }\r\n getFutureScrollPosition() {\r\n return this._scrollable.getFutureScrollPosition();\r\n }\r\n getCurrentScrollPosition() {\r\n return this._scrollable.getCurrentScrollPosition();\r\n }\r\n setScrollPositionNow(update) {\r\n this._scrollable.setScrollPositionNow(update);\r\n }\r\n setScrollPositionSmooth(update) {\r\n this._scrollable.setScrollPositionSmooth(update);\r\n }\r\n}\r\nclass ViewLayout extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(configuration, lineCount, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._configuration = configuration;\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const padding = options.get(69 /* padding */);\r\n this._linesLayout = new _linesLayout_js__WEBPACK_IMPORTED_MODULE_3__.LinesLayout(lineCount, options.get(53 /* lineHeight */), padding.top, padding.bottom);\r\n this._scrollable = this._register(new EditorScrollable(0, scheduleAtNextAnimationFrame));\r\n this._configureSmoothScrollDuration();\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(layoutInfo.contentWidth, 0, layoutInfo.height, 0));\r\n this.onDidScroll = this._scrollable.onDidScroll;\r\n this.onDidContentSizeChange = this._scrollable.onDidContentSizeChange;\r\n this._updateHeight();\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n getScrollable() {\r\n return this._scrollable.getScrollable();\r\n }\r\n onHeightMaybeChanged() {\r\n this._updateHeight();\r\n }\r\n _configureSmoothScrollDuration() {\r\n this._scrollable.setSmoothScrollDuration(this._configuration.options.get(98 /* smoothScrolling */) ? SMOOTH_SCROLLING_TIME : 0);\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._configuration.options;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._linesLayout.setLineHeight(options.get(53 /* lineHeight */));\r\n }\r\n if (e.hasChanged(69 /* padding */)) {\r\n const padding = options.get(69 /* padding */);\r\n this._linesLayout.setPadding(padding.top, padding.bottom);\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const width = layoutInfo.contentWidth;\r\n const height = layoutInfo.height;\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const contentWidth = scrollDimensions.contentWidth;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));\r\n }\r\n else {\r\n this._updateHeight();\r\n }\r\n if (e.hasChanged(98 /* smoothScrolling */)) {\r\n this._configureSmoothScrollDuration();\r\n }\r\n }\r\n onFlushed(lineCount) {\r\n this._linesLayout.onFlushed(lineCount);\r\n }\r\n onLinesDeleted(fromLineNumber, toLineNumber) {\r\n this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber);\r\n }\r\n onLinesInserted(fromLineNumber, toLineNumber) {\r\n this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);\r\n }\r\n // ---- end view event handlers\r\n _getHorizontalScrollbarHeight(width, scrollWidth) {\r\n const options = this._configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n if (scrollbar.horizontal === 2 /* Hidden */) {\r\n // horizontal scrollbar not visible\r\n return 0;\r\n }\r\n if (width >= scrollWidth) {\r\n // horizontal scrollbar not visible\r\n return 0;\r\n }\r\n return scrollbar.horizontalScrollbarSize;\r\n }\r\n _getContentHeight(width, height, contentWidth) {\r\n const options = this._configuration.options;\r\n let result = this._linesLayout.getLinesTotalHeight();\r\n if (options.get(89 /* scrollBeyondLastLine */)) {\r\n result += Math.max(0, height - options.get(53 /* lineHeight */) - options.get(69 /* padding */).bottom);\r\n }\r\n else {\r\n result += this._getHorizontalScrollbarHeight(width, contentWidth);\r\n }\r\n return result;\r\n }\r\n _updateHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const width = scrollDimensions.width;\r\n const height = scrollDimensions.height;\r\n const contentWidth = scrollDimensions.contentWidth;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));\r\n }\r\n // ---- Layouting logic\r\n getCurrentViewport() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return new _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__.Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\r\n }\r\n getFutureViewport() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const currentScrollPosition = this._scrollable.getFutureScrollPosition();\r\n return new _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__.Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\r\n }\r\n _computeContentWidth(maxLineWidth) {\r\n const options = this._configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n if (wrappingInfo.isViewportWrapping) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const minimap = options.get(59 /* minimap */);\r\n if (maxLineWidth > layoutInfo.contentWidth + fontInfo.typicalHalfwidthCharacterWidth) {\r\n // This is a case where viewport wrapping is on, but the line extends above the viewport\r\n if (minimap.enabled && minimap.side === 'right') {\r\n // We need to accomodate the scrollbar width\r\n return maxLineWidth + layoutInfo.verticalScrollbarWidth;\r\n }\r\n }\r\n return maxLineWidth;\r\n }\r\n else {\r\n const extraHorizontalSpace = options.get(88 /* scrollBeyondLastColumn */) * fontInfo.typicalHalfwidthCharacterWidth;\r\n const whitespaceMinWidth = this._linesLayout.getWhitespaceMinWidth();\r\n return Math.max(maxLineWidth + extraHorizontalSpace, whitespaceMinWidth);\r\n }\r\n }\r\n setMaxLineWidth(maxLineWidth) {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n // const newScrollWidth = ;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(scrollDimensions.width, this._computeContentWidth(maxLineWidth), scrollDimensions.height, scrollDimensions.contentHeight));\r\n // The height might depend on the fact that there is a horizontal scrollbar or not\r\n this._updateHeight();\r\n }\r\n // ---- view state\r\n saveState() {\r\n const currentScrollPosition = this._scrollable.getFutureScrollPosition();\r\n let scrollTop = currentScrollPosition.scrollTop;\r\n let firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop);\r\n let whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport);\r\n return {\r\n scrollTop: scrollTop,\r\n scrollTopWithoutViewZones: scrollTop - whitespaceAboveFirstLine,\r\n scrollLeft: currentScrollPosition.scrollLeft\r\n };\r\n }\r\n // ---- IVerticalLayoutProvider\r\n changeWhitespace(callback) {\r\n const hadAChange = this._linesLayout.changeWhitespace(callback);\r\n if (hadAChange) {\r\n this.onHeightMaybeChanged();\r\n }\r\n return hadAChange;\r\n }\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n return this._linesLayout.getVerticalOffsetForLineNumber(lineNumber);\r\n }\r\n isAfterLines(verticalOffset) {\r\n return this._linesLayout.isAfterLines(verticalOffset);\r\n }\r\n isInTopPadding(verticalOffset) {\r\n return this._linesLayout.isInTopPadding(verticalOffset);\r\n }\r\n isInBottomPadding(verticalOffset) {\r\n return this._linesLayout.isInBottomPadding(verticalOffset);\r\n }\r\n getLineNumberAtVerticalOffset(verticalOffset) {\r\n return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(verticalOffset);\r\n }\r\n getWhitespaceAtVerticalOffset(verticalOffset) {\r\n return this._linesLayout.getWhitespaceAtVerticalOffset(verticalOffset);\r\n }\r\n getLinesViewportData() {\r\n const visibleBox = this.getCurrentViewport();\r\n return this._linesLayout.getLinesViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\r\n }\r\n getLinesViewportDataAtScrollTop(scrollTop) {\r\n // do some minimal validations on scrollTop\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n if (scrollTop + scrollDimensions.height > scrollDimensions.scrollHeight) {\r\n scrollTop = scrollDimensions.scrollHeight - scrollDimensions.height;\r\n }\r\n if (scrollTop < 0) {\r\n scrollTop = 0;\r\n }\r\n return this._linesLayout.getLinesViewportData(scrollTop, scrollTop + scrollDimensions.height);\r\n }\r\n getWhitespaceViewportData() {\r\n const visibleBox = this.getCurrentViewport();\r\n return this._linesLayout.getWhitespaceViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\r\n }\r\n getWhitespaces() {\r\n return this._linesLayout.getWhitespaces();\r\n }\r\n // ---- IScrollingProvider\r\n getContentWidth() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.contentWidth;\r\n }\r\n getScrollWidth() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.scrollWidth;\r\n }\r\n getContentHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.contentHeight;\r\n }\r\n getScrollHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.scrollHeight;\r\n }\r\n getCurrentScrollLeft() {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return currentScrollPosition.scrollLeft;\r\n }\r\n getCurrentScrollTop() {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return currentScrollPosition.scrollTop;\r\n }\r\n validateScrollPosition(scrollPosition) {\r\n return this._scrollable.validateScrollPosition(scrollPosition);\r\n }\r\n setScrollPosition(position, type) {\r\n if (type === 1 /* Immediate */) {\r\n this._scrollable.setScrollPositionNow(position);\r\n }\r\n else {\r\n this._scrollable.setScrollPositionSmooth(position);\r\n }\r\n }\r\n deltaScrollNow(deltaScrollLeft, deltaScrollTop) {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n this._scrollable.setScrollPositionNow({\r\n scrollLeft: currentScrollPosition.scrollLeft + deltaScrollLeft,\r\n scrollTop: currentScrollPosition.scrollTop + deltaScrollTop\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineRange\": () => (/* binding */ LineRange),\n/* harmony export */ \"RenderLineInput\": () => (/* binding */ RenderLineInput),\n/* harmony export */ \"CharacterMapping\": () => (/* binding */ CharacterMapping),\n/* harmony export */ \"RenderLineOutput\": () => (/* binding */ RenderLineOutput),\n/* harmony export */ \"renderViewLine\": () => (/* binding */ renderViewLine),\n/* harmony export */ \"RenderLineOutput2\": () => (/* binding */ RenderLineOutput2),\n/* harmony export */ \"renderViewLine2\": () => (/* binding */ renderViewLine2)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/stringBuilder.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js\");\n/* harmony import */ var _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass LinePart {\r\n constructor(endIndex, type, metadata) {\r\n this.endIndex = endIndex;\r\n this.type = type;\r\n this.metadata = metadata;\r\n }\r\n isWhitespace() {\r\n return (this.metadata & 1 /* IS_WHITESPACE_MASK */ ? true : false);\r\n }\r\n}\r\nclass LineRange {\r\n constructor(startIndex, endIndex) {\r\n this.startOffset = startIndex;\r\n this.endOffset = endIndex;\r\n }\r\n equals(otherLineRange) {\r\n return this.startOffset === otherLineRange.startOffset\r\n && this.endOffset === otherLineRange.endOffset;\r\n }\r\n}\r\nclass RenderLineInput {\r\n constructor(useMonospaceOptimizations, canUseHalfwidthRightwardsArrow, lineContent, continuesWithWrappedLine, isBasicASCII, containsRTL, fauxIndentLength, lineTokens, lineDecorations, tabSize, startVisibleColumn, spaceWidth, middotWidth, wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, selectionsOnLine) {\r\n this.useMonospaceOptimizations = useMonospaceOptimizations;\r\n this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow;\r\n this.lineContent = lineContent;\r\n this.continuesWithWrappedLine = continuesWithWrappedLine;\r\n this.isBasicASCII = isBasicASCII;\r\n this.containsRTL = containsRTL;\r\n this.fauxIndentLength = fauxIndentLength;\r\n this.lineTokens = lineTokens;\r\n this.lineDecorations = lineDecorations.sort(_lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__.LineDecoration.compare);\r\n this.tabSize = tabSize;\r\n this.startVisibleColumn = startVisibleColumn;\r\n this.spaceWidth = spaceWidth;\r\n this.stopRenderingLineAfter = stopRenderingLineAfter;\r\n this.renderWhitespace = (renderWhitespace === 'all'\r\n ? 4 /* All */\r\n : renderWhitespace === 'boundary'\r\n ? 1 /* Boundary */\r\n : renderWhitespace === 'selection'\r\n ? 2 /* Selection */\r\n : renderWhitespace === 'trailing'\r\n ? 3 /* Trailing */\r\n : 0 /* None */);\r\n this.renderControlCharacters = renderControlCharacters;\r\n this.fontLigatures = fontLigatures;\r\n this.selectionsOnLine = selectionsOnLine && selectionsOnLine.sort((a, b) => a.startOffset < b.startOffset ? -1 : 1);\r\n const wsmiddotDiff = Math.abs(wsmiddotWidth - spaceWidth);\r\n const middotDiff = Math.abs(middotWidth - spaceWidth);\r\n if (wsmiddotDiff < middotDiff) {\r\n this.renderSpaceWidth = wsmiddotWidth;\r\n this.renderSpaceCharCode = 0x2E31; // U+2E31 - WORD SEPARATOR MIDDLE DOT\r\n }\r\n else {\r\n this.renderSpaceWidth = middotWidth;\r\n this.renderSpaceCharCode = 0xB7; // U+00B7 - MIDDLE DOT\r\n }\r\n }\r\n sameSelection(otherSelections) {\r\n if (this.selectionsOnLine === null) {\r\n return otherSelections === null;\r\n }\r\n if (otherSelections === null) {\r\n return false;\r\n }\r\n if (otherSelections.length !== this.selectionsOnLine.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < this.selectionsOnLine.length; i++) {\r\n if (!this.selectionsOnLine[i].equals(otherSelections[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n equals(other) {\r\n return (this.useMonospaceOptimizations === other.useMonospaceOptimizations\r\n && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow\r\n && this.lineContent === other.lineContent\r\n && this.continuesWithWrappedLine === other.continuesWithWrappedLine\r\n && this.isBasicASCII === other.isBasicASCII\r\n && this.containsRTL === other.containsRTL\r\n && this.fauxIndentLength === other.fauxIndentLength\r\n && this.tabSize === other.tabSize\r\n && this.startVisibleColumn === other.startVisibleColumn\r\n && this.spaceWidth === other.spaceWidth\r\n && this.renderSpaceWidth === other.renderSpaceWidth\r\n && this.renderSpaceCharCode === other.renderSpaceCharCode\r\n && this.stopRenderingLineAfter === other.stopRenderingLineAfter\r\n && this.renderWhitespace === other.renderWhitespace\r\n && this.renderControlCharacters === other.renderControlCharacters\r\n && this.fontLigatures === other.fontLigatures\r\n && _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__.LineDecoration.equalsArr(this.lineDecorations, other.lineDecorations)\r\n && this.lineTokens.equals(other.lineTokens)\r\n && this.sameSelection(other.selectionsOnLine));\r\n }\r\n}\r\n/**\r\n * Provides a both direction mapping between a line's character and its rendered position.\r\n */\r\nclass CharacterMapping {\r\n constructor(length, partCount) {\r\n this.length = length;\r\n this._data = new Uint32Array(this.length);\r\n this._absoluteOffsets = new Uint32Array(this.length);\r\n }\r\n static getPartIndex(partData) {\r\n return (partData & 4294901760 /* PART_INDEX_MASK */) >>> 16 /* PART_INDEX_OFFSET */;\r\n }\r\n static getCharIndex(partData) {\r\n return (partData & 65535 /* CHAR_INDEX_MASK */) >>> 0 /* CHAR_INDEX_OFFSET */;\r\n }\r\n setPartData(charOffset, partIndex, charIndex, partAbsoluteOffset) {\r\n let partData = ((partIndex << 16 /* PART_INDEX_OFFSET */)\r\n | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0;\r\n this._data[charOffset] = partData;\r\n this._absoluteOffsets[charOffset] = partAbsoluteOffset + charIndex;\r\n }\r\n getAbsoluteOffsets() {\r\n return this._absoluteOffsets;\r\n }\r\n charOffsetToPartData(charOffset) {\r\n if (this.length === 0) {\r\n return 0;\r\n }\r\n if (charOffset < 0) {\r\n return this._data[0];\r\n }\r\n if (charOffset >= this.length) {\r\n return this._data[this.length - 1];\r\n }\r\n return this._data[charOffset];\r\n }\r\n partDataToCharOffset(partIndex, partLength, charIndex) {\r\n if (this.length === 0) {\r\n return 0;\r\n }\r\n let searchEntry = ((partIndex << 16 /* PART_INDEX_OFFSET */)\r\n | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0;\r\n let min = 0;\r\n let max = this.length - 1;\r\n while (min + 1 < max) {\r\n let mid = ((min + max) >>> 1);\r\n let midEntry = this._data[mid];\r\n if (midEntry === searchEntry) {\r\n return mid;\r\n }\r\n else if (midEntry > searchEntry) {\r\n max = mid;\r\n }\r\n else {\r\n min = mid;\r\n }\r\n }\r\n if (min === max) {\r\n return min;\r\n }\r\n let minEntry = this._data[min];\r\n let maxEntry = this._data[max];\r\n if (minEntry === searchEntry) {\r\n return min;\r\n }\r\n if (maxEntry === searchEntry) {\r\n return max;\r\n }\r\n let minPartIndex = CharacterMapping.getPartIndex(minEntry);\r\n let minCharIndex = CharacterMapping.getCharIndex(minEntry);\r\n let maxPartIndex = CharacterMapping.getPartIndex(maxEntry);\r\n let maxCharIndex;\r\n if (minPartIndex !== maxPartIndex) {\r\n // sitting between parts\r\n maxCharIndex = partLength;\r\n }\r\n else {\r\n maxCharIndex = CharacterMapping.getCharIndex(maxEntry);\r\n }\r\n let minEntryDistance = charIndex - minCharIndex;\r\n let maxEntryDistance = maxCharIndex - charIndex;\r\n if (minEntryDistance <= maxEntryDistance) {\r\n return min;\r\n }\r\n return max;\r\n }\r\n}\r\nclass RenderLineOutput {\r\n constructor(characterMapping, containsRTL, containsForeignElements) {\r\n this.characterMapping = characterMapping;\r\n this.containsRTL = containsRTL;\r\n this.containsForeignElements = containsForeignElements;\r\n }\r\n}\r\nfunction renderViewLine(input, sb) {\r\n if (input.lineContent.length === 0) {\r\n let containsForeignElements = 0 /* None */;\r\n let content = '<span><span></span></span>';\r\n if (input.lineDecorations.length > 0) {\r\n // This line is empty, but it contains inline decorations\r\n const beforeClassNames = [];\r\n const afterClassNames = [];\r\n for (let i = 0, len = input.lineDecorations.length; i < len; i++) {\r\n const lineDecoration = input.lineDecorations[i];\r\n if (lineDecoration.type === 1 /* Before */) {\r\n beforeClassNames.push(input.lineDecorations[i].className);\r\n containsForeignElements |= 1 /* Before */;\r\n }\r\n if (lineDecoration.type === 2 /* After */) {\r\n afterClassNames.push(input.lineDecorations[i].className);\r\n containsForeignElements |= 2 /* After */;\r\n }\r\n }\r\n if (containsForeignElements !== 0 /* None */) {\r\n const beforeSpan = (beforeClassNames.length > 0 ? `<span class=\"${beforeClassNames.join(' ')}\"></span>` : ``);\r\n const afterSpan = (afterClassNames.length > 0 ? `<span class=\"${afterClassNames.join(' ')}\"></span>` : ``);\r\n content = `<span>${beforeSpan}${afterSpan}</span>`;\r\n }\r\n }\r\n sb.appendASCIIString(content);\r\n return new RenderLineOutput(new CharacterMapping(0, 0), false, containsForeignElements);\r\n }\r\n return _renderLine(resolveRenderLineInput(input), sb);\r\n}\r\nclass RenderLineOutput2 {\r\n constructor(characterMapping, html, containsRTL, containsForeignElements) {\r\n this.characterMapping = characterMapping;\r\n this.html = html;\r\n this.containsRTL = containsRTL;\r\n this.containsForeignElements = containsForeignElements;\r\n }\r\n}\r\nfunction renderViewLine2(input) {\r\n let sb = (0,_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__.createStringBuilder)(10000);\r\n let out = renderViewLine(input, sb);\r\n return new RenderLineOutput2(out.characterMapping, sb.build(), out.containsRTL, out.containsForeignElements);\r\n}\r\nclass ResolvedRenderLineInput {\r\n constructor(fontIsMonospace, canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, parts, containsForeignElements, fauxIndentLength, tabSize, startVisibleColumn, containsRTL, spaceWidth, renderSpaceCharCode, renderWhitespace, renderControlCharacters) {\r\n this.fontIsMonospace = fontIsMonospace;\r\n this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow;\r\n this.lineContent = lineContent;\r\n this.len = len;\r\n this.isOverflowing = isOverflowing;\r\n this.parts = parts;\r\n this.containsForeignElements = containsForeignElements;\r\n this.fauxIndentLength = fauxIndentLength;\r\n this.tabSize = tabSize;\r\n this.startVisibleColumn = startVisibleColumn;\r\n this.containsRTL = containsRTL;\r\n this.spaceWidth = spaceWidth;\r\n this.renderSpaceCharCode = renderSpaceCharCode;\r\n this.renderWhitespace = renderWhitespace;\r\n this.renderControlCharacters = renderControlCharacters;\r\n //\r\n }\r\n}\r\nfunction resolveRenderLineInput(input) {\r\n const lineContent = input.lineContent;\r\n let isOverflowing;\r\n let len;\r\n if (input.stopRenderingLineAfter !== -1 && input.stopRenderingLineAfter < lineContent.length) {\r\n isOverflowing = true;\r\n len = input.stopRenderingLineAfter;\r\n }\r\n else {\r\n isOverflowing = false;\r\n len = lineContent.length;\r\n }\r\n let tokens = transformAndRemoveOverflowing(input.lineTokens, input.fauxIndentLength, len);\r\n if (input.renderWhitespace === 4 /* All */ ||\r\n input.renderWhitespace === 1 /* Boundary */ ||\r\n (input.renderWhitespace === 2 /* Selection */ && !!input.selectionsOnLine) ||\r\n input.renderWhitespace === 3 /* Trailing */) {\r\n tokens = _applyRenderWhitespace(input, lineContent, len, tokens);\r\n }\r\n let containsForeignElements = 0 /* None */;\r\n if (input.lineDecorations.length > 0) {\r\n for (let i = 0, len = input.lineDecorations.length; i < len; i++) {\r\n const lineDecoration = input.lineDecorations[i];\r\n if (lineDecoration.type === 3 /* RegularAffectingLetterSpacing */) {\r\n // Pretend there are foreign elements... although not 100% accurate.\r\n containsForeignElements |= 1 /* Before */;\r\n }\r\n else if (lineDecoration.type === 1 /* Before */) {\r\n containsForeignElements |= 1 /* Before */;\r\n }\r\n else if (lineDecoration.type === 2 /* After */) {\r\n containsForeignElements |= 2 /* After */;\r\n }\r\n }\r\n tokens = _applyInlineDecorations(lineContent, len, tokens, input.lineDecorations);\r\n }\r\n if (!input.containsRTL) {\r\n // We can never split RTL text, as it ruins the rendering\r\n tokens = splitLargeTokens(lineContent, tokens, !input.isBasicASCII || input.fontLigatures);\r\n }\r\n return new ResolvedRenderLineInput(input.useMonospaceOptimizations, input.canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, tokens, containsForeignElements, input.fauxIndentLength, input.tabSize, input.startVisibleColumn, input.containsRTL, input.spaceWidth, input.renderSpaceCharCode, input.renderWhitespace, input.renderControlCharacters);\r\n}\r\n/**\r\n * In the rendering phase, characters are always looped until token.endIndex.\r\n * Ensure that all tokens end before `len` and the last one ends precisely at `len`.\r\n */\r\nfunction transformAndRemoveOverflowing(tokens, fauxIndentLength, len) {\r\n let result = [], resultLen = 0;\r\n // The faux indent part of the line should have no token type\r\n if (fauxIndentLength > 0) {\r\n result[resultLen++] = new LinePart(fauxIndentLength, '', 0);\r\n }\r\n for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\r\n const endIndex = tokens.getEndOffset(tokenIndex);\r\n if (endIndex <= fauxIndentLength) {\r\n // The faux indent part of the line should have no token type\r\n continue;\r\n }\r\n const type = tokens.getClassName(tokenIndex);\r\n if (endIndex >= len) {\r\n result[resultLen++] = new LinePart(len, type, 0);\r\n break;\r\n }\r\n result[resultLen++] = new LinePart(endIndex, type, 0);\r\n }\r\n return result;\r\n}\r\n/**\r\n * See https://github.com/microsoft/vscode/issues/6885.\r\n * It appears that having very large spans causes very slow reading of character positions.\r\n * So here we try to avoid that.\r\n */\r\nfunction splitLargeTokens(lineContent, tokens, onlyAtSpaces) {\r\n let lastTokenEndIndex = 0;\r\n let result = [], resultLen = 0;\r\n if (onlyAtSpaces) {\r\n // Split only at spaces => we need to walk each character\r\n for (let i = 0, len = tokens.length; i < len; i++) {\r\n const token = tokens[i];\r\n const tokenEndIndex = token.endIndex;\r\n if (lastTokenEndIndex + 50 /* LongToken */ < tokenEndIndex) {\r\n const tokenType = token.type;\r\n const tokenMetadata = token.metadata;\r\n let lastSpaceOffset = -1;\r\n let currTokenStart = lastTokenEndIndex;\r\n for (let j = lastTokenEndIndex; j < tokenEndIndex; j++) {\r\n if (lineContent.charCodeAt(j) === 32 /* Space */) {\r\n lastSpaceOffset = j;\r\n }\r\n if (lastSpaceOffset !== -1 && j - currTokenStart >= 50 /* LongToken */) {\r\n // Split at `lastSpaceOffset` + 1\r\n result[resultLen++] = new LinePart(lastSpaceOffset + 1, tokenType, tokenMetadata);\r\n currTokenStart = lastSpaceOffset + 1;\r\n lastSpaceOffset = -1;\r\n }\r\n }\r\n if (currTokenStart !== tokenEndIndex) {\r\n result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata);\r\n }\r\n }\r\n else {\r\n result[resultLen++] = token;\r\n }\r\n lastTokenEndIndex = tokenEndIndex;\r\n }\r\n }\r\n else {\r\n // Split anywhere => we don't need to walk each character\r\n for (let i = 0, len = tokens.length; i < len; i++) {\r\n const token = tokens[i];\r\n const tokenEndIndex = token.endIndex;\r\n let diff = (tokenEndIndex - lastTokenEndIndex);\r\n if (diff > 50 /* LongToken */) {\r\n const tokenType = token.type;\r\n const tokenMetadata = token.metadata;\r\n const piecesCount = Math.ceil(diff / 50 /* LongToken */);\r\n for (let j = 1; j < piecesCount; j++) {\r\n let pieceEndIndex = lastTokenEndIndex + (j * 50 /* LongToken */);\r\n result[resultLen++] = new LinePart(pieceEndIndex, tokenType, tokenMetadata);\r\n }\r\n result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata);\r\n }\r\n else {\r\n result[resultLen++] = token;\r\n }\r\n lastTokenEndIndex = tokenEndIndex;\r\n }\r\n }\r\n return result;\r\n}\r\n/**\r\n * Whitespace is rendered by \"replacing\" tokens with a special-purpose `mtkw` type that is later recognized in the rendering phase.\r\n * Moreover, a token is created for every visual indent because on some fonts the glyphs used for rendering whitespace (→ or ·) do not have the same width as .\r\n * The rendering phase will generate `style=\"width:...\"` for these tokens.\r\n */\r\nfunction _applyRenderWhitespace(input, lineContent, len, tokens) {\r\n const continuesWithWrappedLine = input.continuesWithWrappedLine;\r\n const fauxIndentLength = input.fauxIndentLength;\r\n const tabSize = input.tabSize;\r\n const startVisibleColumn = input.startVisibleColumn;\r\n const useMonospaceOptimizations = input.useMonospaceOptimizations;\r\n const selections = input.selectionsOnLine;\r\n const onlyBoundary = (input.renderWhitespace === 1 /* Boundary */);\r\n const onlyTrailing = (input.renderWhitespace === 3 /* Trailing */);\r\n const generateLinePartForEachWhitespace = (input.renderSpaceWidth !== input.spaceWidth);\r\n let result = [], resultLen = 0;\r\n let tokenIndex = 0;\r\n let tokenType = tokens[tokenIndex].type;\r\n let tokenEndIndex = tokens[tokenIndex].endIndex;\r\n const tokensLength = tokens.length;\r\n let lineIsEmptyOrWhitespace = false;\r\n let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineContent);\r\n let lastNonWhitespaceIndex;\r\n if (firstNonWhitespaceIndex === -1) {\r\n lineIsEmptyOrWhitespace = true;\r\n firstNonWhitespaceIndex = len;\r\n lastNonWhitespaceIndex = len;\r\n }\r\n else {\r\n lastNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(lineContent);\r\n }\r\n let wasInWhitespace = false;\r\n let currentSelectionIndex = 0;\r\n let currentSelection = selections && selections[currentSelectionIndex];\r\n let tmpIndent = startVisibleColumn % tabSize;\r\n for (let charIndex = fauxIndentLength; charIndex < len; charIndex++) {\r\n const chCode = lineContent.charCodeAt(charIndex);\r\n if (currentSelection && charIndex >= currentSelection.endOffset) {\r\n currentSelectionIndex++;\r\n currentSelection = selections && selections[currentSelectionIndex];\r\n }\r\n let isInWhitespace;\r\n if (charIndex < firstNonWhitespaceIndex || charIndex > lastNonWhitespaceIndex) {\r\n // in leading or trailing whitespace\r\n isInWhitespace = true;\r\n }\r\n else if (chCode === 9 /* Tab */) {\r\n // a tab character is rendered both in all and boundary cases\r\n isInWhitespace = true;\r\n }\r\n else if (chCode === 32 /* Space */) {\r\n // hit a space character\r\n if (onlyBoundary) {\r\n // rendering only boundary whitespace\r\n if (wasInWhitespace) {\r\n isInWhitespace = true;\r\n }\r\n else {\r\n const nextChCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */);\r\n isInWhitespace = (nextChCode === 32 /* Space */ || nextChCode === 9 /* Tab */);\r\n }\r\n }\r\n else {\r\n isInWhitespace = true;\r\n }\r\n }\r\n else {\r\n isInWhitespace = false;\r\n }\r\n // If rendering whitespace on selection, check that the charIndex falls within a selection\r\n if (isInWhitespace && selections) {\r\n isInWhitespace = !!currentSelection && currentSelection.startOffset <= charIndex && currentSelection.endOffset > charIndex;\r\n }\r\n // If rendering only trailing whitespace, check that the charIndex points to trailing whitespace.\r\n if (isInWhitespace && onlyTrailing) {\r\n isInWhitespace = lineIsEmptyOrWhitespace || charIndex > lastNonWhitespaceIndex;\r\n }\r\n if (wasInWhitespace) {\r\n // was in whitespace token\r\n if (!isInWhitespace || (!useMonospaceOptimizations && tmpIndent >= tabSize)) {\r\n // leaving whitespace token or entering a new indent\r\n if (generateLinePartForEachWhitespace) {\r\n const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength);\r\n for (let i = lastEndIndex + 1; i <= charIndex; i++) {\r\n result[resultLen++] = new LinePart(i, 'mtkw', 1 /* IS_WHITESPACE */);\r\n }\r\n }\r\n else {\r\n result[resultLen++] = new LinePart(charIndex, 'mtkw', 1 /* IS_WHITESPACE */);\r\n }\r\n tmpIndent = tmpIndent % tabSize;\r\n }\r\n }\r\n else {\r\n // was in regular token\r\n if (charIndex === tokenEndIndex || (isInWhitespace && charIndex > fauxIndentLength)) {\r\n result[resultLen++] = new LinePart(charIndex, tokenType, 0);\r\n tmpIndent = tmpIndent % tabSize;\r\n }\r\n }\r\n if (chCode === 9 /* Tab */) {\r\n tmpIndent = tabSize;\r\n }\r\n else if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isFullWidthCharacter(chCode)) {\r\n tmpIndent += 2;\r\n }\r\n else {\r\n tmpIndent++;\r\n }\r\n wasInWhitespace = isInWhitespace;\r\n while (charIndex === tokenEndIndex) {\r\n tokenIndex++;\r\n if (tokenIndex < tokensLength) {\r\n tokenType = tokens[tokenIndex].type;\r\n tokenEndIndex = tokens[tokenIndex].endIndex;\r\n }\r\n }\r\n }\r\n let generateWhitespace = false;\r\n if (wasInWhitespace) {\r\n // was in whitespace token\r\n if (continuesWithWrappedLine && onlyBoundary) {\r\n let lastCharCode = (len > 0 ? lineContent.charCodeAt(len - 1) : 0 /* Null */);\r\n let prevCharCode = (len > 1 ? lineContent.charCodeAt(len - 2) : 0 /* Null */);\r\n let isSingleTrailingSpace = (lastCharCode === 32 /* Space */ && (prevCharCode !== 32 /* Space */ && prevCharCode !== 9 /* Tab */));\r\n if (!isSingleTrailingSpace) {\r\n generateWhitespace = true;\r\n }\r\n }\r\n else {\r\n generateWhitespace = true;\r\n }\r\n }\r\n if (generateWhitespace) {\r\n if (generateLinePartForEachWhitespace) {\r\n const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength);\r\n for (let i = lastEndIndex + 1; i <= len; i++) {\r\n result[resultLen++] = new LinePart(i, 'mtkw', 1 /* IS_WHITESPACE */);\r\n }\r\n }\r\n else {\r\n result[resultLen++] = new LinePart(len, 'mtkw', 1 /* IS_WHITESPACE */);\r\n }\r\n }\r\n else {\r\n result[resultLen++] = new LinePart(len, tokenType, 0);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Inline decorations are \"merged\" on top of tokens.\r\n * Special care must be taken when multiple inline decorations are at play and they overlap.\r\n */\r\nfunction _applyInlineDecorations(lineContent, len, tokens, _lineDecorations) {\r\n _lineDecorations.sort(_lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__.LineDecoration.compare);\r\n const lineDecorations = _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__.LineDecorationsNormalizer.normalize(lineContent, _lineDecorations);\r\n const lineDecorationsLen = lineDecorations.length;\r\n let lineDecorationIndex = 0;\r\n let result = [], resultLen = 0, lastResultEndIndex = 0;\r\n for (let tokenIndex = 0, len = tokens.length; tokenIndex < len; tokenIndex++) {\r\n const token = tokens[tokenIndex];\r\n const tokenEndIndex = token.endIndex;\r\n const tokenType = token.type;\r\n const tokenMetadata = token.metadata;\r\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset < tokenEndIndex) {\r\n const lineDecoration = lineDecorations[lineDecorationIndex];\r\n if (lineDecoration.startOffset > lastResultEndIndex) {\r\n lastResultEndIndex = lineDecoration.startOffset;\r\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata);\r\n }\r\n if (lineDecoration.endOffset + 1 <= tokenEndIndex) {\r\n // This line decoration ends before this token ends\r\n lastResultEndIndex = lineDecoration.endOffset + 1;\r\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata);\r\n lineDecorationIndex++;\r\n }\r\n else {\r\n // This line decoration continues on to the next token\r\n lastResultEndIndex = tokenEndIndex;\r\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata);\r\n break;\r\n }\r\n }\r\n if (tokenEndIndex > lastResultEndIndex) {\r\n lastResultEndIndex = tokenEndIndex;\r\n result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata);\r\n }\r\n }\r\n const lastTokenEndIndex = tokens[tokens.length - 1].endIndex;\r\n if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\r\n let classNames = [];\r\n let metadata = 0;\r\n while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {\r\n classNames.push(lineDecorations[lineDecorationIndex].className);\r\n metadata |= lineDecorations[lineDecorationIndex].metadata;\r\n lineDecorationIndex++;\r\n }\r\n result[resultLen++] = new LinePart(lastResultEndIndex, classNames.join(' '), metadata);\r\n }\r\n return result;\r\n}\r\n/**\r\n * This function is on purpose not split up into multiple functions to allow runtime type inference (i.e. performance reasons).\r\n * Notice how all the needed data is fully resolved and passed in (i.e. no other calls).\r\n */\r\nfunction _renderLine(input, sb) {\r\n const fontIsMonospace = input.fontIsMonospace;\r\n const canUseHalfwidthRightwardsArrow = input.canUseHalfwidthRightwardsArrow;\r\n const containsForeignElements = input.containsForeignElements;\r\n const lineContent = input.lineContent;\r\n const len = input.len;\r\n const isOverflowing = input.isOverflowing;\r\n const parts = input.parts;\r\n const fauxIndentLength = input.fauxIndentLength;\r\n const tabSize = input.tabSize;\r\n const startVisibleColumn = input.startVisibleColumn;\r\n const containsRTL = input.containsRTL;\r\n const spaceWidth = input.spaceWidth;\r\n const renderSpaceCharCode = input.renderSpaceCharCode;\r\n const renderWhitespace = input.renderWhitespace;\r\n const renderControlCharacters = input.renderControlCharacters;\r\n const characterMapping = new CharacterMapping(len + 1, parts.length);\r\n let charIndex = 0;\r\n let visibleColumn = startVisibleColumn;\r\n let charOffsetInPart = 0;\r\n let partDisplacement = 0;\r\n let prevPartContentCnt = 0;\r\n let partAbsoluteOffset = 0;\r\n if (containsRTL) {\r\n sb.appendASCIIString('<span dir=\"ltr\">');\r\n }\r\n else {\r\n sb.appendASCIIString('<span>');\r\n }\r\n for (let partIndex = 0, tokensLen = parts.length; partIndex < tokensLen; partIndex++) {\r\n partAbsoluteOffset += prevPartContentCnt;\r\n const part = parts[partIndex];\r\n const partEndIndex = part.endIndex;\r\n const partType = part.type;\r\n const partRendersWhitespace = (renderWhitespace !== 0 /* None */ && part.isWhitespace());\r\n const partRendersWhitespaceWithWidth = partRendersWhitespace && !fontIsMonospace && (partType === 'mtkw' /*only whitespace*/ || !containsForeignElements);\r\n const partIsEmptyAndHasPseudoAfter = (charIndex === partEndIndex && part.metadata === 4 /* PSEUDO_AFTER */);\r\n charOffsetInPart = 0;\r\n sb.appendASCIIString('<span class=\"');\r\n sb.appendASCIIString(partRendersWhitespaceWithWidth ? 'mtkz' : partType);\r\n sb.appendASCII(34 /* DoubleQuote */);\r\n if (partRendersWhitespace) {\r\n let partContentCnt = 0;\r\n {\r\n let _charIndex = charIndex;\r\n let _visibleColumn = visibleColumn;\r\n for (; _charIndex < partEndIndex; _charIndex++) {\r\n const charCode = lineContent.charCodeAt(_charIndex);\r\n const charWidth = (charCode === 9 /* Tab */ ? (tabSize - (_visibleColumn % tabSize)) : 1) | 0;\r\n partContentCnt += charWidth;\r\n if (_charIndex >= fauxIndentLength) {\r\n _visibleColumn += charWidth;\r\n }\r\n }\r\n }\r\n if (partRendersWhitespaceWithWidth) {\r\n sb.appendASCIIString(' style=\"width:');\r\n sb.appendASCIIString(String(spaceWidth * partContentCnt));\r\n sb.appendASCIIString('px\"');\r\n }\r\n sb.appendASCII(62 /* GreaterThan */);\r\n for (; charIndex < partEndIndex; charIndex++) {\r\n characterMapping.setPartData(charIndex, partIndex - partDisplacement, charOffsetInPart, partAbsoluteOffset);\r\n partDisplacement = 0;\r\n const charCode = lineContent.charCodeAt(charIndex);\r\n let charWidth;\r\n if (charCode === 9 /* Tab */) {\r\n charWidth = (tabSize - (visibleColumn % tabSize)) | 0;\r\n if (!canUseHalfwidthRightwardsArrow || charWidth > 1) {\r\n sb.write1(0x2192); // RIGHTWARDS ARROW\r\n }\r\n else {\r\n sb.write1(0xFFEB); // HALFWIDTH RIGHTWARDS ARROW\r\n }\r\n for (let space = 2; space <= charWidth; space++) {\r\n sb.write1(0xA0); // \r\n }\r\n }\r\n else { // must be CharCode.Space\r\n charWidth = 1;\r\n sb.write1(renderSpaceCharCode); // · or word separator middle dot\r\n }\r\n charOffsetInPart += charWidth;\r\n if (charIndex >= fauxIndentLength) {\r\n visibleColumn += charWidth;\r\n }\r\n }\r\n prevPartContentCnt = partContentCnt;\r\n }\r\n else {\r\n let partContentCnt = 0;\r\n sb.appendASCII(62 /* GreaterThan */);\r\n for (; charIndex < partEndIndex; charIndex++) {\r\n characterMapping.setPartData(charIndex, partIndex - partDisplacement, charOffsetInPart, partAbsoluteOffset);\r\n partDisplacement = 0;\r\n const charCode = lineContent.charCodeAt(charIndex);\r\n let producedCharacters = 1;\r\n let charWidth = 1;\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n producedCharacters = (tabSize - (visibleColumn % tabSize));\r\n charWidth = producedCharacters;\r\n for (let space = 1; space <= producedCharacters; space++) {\r\n sb.write1(0xA0); // \r\n }\r\n break;\r\n case 32 /* Space */:\r\n sb.write1(0xA0); // \r\n break;\r\n case 60 /* LessThan */:\r\n sb.appendASCIIString('<');\r\n break;\r\n case 62 /* GreaterThan */:\r\n sb.appendASCIIString('>');\r\n break;\r\n case 38 /* Ampersand */:\r\n sb.appendASCIIString('&');\r\n break;\r\n case 0 /* Null */:\r\n sb.appendASCIIString('�');\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR */:\r\n case 8233 /* PARAGRAPH_SEPARATOR */:\r\n case 133 /* NEXT_LINE */:\r\n sb.write1(0xFFFD);\r\n break;\r\n default:\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isFullWidthCharacter(charCode)) {\r\n charWidth++;\r\n }\r\n if (renderControlCharacters && charCode < 32) {\r\n sb.write1(9216 + charCode);\r\n }\r\n else {\r\n sb.write1(charCode);\r\n }\r\n }\r\n charOffsetInPart += producedCharacters;\r\n partContentCnt += producedCharacters;\r\n if (charIndex >= fauxIndentLength) {\r\n visibleColumn += charWidth;\r\n }\r\n }\r\n prevPartContentCnt = partContentCnt;\r\n }\r\n if (partIsEmptyAndHasPseudoAfter) {\r\n partDisplacement++;\r\n }\r\n else {\r\n partDisplacement = 0;\r\n }\r\n sb.appendASCIIString('</span>');\r\n }\r\n // When getting client rects for the last character, we will position the\r\n // text range at the end of the span, insteaf of at the beginning of next span\r\n characterMapping.setPartData(len, parts.length - 1, charOffsetInPart, partAbsoluteOffset);\r\n if (isOverflowing) {\r\n sb.appendASCIIString('<span>…</span>');\r\n }\r\n sb.appendASCIIString('</span>');\r\n return new RenderLineOutput(characterMapping, containsRTL, containsForeignElements);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewportData\": () => (/* binding */ ViewportData)\n/* harmony export */ });\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * Contains all data needed to render at a specific viewport.\r\n */\r\nclass ViewportData {\r\n constructor(selections, partialData, whitespaceViewportData, model) {\r\n this.selections = selections;\r\n this.startLineNumber = partialData.startLineNumber | 0;\r\n this.endLineNumber = partialData.endLineNumber | 0;\r\n this.relativeVerticalOffset = partialData.relativeVerticalOffset;\r\n this.bigNumbersDelta = partialData.bigNumbersDelta | 0;\r\n this.whitespaceViewportData = whitespaceViewportData;\r\n this._model = model;\r\n this.visibleRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(partialData.startLineNumber, this._model.getLineMinColumn(partialData.startLineNumber), partialData.endLineNumber, this._model.getLineMaxColumn(partialData.endLineNumber));\r\n }\r\n getViewLineRenderingData(lineNumber) {\r\n return this._model.getViewLineRenderingData(this.visibleRange, lineNumber);\r\n }\r\n getDecorationsInViewport() {\r\n return this._model.getDecorationsInViewport(this.visibleRange);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MinimapTokensColorTracker\": () => (/* binding */ MinimapTokensColorTracker)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _core_rgba_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/rgba.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass MinimapTokensColorTracker {\r\n constructor() {\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._updateColorMap();\r\n _modes_js__WEBPACK_IMPORTED_MODULE_2__.TokenizationRegistry.onDidChange(e => {\r\n if (e.changedColorMap) {\r\n this._updateColorMap();\r\n }\r\n });\r\n }\r\n static getInstance() {\r\n if (!this._INSTANCE) {\r\n this._INSTANCE = new MinimapTokensColorTracker();\r\n }\r\n return this._INSTANCE;\r\n }\r\n _updateColorMap() {\r\n const colorMap = _modes_js__WEBPACK_IMPORTED_MODULE_2__.TokenizationRegistry.getColorMap();\r\n if (!colorMap) {\r\n this._colors = [_core_rgba_js__WEBPACK_IMPORTED_MODULE_1__.RGBA8.Empty];\r\n this._backgroundIsLight = true;\r\n return;\r\n }\r\n this._colors = [_core_rgba_js__WEBPACK_IMPORTED_MODULE_1__.RGBA8.Empty];\r\n for (let colorId = 1; colorId < colorMap.length; colorId++) {\r\n const source = colorMap[colorId].rgba;\r\n // Use a VM friendly data-type\r\n this._colors[colorId] = new _core_rgba_js__WEBPACK_IMPORTED_MODULE_1__.RGBA8(source.r, source.g, source.b, Math.round(source.a * 255));\r\n }\r\n let backgroundLuminosity = colorMap[2 /* DefaultBackground */].getRelativeLuminance();\r\n this._backgroundIsLight = backgroundLuminosity >= 0.5;\r\n this._onDidChange.fire(undefined);\r\n }\r\n getColor(colorId) {\r\n if (colorId < 1 || colorId >= this._colors.length) {\r\n // background color (basically invisible)\r\n colorId = 2 /* DefaultBackground */;\r\n }\r\n return this._colors[colorId];\r\n }\r\n backgroundIsLight() {\r\n return this._backgroundIsLight;\r\n }\r\n}\r\nMinimapTokensColorTracker._INSTANCE = null;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MonospaceLineBreaksComputerFactory\": () => (/* binding */ MonospaceLineBreaksComputerFactory)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass WrappingCharacterClassifier extends _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_1__.CharacterClassifier {\r\n constructor(BREAK_BEFORE, BREAK_AFTER) {\r\n super(0 /* NONE */);\r\n for (let i = 0; i < BREAK_BEFORE.length; i++) {\r\n this.set(BREAK_BEFORE.charCodeAt(i), 1 /* BREAK_BEFORE */);\r\n }\r\n for (let i = 0; i < BREAK_AFTER.length; i++) {\r\n this.set(BREAK_AFTER.charCodeAt(i), 2 /* BREAK_AFTER */);\r\n }\r\n }\r\n get(charCode) {\r\n if (charCode >= 0 && charCode < 256) {\r\n return this._asciiMap[charCode];\r\n }\r\n else {\r\n // Initialize CharacterClass.BREAK_IDEOGRAPHIC for these Unicode ranges:\r\n // 1. CJK Unified Ideographs (0x4E00 -- 0x9FFF)\r\n // 2. CJK Unified Ideographs Extension A (0x3400 -- 0x4DBF)\r\n // 3. Hiragana and Katakana (0x3040 -- 0x30FF)\r\n if ((charCode >= 0x3040 && charCode <= 0x30FF)\r\n || (charCode >= 0x3400 && charCode <= 0x4DBF)\r\n || (charCode >= 0x4E00 && charCode <= 0x9FFF)) {\r\n return 3 /* BREAK_IDEOGRAPHIC */;\r\n }\r\n return (this._map.get(charCode) || this._defaultValue);\r\n }\r\n }\r\n}\r\nlet arrPool1 = [];\r\nlet arrPool2 = [];\r\nclass MonospaceLineBreaksComputerFactory {\r\n constructor(breakBeforeChars, breakAfterChars) {\r\n this.classifier = new WrappingCharacterClassifier(breakBeforeChars, breakAfterChars);\r\n }\r\n static create(options) {\r\n return new MonospaceLineBreaksComputerFactory(options.get(113 /* wordWrapBreakBeforeCharacters */), options.get(112 /* wordWrapBreakAfterCharacters */));\r\n }\r\n createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) {\r\n tabSize = tabSize | 0; //@perf\r\n wrappingColumn = +wrappingColumn; //@perf\r\n let requests = [];\r\n let previousBreakingData = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n requests.push(lineText);\r\n previousBreakingData.push(previousLineBreakData);\r\n },\r\n finalize: () => {\r\n const columnsForFullWidthChar = fontInfo.typicalFullwidthCharacterWidth / fontInfo.typicalHalfwidthCharacterWidth; //@perf\r\n let result = [];\r\n for (let i = 0, len = requests.length; i < len; i++) {\r\n const previousLineBreakData = previousBreakingData[i];\r\n if (previousLineBreakData) {\r\n result[i] = createLineBreaksFromPreviousLineBreaks(this.classifier, previousLineBreakData, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent);\r\n }\r\n else {\r\n result[i] = createLineBreaks(this.classifier, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent);\r\n }\r\n }\r\n arrPool1.length = 0;\r\n arrPool2.length = 0;\r\n return result;\r\n }\r\n };\r\n }\r\n}\r\nfunction createLineBreaksFromPreviousLineBreaks(classifier, previousBreakingData, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n if (firstLineBreakColumn === -1) {\r\n return null;\r\n }\r\n const len = lineText.length;\r\n if (len <= 1) {\r\n return null;\r\n }\r\n const prevBreakingOffsets = previousBreakingData.breakOffsets;\r\n const prevBreakingOffsetsVisibleColumn = previousBreakingData.breakOffsetsVisibleColumn;\r\n const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent);\r\n const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength;\r\n let breakingOffsets = arrPool1;\r\n let breakingOffsetsVisibleColumn = arrPool2;\r\n let breakingOffsetsCount = 0;\r\n let lastBreakingOffset = 0;\r\n let lastBreakingOffsetVisibleColumn = 0;\r\n let breakingColumn = firstLineBreakColumn;\r\n const prevLen = prevBreakingOffsets.length;\r\n let prevIndex = 0;\r\n if (prevIndex >= 0) {\r\n let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn);\r\n while (prevIndex + 1 < prevLen) {\r\n const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn);\r\n if (distance >= bestDistance) {\r\n break;\r\n }\r\n bestDistance = distance;\r\n prevIndex++;\r\n }\r\n }\r\n while (prevIndex < prevLen) {\r\n // Allow for prevIndex to be -1 (for the case where we hit a tab when walking backwards from the first break)\r\n let prevBreakOffset = prevIndex < 0 ? 0 : prevBreakingOffsets[prevIndex];\r\n let prevBreakOffsetVisibleColumn = prevIndex < 0 ? 0 : prevBreakingOffsetsVisibleColumn[prevIndex];\r\n if (lastBreakingOffset > prevBreakOffset) {\r\n prevBreakOffset = lastBreakingOffset;\r\n prevBreakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn;\r\n }\r\n let breakOffset = 0;\r\n let breakOffsetVisibleColumn = 0;\r\n let forcedBreakOffset = 0;\r\n let forcedBreakOffsetVisibleColumn = 0;\r\n // initially, we search as much as possible to the right (if it fits)\r\n if (prevBreakOffsetVisibleColumn <= breakingColumn) {\r\n let visibleColumn = prevBreakOffsetVisibleColumn;\r\n let prevCharCode = prevBreakOffset === 0 ? 0 /* Null */ : lineText.charCodeAt(prevBreakOffset - 1);\r\n let prevCharCodeClass = prevBreakOffset === 0 ? 0 /* NONE */ : classifier.get(prevCharCode);\r\n let entireLineFits = true;\r\n for (let i = prevBreakOffset; i < len; i++) {\r\n const charStartOffset = i;\r\n const charCode = lineText.charCodeAt(i);\r\n let charCodeClass;\r\n let charWidth;\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i++;\r\n charCodeClass = 0 /* NONE */;\r\n charWidth = 2;\r\n }\r\n else {\r\n charCodeClass = classifier.get(charCode);\r\n charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (charStartOffset > lastBreakingOffset && canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n }\r\n visibleColumn += charWidth;\r\n // check if adding character at `i` will go over the breaking column\r\n if (visibleColumn > breakingColumn) {\r\n // We need to break at least before character at `i`:\r\n if (charStartOffset > lastBreakingOffset) {\r\n forcedBreakOffset = charStartOffset;\r\n forcedBreakOffsetVisibleColumn = visibleColumn - charWidth;\r\n }\r\n else {\r\n // we need to advance at least by one character\r\n forcedBreakOffset = i + 1;\r\n forcedBreakOffsetVisibleColumn = visibleColumn;\r\n }\r\n if (visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) {\r\n // Cannot break at `breakOffset` => reset it if it was set\r\n breakOffset = 0;\r\n }\r\n entireLineFits = false;\r\n break;\r\n }\r\n prevCharCode = charCode;\r\n prevCharCodeClass = charCodeClass;\r\n }\r\n if (entireLineFits) {\r\n // there is no more need to break => stop the outer loop!\r\n if (breakingOffsetsCount > 0) {\r\n // Add last segment, no need to assign to `lastBreakingOffset` and `lastBreakingOffsetVisibleColumn`\r\n breakingOffsets[breakingOffsetsCount] = prevBreakingOffsets[prevBreakingOffsets.length - 1];\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = prevBreakingOffsetsVisibleColumn[prevBreakingOffsets.length - 1];\r\n breakingOffsetsCount++;\r\n }\r\n break;\r\n }\r\n }\r\n if (breakOffset === 0) {\r\n // must search left\r\n let visibleColumn = prevBreakOffsetVisibleColumn;\r\n let charCode = lineText.charCodeAt(prevBreakOffset);\r\n let charCodeClass = classifier.get(charCode);\r\n let hitATabCharacter = false;\r\n for (let i = prevBreakOffset - 1; i >= lastBreakingOffset; i--) {\r\n const charStartOffset = i + 1;\r\n const prevCharCode = lineText.charCodeAt(i);\r\n if (prevCharCode === 9 /* Tab */) {\r\n // cannot determine the width of a tab when going backwards, so we must go forwards\r\n hitATabCharacter = true;\r\n break;\r\n }\r\n let prevCharCodeClass;\r\n let prevCharWidth;\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isLowSurrogate(prevCharCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i--;\r\n prevCharCodeClass = 0 /* NONE */;\r\n prevCharWidth = 2;\r\n }\r\n else {\r\n prevCharCodeClass = classifier.get(prevCharCode);\r\n prevCharWidth = (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isFullWidthCharacter(prevCharCode) ? columnsForFullWidthChar : 1);\r\n }\r\n if (visibleColumn <= breakingColumn) {\r\n if (forcedBreakOffset === 0) {\r\n forcedBreakOffset = charStartOffset;\r\n forcedBreakOffsetVisibleColumn = visibleColumn;\r\n }\r\n if (visibleColumn <= breakingColumn - wrappedLineBreakColumn) {\r\n // went too far!\r\n break;\r\n }\r\n if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n break;\r\n }\r\n }\r\n visibleColumn -= prevCharWidth;\r\n charCode = prevCharCode;\r\n charCodeClass = prevCharCodeClass;\r\n }\r\n if (breakOffset !== 0) {\r\n const remainingWidthOfNextLine = wrappedLineBreakColumn - (forcedBreakOffsetVisibleColumn - breakOffsetVisibleColumn);\r\n if (remainingWidthOfNextLine <= tabSize) {\r\n const charCodeAtForcedBreakOffset = lineText.charCodeAt(forcedBreakOffset);\r\n let charWidth;\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCodeAtForcedBreakOffset)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n charWidth = 2;\r\n }\r\n else {\r\n charWidth = computeCharWidth(charCodeAtForcedBreakOffset, forcedBreakOffsetVisibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (remainingWidthOfNextLine - charWidth < 0) {\r\n // it is not worth it to break at breakOffset, it just introduces an extra needless line!\r\n breakOffset = 0;\r\n }\r\n }\r\n }\r\n if (hitATabCharacter) {\r\n // cannot determine the width of a tab when going backwards, so we must go forwards from the previous break\r\n prevIndex--;\r\n continue;\r\n }\r\n }\r\n if (breakOffset === 0) {\r\n // Could not find a good breaking point\r\n breakOffset = forcedBreakOffset;\r\n breakOffsetVisibleColumn = forcedBreakOffsetVisibleColumn;\r\n }\r\n if (breakOffset <= lastBreakingOffset) {\r\n // Make sure that we are advancing (at least one character)\r\n const charCode = lineText.charCodeAt(lastBreakingOffset);\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n breakOffset = lastBreakingOffset + 2;\r\n breakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn + 2;\r\n }\r\n else {\r\n breakOffset = lastBreakingOffset + 1;\r\n breakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn + computeCharWidth(charCode, lastBreakingOffsetVisibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n }\r\n lastBreakingOffset = breakOffset;\r\n breakingOffsets[breakingOffsetsCount] = breakOffset;\r\n lastBreakingOffsetVisibleColumn = breakOffsetVisibleColumn;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn;\r\n breakingOffsetsCount++;\r\n breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn;\r\n while (prevIndex < 0 || (prevIndex < prevLen && prevBreakingOffsetsVisibleColumn[prevIndex] < breakOffsetVisibleColumn)) {\r\n prevIndex++;\r\n }\r\n let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn);\r\n while (prevIndex + 1 < prevLen) {\r\n const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn);\r\n if (distance >= bestDistance) {\r\n break;\r\n }\r\n bestDistance = distance;\r\n prevIndex++;\r\n }\r\n }\r\n if (breakingOffsetsCount === 0) {\r\n return null;\r\n }\r\n // Doing here some object reuse which ends up helping a huge deal with GC pauses!\r\n breakingOffsets.length = breakingOffsetsCount;\r\n breakingOffsetsVisibleColumn.length = breakingOffsetsCount;\r\n arrPool1 = previousBreakingData.breakOffsets;\r\n arrPool2 = previousBreakingData.breakOffsetsVisibleColumn;\r\n previousBreakingData.breakOffsets = breakingOffsets;\r\n previousBreakingData.breakOffsetsVisibleColumn = breakingOffsetsVisibleColumn;\r\n previousBreakingData.wrappedTextIndentLength = wrappedTextIndentLength;\r\n return previousBreakingData;\r\n}\r\nfunction createLineBreaks(classifier, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n if (firstLineBreakColumn === -1) {\r\n return null;\r\n }\r\n const len = lineText.length;\r\n if (len <= 1) {\r\n return null;\r\n }\r\n const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent);\r\n const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength;\r\n let breakingOffsets = [];\r\n let breakingOffsetsVisibleColumn = [];\r\n let breakingOffsetsCount = 0;\r\n let breakOffset = 0;\r\n let breakOffsetVisibleColumn = 0;\r\n let breakingColumn = firstLineBreakColumn;\r\n let prevCharCode = lineText.charCodeAt(0);\r\n let prevCharCodeClass = classifier.get(prevCharCode);\r\n let visibleColumn = computeCharWidth(prevCharCode, 0, tabSize, columnsForFullWidthChar);\r\n let startOffset = 1;\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(prevCharCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n visibleColumn += 1;\r\n prevCharCode = lineText.charCodeAt(1);\r\n prevCharCodeClass = classifier.get(prevCharCode);\r\n startOffset++;\r\n }\r\n for (let i = startOffset; i < len; i++) {\r\n const charStartOffset = i;\r\n const charCode = lineText.charCodeAt(i);\r\n let charCodeClass;\r\n let charWidth;\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i++;\r\n charCodeClass = 0 /* NONE */;\r\n charWidth = 2;\r\n }\r\n else {\r\n charCodeClass = classifier.get(charCode);\r\n charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n }\r\n visibleColumn += charWidth;\r\n // check if adding character at `i` will go over the breaking column\r\n if (visibleColumn > breakingColumn) {\r\n // We need to break at least before character at `i`:\r\n if (breakOffset === 0 || visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) {\r\n // Cannot break at `breakOffset`, must break at `i`\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn - charWidth;\r\n }\r\n breakingOffsets[breakingOffsetsCount] = breakOffset;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn;\r\n breakingOffsetsCount++;\r\n breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn;\r\n breakOffset = 0;\r\n }\r\n prevCharCode = charCode;\r\n prevCharCodeClass = charCodeClass;\r\n }\r\n if (breakingOffsetsCount === 0) {\r\n return null;\r\n }\r\n // Add last segment\r\n breakingOffsets[breakingOffsetsCount] = len;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = visibleColumn;\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__.LineBreakData(breakingOffsets, breakingOffsetsVisibleColumn, wrappedTextIndentLength);\r\n}\r\nfunction computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar) {\r\n if (charCode === 9 /* Tab */) {\r\n return (tabSize - (visibleColumn % tabSize));\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isFullWidthCharacter(charCode)) {\r\n return columnsForFullWidthChar;\r\n }\r\n if (charCode < 32) {\r\n // when using `editor.renderControlCharacters`, the substitutions are often wide\r\n return columnsForFullWidthChar;\r\n }\r\n return 1;\r\n}\r\nfunction tabCharacterWidth(visibleColumn, tabSize) {\r\n return (tabSize - (visibleColumn % tabSize));\r\n}\r\n/**\r\n * Kinsoku Shori : Don't break after a leading character, like an open bracket\r\n * Kinsoku Shori : Don't break before a trailing character, like a period\r\n */\r\nfunction canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass) {\r\n return (charCode !== 32 /* Space */\r\n && ((prevCharCodeClass === 2 /* BREAK_AFTER */)\r\n || (prevCharCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && charCodeClass !== 2 /* BREAK_AFTER */)\r\n || (charCodeClass === 1 /* BREAK_BEFORE */)\r\n || (charCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && prevCharCodeClass !== 1 /* BREAK_BEFORE */)));\r\n}\r\nfunction computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n let wrappedTextIndentLength = 0;\r\n if (wrappingIndent !== 0 /* None */) {\r\n const firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineText);\r\n if (firstNonWhitespaceIndex !== -1) {\r\n // Track existing indent\r\n for (let i = 0; i < firstNonWhitespaceIndex; i++) {\r\n const charWidth = (lineText.charCodeAt(i) === 9 /* Tab */ ? tabCharacterWidth(wrappedTextIndentLength, tabSize) : 1);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n // Increase indent of continuation lines, if desired\r\n const numberOfAdditionalTabs = (wrappingIndent === 3 /* DeepIndent */ ? 2 : wrappingIndent === 2 /* Indent */ ? 1 : 0);\r\n for (let i = 0; i < numberOfAdditionalTabs; i++) {\r\n const charWidth = tabCharacterWidth(wrappedTextIndentLength, tabSize);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n // Force sticking to beginning of line if no character would fit except for the indentation\r\n if (wrappedTextIndentLength + columnsForFullWidthChar > firstLineBreakColumn) {\r\n wrappedTextIndentLength = 0;\r\n }\r\n }\r\n }\r\n return wrappedTextIndentLength;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PrefixSumIndexOfResult\": () => (/* binding */ PrefixSumIndexOfResult),\n/* harmony export */ \"PrefixSumComputer\": () => (/* binding */ PrefixSumComputer)\n/* harmony export */ });\n/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uint.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uint.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass PrefixSumIndexOfResult {\r\n constructor(index, remainder) {\r\n this.index = index;\r\n this.remainder = remainder;\r\n }\r\n}\r\nclass PrefixSumComputer {\r\n constructor(values) {\r\n this.values = values;\r\n this.prefixSum = new Uint32Array(values.length);\r\n this.prefixSumValidIndex = new Int32Array(1);\r\n this.prefixSumValidIndex[0] = -1;\r\n }\r\n insertValues(insertIndex, insertValues) {\r\n insertIndex = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(insertIndex);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n const insertValuesLen = insertValues.length;\r\n if (insertValuesLen === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length + insertValuesLen);\r\n this.values.set(oldValues.subarray(0, insertIndex), 0);\r\n this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);\r\n this.values.set(insertValues, insertIndex);\r\n if (insertIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = insertIndex - 1;\r\n }\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n changeValue(index, value) {\r\n index = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(index);\r\n value = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(value);\r\n if (this.values[index] === value) {\r\n return false;\r\n }\r\n this.values[index] = value;\r\n if (index - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = index - 1;\r\n }\r\n return true;\r\n }\r\n removeValues(startIndex, cnt) {\r\n startIndex = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(startIndex);\r\n cnt = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(cnt);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n if (startIndex >= oldValues.length) {\r\n return false;\r\n }\r\n let maxCnt = oldValues.length - startIndex;\r\n if (cnt >= maxCnt) {\r\n cnt = maxCnt;\r\n }\r\n if (cnt === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length - cnt);\r\n this.values.set(oldValues.subarray(0, startIndex), 0);\r\n this.values.set(oldValues.subarray(startIndex + cnt), startIndex);\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (startIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = startIndex - 1;\r\n }\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n getTotalValue() {\r\n if (this.values.length === 0) {\r\n return 0;\r\n }\r\n return this._getAccumulatedValue(this.values.length - 1);\r\n }\r\n getAccumulatedValue(index) {\r\n if (index < 0) {\r\n return 0;\r\n }\r\n index = (0,_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__.toUint32)(index);\r\n return this._getAccumulatedValue(index);\r\n }\r\n _getAccumulatedValue(index) {\r\n if (index <= this.prefixSumValidIndex[0]) {\r\n return this.prefixSum[index];\r\n }\r\n let startIndex = this.prefixSumValidIndex[0] + 1;\r\n if (startIndex === 0) {\r\n this.prefixSum[0] = this.values[0];\r\n startIndex++;\r\n }\r\n if (index >= this.values.length) {\r\n index = this.values.length - 1;\r\n }\r\n for (let i = startIndex; i <= index; i++) {\r\n this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];\r\n }\r\n this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);\r\n return this.prefixSum[index];\r\n }\r\n getIndexOf(accumulatedValue) {\r\n accumulatedValue = Math.floor(accumulatedValue); //@perf\r\n // Compute all sums (to get a fully valid prefixSum)\r\n this.getTotalValue();\r\n let low = 0;\r\n let high = this.values.length - 1;\r\n let mid = 0;\r\n let midStop = 0;\r\n let midStart = 0;\r\n while (low <= high) {\r\n mid = low + ((high - low) / 2) | 0;\r\n midStop = this.prefixSum[mid];\r\n midStart = midStop - this.values[mid];\r\n if (accumulatedValue < midStart) {\r\n high = mid - 1;\r\n }\r\n else if (accumulatedValue >= midStop) {\r\n low = mid + 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return new PrefixSumIndexOfResult(mid, accumulatedValue - midStart);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CoordinatesConverter\": () => (/* binding */ CoordinatesConverter),\n/* harmony export */ \"SplitLinesCollection\": () => (/* binding */ SplitLinesCollection),\n/* harmony export */ \"SplitLine\": () => (/* binding */ SplitLine),\n/* harmony export */ \"IdentityCoordinatesConverter\": () => (/* binding */ IdentityCoordinatesConverter),\n/* harmony export */ \"IdentityLinesCollection\": () => (/* binding */ IdentityLinesCollection)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../view/viewEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js\");\n/* harmony import */ var _prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./prefixSumComputer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js\");\n/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CoordinatesConverter {\r\n constructor(lines) {\r\n this._lines = lines;\r\n }\r\n // View -> Model conversion and related methods\r\n convertViewPositionToModelPosition(viewPosition) {\r\n return this._lines.convertViewPositionToModelPosition(viewPosition.lineNumber, viewPosition.column);\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n return this._lines.convertViewRangeToModelRange(viewRange);\r\n }\r\n validateViewPosition(viewPosition, expectedModelPosition) {\r\n return this._lines.validateViewPosition(viewPosition.lineNumber, viewPosition.column, expectedModelPosition);\r\n }\r\n validateViewRange(viewRange, expectedModelRange) {\r\n return this._lines.validateViewRange(viewRange, expectedModelRange);\r\n }\r\n // Model -> View conversion and related methods\r\n convertModelPositionToViewPosition(modelPosition) {\r\n return this._lines.convertModelPositionToViewPosition(modelPosition.lineNumber, modelPosition.column);\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n return this._lines.convertModelRangeToViewRange(modelRange);\r\n }\r\n modelPositionIsVisible(modelPosition) {\r\n return this._lines.modelPositionIsVisible(modelPosition.lineNumber, modelPosition.column);\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n return this._lines.getModelLineViewLineCount(modelLineNumber);\r\n }\r\n}\r\nclass LineNumberMapper {\r\n constructor(viewLineCounts) {\r\n this._counts = viewLineCounts;\r\n this._isValid = false;\r\n this._validEndIndex = -1;\r\n this._modelToView = [];\r\n this._viewToModel = [];\r\n }\r\n _invalidate(index) {\r\n this._isValid = false;\r\n this._validEndIndex = Math.min(this._validEndIndex, index - 1);\r\n }\r\n _ensureValid() {\r\n if (this._isValid) {\r\n return;\r\n }\r\n for (let i = this._validEndIndex + 1, len = this._counts.length; i < len; i++) {\r\n const viewLineCount = this._counts[i];\r\n const viewLinesAbove = (i > 0 ? this._modelToView[i - 1] : 0);\r\n this._modelToView[i] = viewLinesAbove + viewLineCount;\r\n for (let j = 0; j < viewLineCount; j++) {\r\n this._viewToModel[viewLinesAbove + j] = i;\r\n }\r\n }\r\n // trim things\r\n this._modelToView.length = this._counts.length;\r\n this._viewToModel.length = this._modelToView[this._modelToView.length - 1];\r\n // mark as valid\r\n this._isValid = true;\r\n this._validEndIndex = this._counts.length - 1;\r\n }\r\n changeValue(index, value) {\r\n if (this._counts[index] === value) {\r\n // no change\r\n return;\r\n }\r\n this._counts[index] = value;\r\n this._invalidate(index);\r\n }\r\n removeValues(start, deleteCount) {\r\n this._counts.splice(start, deleteCount);\r\n this._invalidate(start);\r\n }\r\n insertValues(insertIndex, insertArr) {\r\n this._counts = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.arrayInsert(this._counts, insertIndex, insertArr);\r\n this._invalidate(insertIndex);\r\n }\r\n getTotalValue() {\r\n this._ensureValid();\r\n return this._viewToModel.length;\r\n }\r\n getAccumulatedValue(index) {\r\n this._ensureValid();\r\n return this._modelToView[index];\r\n }\r\n getIndexOf(accumulatedValue) {\r\n this._ensureValid();\r\n const modelLineIndex = this._viewToModel[accumulatedValue];\r\n const viewLinesAbove = (modelLineIndex > 0 ? this._modelToView[modelLineIndex - 1] : 0);\r\n return new _prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_5__.PrefixSumIndexOfResult(modelLineIndex, accumulatedValue - viewLinesAbove);\r\n }\r\n}\r\nclass SplitLinesCollection {\r\n constructor(model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, tabSize, wrappingStrategy, wrappingColumn, wrappingIndent) {\r\n this.model = model;\r\n this._validModelVersionId = -1;\r\n this._domLineBreaksComputerFactory = domLineBreaksComputerFactory;\r\n this._monospaceLineBreaksComputerFactory = monospaceLineBreaksComputerFactory;\r\n this.fontInfo = fontInfo;\r\n this.tabSize = tabSize;\r\n this.wrappingStrategy = wrappingStrategy;\r\n this.wrappingColumn = wrappingColumn;\r\n this.wrappingIndent = wrappingIndent;\r\n this._constructLines(/*resetHiddenAreas*/ true, null);\r\n }\r\n dispose() {\r\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []);\r\n }\r\n createCoordinatesConverter() {\r\n return new CoordinatesConverter(this);\r\n }\r\n _constructLines(resetHiddenAreas, previousLineBreaks) {\r\n this.lines = [];\r\n if (resetHiddenAreas) {\r\n this.hiddenAreasIds = [];\r\n }\r\n let linesContent = this.model.getLinesContent();\r\n const lineCount = linesContent.length;\r\n const lineBreaksComputer = this.createLineBreaksComputer();\r\n for (let i = 0; i < lineCount; i++) {\r\n lineBreaksComputer.addRequest(linesContent[i], previousLineBreaks ? previousLineBreaks[i] : null);\r\n }\r\n const linesBreaks = lineBreaksComputer.finalize();\r\n let values = [];\r\n let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingStarts);\r\n let hiddenAreaStart = 1, hiddenAreaEnd = 0;\r\n let hiddenAreaIdx = -1;\r\n let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\r\n for (let i = 0; i < lineCount; i++) {\r\n let lineNumber = i + 1;\r\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\r\n hiddenAreaIdx++;\r\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\r\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\r\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\r\n }\r\n let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd);\r\n let line = createSplitLine(linesBreaks[i], !isInHiddenArea);\r\n values[i] = line.getViewLineCount();\r\n this.lines[i] = line;\r\n }\r\n this._validModelVersionId = this.model.getVersionId();\r\n this.prefixSumComputer = new LineNumberMapper(values);\r\n }\r\n getHiddenAreas() {\r\n return this.hiddenAreasIds.map((decId) => {\r\n return this.model.getDecorationRange(decId);\r\n });\r\n }\r\n _reduceRanges(_ranges) {\r\n if (_ranges.length === 0) {\r\n return [];\r\n }\r\n let ranges = _ranges.map(r => this.model.validateRange(r)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingStarts);\r\n let result = [];\r\n let currentRangeStart = ranges[0].startLineNumber;\r\n let currentRangeEnd = ranges[0].endLineNumber;\r\n for (let i = 1, len = ranges.length; i < len; i++) {\r\n let range = ranges[i];\r\n if (range.startLineNumber > currentRangeEnd + 1) {\r\n result.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(currentRangeStart, 1, currentRangeEnd, 1));\r\n currentRangeStart = range.startLineNumber;\r\n currentRangeEnd = range.endLineNumber;\r\n }\r\n else if (range.endLineNumber > currentRangeEnd) {\r\n currentRangeEnd = range.endLineNumber;\r\n }\r\n }\r\n result.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(currentRangeStart, 1, currentRangeEnd, 1));\r\n return result;\r\n }\r\n setHiddenAreas(_ranges) {\r\n let newRanges = this._reduceRanges(_ranges);\r\n // BEGIN TODO@Martin: Please stop calling this method on each model change!\r\n let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingStarts);\r\n if (newRanges.length === oldRanges.length) {\r\n let hasDifference = false;\r\n for (let i = 0; i < newRanges.length; i++) {\r\n if (!newRanges[i].equalsRange(oldRanges[i])) {\r\n hasDifference = true;\r\n break;\r\n }\r\n }\r\n if (!hasDifference) {\r\n return false;\r\n }\r\n }\r\n // END TODO@Martin: Please stop calling this method on each model change!\r\n let newDecorations = [];\r\n for (const newRange of newRanges) {\r\n newDecorations.push({\r\n range: newRange,\r\n options: _model_textModel_js__WEBPACK_IMPORTED_MODULE_3__.ModelDecorationOptions.EMPTY\r\n });\r\n }\r\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations);\r\n let hiddenAreas = newRanges;\r\n let hiddenAreaStart = 1, hiddenAreaEnd = 0;\r\n let hiddenAreaIdx = -1;\r\n let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\r\n let hasVisibleLine = false;\r\n for (let i = 0; i < this.lines.length; i++) {\r\n let lineNumber = i + 1;\r\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\r\n hiddenAreaIdx++;\r\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\r\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\r\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\r\n }\r\n let lineChanged = false;\r\n if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) {\r\n // Line should be hidden\r\n if (this.lines[i].isVisible()) {\r\n this.lines[i] = this.lines[i].setVisible(false);\r\n lineChanged = true;\r\n }\r\n }\r\n else {\r\n hasVisibleLine = true;\r\n // Line should be visible\r\n if (!this.lines[i].isVisible()) {\r\n this.lines[i] = this.lines[i].setVisible(true);\r\n lineChanged = true;\r\n }\r\n }\r\n if (lineChanged) {\r\n let newOutputLineCount = this.lines[i].getViewLineCount();\r\n this.prefixSumComputer.changeValue(i, newOutputLineCount);\r\n }\r\n }\r\n if (!hasVisibleLine) {\r\n // Cannot have everything be hidden => reveal everything!\r\n this.setHiddenAreas([]);\r\n }\r\n return true;\r\n }\r\n modelPositionIsVisible(modelLineNumber, _modelColumn) {\r\n if (modelLineNumber < 1 || modelLineNumber > this.lines.length) {\r\n // invalid arguments\r\n return false;\r\n }\r\n return this.lines[modelLineNumber - 1].isVisible();\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n if (modelLineNumber < 1 || modelLineNumber > this.lines.length) {\r\n // invalid arguments\r\n return 1;\r\n }\r\n return this.lines[modelLineNumber - 1].getViewLineCount();\r\n }\r\n setTabSize(newTabSize) {\r\n if (this.tabSize === newTabSize) {\r\n return false;\r\n }\r\n this.tabSize = newTabSize;\r\n this._constructLines(/*resetHiddenAreas*/ false, null);\r\n return true;\r\n }\r\n setWrappingSettings(fontInfo, wrappingStrategy, wrappingColumn, wrappingIndent) {\r\n const equalFontInfo = this.fontInfo.equals(fontInfo);\r\n const equalWrappingStrategy = (this.wrappingStrategy === wrappingStrategy);\r\n const equalWrappingColumn = (this.wrappingColumn === wrappingColumn);\r\n const equalWrappingIndent = (this.wrappingIndent === wrappingIndent);\r\n if (equalFontInfo && equalWrappingStrategy && equalWrappingColumn && equalWrappingIndent) {\r\n return false;\r\n }\r\n const onlyWrappingColumnChanged = (equalFontInfo && equalWrappingStrategy && !equalWrappingColumn && equalWrappingIndent);\r\n this.fontInfo = fontInfo;\r\n this.wrappingStrategy = wrappingStrategy;\r\n this.wrappingColumn = wrappingColumn;\r\n this.wrappingIndent = wrappingIndent;\r\n let previousLineBreaks = null;\r\n if (onlyWrappingColumnChanged) {\r\n previousLineBreaks = [];\r\n for (let i = 0, len = this.lines.length; i < len; i++) {\r\n previousLineBreaks[i] = this.lines[i].getLineBreakData();\r\n }\r\n }\r\n this._constructLines(/*resetHiddenAreas*/ false, previousLineBreaks);\r\n return true;\r\n }\r\n createLineBreaksComputer() {\r\n const lineBreaksComputerFactory = (this.wrappingStrategy === 'advanced'\r\n ? this._domLineBreaksComputerFactory\r\n : this._monospaceLineBreaksComputerFactory);\r\n return lineBreaksComputerFactory.createLineBreaksComputer(this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent);\r\n }\r\n onModelFlushed() {\r\n this._constructLines(/*resetHiddenAreas*/ true, null);\r\n }\r\n onModelLinesDeleted(versionId, fromLineNumber, toLineNumber) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return null;\r\n }\r\n let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\r\n let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1);\r\n this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\r\n this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\r\n return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber);\r\n }\r\n onModelLinesInserted(versionId, fromLineNumber, _toLineNumber, lineBreaks) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return null;\r\n }\r\n // cannot use this.getHiddenAreas() because those decorations have already seen the effect of this model change\r\n const isInHiddenArea = (fromLineNumber > 2 && !this.lines[fromLineNumber - 2].isVisible());\r\n let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\r\n let totalOutputLineCount = 0;\r\n let insertLines = [];\r\n let insertPrefixSumValues = [];\r\n for (let i = 0, len = lineBreaks.length; i < len; i++) {\r\n let line = createSplitLine(lineBreaks[i], !isInHiddenArea);\r\n insertLines.push(line);\r\n let outputLineCount = line.getViewLineCount();\r\n totalOutputLineCount += outputLineCount;\r\n insertPrefixSumValues[i] = outputLineCount;\r\n }\r\n // TODO@Alex: use arrays.arrayInsert\r\n this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1));\r\n this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues);\r\n return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1);\r\n }\r\n onModelLineChanged(versionId, lineNumber, lineBreakData) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return [false, null, null, null];\r\n }\r\n let lineIndex = lineNumber - 1;\r\n let oldOutputLineCount = this.lines[lineIndex].getViewLineCount();\r\n let isVisible = this.lines[lineIndex].isVisible();\r\n let line = createSplitLine(lineBreakData, isVisible);\r\n this.lines[lineIndex] = line;\r\n let newOutputLineCount = this.lines[lineIndex].getViewLineCount();\r\n let lineMappingChanged = false;\r\n let changeFrom = 0;\r\n let changeTo = -1;\r\n let insertFrom = 0;\r\n let insertTo = -1;\r\n let deleteFrom = 0;\r\n let deleteTo = -1;\r\n if (oldOutputLineCount > newOutputLineCount) {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + newOutputLineCount - 1;\r\n deleteFrom = changeTo + 1;\r\n deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1;\r\n lineMappingChanged = true;\r\n }\r\n else if (oldOutputLineCount < newOutputLineCount) {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + oldOutputLineCount - 1;\r\n insertFrom = changeTo + 1;\r\n insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1;\r\n lineMappingChanged = true;\r\n }\r\n else {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + newOutputLineCount - 1;\r\n }\r\n this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount);\r\n const viewLinesChangedEvent = (changeFrom <= changeTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesChangedEvent(changeFrom, changeTo) : null);\r\n const viewLinesInsertedEvent = (insertFrom <= insertTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesInsertedEvent(insertFrom, insertTo) : null);\r\n const viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesDeletedEvent(deleteFrom, deleteTo) : null);\r\n return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent];\r\n }\r\n acceptVersionId(versionId) {\r\n this._validModelVersionId = versionId;\r\n if (this.lines.length === 1 && !this.lines[0].isVisible()) {\r\n // At least one line must be visible => reset hidden areas\r\n this.setHiddenAreas([]);\r\n }\r\n }\r\n getViewLineCount() {\r\n return this.prefixSumComputer.getTotalValue();\r\n }\r\n _toValidViewLineNumber(viewLineNumber) {\r\n if (viewLineNumber < 1) {\r\n return 1;\r\n }\r\n const viewLineCount = this.getViewLineCount();\r\n if (viewLineNumber > viewLineCount) {\r\n return viewLineCount;\r\n }\r\n return viewLineNumber | 0;\r\n }\r\n getActiveIndentGuide(viewLineNumber, minLineNumber, maxLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n minLineNumber = this._toValidViewLineNumber(minLineNumber);\r\n maxLineNumber = this._toValidViewLineNumber(maxLineNumber);\r\n const modelPosition = this.convertViewPositionToModelPosition(viewLineNumber, this.getViewLineMinColumn(viewLineNumber));\r\n const modelMinPosition = this.convertViewPositionToModelPosition(minLineNumber, this.getViewLineMinColumn(minLineNumber));\r\n const modelMaxPosition = this.convertViewPositionToModelPosition(maxLineNumber, this.getViewLineMinColumn(maxLineNumber));\r\n const result = this.model.getActiveIndentGuide(modelPosition.lineNumber, modelMinPosition.lineNumber, modelMaxPosition.lineNumber);\r\n const viewStartPosition = this.convertModelPositionToViewPosition(result.startLineNumber, 1);\r\n const viewEndPosition = this.convertModelPositionToViewPosition(result.endLineNumber, this.model.getLineMaxColumn(result.endLineNumber));\r\n return {\r\n startLineNumber: viewStartPosition.lineNumber,\r\n endLineNumber: viewEndPosition.lineNumber,\r\n indent: result.indent\r\n };\r\n }\r\n getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) {\r\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\r\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\r\n const modelStart = this.convertViewPositionToModelPosition(viewStartLineNumber, this.getViewLineMinColumn(viewStartLineNumber));\r\n const modelEnd = this.convertViewPositionToModelPosition(viewEndLineNumber, this.getViewLineMaxColumn(viewEndLineNumber));\r\n let result = [];\r\n let resultRepeatCount = [];\r\n let resultRepeatOption = [];\r\n const modelStartLineIndex = modelStart.lineNumber - 1;\r\n const modelEndLineIndex = modelEnd.lineNumber - 1;\r\n let reqStart = null;\r\n for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\r\n const line = this.lines[modelLineIndex];\r\n if (line.isVisible()) {\r\n let viewLineStartIndex = line.getViewLineNumberOfModelPosition(0, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\r\n let viewLineEndIndex = line.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(modelLineIndex + 1));\r\n let count = viewLineEndIndex - viewLineStartIndex + 1;\r\n let option = 0 /* BlockNone */;\r\n if (count > 1 && line.getViewLineMinColumn(this.model, modelLineIndex + 1, viewLineEndIndex) === 1) {\r\n // wrapped lines should block indent guides\r\n option = (viewLineStartIndex === 0 ? 1 /* BlockSubsequent */ : 2 /* BlockAll */);\r\n }\r\n resultRepeatCount.push(count);\r\n resultRepeatOption.push(option);\r\n // merge into previous request\r\n if (reqStart === null) {\r\n reqStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(modelLineIndex + 1, 0);\r\n }\r\n }\r\n else {\r\n // hit invisible line => flush request\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelLineIndex));\r\n reqStart = null;\r\n }\r\n }\r\n }\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelEnd.lineNumber));\r\n reqStart = null;\r\n }\r\n const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\r\n let viewIndents = new Array(viewLineCount);\r\n let currIndex = 0;\r\n for (let i = 0, len = result.length; i < len; i++) {\r\n let value = result[i];\r\n let count = Math.min(viewLineCount - currIndex, resultRepeatCount[i]);\r\n let option = resultRepeatOption[i];\r\n let blockAtIndex;\r\n if (option === 2 /* BlockAll */) {\r\n blockAtIndex = 0;\r\n }\r\n else if (option === 1 /* BlockSubsequent */) {\r\n blockAtIndex = 1;\r\n }\r\n else {\r\n blockAtIndex = count;\r\n }\r\n for (let j = 0; j < count; j++) {\r\n if (j === blockAtIndex) {\r\n value = 0;\r\n }\r\n viewIndents[currIndex++] = value;\r\n }\r\n }\r\n return viewIndents;\r\n }\r\n getViewLineContent(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineLength(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineLength(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineMinColumn(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineMaxColumn(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineData(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) {\r\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\r\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\r\n let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1);\r\n let viewLineNumber = viewStartLineNumber;\r\n let startModelLineIndex = start.index;\r\n let startRemainder = start.remainder;\r\n let result = [];\r\n for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) {\r\n let line = this.lines[modelLineIndex];\r\n if (!line.isVisible()) {\r\n continue;\r\n }\r\n let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0);\r\n let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex;\r\n let lastLine = false;\r\n if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) {\r\n lastLine = true;\r\n remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1;\r\n }\r\n let toViewLineIndex = fromViewLineIndex + remainingViewLineCount;\r\n line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result);\r\n viewLineNumber += remainingViewLineCount;\r\n if (lastLine) {\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n validateViewPosition(viewLineNumber, viewColumn, expectedModelPosition) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n let line = this.lines[lineIndex];\r\n let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder);\r\n let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\r\n if (viewColumn < minColumn) {\r\n viewColumn = minColumn;\r\n }\r\n if (viewColumn > maxColumn) {\r\n viewColumn = maxColumn;\r\n }\r\n let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn);\r\n let computedModelPosition = this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineIndex + 1, computedModelColumn));\r\n if (computedModelPosition.equals(expectedModelPosition)) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(viewLineNumber, viewColumn);\r\n }\r\n return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column);\r\n }\r\n validateViewRange(viewRange, expectedModelRange) {\r\n const validViewStart = this.validateViewPosition(viewRange.startLineNumber, viewRange.startColumn, expectedModelRange.getStartPosition());\r\n const validViewEnd = this.validateViewPosition(viewRange.endLineNumber, viewRange.endColumn, expectedModelRange.getEndPosition());\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(validViewStart.lineNumber, validViewStart.column, validViewEnd.lineNumber, validViewEnd.column);\r\n }\r\n convertViewPositionToModelPosition(viewLineNumber, viewColumn) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn);\r\n // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn);\r\n return this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(lineIndex + 1, inputColumn));\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n const start = this.convertViewPositionToModelPosition(viewRange.startLineNumber, viewRange.startColumn);\r\n const end = this.convertViewPositionToModelPosition(viewRange.endLineNumber, viewRange.endColumn);\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n convertModelPositionToViewPosition(_modelLineNumber, _modelColumn) {\r\n const validPosition = this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(_modelLineNumber, _modelColumn));\r\n const inputLineNumber = validPosition.lineNumber;\r\n const inputColumn = validPosition.column;\r\n let lineIndex = inputLineNumber - 1, lineIndexChanged = false;\r\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\r\n lineIndex--;\r\n lineIndexChanged = true;\r\n }\r\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\r\n // Could not reach a real line\r\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1);\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(1, 1);\r\n }\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n let r;\r\n if (lineIndexChanged) {\r\n r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\r\n }\r\n else {\r\n r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn);\r\n }\r\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r);\r\n return r;\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n let start = this.convertModelPositionToViewPosition(modelRange.startLineNumber, modelRange.startColumn);\r\n let end = this.convertModelPositionToViewPosition(modelRange.endLineNumber, modelRange.endColumn);\r\n if (modelRange.startLineNumber === modelRange.endLineNumber && start.lineNumber !== end.lineNumber) {\r\n // This is a single line range that ends up taking more lines due to wrapping\r\n if (end.column === this.getViewLineMinColumn(end.lineNumber)) {\r\n // the end column lands on the first column of the next line\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(start.lineNumber, start.column, end.lineNumber - 1, this.getViewLineMaxColumn(end.lineNumber - 1));\r\n }\r\n }\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n _getViewLineNumberForModelPosition(inputLineNumber, inputColumn) {\r\n let lineIndex = inputLineNumber - 1;\r\n if (this.lines[lineIndex].isVisible()) {\r\n // this model line is visible\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn);\r\n }\r\n // this model line is not visible\r\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\r\n lineIndex--;\r\n }\r\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\r\n // Could not reach a real line\r\n return 1;\r\n }\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\r\n }\r\n getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) {\r\n const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\r\n const result = new OverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n const lane = opts ? opts.position : 0;\r\n if (lane === 0) {\r\n continue;\r\n }\r\n const color = opts.getColor(theme);\r\n const viewStartLineNumber = this._getViewLineNumberForModelPosition(decoration.range.startLineNumber, decoration.range.startColumn);\r\n const viewEndLineNumber = this._getViewLineNumberForModelPosition(decoration.range.endLineNumber, decoration.range.endColumn);\r\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\r\n }\r\n return result.result;\r\n }\r\n getDecorationsInRange(range, ownerId, filterOutValidation) {\r\n const modelStart = this.convertViewPositionToModelPosition(range.startLineNumber, range.startColumn);\r\n const modelEnd = this.convertViewPositionToModelPosition(range.endLineNumber, range.endColumn);\r\n if (modelEnd.lineNumber - modelStart.lineNumber <= range.endLineNumber - range.startLineNumber) {\r\n // most likely there are no hidden lines => fast path\r\n // fetch decorations from column 1 to cover the case of wrapped lines that have whole line decorations at column 1\r\n return this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(modelStart.lineNumber, 1, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation);\r\n }\r\n let result = [];\r\n const modelStartLineIndex = modelStart.lineNumber - 1;\r\n const modelEndLineIndex = modelEnd.lineNumber - 1;\r\n let reqStart = null;\r\n for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\r\n const line = this.lines[modelLineIndex];\r\n if (line.isVisible()) {\r\n // merge into previous request\r\n if (reqStart === null) {\r\n reqStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(modelLineIndex + 1, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\r\n }\r\n }\r\n else {\r\n // hit invisible line => flush request\r\n if (reqStart !== null) {\r\n const maxLineColumn = this.model.getLineMaxColumn(modelLineIndex);\r\n result = result.concat(this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(reqStart.lineNumber, reqStart.column, modelLineIndex, maxLineColumn), ownerId, filterOutValidation));\r\n reqStart = null;\r\n }\r\n }\r\n }\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(reqStart.lineNumber, reqStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation));\r\n reqStart = null;\r\n }\r\n result.sort((a, b) => {\r\n const res = _core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.compareRangesUsingStarts(a.range, b.range);\r\n if (res === 0) {\r\n if (a.id < b.id) {\r\n return -1;\r\n }\r\n if (a.id > b.id) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n return res;\r\n });\r\n // Eliminate duplicate decorations that might have intersected our visible ranges multiple times\r\n let finalResult = [], finalResultLen = 0;\r\n let prevDecId = null;\r\n for (const dec of result) {\r\n const decId = dec.id;\r\n if (prevDecId === decId) {\r\n // skip\r\n continue;\r\n }\r\n prevDecId = decId;\r\n finalResult[finalResultLen++] = dec;\r\n }\r\n return finalResult;\r\n }\r\n}\r\nclass VisibleIdentitySplitLine {\r\n constructor() { }\r\n isVisible() {\r\n return true;\r\n }\r\n setVisible(isVisible) {\r\n if (isVisible) {\r\n return this;\r\n }\r\n return InvisibleIdentitySplitLine.INSTANCE;\r\n }\r\n getLineBreakData() {\r\n return null;\r\n }\r\n getViewLineCount() {\r\n return 1;\r\n }\r\n getViewLineContent(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineContent(modelLineNumber);\r\n }\r\n getViewLineLength(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineLength(modelLineNumber);\r\n }\r\n getViewLineMinColumn(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineMinColumn(modelLineNumber);\r\n }\r\n getViewLineMaxColumn(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineMaxColumn(modelLineNumber);\r\n }\r\n getViewLineData(model, modelLineNumber, _outputLineIndex) {\r\n let lineTokens = model.getLineTokens(modelLineNumber);\r\n let lineContent = lineTokens.getLineContent();\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.ViewLineData(lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate());\r\n }\r\n getViewLinesData(model, modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, globalStartIndex, needed, result) {\r\n if (!needed[globalStartIndex]) {\r\n result[globalStartIndex] = null;\r\n return;\r\n }\r\n result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0);\r\n }\r\n getModelColumnOfViewPosition(_outputLineIndex, outputColumn) {\r\n return outputColumn;\r\n }\r\n getViewPositionOfModelPosition(deltaLineNumber, inputColumn) {\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(deltaLineNumber, inputColumn);\r\n }\r\n getViewLineNumberOfModelPosition(deltaLineNumber, _inputColumn) {\r\n return deltaLineNumber;\r\n }\r\n}\r\nVisibleIdentitySplitLine.INSTANCE = new VisibleIdentitySplitLine();\r\nclass InvisibleIdentitySplitLine {\r\n constructor() { }\r\n isVisible() {\r\n return false;\r\n }\r\n setVisible(isVisible) {\r\n if (!isVisible) {\r\n return this;\r\n }\r\n return VisibleIdentitySplitLine.INSTANCE;\r\n }\r\n getLineBreakData() {\r\n return null;\r\n }\r\n getViewLineCount() {\r\n return 0;\r\n }\r\n getViewLineContent(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineLength(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineMinColumn(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineMaxColumn(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineData(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLinesData(_model, _modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, _globalStartIndex, _needed, _result) {\r\n throw new Error('Not supported');\r\n }\r\n getModelColumnOfViewPosition(_outputLineIndex, _outputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n getViewPositionOfModelPosition(_deltaLineNumber, _inputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineNumberOfModelPosition(_deltaLineNumber, _inputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n}\r\nInvisibleIdentitySplitLine.INSTANCE = new InvisibleIdentitySplitLine();\r\nclass SplitLine {\r\n constructor(lineBreakData, isVisible) {\r\n this._lineBreakData = lineBreakData;\r\n this._isVisible = isVisible;\r\n }\r\n isVisible() {\r\n return this._isVisible;\r\n }\r\n setVisible(isVisible) {\r\n this._isVisible = isVisible;\r\n return this;\r\n }\r\n getLineBreakData() {\r\n return this._lineBreakData;\r\n }\r\n getViewLineCount() {\r\n if (!this._isVisible) {\r\n return 0;\r\n }\r\n return this._lineBreakData.breakOffsets.length;\r\n }\r\n getInputStartOffsetOfOutputLineIndex(outputLineIndex) {\r\n return _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, 0);\r\n }\r\n getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex) {\r\n if (outputLineIndex + 1 === this._lineBreakData.breakOffsets.length) {\r\n return model.getLineMaxColumn(modelLineNumber) - 1;\r\n }\r\n return _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex + 1, 0);\r\n }\r\n getViewLineContent(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let r = model.getValueInRange({\r\n startLineNumber: modelLineNumber,\r\n startColumn: startOffset + 1,\r\n endLineNumber: modelLineNumber,\r\n endColumn: endOffset + 1\r\n });\r\n if (outputLineIndex > 0) {\r\n r = spaces(this._lineBreakData.wrappedTextIndentLength) + r;\r\n }\r\n return r;\r\n }\r\n getViewLineLength(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let r = endOffset - startOffset;\r\n if (outputLineIndex > 0) {\r\n r = this._lineBreakData.wrappedTextIndentLength + r;\r\n }\r\n return r;\r\n }\r\n getViewLineMinColumn(_model, _modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n if (outputLineIndex > 0) {\r\n return this._lineBreakData.wrappedTextIndentLength + 1;\r\n }\r\n return 1;\r\n }\r\n getViewLineMaxColumn(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1;\r\n }\r\n getViewLineData(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let lineContent = model.getValueInRange({\r\n startLineNumber: modelLineNumber,\r\n startColumn: startOffset + 1,\r\n endLineNumber: modelLineNumber,\r\n endColumn: endOffset + 1\r\n });\r\n if (outputLineIndex > 0) {\r\n lineContent = spaces(this._lineBreakData.wrappedTextIndentLength) + lineContent;\r\n }\r\n let minColumn = (outputLineIndex > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1);\r\n let maxColumn = lineContent.length + 1;\r\n let continuesWithWrappedLine = (outputLineIndex + 1 < this.getViewLineCount());\r\n let deltaStartIndex = 0;\r\n if (outputLineIndex > 0) {\r\n deltaStartIndex = this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n let lineTokens = model.getLineTokens(modelLineNumber);\r\n const startVisibleColumn = (outputLineIndex === 0 ? 0 : this._lineBreakData.breakOffsetsVisibleColumn[outputLineIndex - 1]);\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.ViewLineData(lineContent, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex));\r\n }\r\n getViewLinesData(model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) {\r\n let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex;\r\n if (!needed[globalIndex]) {\r\n result[globalIndex] = null;\r\n continue;\r\n }\r\n result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex);\r\n }\r\n }\r\n getModelColumnOfViewPosition(outputLineIndex, outputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let adjustedColumn = outputColumn - 1;\r\n if (outputLineIndex > 0) {\r\n if (adjustedColumn < this._lineBreakData.wrappedTextIndentLength) {\r\n adjustedColumn = 0;\r\n }\r\n else {\r\n adjustedColumn -= this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n }\r\n return _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, adjustedColumn) + 1;\r\n }\r\n getViewPositionOfModelPosition(deltaLineNumber, inputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let r = _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1);\r\n let outputLineIndex = r.outputLineIndex;\r\n let outputColumn = r.outputOffset + 1;\r\n if (outputLineIndex > 0) {\r\n outputColumn += this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n //\t\tconsole.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn);\r\n return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(deltaLineNumber + outputLineIndex, outputColumn);\r\n }\r\n getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n const r = _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1);\r\n return (deltaLineNumber + r.outputLineIndex);\r\n }\r\n}\r\nlet _spaces = [''];\r\nfunction spaces(count) {\r\n if (count >= _spaces.length) {\r\n for (let i = 1; i <= count; i++) {\r\n _spaces[i] = _makeSpaces(i);\r\n }\r\n }\r\n return _spaces[count];\r\n}\r\nfunction _makeSpaces(count) {\r\n return new Array(count + 1).join(' ');\r\n}\r\nfunction createSplitLine(lineBreakData, isVisible) {\r\n if (lineBreakData === null) {\r\n // No mapping needed\r\n if (isVisible) {\r\n return VisibleIdentitySplitLine.INSTANCE;\r\n }\r\n return InvisibleIdentitySplitLine.INSTANCE;\r\n }\r\n else {\r\n return new SplitLine(lineBreakData, isVisible);\r\n }\r\n}\r\nclass IdentityCoordinatesConverter {\r\n constructor(lines) {\r\n this._lines = lines;\r\n }\r\n _validPosition(pos) {\r\n return this._lines.model.validatePosition(pos);\r\n }\r\n _validRange(range) {\r\n return this._lines.model.validateRange(range);\r\n }\r\n // View -> Model conversion and related methods\r\n convertViewPositionToModelPosition(viewPosition) {\r\n return this._validPosition(viewPosition);\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n return this._validRange(viewRange);\r\n }\r\n validateViewPosition(_viewPosition, expectedModelPosition) {\r\n return this._validPosition(expectedModelPosition);\r\n }\r\n validateViewRange(_viewRange, expectedModelRange) {\r\n return this._validRange(expectedModelRange);\r\n }\r\n // Model -> View conversion and related methods\r\n convertModelPositionToViewPosition(modelPosition) {\r\n return this._validPosition(modelPosition);\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n return this._validRange(modelRange);\r\n }\r\n modelPositionIsVisible(modelPosition) {\r\n const lineCount = this._lines.model.getLineCount();\r\n if (modelPosition.lineNumber < 1 || modelPosition.lineNumber > lineCount) {\r\n // invalid arguments\r\n return false;\r\n }\r\n return true;\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n return 1;\r\n }\r\n}\r\nclass IdentityLinesCollection {\r\n constructor(model) {\r\n this.model = model;\r\n }\r\n dispose() {\r\n }\r\n createCoordinatesConverter() {\r\n return new IdentityCoordinatesConverter(this);\r\n }\r\n getHiddenAreas() {\r\n return [];\r\n }\r\n setHiddenAreas(_ranges) {\r\n return false;\r\n }\r\n setTabSize(_newTabSize) {\r\n return false;\r\n }\r\n setWrappingSettings(_fontInfo, _wrappingStrategy, _wrappingColumn, _wrappingIndent) {\r\n return false;\r\n }\r\n createLineBreaksComputer() {\r\n let result = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n result.push(null);\r\n },\r\n finalize: () => {\r\n return result;\r\n }\r\n };\r\n }\r\n onModelFlushed() {\r\n }\r\n onModelLinesDeleted(_versionId, fromLineNumber, toLineNumber) {\r\n return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesDeletedEvent(fromLineNumber, toLineNumber);\r\n }\r\n onModelLinesInserted(_versionId, fromLineNumber, toLineNumber, lineBreaks) {\r\n return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesInsertedEvent(fromLineNumber, toLineNumber);\r\n }\r\n onModelLineChanged(_versionId, lineNumber, lineBreakData) {\r\n return [false, new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__.ViewLinesChangedEvent(lineNumber, lineNumber), null, null];\r\n }\r\n acceptVersionId(_versionId) {\r\n }\r\n getViewLineCount() {\r\n return this.model.getLineCount();\r\n }\r\n getActiveIndentGuide(viewLineNumber, _minLineNumber, _maxLineNumber) {\r\n return {\r\n startLineNumber: viewLineNumber,\r\n endLineNumber: viewLineNumber,\r\n indent: 0\r\n };\r\n }\r\n getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) {\r\n const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\r\n let result = new Array(viewLineCount);\r\n for (let i = 0; i < viewLineCount; i++) {\r\n result[i] = 0;\r\n }\r\n return result;\r\n }\r\n getViewLineContent(viewLineNumber) {\r\n return this.model.getLineContent(viewLineNumber);\r\n }\r\n getViewLineLength(viewLineNumber) {\r\n return this.model.getLineLength(viewLineNumber);\r\n }\r\n getViewLineMinColumn(viewLineNumber) {\r\n return this.model.getLineMinColumn(viewLineNumber);\r\n }\r\n getViewLineMaxColumn(viewLineNumber) {\r\n return this.model.getLineMaxColumn(viewLineNumber);\r\n }\r\n getViewLineData(viewLineNumber) {\r\n let lineTokens = this.model.getLineTokens(viewLineNumber);\r\n let lineContent = lineTokens.getLineContent();\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__.ViewLineData(lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate());\r\n }\r\n getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) {\r\n const lineCount = this.model.getLineCount();\r\n viewStartLineNumber = Math.min(Math.max(1, viewStartLineNumber), lineCount);\r\n viewEndLineNumber = Math.min(Math.max(1, viewEndLineNumber), lineCount);\r\n let result = [];\r\n for (let lineNumber = viewStartLineNumber; lineNumber <= viewEndLineNumber; lineNumber++) {\r\n let idx = lineNumber - viewStartLineNumber;\r\n if (!needed[idx]) {\r\n result[idx] = null;\r\n }\r\n result[idx] = this.getViewLineData(lineNumber);\r\n }\r\n return result;\r\n }\r\n getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) {\r\n const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\r\n const result = new OverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n const lane = opts ? opts.position : 0;\r\n if (lane === 0) {\r\n continue;\r\n }\r\n const color = opts.getColor(theme);\r\n const viewStartLineNumber = decoration.range.startLineNumber;\r\n const viewEndLineNumber = decoration.range.endLineNumber;\r\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\r\n }\r\n return result.result;\r\n }\r\n getDecorationsInRange(range, ownerId, filterOutValidation) {\r\n return this.model.getDecorationsInRange(range, ownerId, filterOutValidation);\r\n }\r\n}\r\nclass OverviewRulerDecorations {\r\n constructor() {\r\n this.result = Object.create(null);\r\n }\r\n accept(color, startLineNumber, endLineNumber, lane) {\r\n let prev = this.result[color];\r\n if (prev) {\r\n const prevLane = prev[prev.length - 3];\r\n const prevEndLineNumber = prev[prev.length - 1];\r\n if (prevLane === lane && prevEndLineNumber + 1 >= startLineNumber) {\r\n // merge into prev\r\n if (endLineNumber > prevEndLineNumber) {\r\n prev[prev.length - 1] = endLineNumber;\r\n }\r\n return;\r\n }\r\n // push\r\n prev.push(lane, startLineNumber, endLineNumber);\r\n }\r\n else {\r\n this.result[color] = [lane, startLineNumber, endLineNumber];\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewEventHandler\": () => (/* binding */ ViewEventHandler)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ViewEventHandler extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor() {\r\n super();\r\n this._shouldRender = true;\r\n }\r\n shouldRender() {\r\n return this._shouldRender;\r\n }\r\n forceShouldRender() {\r\n this._shouldRender = true;\r\n }\r\n setShouldRender() {\r\n this._shouldRender = true;\r\n }\r\n onDidRender() {\r\n this._shouldRender = false;\r\n }\r\n // --- begin event handlers\r\n onCompositionStart(e) {\r\n return false;\r\n }\r\n onCompositionEnd(e) {\r\n return false;\r\n }\r\n onConfigurationChanged(e) {\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n return false;\r\n }\r\n onDecorationsChanged(e) {\r\n return false;\r\n }\r\n onFlushed(e) {\r\n return false;\r\n }\r\n onFocusChanged(e) {\r\n return false;\r\n }\r\n onLanguageConfigurationChanged(e) {\r\n return false;\r\n }\r\n onLineMappingChanged(e) {\r\n return false;\r\n }\r\n onLinesChanged(e) {\r\n return false;\r\n }\r\n onLinesDeleted(e) {\r\n return false;\r\n }\r\n onLinesInserted(e) {\r\n return false;\r\n }\r\n onRevealRangeRequest(e) {\r\n return false;\r\n }\r\n onScrollChanged(e) {\r\n return false;\r\n }\r\n onThemeChanged(e) {\r\n return false;\r\n }\r\n onTokensChanged(e) {\r\n return false;\r\n }\r\n onTokensColorsChanged(e) {\r\n return false;\r\n }\r\n onZonesChanged(e) {\r\n return false;\r\n }\r\n // --- end event handlers\r\n handleEvents(events) {\r\n let shouldRender = false;\r\n for (let i = 0, len = events.length; i < len; i++) {\r\n let e = events[i];\r\n switch (e.type) {\r\n case 0 /* ViewCompositionStart */:\r\n if (this.onCompositionStart(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 1 /* ViewCompositionEnd */:\r\n if (this.onCompositionEnd(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 2 /* ViewConfigurationChanged */:\r\n if (this.onConfigurationChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 3 /* ViewCursorStateChanged */:\r\n if (this.onCursorStateChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 4 /* ViewDecorationsChanged */:\r\n if (this.onDecorationsChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 5 /* ViewFlushed */:\r\n if (this.onFlushed(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 6 /* ViewFocusChanged */:\r\n if (this.onFocusChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 7 /* ViewLanguageConfigurationChanged */:\r\n if (this.onLanguageConfigurationChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 8 /* ViewLineMappingChanged */:\r\n if (this.onLineMappingChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 9 /* ViewLinesChanged */:\r\n if (this.onLinesChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 10 /* ViewLinesDeleted */:\r\n if (this.onLinesDeleted(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 11 /* ViewLinesInserted */:\r\n if (this.onLinesInserted(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 12 /* ViewRevealRangeRequest */:\r\n if (this.onRevealRangeRequest(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 13 /* ViewScrollChanged */:\r\n if (this.onScrollChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 15 /* ViewTokensChanged */:\r\n if (this.onTokensChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 14 /* ViewThemeChanged */:\r\n if (this.onThemeChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 16 /* ViewTokensColorsChanged */:\r\n if (this.onTokensColorsChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n case 17 /* ViewZonesChanged */:\r\n if (this.onZonesChanged(e)) {\r\n shouldRender = true;\r\n }\r\n break;\r\n default:\r\n console.info('View received unknown event: ');\r\n console.info(e);\r\n }\r\n }\r\n if (shouldRender) {\r\n this._shouldRender = true;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Viewport\": () => (/* binding */ Viewport),\n/* harmony export */ \"OutputPosition\": () => (/* binding */ OutputPosition),\n/* harmony export */ \"LineBreakData\": () => (/* binding */ LineBreakData),\n/* harmony export */ \"MinimapLinesRenderingData\": () => (/* binding */ MinimapLinesRenderingData),\n/* harmony export */ \"ViewLineData\": () => (/* binding */ ViewLineData),\n/* harmony export */ \"ViewLineRenderingData\": () => (/* binding */ ViewLineRenderingData),\n/* harmony export */ \"InlineDecoration\": () => (/* binding */ InlineDecoration),\n/* harmony export */ \"ViewModelDecoration\": () => (/* binding */ ViewModelDecoration)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass Viewport {\r\n constructor(top, left, width, height) {\r\n this.top = top | 0;\r\n this.left = left | 0;\r\n this.width = width | 0;\r\n this.height = height | 0;\r\n }\r\n}\r\nclass OutputPosition {\r\n constructor(outputLineIndex, outputOffset) {\r\n this.outputLineIndex = outputLineIndex;\r\n this.outputOffset = outputOffset;\r\n }\r\n}\r\nclass LineBreakData {\r\n constructor(breakOffsets, breakOffsetsVisibleColumn, wrappedTextIndentLength) {\r\n this.breakOffsets = breakOffsets;\r\n this.breakOffsetsVisibleColumn = breakOffsetsVisibleColumn;\r\n this.wrappedTextIndentLength = wrappedTextIndentLength;\r\n }\r\n static getInputOffsetOfOutputPosition(breakOffsets, outputLineIndex, outputOffset) {\r\n if (outputLineIndex === 0) {\r\n return outputOffset;\r\n }\r\n else {\r\n return breakOffsets[outputLineIndex - 1] + outputOffset;\r\n }\r\n }\r\n static getOutputPositionOfInputOffset(breakOffsets, inputOffset) {\r\n let low = 0;\r\n let high = breakOffsets.length - 1;\r\n let mid = 0;\r\n let midStart = 0;\r\n while (low <= high) {\r\n mid = low + ((high - low) / 2) | 0;\r\n const midStop = breakOffsets[mid];\r\n midStart = mid > 0 ? breakOffsets[mid - 1] : 0;\r\n if (inputOffset < midStart) {\r\n high = mid - 1;\r\n }\r\n else if (inputOffset >= midStop) {\r\n low = mid + 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return new OutputPosition(mid, inputOffset - midStart);\r\n }\r\n}\r\nclass MinimapLinesRenderingData {\r\n constructor(tabSize, data) {\r\n this.tabSize = tabSize;\r\n this.data = data;\r\n }\r\n}\r\nclass ViewLineData {\r\n constructor(content, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, tokens) {\r\n this.content = content;\r\n this.continuesWithWrappedLine = continuesWithWrappedLine;\r\n this.minColumn = minColumn;\r\n this.maxColumn = maxColumn;\r\n this.startVisibleColumn = startVisibleColumn;\r\n this.tokens = tokens;\r\n }\r\n}\r\nclass ViewLineRenderingData {\r\n constructor(minColumn, maxColumn, content, continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, tokens, inlineDecorations, tabSize, startVisibleColumn) {\r\n this.minColumn = minColumn;\r\n this.maxColumn = maxColumn;\r\n this.content = content;\r\n this.continuesWithWrappedLine = continuesWithWrappedLine;\r\n this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII);\r\n this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL);\r\n this.tokens = tokens;\r\n this.inlineDecorations = inlineDecorations;\r\n this.tabSize = tabSize;\r\n this.startVisibleColumn = startVisibleColumn;\r\n }\r\n static isBasicASCII(lineContent, mightContainNonBasicASCII) {\r\n if (mightContainNonBasicASCII) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isBasicASCII(lineContent);\r\n }\r\n return true;\r\n }\r\n static containsRTL(lineContent, isBasicASCII, mightContainRTL) {\r\n if (!isBasicASCII && mightContainRTL) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.containsRTL(lineContent);\r\n }\r\n return false;\r\n }\r\n}\r\nclass InlineDecoration {\r\n constructor(range, inlineClassName, type) {\r\n this.range = range;\r\n this.inlineClassName = inlineClassName;\r\n this.type = type;\r\n }\r\n}\r\nclass ViewModelDecoration {\r\n constructor(range, options) {\r\n this.range = range;\r\n this.options = options;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewModelDecorations\": () => (/* binding */ ViewModelDecorations)\n/* harmony export */ });\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass ViewModelDecorations {\r\n constructor(editorId, model, configuration, linesCollection, coordinatesConverter) {\r\n this.editorId = editorId;\r\n this.model = model;\r\n this.configuration = configuration;\r\n this._linesCollection = linesCollection;\r\n this._coordinatesConverter = coordinatesConverter;\r\n this._decorationsCache = Object.create(null);\r\n this._cachedModelDecorationsResolver = null;\r\n this._cachedModelDecorationsResolverViewRange = null;\r\n }\r\n _clearCachedModelDecorationsResolver() {\r\n this._cachedModelDecorationsResolver = null;\r\n this._cachedModelDecorationsResolverViewRange = null;\r\n }\r\n dispose() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n reset() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n onModelDecorationsChanged() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n onLineMappingChanged() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n _getOrCreateViewModelDecoration(modelDecoration) {\r\n const id = modelDecoration.id;\r\n let r = this._decorationsCache[id];\r\n if (!r) {\r\n const modelRange = modelDecoration.range;\r\n const options = modelDecoration.options;\r\n let viewRange;\r\n if (options.isWholeLine) {\r\n const start = this._coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(modelRange.startLineNumber, 1));\r\n const end = this._coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(modelRange.endLineNumber, this.model.getLineMaxColumn(modelRange.endLineNumber)));\r\n viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n else {\r\n viewRange = this._coordinatesConverter.convertModelRangeToViewRange(modelRange);\r\n }\r\n r = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__.ViewModelDecoration(viewRange, options);\r\n this._decorationsCache[id] = r;\r\n }\r\n return r;\r\n }\r\n getDecorationsViewportData(viewRange) {\r\n let cacheIsValid = (this._cachedModelDecorationsResolver !== null);\r\n cacheIsValid = cacheIsValid && (viewRange.equalsRange(this._cachedModelDecorationsResolverViewRange));\r\n if (!cacheIsValid) {\r\n this._cachedModelDecorationsResolver = this._getDecorationsViewportData(viewRange);\r\n this._cachedModelDecorationsResolverViewRange = viewRange;\r\n }\r\n return this._cachedModelDecorationsResolver;\r\n }\r\n _getDecorationsViewportData(viewportRange) {\r\n const modelDecorations = this._linesCollection.getDecorationsInRange(viewportRange, this.editorId, (0,_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__.filterValidationDecorations)(this.configuration.options));\r\n const startLineNumber = viewportRange.startLineNumber;\r\n const endLineNumber = viewportRange.endLineNumber;\r\n let decorationsInViewport = [], decorationsInViewportLen = 0;\r\n let inlineDecorations = [];\r\n for (let j = startLineNumber; j <= endLineNumber; j++) {\r\n inlineDecorations[j - startLineNumber] = [];\r\n }\r\n for (let i = 0, len = modelDecorations.length; i < len; i++) {\r\n let modelDecoration = modelDecorations[i];\r\n let decorationOptions = modelDecoration.options;\r\n let viewModelDecoration = this._getOrCreateViewModelDecoration(modelDecoration);\r\n let viewRange = viewModelDecoration.range;\r\n decorationsInViewport[decorationsInViewportLen++] = viewModelDecoration;\r\n if (decorationOptions.inlineClassName) {\r\n let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__.InlineDecoration(viewRange, decorationOptions.inlineClassName, decorationOptions.inlineClassNameAffectsLetterSpacing ? 3 /* RegularAffectingLetterSpacing */ : 0 /* Regular */);\r\n let intersectedStartLineNumber = Math.max(startLineNumber, viewRange.startLineNumber);\r\n let intersectedEndLineNumber = Math.min(endLineNumber, viewRange.endLineNumber);\r\n for (let j = intersectedStartLineNumber; j <= intersectedEndLineNumber; j++) {\r\n inlineDecorations[j - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n if (decorationOptions.beforeContentClassName) {\r\n if (startLineNumber <= viewRange.startLineNumber && viewRange.startLineNumber <= endLineNumber) {\r\n let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__.InlineDecoration(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(viewRange.startLineNumber, viewRange.startColumn, viewRange.startLineNumber, viewRange.startColumn), decorationOptions.beforeContentClassName, 1 /* Before */);\r\n inlineDecorations[viewRange.startLineNumber - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n if (decorationOptions.afterContentClassName) {\r\n if (startLineNumber <= viewRange.endLineNumber && viewRange.endLineNumber <= endLineNumber) {\r\n let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__.InlineDecoration(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(viewRange.endLineNumber, viewRange.endColumn, viewRange.endLineNumber, viewRange.endColumn), decorationOptions.afterContentClassName, 2 /* After */);\r\n inlineDecorations[viewRange.endLineNumber - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n }\r\n return {\r\n decorations: decorationsInViewport,\r\n inlineDecorations: inlineDecorations\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewModelEventDispatcher\": () => (/* binding */ ViewModelEventDispatcher),\n/* harmony export */ \"ViewModelEventsCollector\": () => (/* binding */ ViewModelEventsCollector),\n/* harmony export */ \"ContentSizeChangedEvent\": () => (/* binding */ ContentSizeChangedEvent),\n/* harmony export */ \"FocusChangedEvent\": () => (/* binding */ FocusChangedEvent),\n/* harmony export */ \"ScrollChangedEvent\": () => (/* binding */ ScrollChangedEvent),\n/* harmony export */ \"ViewZonesChangedEvent\": () => (/* binding */ ViewZonesChangedEvent),\n/* harmony export */ \"CursorStateChangedEvent\": () => (/* binding */ CursorStateChangedEvent),\n/* harmony export */ \"ReadOnlyEditAttemptEvent\": () => (/* binding */ ReadOnlyEditAttemptEvent)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass ViewModelEventDispatcher extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super();\r\n this._onEvent = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onEvent = this._onEvent.event;\r\n this._eventHandlers = [];\r\n this._viewEventQueue = null;\r\n this._isConsumingViewEventQueue = false;\r\n this._collector = null;\r\n this._collectorCnt = 0;\r\n this._outgoingEvents = [];\r\n }\r\n emitOutgoingEvent(e) {\r\n this._addOutgoingEvent(e);\r\n this._emitOugoingEvents();\r\n }\r\n _addOutgoingEvent(e) {\r\n for (let i = 0, len = this._outgoingEvents.length; i < len; i++) {\r\n if (this._outgoingEvents[i].kind === e.kind) {\r\n this._outgoingEvents[i] = this._outgoingEvents[i].merge(e);\r\n return;\r\n }\r\n }\r\n // not merged\r\n this._outgoingEvents.push(e);\r\n }\r\n _emitOugoingEvents() {\r\n while (this._outgoingEvents.length > 0) {\r\n if (this._collector || this._isConsumingViewEventQueue) {\r\n // right now collecting or emitting view events, so let's postpone emitting\r\n return;\r\n }\r\n const event = this._outgoingEvents.shift();\r\n if (event.isNoOp()) {\r\n continue;\r\n }\r\n this._onEvent.fire(event);\r\n }\r\n }\r\n addViewEventHandler(eventHandler) {\r\n for (let i = 0, len = this._eventHandlers.length; i < len; i++) {\r\n if (this._eventHandlers[i] === eventHandler) {\r\n console.warn('Detected duplicate listener in ViewEventDispatcher', eventHandler);\r\n }\r\n }\r\n this._eventHandlers.push(eventHandler);\r\n }\r\n removeViewEventHandler(eventHandler) {\r\n for (let i = 0; i < this._eventHandlers.length; i++) {\r\n if (this._eventHandlers[i] === eventHandler) {\r\n this._eventHandlers.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n beginEmitViewEvents() {\r\n this._collectorCnt++;\r\n if (this._collectorCnt === 1) {\r\n this._collector = new ViewModelEventsCollector();\r\n }\r\n return this._collector;\r\n }\r\n endEmitViewEvents() {\r\n this._collectorCnt--;\r\n if (this._collectorCnt === 0) {\r\n const outgoingEvents = this._collector.outgoingEvents;\r\n const viewEvents = this._collector.viewEvents;\r\n this._collector = null;\r\n for (const outgoingEvent of outgoingEvents) {\r\n this._addOutgoingEvent(outgoingEvent);\r\n }\r\n if (viewEvents.length > 0) {\r\n this._emitMany(viewEvents);\r\n }\r\n }\r\n this._emitOugoingEvents();\r\n }\r\n emitSingleViewEvent(event) {\r\n try {\r\n const eventsCollector = this.beginEmitViewEvents();\r\n eventsCollector.emitViewEvent(event);\r\n }\r\n finally {\r\n this.endEmitViewEvents();\r\n }\r\n }\r\n _emitMany(events) {\r\n if (this._viewEventQueue) {\r\n this._viewEventQueue = this._viewEventQueue.concat(events);\r\n }\r\n else {\r\n this._viewEventQueue = events;\r\n }\r\n if (!this._isConsumingViewEventQueue) {\r\n this._consumeViewEventQueue();\r\n }\r\n }\r\n _consumeViewEventQueue() {\r\n try {\r\n this._isConsumingViewEventQueue = true;\r\n this._doConsumeQueue();\r\n }\r\n finally {\r\n this._isConsumingViewEventQueue = false;\r\n }\r\n }\r\n _doConsumeQueue() {\r\n while (this._viewEventQueue) {\r\n // Empty event queue, as events might come in while sending these off\r\n const events = this._viewEventQueue;\r\n this._viewEventQueue = null;\r\n // Use a clone of the event handlers list, as they might remove themselves\r\n const eventHandlers = this._eventHandlers.slice(0);\r\n for (const eventHandler of eventHandlers) {\r\n eventHandler.handleEvents(events);\r\n }\r\n }\r\n }\r\n}\r\nclass ViewModelEventsCollector {\r\n constructor() {\r\n this.viewEvents = [];\r\n this.outgoingEvents = [];\r\n }\r\n emitViewEvent(event) {\r\n this.viewEvents.push(event);\r\n }\r\n emitOutgoingEvent(e) {\r\n this.outgoingEvents.push(e);\r\n }\r\n}\r\nclass ContentSizeChangedEvent {\r\n constructor(oldContentWidth, oldContentHeight, contentWidth, contentHeight) {\r\n this.kind = 0 /* ContentSizeChanged */;\r\n this._oldContentWidth = oldContentWidth;\r\n this._oldContentHeight = oldContentHeight;\r\n this.contentWidth = contentWidth;\r\n this.contentHeight = contentHeight;\r\n this.contentWidthChanged = (this._oldContentWidth !== this.contentWidth);\r\n this.contentHeightChanged = (this._oldContentHeight !== this.contentHeight);\r\n }\r\n isNoOp() {\r\n return (!this.contentWidthChanged && !this.contentHeightChanged);\r\n }\r\n merge(other) {\r\n if (other.kind !== 0 /* ContentSizeChanged */) {\r\n return this;\r\n }\r\n return new ContentSizeChangedEvent(this._oldContentWidth, this._oldContentHeight, other.contentWidth, other.contentHeight);\r\n }\r\n}\r\nclass FocusChangedEvent {\r\n constructor(oldHasFocus, hasFocus) {\r\n this.kind = 1 /* FocusChanged */;\r\n this.oldHasFocus = oldHasFocus;\r\n this.hasFocus = hasFocus;\r\n }\r\n isNoOp() {\r\n return (this.oldHasFocus === this.hasFocus);\r\n }\r\n merge(other) {\r\n if (other.kind !== 1 /* FocusChanged */) {\r\n return this;\r\n }\r\n return new FocusChangedEvent(this.oldHasFocus, other.hasFocus);\r\n }\r\n}\r\nclass ScrollChangedEvent {\r\n constructor(oldScrollWidth, oldScrollLeft, oldScrollHeight, oldScrollTop, scrollWidth, scrollLeft, scrollHeight, scrollTop) {\r\n this.kind = 2 /* ScrollChanged */;\r\n this._oldScrollWidth = oldScrollWidth;\r\n this._oldScrollLeft = oldScrollLeft;\r\n this._oldScrollHeight = oldScrollHeight;\r\n this._oldScrollTop = oldScrollTop;\r\n this.scrollWidth = scrollWidth;\r\n this.scrollLeft = scrollLeft;\r\n this.scrollHeight = scrollHeight;\r\n this.scrollTop = scrollTop;\r\n this.scrollWidthChanged = (this._oldScrollWidth !== this.scrollWidth);\r\n this.scrollLeftChanged = (this._oldScrollLeft !== this.scrollLeft);\r\n this.scrollHeightChanged = (this._oldScrollHeight !== this.scrollHeight);\r\n this.scrollTopChanged = (this._oldScrollTop !== this.scrollTop);\r\n }\r\n isNoOp() {\r\n return (!this.scrollWidthChanged && !this.scrollLeftChanged && !this.scrollHeightChanged && !this.scrollTopChanged);\r\n }\r\n merge(other) {\r\n if (other.kind !== 2 /* ScrollChanged */) {\r\n return this;\r\n }\r\n return new ScrollChangedEvent(this._oldScrollWidth, this._oldScrollLeft, this._oldScrollHeight, this._oldScrollTop, other.scrollWidth, other.scrollLeft, other.scrollHeight, other.scrollTop);\r\n }\r\n}\r\nclass ViewZonesChangedEvent {\r\n constructor() {\r\n this.kind = 3 /* ViewZonesChanged */;\r\n }\r\n isNoOp() {\r\n return false;\r\n }\r\n merge(other) {\r\n return this;\r\n }\r\n}\r\nclass CursorStateChangedEvent {\r\n constructor(oldSelections, selections, oldModelVersionId, modelVersionId, source, reason, reachedMaxCursorCount) {\r\n this.kind = 5 /* CursorStateChanged */;\r\n this.oldSelections = oldSelections;\r\n this.selections = selections;\r\n this.oldModelVersionId = oldModelVersionId;\r\n this.modelVersionId = modelVersionId;\r\n this.source = source;\r\n this.reason = reason;\r\n this.reachedMaxCursorCount = reachedMaxCursorCount;\r\n }\r\n static _selectionsAreEqual(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n const aLen = a.length;\r\n const bLen = b.length;\r\n if (aLen !== bLen) {\r\n return false;\r\n }\r\n for (let i = 0; i < aLen; i++) {\r\n if (!a[i].equalsSelection(b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n isNoOp() {\r\n return (CursorStateChangedEvent._selectionsAreEqual(this.oldSelections, this.selections)\r\n && this.oldModelVersionId === this.modelVersionId);\r\n }\r\n merge(other) {\r\n if (other.kind !== 5 /* CursorStateChanged */) {\r\n return this;\r\n }\r\n return new CursorStateChangedEvent(this.oldSelections, other.selections, this.oldModelVersionId, other.modelVersionId, other.source, other.reason, this.reachedMaxCursorCount || other.reachedMaxCursorCount);\r\n }\r\n}\r\nclass ReadOnlyEditAttemptEvent {\r\n constructor() {\r\n this.kind = 4 /* ReadOnlyEditAttempt */;\r\n }\r\n isNoOp() {\r\n return false;\r\n }\r\n merge(other) {\r\n return this;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewModel\": () => (/* binding */ ViewModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/textToHtmlTokenizer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js\");\n/* harmony import */ var _minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./minimapTokensColorTracker.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js\");\n/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../view/viewEvents.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js\");\n/* harmony import */ var _viewLayout_viewLayout_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewLayout/viewLayout.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js\");\n/* harmony import */ var _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./splitLinesCollection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js\");\n/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _viewModelDecorations_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./viewModelDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _controller_cursor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../controller/cursor.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js\");\n/* harmony import */ var _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./viewModelEventDispatcher.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst USE_IDENTITY_LINES_COLLECTION = true;\r\nclass ViewModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(editorId, configuration, model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._editorId = editorId;\r\n this._configuration = configuration;\r\n this.model = model;\r\n this._eventDispatcher = new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__.ViewModelEventDispatcher();\r\n this.onEvent = this._eventDispatcher.onEvent;\r\n this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._tokenizeViewportSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__.RunOnceScheduler(() => this.tokenizeViewport(), 50));\r\n this._updateConfigurationViewLineCount = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__.RunOnceScheduler(() => this._updateConfigurationViewLineCountNow(), 0));\r\n this._hasFocus = false;\r\n this._viewportStartLine = -1;\r\n this._viewportStartLineTrackedRange = null;\r\n this._viewportStartLineDelta = 0;\r\n if (USE_IDENTITY_LINES_COLLECTION && this.model.isTooLargeForTokenization()) {\r\n this._lines = new _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__.IdentityLinesCollection(this.model);\r\n }\r\n else {\r\n const options = this._configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingStrategy = options.get(118 /* wrappingStrategy */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const wrappingIndent = options.get(117 /* wrappingIndent */);\r\n this._lines = new _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__.SplitLinesCollection(this.model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, this.model.getOptions().tabSize, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent);\r\n }\r\n this.coordinatesConverter = this._lines.createCoordinatesConverter();\r\n this._cursor = this._register(new _controller_cursor_js__WEBPACK_IMPORTED_MODULE_16__.Cursor(model, this, this.coordinatesConverter, this.cursorConfig));\r\n this.viewLayout = this._register(new _viewLayout_viewLayout_js__WEBPACK_IMPORTED_MODULE_10__.ViewLayout(this._configuration, this.getLineCount(), scheduleAtNextAnimationFrame));\r\n this._register(this.viewLayout.onDidScroll((e) => {\r\n if (e.scrollTopChanged) {\r\n this._tokenizeViewportSoon.schedule();\r\n }\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewScrollChangedEvent(e));\r\n this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__.ScrollChangedEvent(e.oldScrollWidth, e.oldScrollLeft, e.oldScrollHeight, e.oldScrollTop, e.scrollWidth, e.scrollLeft, e.scrollHeight, e.scrollTop));\r\n }));\r\n this._register(this.viewLayout.onDidContentSizeChange((e) => {\r\n this._eventDispatcher.emitOutgoingEvent(e);\r\n }));\r\n this._decorations = new _viewModelDecorations_js__WEBPACK_IMPORTED_MODULE_13__.ViewModelDecorations(this._editorId, this.model, this._configuration, this._lines, this.coordinatesConverter);\r\n this._registerModelEvents();\r\n this._register(this._configuration.onDidChangeFast((e) => {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n this._onConfigurationChanged(eventsCollector, e);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }));\r\n this._register(_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_8__.MinimapTokensColorTracker.getInstance().onDidChange(() => {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewTokensColorsChangedEvent());\r\n }));\r\n this._updateConfigurationViewLineCountNow();\r\n }\r\n dispose() {\r\n // First remove listeners, as disposing the lines might end up sending\r\n // model decoration changed events ... and we no longer care about them ...\r\n super.dispose();\r\n this._decorations.dispose();\r\n this._lines.dispose();\r\n this.invalidateMinimapColorCache();\r\n this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, null, 1 /* NeverGrowsWhenTypingAtEdges */);\r\n this._eventDispatcher.dispose();\r\n }\r\n createLineBreaksComputer() {\r\n return this._lines.createLineBreaksComputer();\r\n }\r\n addViewEventHandler(eventHandler) {\r\n this._eventDispatcher.addViewEventHandler(eventHandler);\r\n }\r\n removeViewEventHandler(eventHandler) {\r\n this._eventDispatcher.removeViewEventHandler(eventHandler);\r\n }\r\n _updateConfigurationViewLineCountNow() {\r\n this._configuration.setViewLineCount(this._lines.getViewLineCount());\r\n }\r\n tokenizeViewport() {\r\n const linesViewportData = this.viewLayout.getLinesViewportData();\r\n const startPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(linesViewportData.startLineNumber, 1));\r\n const endPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(linesViewportData.endLineNumber, 1));\r\n this.model.tokenizeViewport(startPosition.lineNumber, endPosition.lineNumber);\r\n }\r\n setHasFocus(hasFocus) {\r\n this._hasFocus = hasFocus;\r\n this._cursor.setHasFocus(hasFocus);\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewFocusChangedEvent(hasFocus));\r\n this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__.FocusChangedEvent(!hasFocus, hasFocus));\r\n }\r\n onCompositionStart() {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewCompositionStartEvent());\r\n }\r\n onCompositionEnd() {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewCompositionEndEvent());\r\n }\r\n onDidColorThemeChange() {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewThemeChangedEvent());\r\n }\r\n _onConfigurationChanged(eventsCollector, e) {\r\n // We might need to restore the current centered view range, so save it (if available)\r\n let previousViewportStartModelPosition = null;\r\n if (this._viewportStartLine !== -1) {\r\n let previousViewportStartViewPosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(this._viewportStartLine, this.getLineMinColumn(this._viewportStartLine));\r\n previousViewportStartModelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(previousViewportStartViewPosition);\r\n }\r\n let restorePreviousViewportStart = false;\r\n const options = this._configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingStrategy = options.get(118 /* wrappingStrategy */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const wrappingIndent = options.get(117 /* wrappingIndent */);\r\n if (this._lines.setWrappingSettings(fontInfo, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent)) {\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n if (this.viewLayout.getCurrentScrollTop() !== 0) {\r\n // Never change the scroll position from 0 to something else...\r\n restorePreviousViewportStart = true;\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n if (e.hasChanged(75 /* readOnly */)) {\r\n // Must read again all decorations due to readOnly filtering\r\n this._decorations.reset();\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(null));\r\n }\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewConfigurationChangedEvent(e));\r\n this.viewLayout.onConfigurationChanged(e);\r\n if (restorePreviousViewportStart && previousViewportStartModelPosition) {\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(previousViewportStartModelPosition);\r\n const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */);\r\n }\r\n if (_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration.shouldRecreate(e)) {\r\n this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }\r\n }\r\n _registerModelEvents() {\r\n this._register(this.model.onDidChangeRawContentFast((e) => {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n let hadOtherModelChange = false;\r\n let hadModelLineChangeThatChangedLineMapping = false;\r\n const changes = e.changes;\r\n const versionId = e.versionId;\r\n // Do a first pass to compute line mappings, and a second pass to actually interpret them\r\n const lineBreaksComputer = this._lines.createLineBreaksComputer();\r\n for (const change of changes) {\r\n switch (change.changeType) {\r\n case 4 /* LinesInserted */: {\r\n for (const line of change.detail) {\r\n lineBreaksComputer.addRequest(line, null);\r\n }\r\n break;\r\n }\r\n case 2 /* LineChanged */: {\r\n lineBreaksComputer.addRequest(change.detail, null);\r\n break;\r\n }\r\n }\r\n }\r\n const lineBreaks = lineBreaksComputer.finalize();\r\n let lineBreaksOffset = 0;\r\n for (const change of changes) {\r\n switch (change.changeType) {\r\n case 1 /* Flush */: {\r\n this._lines.onModelFlushed();\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewFlushedEvent());\r\n this._decorations.reset();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 3 /* LinesDeleted */: {\r\n const linesDeletedEvent = this._lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber);\r\n if (linesDeletedEvent !== null) {\r\n eventsCollector.emitViewEvent(linesDeletedEvent);\r\n this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\r\n }\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 4 /* LinesInserted */: {\r\n const insertedLineBreaks = lineBreaks.slice(lineBreaksOffset, lineBreaksOffset + change.detail.length);\r\n lineBreaksOffset += change.detail.length;\r\n const linesInsertedEvent = this._lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, insertedLineBreaks);\r\n if (linesInsertedEvent !== null) {\r\n eventsCollector.emitViewEvent(linesInsertedEvent);\r\n this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\r\n }\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 2 /* LineChanged */: {\r\n const changedLineBreakData = lineBreaks[lineBreaksOffset];\r\n lineBreaksOffset++;\r\n const [lineMappingChanged, linesChangedEvent, linesInsertedEvent, linesDeletedEvent] = this._lines.onModelLineChanged(versionId, change.lineNumber, changedLineBreakData);\r\n hadModelLineChangeThatChangedLineMapping = lineMappingChanged;\r\n if (linesChangedEvent) {\r\n eventsCollector.emitViewEvent(linesChangedEvent);\r\n }\r\n if (linesInsertedEvent) {\r\n eventsCollector.emitViewEvent(linesInsertedEvent);\r\n this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\r\n }\r\n if (linesDeletedEvent) {\r\n eventsCollector.emitViewEvent(linesDeletedEvent);\r\n this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\r\n }\r\n break;\r\n }\r\n case 5 /* EOLChanged */: {\r\n // Nothing to do. The new version will be accepted below\r\n break;\r\n }\r\n }\r\n }\r\n this._lines.acceptVersionId(versionId);\r\n this.viewLayout.onHeightMaybeChanged();\r\n if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) {\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n }\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n // Update the configuration and reset the centered view line\r\n this._viewportStartLine = -1;\r\n this._configuration.setMaxLineNumber(this.model.getLineCount());\r\n this._updateConfigurationViewLineCountNow();\r\n // Recover viewport\r\n if (!this._hasFocus && this.model.getAttachedEditorCount() >= 2 && this._viewportStartLineTrackedRange) {\r\n const modelRange = this.model._getTrackedRange(this._viewportStartLineTrackedRange);\r\n if (modelRange) {\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelRange.getStartPosition());\r\n const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */);\r\n }\r\n }\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n this._cursor.onModelContentChanged(eventsCollector, e);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }));\r\n this._register(this.model.onDidChangeTokens((e) => {\r\n let viewRanges = [];\r\n for (let j = 0, lenJ = e.ranges.length; j < lenJ; j++) {\r\n const modelRange = e.ranges[j];\r\n const viewStartLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(modelRange.fromLineNumber, 1)).lineNumber;\r\n const viewEndLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(modelRange.toLineNumber, this.model.getLineMaxColumn(modelRange.toLineNumber))).lineNumber;\r\n viewRanges[j] = {\r\n fromLineNumber: viewStartLineNumber,\r\n toLineNumber: viewEndLineNumber\r\n };\r\n }\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewTokensChangedEvent(viewRanges));\r\n if (e.tokenizationSupportChanged) {\r\n this._tokenizeViewportSoon.schedule();\r\n }\r\n }));\r\n this._register(this.model.onDidChangeLanguageConfiguration((e) => {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewLanguageConfigurationEvent());\r\n this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeLanguage((e) => {\r\n this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeOptions((e) => {\r\n // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here\r\n if (this._lines.setTabSize(this.model.getOptions().tabSize)) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__.CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeDecorations((e) => {\r\n this._decorations.onModelDecorationsChanged();\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(e));\r\n }));\r\n }\r\n setHiddenAreas(ranges) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n let lineMappingChanged = this._lines.setHiddenAreas(ranges);\r\n if (lineMappingChanged) {\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n this.viewLayout.onHeightMaybeChanged();\r\n }\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n getVisibleRangesPlusViewportAboveBelow() {\r\n const layoutInfo = this._configuration.options.get(124 /* layoutInfo */);\r\n const lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n const linesAround = Math.max(20, Math.round(layoutInfo.height / lineHeight));\r\n const partialData = this.viewLayout.getLinesViewportData();\r\n const startViewLineNumber = Math.max(1, partialData.completelyVisibleStartLineNumber - linesAround);\r\n const endViewLineNumber = Math.min(this.getLineCount(), partialData.completelyVisibleEndLineNumber + linesAround);\r\n return this._toModelVisibleRanges(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber)));\r\n }\r\n getVisibleRanges() {\r\n const visibleViewRange = this.getCompletelyVisibleViewRange();\r\n return this._toModelVisibleRanges(visibleViewRange);\r\n }\r\n _toModelVisibleRanges(visibleViewRange) {\r\n const visibleRange = this.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\r\n const hiddenAreas = this._lines.getHiddenAreas();\r\n if (hiddenAreas.length === 0) {\r\n return [visibleRange];\r\n }\r\n let result = [], resultLen = 0;\r\n let startLineNumber = visibleRange.startLineNumber;\r\n let startColumn = visibleRange.startColumn;\r\n let endLineNumber = visibleRange.endLineNumber;\r\n let endColumn = visibleRange.endColumn;\r\n for (let i = 0, len = hiddenAreas.length; i < len; i++) {\r\n const hiddenStartLineNumber = hiddenAreas[i].startLineNumber;\r\n const hiddenEndLineNumber = hiddenAreas[i].endLineNumber;\r\n if (hiddenEndLineNumber < startLineNumber) {\r\n continue;\r\n }\r\n if (hiddenStartLineNumber > endLineNumber) {\r\n continue;\r\n }\r\n if (startLineNumber < hiddenStartLineNumber) {\r\n result[resultLen++] = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startLineNumber, startColumn, hiddenStartLineNumber - 1, this.model.getLineMaxColumn(hiddenStartLineNumber - 1));\r\n }\r\n startLineNumber = hiddenEndLineNumber + 1;\r\n startColumn = 1;\r\n }\r\n if (startLineNumber < endLineNumber || (startLineNumber === endLineNumber && startColumn < endColumn)) {\r\n result[resultLen++] = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n return result;\r\n }\r\n getCompletelyVisibleViewRange() {\r\n const partialData = this.viewLayout.getLinesViewportData();\r\n const startViewLineNumber = partialData.completelyVisibleStartLineNumber;\r\n const endViewLineNumber = partialData.completelyVisibleEndLineNumber;\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\r\n }\r\n getCompletelyVisibleViewRangeAtScrollTop(scrollTop) {\r\n const partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop);\r\n const startViewLineNumber = partialData.completelyVisibleStartLineNumber;\r\n const endViewLineNumber = partialData.completelyVisibleEndLineNumber;\r\n return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\r\n }\r\n saveState() {\r\n const compatViewState = this.viewLayout.saveState();\r\n const scrollTop = compatViewState.scrollTop;\r\n const firstViewLineNumber = this.viewLayout.getLineNumberAtVerticalOffset(scrollTop);\r\n const firstPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(firstViewLineNumber, this.getLineMinColumn(firstViewLineNumber)));\r\n const firstPositionDeltaTop = this.viewLayout.getVerticalOffsetForLineNumber(firstViewLineNumber) - scrollTop;\r\n return {\r\n scrollLeft: compatViewState.scrollLeft,\r\n firstPosition: firstPosition,\r\n firstPositionDeltaTop: firstPositionDeltaTop\r\n };\r\n }\r\n reduceRestoreState(state) {\r\n if (typeof state.firstPosition === 'undefined') {\r\n // This is a view state serialized by an older version\r\n return this._reduceRestoreStateCompatibility(state);\r\n }\r\n const modelPosition = this.model.validatePosition(state.firstPosition);\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n const scrollTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber) - state.firstPositionDeltaTop;\r\n return {\r\n scrollLeft: state.scrollLeft,\r\n scrollTop: scrollTop\r\n };\r\n }\r\n _reduceRestoreStateCompatibility(state) {\r\n return {\r\n scrollLeft: state.scrollLeft,\r\n scrollTop: state.scrollTopWithoutViewZones\r\n };\r\n }\r\n getTabSize() {\r\n return this.model.getOptions().tabSize;\r\n }\r\n getTextModelOptions() {\r\n return this.model.getOptions();\r\n }\r\n getLineCount() {\r\n return this._lines.getViewLineCount();\r\n }\r\n /**\r\n * Gives a hint that a lot of requests are about to come in for these line numbers.\r\n */\r\n setViewport(startLineNumber, endLineNumber, centeredLineNumber) {\r\n this._viewportStartLine = startLineNumber;\r\n let position = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(startLineNumber, this.getLineMinColumn(startLineNumber)));\r\n this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, position.column, position.lineNumber, position.column), 1 /* NeverGrowsWhenTypingAtEdges */);\r\n const viewportStartLineTop = this.viewLayout.getVerticalOffsetForLineNumber(startLineNumber);\r\n const scrollTop = this.viewLayout.getCurrentScrollTop();\r\n this._viewportStartLineDelta = scrollTop - viewportStartLineTop;\r\n }\r\n getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber) {\r\n return this._lines.getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber);\r\n }\r\n getLinesIndentGuides(startLineNumber, endLineNumber) {\r\n return this._lines.getViewLinesIndentGuides(startLineNumber, endLineNumber);\r\n }\r\n getLineContent(lineNumber) {\r\n return this._lines.getViewLineContent(lineNumber);\r\n }\r\n getLineLength(lineNumber) {\r\n return this._lines.getViewLineLength(lineNumber);\r\n }\r\n getLineMinColumn(lineNumber) {\r\n return this._lines.getViewLineMinColumn(lineNumber);\r\n }\r\n getLineMaxColumn(lineNumber) {\r\n return this._lines.getViewLineMaxColumn(lineNumber);\r\n }\r\n getLineFirstNonWhitespaceColumn(lineNumber) {\r\n const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.firstNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 1;\r\n }\r\n getLineLastNonWhitespaceColumn(lineNumber) {\r\n const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.lastNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 2;\r\n }\r\n getDecorationsInViewport(visibleRange) {\r\n return this._decorations.getDecorationsViewportData(visibleRange).decorations;\r\n }\r\n getViewLineRenderingData(visibleRange, lineNumber) {\r\n let mightContainRTL = this.model.mightContainRTL();\r\n let mightContainNonBasicASCII = this.model.mightContainNonBasicASCII();\r\n let tabSize = this.getTabSize();\r\n let lineData = this._lines.getViewLineData(lineNumber);\r\n let allInlineDecorations = this._decorations.getDecorationsViewportData(visibleRange).inlineDecorations;\r\n let inlineDecorations = allInlineDecorations[lineNumber - visibleRange.startLineNumber];\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_12__.ViewLineRenderingData(lineData.minColumn, lineData.maxColumn, lineData.content, lineData.continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, lineData.tokens, inlineDecorations, tabSize, lineData.startVisibleColumn);\r\n }\r\n getViewLineData(lineNumber) {\r\n return this._lines.getViewLineData(lineNumber);\r\n }\r\n getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) {\r\n let result = this._lines.getViewLinesData(startLineNumber, endLineNumber, needed);\r\n return new _viewModel_js__WEBPACK_IMPORTED_MODULE_12__.MinimapLinesRenderingData(this.getTabSize(), result);\r\n }\r\n getAllOverviewRulerDecorations(theme) {\r\n return this._lines.getAllOverviewRulerDecorations(this._editorId, (0,_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__.filterValidationDecorations)(this._configuration.options), theme);\r\n }\r\n invalidateOverviewRulerColorCache() {\r\n const decorations = this.model.getOverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n if (opts) {\r\n opts.invalidateCachedColor();\r\n }\r\n }\r\n }\r\n invalidateMinimapColorCache() {\r\n const decorations = this.model.getAllDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.minimap;\r\n if (opts) {\r\n opts.invalidateCachedColor();\r\n }\r\n }\r\n }\r\n getValueInRange(range, eol) {\r\n const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range);\r\n return this.model.getValueInRange(modelRange, eol);\r\n }\r\n getModelLineMaxColumn(modelLineNumber) {\r\n return this.model.getLineMaxColumn(modelLineNumber);\r\n }\r\n validateModelPosition(position) {\r\n return this.model.validatePosition(position);\r\n }\r\n validateModelRange(range) {\r\n return this.model.validateRange(range);\r\n }\r\n deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt) {\r\n const modelAnchor = this.coordinatesConverter.convertViewPositionToModelPosition(viewAnchorPosition);\r\n if (this.model.getEOL().length === 2) {\r\n // This model uses CRLF, so the delta must take that into account\r\n if (deltaOffset < 0) {\r\n deltaOffset -= lineFeedCnt;\r\n }\r\n else {\r\n deltaOffset += lineFeedCnt;\r\n }\r\n }\r\n const modelAnchorOffset = this.model.getOffsetAt(modelAnchor);\r\n const resultOffset = modelAnchorOffset + deltaOffset;\r\n return this.model.getPositionAt(resultOffset);\r\n }\r\n getEOL() {\r\n return this.model.getEOL();\r\n }\r\n getPlainTextToCopy(modelRanges, emptySelectionClipboard, forceCRLF) {\r\n const newLineCharacter = forceCRLF ? '\\r\\n' : this.model.getEOL();\r\n modelRanges = modelRanges.slice(0);\r\n modelRanges.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts);\r\n let hasEmptyRange = false;\r\n let hasNonEmptyRange = false;\r\n for (const range of modelRanges) {\r\n if (range.isEmpty()) {\r\n hasEmptyRange = true;\r\n }\r\n else {\r\n hasNonEmptyRange = true;\r\n }\r\n }\r\n if (!hasNonEmptyRange) {\r\n // all ranges are empty\r\n if (!emptySelectionClipboard) {\r\n return '';\r\n }\r\n const modelLineNumbers = modelRanges.map((r) => r.startLineNumber);\r\n let result = '';\r\n for (let i = 0; i < modelLineNumbers.length; i++) {\r\n if (i > 0 && modelLineNumbers[i - 1] === modelLineNumbers[i]) {\r\n continue;\r\n }\r\n result += this.model.getLineContent(modelLineNumbers[i]) + newLineCharacter;\r\n }\r\n return result;\r\n }\r\n if (hasEmptyRange && emptySelectionClipboard) {\r\n // mixed empty selections and non-empty selections\r\n let result = [];\r\n let prevModelLineNumber = 0;\r\n for (const modelRange of modelRanges) {\r\n const modelLineNumber = modelRange.startLineNumber;\r\n if (modelRange.isEmpty()) {\r\n if (modelLineNumber !== prevModelLineNumber) {\r\n result.push(this.model.getLineContent(modelLineNumber));\r\n }\r\n }\r\n else {\r\n result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */));\r\n }\r\n prevModelLineNumber = modelLineNumber;\r\n }\r\n return result.length === 1 ? result[0] : result;\r\n }\r\n let result = [];\r\n for (const modelRange of modelRanges) {\r\n if (!modelRange.isEmpty()) {\r\n result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */));\r\n }\r\n }\r\n return result.length === 1 ? result[0] : result;\r\n }\r\n getRichTextToCopy(modelRanges, emptySelectionClipboard) {\r\n const languageId = this.model.getLanguageIdentifier();\r\n if (languageId.id === 1 /* PlainText */) {\r\n return null;\r\n }\r\n if (modelRanges.length !== 1) {\r\n // no multiple selection support at this time\r\n return null;\r\n }\r\n let range = modelRanges[0];\r\n if (range.isEmpty()) {\r\n if (!emptySelectionClipboard) {\r\n // nothing to copy\r\n return null;\r\n }\r\n const lineNumber = range.startLineNumber;\r\n range = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(lineNumber, this.model.getLineMinColumn(lineNumber), lineNumber, this.model.getLineMaxColumn(lineNumber));\r\n }\r\n const fontInfo = this._configuration.options.get(38 /* fontInfo */);\r\n const colorMap = this._getColorMap();\r\n const fontFamily = fontInfo.fontFamily === _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__.EDITOR_FONT_DEFAULTS.fontFamily ? fontInfo.fontFamily : `'${fontInfo.fontFamily}', ${_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__.EDITOR_FONT_DEFAULTS.fontFamily}`;\r\n return {\r\n mode: languageId.language,\r\n html: (`<div style=\"`\r\n + `color: ${colorMap[1 /* DefaultForeground */]};`\r\n + `background-color: ${colorMap[2 /* DefaultBackground */]};`\r\n + `font-family: ${fontFamily};`\r\n + `font-weight: ${fontInfo.fontWeight};`\r\n + `font-size: ${fontInfo.fontSize}px;`\r\n + `line-height: ${fontInfo.lineHeight}px;`\r\n + `white-space: pre;`\r\n + `\">`\r\n + this._getHTMLToCopy(range, colorMap)\r\n + '</div>')\r\n };\r\n }\r\n _getHTMLToCopy(modelRange, colorMap) {\r\n const startLineNumber = modelRange.startLineNumber;\r\n const startColumn = modelRange.startColumn;\r\n const endLineNumber = modelRange.endLineNumber;\r\n const endColumn = modelRange.endColumn;\r\n const tabSize = this.getTabSize();\r\n let result = '';\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineTokens = this.model.getLineTokens(lineNumber);\r\n const lineContent = lineTokens.getLineContent();\r\n const startOffset = (lineNumber === startLineNumber ? startColumn - 1 : 0);\r\n const endOffset = (lineNumber === endLineNumber ? endColumn - 1 : lineContent.length);\r\n if (lineContent === '') {\r\n result += '<br>';\r\n }\r\n else {\r\n result += (0,_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_7__.tokenizeLineToHTML)(lineContent, lineTokens.inflate(), colorMap, startOffset, endOffset, tabSize, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_15__.isWindows);\r\n }\r\n }\r\n return result;\r\n }\r\n _getColorMap() {\r\n let colorMap = _modes_js__WEBPACK_IMPORTED_MODULE_6__.TokenizationRegistry.getColorMap();\r\n let result = ['#000000'];\r\n if (colorMap) {\r\n for (let i = 1, len = colorMap.length; i < len; i++) {\r\n result[i] = _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__.Color.Format.CSS.formatHex(colorMap[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n //#region model\r\n pushStackElement() {\r\n this.model.pushStackElement();\r\n }\r\n //#endregion\r\n //#region cursor operations\r\n getPrimaryCursorState() {\r\n return this._cursor.getPrimaryCursorState();\r\n }\r\n getLastAddedCursorIndex() {\r\n return this._cursor.getLastAddedCursorIndex();\r\n }\r\n getCursorStates() {\r\n return this._cursor.getCursorStates();\r\n }\r\n setCursorStates(source, reason, states) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.setStates(eventsCollector, source, reason, states));\r\n }\r\n getCursorColumnSelectData() {\r\n return this._cursor.getCursorColumnSelectData();\r\n }\r\n setCursorColumnSelectData(columnSelectData) {\r\n this._cursor.setCursorColumnSelectData(columnSelectData);\r\n }\r\n getPrevEditOperationType() {\r\n return this._cursor.getPrevEditOperationType();\r\n }\r\n setPrevEditOperationType(type) {\r\n this._cursor.setPrevEditOperationType(type);\r\n }\r\n getSelection() {\r\n return this._cursor.getSelection();\r\n }\r\n getSelections() {\r\n return this._cursor.getSelections();\r\n }\r\n getPosition() {\r\n return this._cursor.getPrimaryCursorState().modelState.position;\r\n }\r\n setSelections(source, selections, reason = 0 /* NotSet */) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.setSelections(eventsCollector, source, selections, reason));\r\n }\r\n saveCursorState() {\r\n return this._cursor.saveState();\r\n }\r\n restoreCursorState(states) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.restoreState(eventsCollector, states));\r\n }\r\n _executeCursorEdit(callback) {\r\n if (this._cursor.context.cursorConfig.readOnly) {\r\n // we cannot edit when read only...\r\n this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__.ReadOnlyEditAttemptEvent());\r\n return;\r\n }\r\n this._withViewEventsCollector(callback);\r\n }\r\n executeEdits(source, edits, cursorStateComputer) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeEdits(eventsCollector, source, edits, cursorStateComputer));\r\n }\r\n startComposition() {\r\n this._cursor.setIsDoingComposition(true);\r\n this._executeCursorEdit(eventsCollector => this._cursor.startComposition(eventsCollector));\r\n }\r\n endComposition(source) {\r\n this._cursor.setIsDoingComposition(false);\r\n this._executeCursorEdit(eventsCollector => this._cursor.endComposition(eventsCollector, source));\r\n }\r\n type(text, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.type(eventsCollector, text, source));\r\n }\r\n compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.compositionType(eventsCollector, text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source));\r\n }\r\n paste(text, pasteOnNewLine, multicursorText, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.paste(eventsCollector, text, pasteOnNewLine, multicursorText, source));\r\n }\r\n cut(source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.cut(eventsCollector, source));\r\n }\r\n executeCommand(command, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeCommand(eventsCollector, command, source));\r\n }\r\n executeCommands(commands, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeCommands(eventsCollector, commands, source));\r\n }\r\n revealPrimaryCursor(source, revealHorizontal) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.revealPrimary(eventsCollector, source, revealHorizontal, 0 /* Smooth */));\r\n }\r\n revealTopMostCursor(source) {\r\n const viewPosition = this._cursor.getTopMostViewPosition();\r\n const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewRevealRangeRequestEvent(source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */)));\r\n }\r\n revealBottomMostCursor(source) {\r\n const viewPosition = this._cursor.getBottomMostViewPosition();\r\n const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewRevealRangeRequestEvent(source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */)));\r\n }\r\n revealRange(source, revealHorizontal, viewRange, verticalType, scrollType) {\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewRevealRangeRequestEvent(source, viewRange, null, verticalType, revealHorizontal, scrollType)));\r\n }\r\n //#endregion\r\n //#region viewLayout\r\n getVerticalOffsetForLineNumber(viewLineNumber) {\r\n return this.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber);\r\n }\r\n getScrollTop() {\r\n return this.viewLayout.getCurrentScrollTop();\r\n }\r\n setScrollTop(newScrollTop, scrollType) {\r\n this.viewLayout.setScrollPosition({ scrollTop: newScrollTop }, scrollType);\r\n }\r\n setScrollPosition(position, type) {\r\n this.viewLayout.setScrollPosition(position, type);\r\n }\r\n deltaScrollNow(deltaScrollLeft, deltaScrollTop) {\r\n this.viewLayout.deltaScrollNow(deltaScrollLeft, deltaScrollTop);\r\n }\r\n changeWhitespace(callback) {\r\n const hadAChange = this.viewLayout.changeWhitespace(callback);\r\n if (hadAChange) {\r\n this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__.ViewZonesChangedEvent());\r\n this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__.ViewZonesChangedEvent());\r\n }\r\n }\r\n setMaxLineWidth(maxLineWidth) {\r\n this.viewLayout.setMaxLineWidth(maxLineWidth);\r\n }\r\n //#endregion\r\n _withViewEventsCollector(callback) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n callback(eventsCollector);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SelectionAnchorSet\": () => (/* binding */ SelectionAnchorSet)\n/* harmony export */ });\n/* harmony import */ var _anchorSelect_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./anchorSelect.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst SelectionAnchorSet = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.RawContextKey('selectionAnchorSet', false);\r\nlet SelectionAnchorController = class SelectionAnchorController {\r\n constructor(editor, contextKeyService) {\r\n this.editor = editor;\r\n this.selectionAnchorSetContextKey = SelectionAnchorSet.bindTo(contextKeyService);\r\n this.modelChangeListener = editor.onDidChangeModel(() => this.selectionAnchorSetContextKey.reset());\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SelectionAnchorController.ID);\r\n }\r\n setSelectionAnchor() {\r\n if (this.editor.hasModel()) {\r\n const position = this.editor.getPosition();\r\n const previousDecorations = this.decorationId ? [this.decorationId] : [];\r\n const newDecorationId = this.editor.deltaDecorations(previousDecorations, [{\r\n range: _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__.Selection.fromPositions(position, position),\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n hoverMessage: new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_7__.MarkdownString().appendText((0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('selectionAnchor', \"Selection Anchor\")),\r\n className: 'selection-anchor'\r\n }\r\n }]);\r\n this.decorationId = newDecorationId[0];\r\n this.selectionAnchorSetContextKey.set(!!this.decorationId);\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_8__.alert)((0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('anchorSet', \"Anchor set at {0}:{1}\", position.lineNumber, position.column));\r\n }\r\n }\r\n goToSelectionAnchor() {\r\n if (this.editor.hasModel() && this.decorationId) {\r\n const anchorPosition = this.editor.getModel().getDecorationRange(this.decorationId);\r\n if (anchorPosition) {\r\n this.editor.setPosition(anchorPosition.getStartPosition());\r\n }\r\n }\r\n }\r\n selectFromAnchorToCursor() {\r\n if (this.editor.hasModel() && this.decorationId) {\r\n const start = this.editor.getModel().getDecorationRange(this.decorationId);\r\n if (start) {\r\n const end = this.editor.getPosition();\r\n this.editor.setSelection(_common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__.Selection.fromPositions(start.getStartPosition(), end));\r\n this.cancelSelectionAnchor();\r\n }\r\n }\r\n }\r\n cancelSelectionAnchor() {\r\n if (this.decorationId) {\r\n this.editor.deltaDecorations([this.decorationId], []);\r\n this.decorationId = undefined;\r\n this.selectionAnchorSetContextKey.set(false);\r\n }\r\n }\r\n dispose() {\r\n this.cancelSelectionAnchor();\r\n this.modelChangeListener.dispose();\r\n }\r\n};\r\nSelectionAnchorController.ID = 'editor.contrib.selectionAnchorController';\r\nSelectionAnchorController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.IContextKeyService)\r\n], SelectionAnchorController);\r\nclass SetSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.setSelectionAnchor',\r\n label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('setSelectionAnchor', \"Set Selection Anchor\"),\r\n alias: 'Set Selection Anchor',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 32 /* KEY_B */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.setSelectionAnchor();\r\n });\r\n }\r\n}\r\nclass GoToSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.goToSelectionAnchor',\r\n label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('goToSelectionAnchor', \"Go to Selection Anchor\"),\r\n alias: 'Go to Selection Anchor',\r\n precondition: SelectionAnchorSet,\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.goToSelectionAnchor();\r\n });\r\n }\r\n}\r\nclass SelectFromAnchorToCursor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectFromAnchorToCursor',\r\n label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('selectFromAnchorToCursor', \"Select from Anchor to Cursor\"),\r\n alias: 'Select from Anchor to Cursor',\r\n precondition: SelectionAnchorSet,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 41 /* KEY_K */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.selectFromAnchorToCursor();\r\n });\r\n }\r\n}\r\nclass CancelSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.cancelSelectionAnchor',\r\n label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('cancelSelectionAnchor', \"Cancel Selection Anchor\"),\r\n alias: 'Cancel Selection Anchor',\r\n precondition: SelectionAnchorSet,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: 9 /* Escape */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.cancelSelectionAnchor();\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorContribution)(SelectionAnchorController.ID, SelectionAnchorController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(SetSelectionAnchor);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(GoToSelectionAnchor);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(SelectFromAnchorToCursor);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(CancelSelectionAnchor);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BracketMatchingController\": () => (/* binding */ BracketMatchingController)\n/* harmony export */ });\n/* harmony import */ var _bracketMatching_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bracketMatching.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst overviewRulerBracketMatchForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_12__.registerColor)('editorOverviewRuler.bracketMatchForeground', { dark: '#A0A0A0', light: '#A0A0A0', hc: '#A0A0A0' }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('overviewRulerBracketMatchForeground', 'Overview ruler marker color for matching brackets.'));\r\nclass JumpToBracketAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.jumpToBracket',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('smartSelect.jumpBracket', \"Go to Bracket\"),\r\n alias: 'Go to Bracket',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 88 /* US_BACKSLASH */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = BracketMatchingController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.jumpToBracket();\r\n }\r\n}\r\nclass SelectToBracketAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectToBracket',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('smartSelect.selectToBracket', \"Select to Bracket\"),\r\n alias: 'Select to Bracket',\r\n precondition: undefined,\r\n description: {\r\n description: `Select to Bracket`,\r\n args: [{\r\n name: 'args',\r\n schema: {\r\n type: 'object',\r\n properties: {\r\n 'selectBrackets': {\r\n type: 'boolean',\r\n default: true\r\n }\r\n },\r\n }\r\n }]\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n const controller = BracketMatchingController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n let selectBrackets = true;\r\n if (args && args.selectBrackets === false) {\r\n selectBrackets = false;\r\n }\r\n controller.selectToBracket(selectBrackets);\r\n }\r\n}\r\nclass BracketsData {\r\n constructor(position, brackets, options) {\r\n this.position = position;\r\n this.brackets = brackets;\r\n this.options = options;\r\n }\r\n}\r\nclass BracketMatchingController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n this._decorations = [];\r\n this._updateBracketsSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.RunOnceScheduler(() => this._updateBrackets(), 50));\r\n this._matchBrackets = this._editor.getOption(58 /* matchBrackets */);\r\n this._updateBracketsSoon.schedule();\r\n this._register(editor.onDidChangeCursorPosition((e) => {\r\n if (this._matchBrackets === 'never') {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._lastBracketsData = [];\r\n this._decorations = [];\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModelLanguageConfiguration((e) => {\r\n this._lastBracketsData = [];\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(58 /* matchBrackets */)) {\r\n this._matchBrackets = this._editor.getOption(58 /* matchBrackets */);\r\n this._decorations = this._editor.deltaDecorations(this._decorations, []);\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n this._updateBracketsSoon.schedule();\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(BracketMatchingController.ID);\r\n }\r\n jumpToBracket() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const newSelections = this._editor.getSelections().map(selection => {\r\n const position = selection.getStartPosition();\r\n // find matching brackets if position is on a bracket\r\n const brackets = model.matchBracket(position);\r\n let newCursorPosition = null;\r\n if (brackets) {\r\n if (brackets[0].containsPosition(position)) {\r\n newCursorPosition = brackets[1].getStartPosition();\r\n }\r\n else if (brackets[1].containsPosition(position)) {\r\n newCursorPosition = brackets[0].getStartPosition();\r\n }\r\n }\r\n else {\r\n // find the enclosing brackets if the position isn't on a matching bracket\r\n const enclosingBrackets = model.findEnclosingBrackets(position);\r\n if (enclosingBrackets) {\r\n newCursorPosition = enclosingBrackets[0].getStartPosition();\r\n }\r\n else {\r\n // no enclosing brackets, try the very first next bracket\r\n const nextBracket = model.findNextBracket(position);\r\n if (nextBracket && nextBracket.range) {\r\n newCursorPosition = nextBracket.range.getStartPosition();\r\n }\r\n }\r\n }\r\n if (newCursorPosition) {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column);\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(position.lineNumber, position.column, position.lineNumber, position.column);\r\n });\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealRange(newSelections[0]);\r\n }\r\n selectToBracket(selectBrackets) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const newSelections = [];\r\n this._editor.getSelections().forEach(selection => {\r\n const position = selection.getStartPosition();\r\n let brackets = model.matchBracket(position);\r\n if (!brackets) {\r\n brackets = model.findEnclosingBrackets(position);\r\n if (!brackets) {\r\n const nextBracket = model.findNextBracket(position);\r\n if (nextBracket && nextBracket.range) {\r\n brackets = model.matchBracket(nextBracket.range.getStartPosition());\r\n }\r\n }\r\n }\r\n let selectFrom = null;\r\n let selectTo = null;\r\n if (brackets) {\r\n brackets.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts);\r\n const [open, close] = brackets;\r\n selectFrom = selectBrackets ? open.getStartPosition() : open.getEndPosition();\r\n selectTo = selectBrackets ? close.getEndPosition() : close.getStartPosition();\r\n }\r\n if (selectFrom && selectTo) {\r\n newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(selectFrom.lineNumber, selectFrom.column, selectTo.lineNumber, selectTo.column));\r\n }\r\n });\r\n if (newSelections.length > 0) {\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealRange(newSelections[0]);\r\n }\r\n }\r\n _updateBrackets() {\r\n if (this._matchBrackets === 'never') {\r\n return;\r\n }\r\n this._recomputeBrackets();\r\n let newDecorations = [], newDecorationsLen = 0;\r\n for (const bracketData of this._lastBracketsData) {\r\n let brackets = bracketData.brackets;\r\n if (brackets) {\r\n newDecorations[newDecorationsLen++] = { range: brackets[0], options: bracketData.options };\r\n newDecorations[newDecorationsLen++] = { range: brackets[1], options: bracketData.options };\r\n }\r\n }\r\n this._decorations = this._editor.deltaDecorations(this._decorations, newDecorations);\r\n }\r\n _recomputeBrackets() {\r\n if (!this._editor.hasModel()) {\r\n // no model => no brackets!\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n return;\r\n }\r\n const selections = this._editor.getSelections();\r\n if (selections.length > 100) {\r\n // no bracket matching for high numbers of selections\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const versionId = model.getVersionId();\r\n let previousData = [];\r\n if (this._lastVersionId === versionId) {\r\n // use the previous data only if the model is at the same version id\r\n previousData = this._lastBracketsData;\r\n }\r\n let positions = [], positionsLen = 0;\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n if (selection.isEmpty()) {\r\n // will bracket match a cursor only if the selection is collapsed\r\n positions[positionsLen++] = selection.getStartPosition();\r\n }\r\n }\r\n // sort positions for `previousData` cache hits\r\n if (positions.length > 1) {\r\n positions.sort(_common_core_position_js__WEBPACK_IMPORTED_MODULE_5__.Position.compare);\r\n }\r\n let newData = [], newDataLen = 0;\r\n let previousIndex = 0, previousLen = previousData.length;\r\n for (let i = 0, len = positions.length; i < len; i++) {\r\n let position = positions[i];\r\n while (previousIndex < previousLen && previousData[previousIndex].position.isBefore(position)) {\r\n previousIndex++;\r\n }\r\n if (previousIndex < previousLen && previousData[previousIndex].position.equals(position)) {\r\n newData[newDataLen++] = previousData[previousIndex];\r\n }\r\n else {\r\n let brackets = model.matchBracket(position);\r\n let options = BracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;\r\n if (!brackets && this._matchBrackets === 'always') {\r\n brackets = model.findEnclosingBrackets(position, 20 /* give at most 20ms to compute */);\r\n options = BracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER;\r\n }\r\n newData[newDataLen++] = new BracketsData(position, brackets, options);\r\n }\r\n }\r\n this._lastBracketsData = newData;\r\n this._lastVersionId = versionId;\r\n }\r\n}\r\nBracketMatchingController.ID = 'editor.contrib.bracketMatchingController';\r\nBracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'bracket-match',\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.themeColorFromId)(overviewRulerBracketMatchForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center\r\n }\r\n});\r\nBracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'bracket-match'\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(BracketMatchingController.ID, BracketMatchingController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(SelectToBracketAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(JumpToBracketAction);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.registerThemingParticipant)((theme, collector) => {\r\n const bracketMatchBackground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__.editorBracketMatchBackground);\r\n if (bracketMatchBackground) {\r\n collector.addRule(`.monaco-editor .bracket-match { background-color: ${bracketMatchBackground}; }`);\r\n }\r\n const bracketMatchBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__.editorBracketMatchBorder);\r\n if (bracketMatchBorder) {\r\n collector.addRule(`.monaco-editor .bracket-match { border: 1px solid ${bracketMatchBorder}; }`);\r\n }\r\n});\r\n// Go to menu\r\n_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__.MenuRegistry.appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__.MenuId.MenubarGoMenu, {\r\n group: '5_infile_nav',\r\n command: {\r\n id: 'editor.action.jumpToBracket',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize({ key: 'miGoToBracket', comment: ['&& denotes a mnemonic'] }, \"Go to &&Bracket\")\r\n },\r\n order: 2\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _moveCaretCommand_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./moveCaretCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass MoveCaretAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor(left, opts) {\r\n super(opts);\r\n this.left = left;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let commands = [];\r\n let selections = editor.getSelections();\r\n for (const selection of selections) {\r\n commands.push(new _moveCaretCommand_js__WEBPACK_IMPORTED_MODULE_3__.MoveCaretCommand(selection, this.left));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass MoveCaretLeftAction extends MoveCaretAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.moveCarretLeftAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('caret.moveLeft', \"Move Selected Text Left\"),\r\n alias: 'Move Selected Text Left',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass MoveCaretRightAction extends MoveCaretAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.moveCarretRightAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('caret.moveRight', \"Move Selected Text Right\"),\r\n alias: 'Move Selected Text Right',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(MoveCaretLeftAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(MoveCaretRightAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MoveCaretCommand\": () => (/* binding */ MoveCaretCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass MoveCaretCommand {\r\n constructor(selection, isMovingLeft) {\r\n this._selection = selection;\r\n this._isMovingLeft = isMovingLeft;\r\n }\r\n getEditOperations(model, builder) {\r\n if (this._selection.startLineNumber !== this._selection.endLineNumber || this._selection.isEmpty()) {\r\n return;\r\n }\r\n const lineNumber = this._selection.startLineNumber;\r\n const startColumn = this._selection.startColumn;\r\n const endColumn = this._selection.endColumn;\r\n if (this._isMovingLeft && startColumn === 1) {\r\n return;\r\n }\r\n if (!this._isMovingLeft && endColumn === model.getLineMaxColumn(lineNumber)) {\r\n return;\r\n }\r\n if (this._isMovingLeft) {\r\n const rangeBefore = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(lineNumber, startColumn - 1, lineNumber, startColumn);\r\n const charBefore = model.getValueInRange(rangeBefore);\r\n builder.addEditOperation(rangeBefore, null);\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(lineNumber, endColumn, lineNumber, endColumn), charBefore);\r\n }\r\n else {\r\n const rangeAfter = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(lineNumber, endColumn, lineNumber, endColumn + 1);\r\n const charAfter = model.getValueInRange(rangeAfter);\r\n builder.addEditOperation(rangeAfter, null);\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(lineNumber, startColumn, lineNumber, startColumn), charAfter);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n if (this._isMovingLeft) {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__.Selection(this._selection.startLineNumber, this._selection.startColumn - 1, this._selection.endLineNumber, this._selection.endColumn - 1);\r\n }\r\n else {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__.Selection(this._selection.startLineNumber, this._selection.startColumn + 1, this._selection.endLineNumber, this._selection.endColumn + 1);\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorMoveOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TransposeLettersAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transposeLetters',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('transposeLetters.label', \"Transpose Letters\"),\r\n alias: 'Transpose Letters',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 50 /* KEY_T */\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let model = editor.getModel();\r\n let commands = [];\r\n let selections = editor.getSelections();\r\n for (let selection of selections) {\r\n if (!selection.isEmpty()) {\r\n continue;\r\n }\r\n let lineNumber = selection.startLineNumber;\r\n let column = selection.startColumn;\r\n let lastColumn = model.getLineMaxColumn(lineNumber);\r\n if (lineNumber === 1 && (column === 1 || (column === 2 && lastColumn === 2))) {\r\n // at beginning of file, nothing to do\r\n continue;\r\n }\r\n // handle special case: when at end of line, transpose left two chars\r\n // otherwise, transpose left and right chars\r\n let endPosition = (column === lastColumn) ?\r\n selection.getPosition() :\r\n _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__.MoveOperations.rightPosition(model, selection.getPosition().lineNumber, selection.getPosition().column);\r\n let middlePosition = _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__.MoveOperations.leftPosition(model, endPosition.lineNumber, endPosition.column);\r\n let beginPosition = _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__.MoveOperations.leftPosition(model, middlePosition.lineNumber, middlePosition.column);\r\n let leftChar = model.getValueInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.fromPositions(beginPosition, middlePosition));\r\n let rightChar = model.getValueInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.fromPositions(middlePosition, endPosition));\r\n let replaceRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.fromPositions(beginPosition, endPosition);\r\n commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(replaceRange, rightChar + leftChar));\r\n }\r\n if (commands.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(TransposeLettersAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CutAction\": () => (/* binding */ CutAction),\n/* harmony export */ \"CopyAction\": () => (/* binding */ CopyAction),\n/* harmony export */ \"PasteAction\": () => (/* binding */ PasteAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/controller/textAreaInput.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';\r\nconst supportsCut = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative || document.queryCommandSupported('cut'));\r\nconst supportsCopy = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative || document.queryCommandSupported('copy'));\r\n// Firefox only supports navigator.clipboard.readText() in browser extensions.\r\n// See https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#Browser_compatibility\r\n// When loading over http, navigator.clipboard can be undefined. See https://github.com/microsoft/monaco-editor/issues/2313\r\nconst supportsPaste = (typeof navigator.clipboard === 'undefined' || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__.isFirefox) ? document.queryCommandSupported('paste') : true;\r\nfunction registerCommand(command) {\r\n command.register();\r\n return command;\r\n}\r\nconst CutAction = supportsCut ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.MultiCommand({\r\n id: 'editor.action.clipboardCutAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind cut keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */,\r\n win: { primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */, secondary: [1024 /* Shift */ | 20 /* Delete */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miCut', comment: ['&& denotes a mnemonic'] }, \"Cu&&t\"),\r\n order: 1\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.cutLabel', \"Cut\"),\r\n when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable,\r\n order: 1,\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.cutLabel', \"Cut\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nconst CopyAction = supportsCopy ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.MultiCommand({\r\n id: 'editor.action.clipboardCopyAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind copy keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */,\r\n win: { primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */, secondary: [2048 /* CtrlCmd */ | 19 /* Insert */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miCopy', comment: ['&& denotes a mnemonic'] }, \"&&Copy\"),\r\n order: 2\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.copyLabel', \"Copy\"),\r\n order: 2,\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.copyLabel', \"Copy\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nconst PasteAction = supportsPaste ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.MultiCommand({\r\n id: 'editor.action.clipboardPasteAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind paste keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */,\r\n win: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] },\r\n linux: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miPaste', comment: ['&& denotes a mnemonic'] }, \"&&Paste\"),\r\n order: 3\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.pasteLabel', \"Paste\"),\r\n when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable,\r\n order: 3,\r\n }, {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.CommandPalette,\r\n group: '',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.pasteLabel', \"Paste\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nclass ExecCommandCopyWithSyntaxHighlightingAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('actions.clipboard.copyWithSyntaxHighlightingLabel', \"Copy With Syntax Highlighting\"),\r\n alias: 'Copy With Syntax Highlighting',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const emptySelectionClipboard = editor.getOption(28 /* emptySelectionClipboard */);\r\n if (!emptySelectionClipboard && editor.getSelection().isEmpty()) {\r\n return;\r\n }\r\n _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__.CopyOptions.forceCopyWithSyntaxHighlighting = true;\r\n editor.focus();\r\n document.execCommand('copy');\r\n _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__.CopyOptions.forceCopyWithSyntaxHighlighting = false;\r\n }\r\n}\r\nfunction registerExecCommandImpl(target, browserCommand) {\r\n if (!target) {\r\n return;\r\n }\r\n // 1. handle case when focus is in editor.\r\n target.addImplementation(10000, (accessor, args) => {\r\n // Only if editor text focus (i.e. not if editor has widget focus).\r\n const focusedEditor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService).getFocusedCodeEditor();\r\n if (focusedEditor && focusedEditor.hasTextFocus()) {\r\n // Do not execute if there is no selection and empty selection clipboard is off\r\n const emptySelectionClipboard = focusedEditor.getOption(28 /* emptySelectionClipboard */);\r\n const selection = focusedEditor.getSelection();\r\n if (selection && selection.isEmpty() && !emptySelectionClipboard) {\r\n return true;\r\n }\r\n document.execCommand(browserCommand);\r\n return true;\r\n }\r\n return false;\r\n });\r\n // 2. (default) handle case when focus is somewhere else.\r\n target.addImplementation(0, (accessor, args) => {\r\n document.execCommand(browserCommand);\r\n return true;\r\n });\r\n}\r\nregisterExecCommandImpl(CutAction, 'cut');\r\nregisterExecCommandImpl(CopyAction, 'copy');\r\nif (PasteAction) {\r\n // 1. Paste: handle case when focus is in editor.\r\n PasteAction.addImplementation(10000, (accessor, args) => {\r\n const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService);\r\n const clipboardService = accessor.get(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_8__.IClipboardService);\r\n // Only if editor text focus (i.e. not if editor has widget focus).\r\n const focusedEditor = codeEditorService.getFocusedCodeEditor();\r\n if (focusedEditor && focusedEditor.hasTextFocus()) {\r\n const result = document.execCommand('paste');\r\n // Use the clipboard service if document.execCommand('paste') was not successful\r\n if (!result && _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWeb) {\r\n (() => __awaiter(void 0, void 0, void 0, function* () {\r\n const clipboardText = yield clipboardService.readText();\r\n if (clipboardText !== '') {\r\n const metadata = _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__.InMemoryClipboardMetadataManager.INSTANCE.get(clipboardText);\r\n let pasteOnNewLine = false;\r\n let multicursorText = null;\r\n let mode = null;\r\n if (metadata) {\r\n pasteOnNewLine = (focusedEditor.getOption(28 /* emptySelectionClipboard */) && !!metadata.isFromEmptySelection);\r\n multicursorText = (typeof metadata.multicursorText !== 'undefined' ? metadata.multicursorText : null);\r\n mode = metadata.mode;\r\n }\r\n focusedEditor.trigger('keyboard', \"paste\" /* Paste */, {\r\n text: clipboardText,\r\n pasteOnNewLine,\r\n multicursorText,\r\n mode\r\n });\r\n }\r\n }))();\r\n return true;\r\n }\r\n return true;\r\n }\r\n return false;\r\n });\r\n // 2. Paste: (default) handle case when focus is somewhere else.\r\n PasteAction.addImplementation(0, (accessor, args) => {\r\n document.execCommand('paste');\r\n return true;\r\n });\r\n}\r\nif (supportsCopy) {\r\n (0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(ExecCommandCopyWithSyntaxHighlightingAction);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"codeActionCommandId\": () => (/* binding */ codeActionCommandId),\n/* harmony export */ \"refactorCommandId\": () => (/* binding */ refactorCommandId),\n/* harmony export */ \"sourceActionCommandId\": () => (/* binding */ sourceActionCommandId),\n/* harmony export */ \"organizeImportsCommandId\": () => (/* binding */ organizeImportsCommandId),\n/* harmony export */ \"fixAllCommandId\": () => (/* binding */ fixAllCommandId),\n/* harmony export */ \"CodeActionItem\": () => (/* binding */ CodeActionItem),\n/* harmony export */ \"getCodeActions\": () => (/* binding */ getCodeActions)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./types.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst codeActionCommandId = 'editor.action.codeAction';\r\nconst refactorCommandId = 'editor.action.refactor';\r\nconst sourceActionCommandId = 'editor.action.sourceAction';\r\nconst organizeImportsCommandId = 'editor.action.organizeImports';\r\nconst fixAllCommandId = 'editor.action.fixAll';\r\nclass CodeActionItem {\r\n constructor(action, provider) {\r\n this.action = action;\r\n this.provider = provider;\r\n }\r\n resolve(token) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (((_a = this.provider) === null || _a === void 0 ? void 0 : _a.resolveCodeAction) && !this.action.edit) {\r\n let action;\r\n try {\r\n action = yield this.provider.resolveCodeAction(this.action, token);\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedExternalError)(err);\r\n }\r\n if (action) {\r\n this.action.edit = action.edit;\r\n }\r\n }\r\n return this;\r\n });\r\n }\r\n}\r\nclass ManagedCodeActionSet extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(actions, documentation, disposables) {\r\n super();\r\n this.documentation = documentation;\r\n this._register(disposables);\r\n this.allActions = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.mergeSort)([...actions], ManagedCodeActionSet.codeActionsComparator);\r\n this.validActions = this.allActions.filter(({ action }) => !action.disabled);\r\n }\r\n static codeActionsComparator({ action: a }, { action: b }) {\r\n if (a.isPreferred && !b.isPreferred) {\r\n return -1;\r\n }\r\n else if (!a.isPreferred && b.isPreferred) {\r\n return 1;\r\n }\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray)(a.diagnostics)) {\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray)(b.diagnostics)) {\r\n return a.diagnostics[0].message.localeCompare(b.diagnostics[0].message);\r\n }\r\n else {\r\n return -1;\r\n }\r\n }\r\n else if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray)(b.diagnostics)) {\r\n return 1;\r\n }\r\n else {\r\n return 0; // both have no diagnostics\r\n }\r\n }\r\n get hasAutoFix() {\r\n return this.validActions.some(({ action: fix }) => !!fix.kind && _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind.QuickFix.contains(new _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind(fix.kind)) && !!fix.isPreferred);\r\n }\r\n}\r\nconst emptyCodeActionsResponse = { actions: [], documentation: undefined };\r\nfunction getCodeActions(model, rangeOrSelection, trigger, progress, token) {\r\n var _a;\r\n const filter = trigger.filter || {};\r\n const codeActionContext = {\r\n only: (_a = filter.include) === null || _a === void 0 ? void 0 : _a.value,\r\n trigger: trigger.type,\r\n };\r\n const cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.TextModelCancellationTokenSource(model, token);\r\n const providers = getCodeActionProviders(model, filter);\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n const promises = providers.map((provider) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n progress.report(provider);\r\n const providedCodeActions = yield provider.provideCodeActions(model, rangeOrSelection, codeActionContext, cts.token);\r\n if (providedCodeActions) {\r\n disposables.add(providedCodeActions);\r\n }\r\n if (cts.token.isCancellationRequested) {\r\n return emptyCodeActionsResponse;\r\n }\r\n const filteredActions = ((providedCodeActions === null || providedCodeActions === void 0 ? void 0 : providedCodeActions.actions) || []).filter(action => action && (0,_types_js__WEBPACK_IMPORTED_MODULE_10__.filtersAction)(filter, action));\r\n const documentation = getDocumentation(provider, filteredActions, filter.include);\r\n return {\r\n actions: filteredActions.map(action => new CodeActionItem(action, provider)),\r\n documentation\r\n };\r\n }\r\n catch (err) {\r\n if ((0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.isPromiseCanceledError)(err)) {\r\n throw err;\r\n }\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedExternalError)(err);\r\n return emptyCodeActionsResponse;\r\n }\r\n }));\r\n const listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionProviderRegistry.onDidChange(() => {\r\n const newProviders = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionProviderRegistry.all(model);\r\n if (!(0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.equals)(newProviders, providers)) {\r\n cts.cancel();\r\n }\r\n });\r\n return Promise.all(promises).then(actions => {\r\n const allActions = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.flatten)(actions.map(x => x.actions));\r\n const allDocumentation = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.coalesce)(actions.map(x => x.documentation));\r\n return new ManagedCodeActionSet(allActions, allDocumentation, disposables);\r\n })\r\n .finally(() => {\r\n listener.dispose();\r\n cts.dispose();\r\n });\r\n}\r\nfunction getCodeActionProviders(model, filter) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionProviderRegistry.all(model)\r\n // Don't include providers that we know will not return code actions of interest\r\n .filter(provider => {\r\n if (!provider.providedCodeActionKinds) {\r\n // We don't know what type of actions this provider will return.\r\n return true;\r\n }\r\n return provider.providedCodeActionKinds.some(kind => (0,_types_js__WEBPACK_IMPORTED_MODULE_10__.mayIncludeActionsOfKind)(filter, new _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind(kind)));\r\n });\r\n}\r\nfunction getDocumentation(provider, providedCodeActions, only) {\r\n if (!provider.documentation) {\r\n return undefined;\r\n }\r\n const documentation = provider.documentation.map(entry => ({ kind: new _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind(entry.kind), command: entry.command }));\r\n if (only) {\r\n let currentBest;\r\n for (const entry of documentation) {\r\n if (entry.kind.contains(only)) {\r\n if (!currentBest) {\r\n currentBest = entry;\r\n }\r\n else {\r\n // Take best match\r\n if (currentBest.kind.contains(entry.kind)) {\r\n currentBest = entry;\r\n }\r\n }\r\n }\r\n }\r\n if (currentBest) {\r\n return currentBest === null || currentBest === void 0 ? void 0 : currentBest.command;\r\n }\r\n }\r\n // Otherwise, check to see if any of the provided actions match.\r\n for (const action of providedCodeActions) {\r\n if (!action.kind) {\r\n continue;\r\n }\r\n for (const entry of documentation) {\r\n if (entry.kind.contains(new _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind(action.kind))) {\r\n return entry.command;\r\n }\r\n }\r\n }\r\n return undefined;\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_12__.CommandsRegistry.registerCommand('_executeCodeActionProvider', function (accessor, resource, rangeOrSelection, kind, itemResolveCount) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI)) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.illegalArgument)();\r\n }\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_9__.IModelService).getModel(resource);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.illegalArgument)();\r\n }\r\n const validatedRangeOrSelection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection.isISelection(rangeOrSelection)\r\n ? _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection.liftSelection(rangeOrSelection)\r\n : _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.isIRange(rangeOrSelection)\r\n ? model.validateRange(rangeOrSelection)\r\n : undefined;\r\n if (!validatedRangeOrSelection) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.illegalArgument)();\r\n }\r\n const include = typeof kind === 'string' ? new _types_js__WEBPACK_IMPORTED_MODULE_10__.CodeActionKind(kind) : undefined;\r\n const codeActionSet = yield getCodeActions(model, validatedRangeOrSelection, { type: 2 /* Manual */, filter: { includeSourceActions: true, include } }, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_11__.Progress.None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None);\r\n const resolving = [];\r\n const resolveCount = Math.min(codeActionSet.validActions.length, typeof itemResolveCount === 'number' ? itemResolveCount : 0);\r\n for (let i = 0; i < resolveCount; i++) {\r\n resolving.push(codeActionSet.validActions[i].resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None));\r\n }\r\n try {\r\n yield Promise.all(resolving);\r\n return codeActionSet.validActions.map(item => item.action);\r\n }\r\n finally {\r\n setTimeout(() => codeActionSet.dispose(), 100);\r\n }\r\n });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickFixController\": () => (/* binding */ QuickFixController),\n/* harmony export */ \"applyCodeAction\": () => (/* binding */ applyCodeAction),\n/* harmony export */ \"QuickFixAction\": () => (/* binding */ QuickFixAction),\n/* harmony export */ \"CodeActionCommand\": () => (/* binding */ CodeActionCommand),\n/* harmony export */ \"RefactorAction\": () => (/* binding */ RefactorAction),\n/* harmony export */ \"SourceAction\": () => (/* binding */ SourceAction),\n/* harmony export */ \"OrganizeImportsAction\": () => (/* binding */ OrganizeImportsAction),\n/* harmony export */ \"FixAllAction\": () => (/* binding */ FixAllAction),\n/* harmony export */ \"AutoFixAction\": () => (/* binding */ AutoFixAction)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lazy.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lazy.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codeAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js\");\n/* harmony import */ var _codeActionUi_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./codeActionUi.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js\");\n/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../message/messageController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _codeActionModel_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./codeActionModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./types.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction contextKeyForSupportedActions(kind) {\r\n return _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.regex(_codeActionModel_js__WEBPACK_IMPORTED_MODULE_18__.SUPPORTED_CODE_ACTIONS.keys()[0], new RegExp('(\\\\s|^)' + (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.escapeRegExpCharacters)(kind.value) + '\\\\b'));\r\n}\r\nconst argsSchema = {\r\n type: 'object',\r\n defaultSnippets: [{ body: { kind: '' } }],\r\n properties: {\r\n 'kind': {\r\n type: 'string',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.kind', \"Kind of the code action to run.\"),\r\n },\r\n 'apply': {\r\n type: 'string',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.apply', \"Controls when the returned actions are applied.\"),\r\n default: \"ifSingle\" /* IfSingle */,\r\n enum: [\"first\" /* First */, \"ifSingle\" /* IfSingle */, \"never\" /* Never */],\r\n enumDescriptions: [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.apply.first', \"Always apply the first returned code action.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.apply.ifSingle', \"Apply the first returned code action if it is the only one.\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.apply.never', \"Do not apply the returned code actions.\"),\r\n ]\r\n },\r\n 'preferred': {\r\n type: 'boolean',\r\n default: false,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('args.schema.preferred', \"Controls if only preferred code actions should be returned.\"),\r\n }\r\n }\r\n};\r\nlet QuickFixController = class QuickFixController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(editor, markerService, contextKeyService, progressService, _instantiationService) {\r\n super();\r\n this._instantiationService = _instantiationService;\r\n this._editor = editor;\r\n this._model = this._register(new _codeActionModel_js__WEBPACK_IMPORTED_MODULE_18__.CodeActionModel(this._editor, markerService, contextKeyService, progressService));\r\n this._register(this._model.onDidChangeState(newState => this.update(newState)));\r\n this._ui = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__.Lazy(() => this._register(new _codeActionUi_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionUi(editor, QuickFixAction.Id, AutoFixAction.Id, {\r\n applyCodeAction: (action, retrigger) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n yield this._applyCodeAction(action);\r\n }\r\n finally {\r\n if (retrigger) {\r\n this._trigger({ type: 1 /* Auto */, filter: {} });\r\n }\r\n }\r\n })\r\n }, this._instantiationService)));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(QuickFixController.ID);\r\n }\r\n update(newState) {\r\n this._ui.getValue().update(newState);\r\n }\r\n showCodeActions(trigger, actions, at) {\r\n return this._ui.getValue().showCodeActionList(trigger, actions, at, { includeDisabledActions: false });\r\n }\r\n manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_9__.MessageController.get(this._editor).closeMessage();\r\n const triggerPosition = this._editor.getPosition();\r\n this._trigger({ type: 2 /* Manual */, filter, autoApply, context: { notAvailableMessage, position: triggerPosition } });\r\n }\r\n _trigger(trigger) {\r\n return this._model.trigger(trigger);\r\n }\r\n _applyCodeAction(action) {\r\n return this._instantiationService.invokeFunction(applyCodeAction, action, this._editor);\r\n }\r\n};\r\nQuickFixController.ID = 'editor.contrib.quickFixController';\r\nQuickFixController = __decorate([\r\n __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_14__.IMarkerService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(3, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_16__.IEditorProgressService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__.IInstantiationService)\r\n], QuickFixController);\r\n\r\nfunction applyCodeAction(accessor, item, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const bulkEditService = accessor.get(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_5__.IBulkEditService);\r\n const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_11__.ICommandService);\r\n const telemetryService = accessor.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_17__.ITelemetryService);\r\n const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_15__.INotificationService);\r\n telemetryService.publicLog2('codeAction.applyCodeAction', {\r\n codeActionTitle: item.action.title,\r\n codeActionKind: item.action.kind,\r\n codeActionIsPreferred: !!item.action.isPreferred,\r\n });\r\n yield item.resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None);\r\n if (item.action.edit) {\r\n yield bulkEditService.apply(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_5__.ResourceEdit.convert(item.action.edit), { editor, label: item.action.title });\r\n }\r\n if (item.action.command) {\r\n try {\r\n yield commandService.executeCommand(item.action.command.id, ...(item.action.command.arguments || []));\r\n }\r\n catch (err) {\r\n const message = asMessage(err);\r\n notificationService.error(typeof message === 'string'\r\n ? message\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('applyCodeActionFailed', \"An unknown error occurred while applying the code action\"));\r\n }\r\n }\r\n });\r\n}\r\nfunction asMessage(err) {\r\n if (typeof err === 'string') {\r\n return err;\r\n }\r\n else if (err instanceof Error && typeof err.message === 'string') {\r\n return err.message;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nfunction triggerCodeActionsForEditorSelection(editor, notAvailableMessage, filter, autoApply) {\r\n if (editor.hasModel()) {\r\n const controller = QuickFixController.get(editor);\r\n if (controller) {\r\n controller.manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply);\r\n }\r\n }\r\n}\r\nclass QuickFixAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: QuickFixAction.Id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('quickfix.trigger.label', \"Quick Fix...\"),\r\n alias: 'Quick Fix...',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.hasCodeActionsProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 84 /* US_DOT */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.quickFix.noneMessage', \"No code actions available\"), undefined, undefined);\r\n }\r\n}\r\nQuickFixAction.Id = 'editor.action.quickFix';\r\nclass CodeActionCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorCommand {\r\n constructor() {\r\n super({\r\n id: _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.codeActionCommandId,\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.hasCodeActionsProvider),\r\n description: {\r\n description: 'Trigger a code action',\r\n args: [{ name: 'args', schema: argsSchema, }]\r\n }\r\n });\r\n }\r\n runEditorCommand(_accessor, editor, userArgs) {\r\n const args = _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Empty,\r\n apply: \"ifSingle\" /* IfSingle */,\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.codeAction.noneMessage.preferred.kind', \"No preferred code actions for '{0}' available\", userArgs.kind)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.codeAction.noneMessage.kind', \"No code actions for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.codeAction.noneMessage.preferred', \"No preferred code actions available\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.codeAction.noneMessage', \"No code actions available\"), {\r\n include: args.kind,\r\n includeSourceActions: true,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nclass RefactorAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.refactorCommandId,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('refactor.label', \"Refactor...\"),\r\n alias: 'Refactor...',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.hasCodeActionsProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 48 /* KEY_R */,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 48 /* KEY_R */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 2,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Refactor)),\r\n },\r\n description: {\r\n description: 'Refactor...',\r\n args: [{ name: 'args', schema: argsSchema }]\r\n }\r\n });\r\n }\r\n run(_accessor, editor, userArgs) {\r\n const args = _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Refactor,\r\n apply: \"never\" /* Never */\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.refactor.noneMessage.preferred.kind', \"No preferred refactorings for '{0}' available\", userArgs.kind)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.refactor.noneMessage.kind', \"No refactorings for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.refactor.noneMessage.preferred', \"No preferred refactorings available\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.refactor.noneMessage', \"No refactorings available\"), {\r\n include: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Refactor.contains(args.kind) ? args.kind : _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.None,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nclass SourceAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.sourceActionCommandId,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('source.label', \"Source Action...\"),\r\n alias: 'Source Action...',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.hasCodeActionsProvider),\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 2.1,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Source)),\r\n },\r\n description: {\r\n description: 'Source Action...',\r\n args: [{ name: 'args', schema: argsSchema }]\r\n }\r\n });\r\n }\r\n run(_accessor, editor, userArgs) {\r\n const args = _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Source,\r\n apply: \"never\" /* Never */\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.source.noneMessage.preferred.kind', \"No preferred source actions for '{0}' available\", userArgs.kind)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.source.noneMessage.kind', \"No source actions for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.source.noneMessage.preferred', \"No preferred source actions available\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.source.noneMessage', \"No source actions available\"), {\r\n include: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.Source.contains(args.kind) ? args.kind : _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.None,\r\n includeSourceActions: true,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nclass OrganizeImportsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.organizeImportsCommandId,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('organizeImports.label', \"Organize Imports\"),\r\n alias: 'Organize Imports',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.SourceOrganizeImports)),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 45 /* KEY_O */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.organize.noneMessage', \"No organize imports action available\"), { include: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.SourceOrganizeImports, includeSourceActions: true }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nclass FixAllAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.fixAllCommandId,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('fixAll.label', \"Fix All\"),\r\n alias: 'Fix All',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.SourceFixAll))\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('fixAll.noneMessage', \"No fix all action available\"), { include: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.SourceFixAll, includeSourceActions: true }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nclass AutoFixAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: AutoFixAction.Id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('autoFix.label', \"Auto Fix...\"),\r\n alias: 'Auto Fix...',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.QuickFix)),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 84 /* US_DOT */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 84 /* US_DOT */\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('editor.action.autoFix.noneMessage', \"No auto fixes available\"), {\r\n include: _types_js__WEBPACK_IMPORTED_MODULE_19__.CodeActionKind.QuickFix,\r\n onlyIncludePreferredActions: true\r\n }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nAutoFixAction.Id = 'editor.action.autoFix';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codeActionCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorContribution)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.QuickFixController.ID, _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.QuickFixController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.QuickFixAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.RefactorAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.SourceAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.OrganizeImportsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.AutoFixAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.FixAllAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__.CodeActionCommand());\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeActionMenu\": () => (/* binding */ CodeActionMenu),\n/* harmony export */ \"CodeActionKeybindingResolver\": () => (/* binding */ CodeActionKeybindingResolver)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lazy.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lazy.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codeAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js\");\n/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./types.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CodeActionAction extends _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__.Action {\r\n constructor(action, callback) {\r\n super(action.command ? action.command.id : action.title, stripNewlines(action.title), undefined, !action.disabled, callback);\r\n this.action = action;\r\n }\r\n}\r\nfunction stripNewlines(str) {\r\n return str.replace(/\\r\\n|\\r|\\n/g, ' ');\r\n}\r\nlet CodeActionMenu = class CodeActionMenu extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(_editor, _delegate, _contextMenuService, keybindingService) {\r\n super();\r\n this._editor = _editor;\r\n this._delegate = _delegate;\r\n this._contextMenuService = _contextMenuService;\r\n this._visible = false;\r\n this._showingActions = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.MutableDisposable());\r\n this._keybindingResolver = new CodeActionKeybindingResolver({\r\n getKeybindings: () => keybindingService.getKeybindings()\r\n });\r\n }\r\n get isVisible() {\r\n return this._visible;\r\n }\r\n show(trigger, codeActions, at, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const actionsToShow = options.includeDisabledActions ? codeActions.allActions : codeActions.validActions;\r\n if (!actionsToShow.length) {\r\n this._visible = false;\r\n return;\r\n }\r\n if (!this._editor.getDomNode()) {\r\n // cancel when editor went off-dom\r\n this._visible = false;\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.canceled)();\r\n }\r\n this._visible = true;\r\n this._showingActions.value = codeActions;\r\n const menuActions = this.getMenuActions(trigger, actionsToShow, codeActions.documentation);\r\n const anchor = _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__.Position.isIPosition(at) ? this._toCoords(at) : at || { x: 0, y: 0 };\r\n const resolver = this._keybindingResolver.getResolver();\r\n this._contextMenuService.showContextMenu({\r\n domForShadowRoot: this._editor.getDomNode(),\r\n getAnchor: () => anchor,\r\n getActions: () => menuActions,\r\n onHide: () => {\r\n this._visible = false;\r\n this._editor.focus();\r\n },\r\n autoSelectFirstItem: true,\r\n getKeyBinding: action => action instanceof CodeActionAction ? resolver(action.action) : undefined,\r\n });\r\n });\r\n }\r\n getMenuActions(trigger, actionsToShow, documentation) {\r\n var _a, _b;\r\n const toCodeActionAction = (item) => new CodeActionAction(item.action, () => this._delegate.onSelectCodeAction(item));\r\n const result = actionsToShow\r\n .map(toCodeActionAction);\r\n const allDocumentation = [...documentation];\r\n const model = this._editor.getModel();\r\n if (model && result.length) {\r\n for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_6__.CodeActionProviderRegistry.all(model)) {\r\n if (provider._getAdditionalMenuItems) {\r\n allDocumentation.push(...provider._getAdditionalMenuItems({ trigger: trigger.type, only: (_b = (_a = trigger.filter) === null || _a === void 0 ? void 0 : _a.include) === null || _b === void 0 ? void 0 : _b.value }, actionsToShow.map(item => item.action)));\r\n }\r\n }\r\n }\r\n if (allDocumentation.length) {\r\n result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__.Separator(), ...allDocumentation.map(command => toCodeActionAction(new _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.CodeActionItem({\r\n title: command.title,\r\n command: command,\r\n }, undefined))));\r\n }\r\n return result;\r\n }\r\n _toCoords(position) {\r\n if (!this._editor.hasModel()) {\r\n return { x: 0, y: 0 };\r\n }\r\n this._editor.revealPosition(position, 1 /* Immediate */);\r\n this._editor.render();\r\n // Translate to absolute editor position\r\n const cursorCoords = this._editor.getScrolledVisiblePosition(position);\r\n const editorCoords = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.getDomNodePagePosition)(this._editor.getDomNode());\r\n const x = editorCoords.left + cursorCoords.left;\r\n const y = editorCoords.top + cursorCoords.top + cursorCoords.height;\r\n return { x, y };\r\n }\r\n};\r\nCodeActionMenu = __decorate([\r\n __param(2, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__.IContextMenuService),\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService)\r\n], CodeActionMenu);\r\n\r\nclass CodeActionKeybindingResolver {\r\n constructor(_keybindingProvider) {\r\n this._keybindingProvider = _keybindingProvider;\r\n }\r\n getResolver() {\r\n // Lazy since we may not actually ever read the value\r\n const allCodeActionBindings = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_3__.Lazy(() => this._keybindingProvider.getKeybindings()\r\n .filter(item => CodeActionKeybindingResolver.codeActionCommands.indexOf(item.command) >= 0)\r\n .filter(item => item.resolvedKeybinding)\r\n .map((item) => {\r\n // Special case these commands since they come built-in with VS Code and don't use 'commandArgs'\r\n let commandArgs = item.commandArgs;\r\n if (item.command === _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.organizeImportsCommandId) {\r\n commandArgs = { kind: _types_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionKind.SourceOrganizeImports.value };\r\n }\r\n else if (item.command === _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.fixAllCommandId) {\r\n commandArgs = { kind: _types_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionKind.SourceFixAll.value };\r\n }\r\n return Object.assign({ resolvedKeybinding: item.resolvedKeybinding }, _types_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionCommandArgs.fromUser(commandArgs, {\r\n kind: _types_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionKind.None,\r\n apply: \"never\" /* Never */\r\n }));\r\n }));\r\n return (action) => {\r\n if (action.kind) {\r\n const binding = this.bestKeybindingForCodeAction(action, allCodeActionBindings.getValue());\r\n return binding === null || binding === void 0 ? void 0 : binding.resolvedKeybinding;\r\n }\r\n return undefined;\r\n };\r\n }\r\n bestKeybindingForCodeAction(action, candidates) {\r\n if (!action.kind) {\r\n return undefined;\r\n }\r\n const kind = new _types_js__WEBPACK_IMPORTED_MODULE_8__.CodeActionKind(action.kind);\r\n return candidates\r\n .filter(candidate => candidate.kind.contains(kind))\r\n .filter(candidate => {\r\n if (candidate.preferred) {\r\n // If the candidate keybinding only applies to preferred actions, the this action must also be preferred\r\n return action.isPreferred;\r\n }\r\n return true;\r\n })\r\n .reduceRight((currentBest, candidate) => {\r\n if (!currentBest) {\r\n return candidate;\r\n }\r\n // Select the more specific binding\r\n return currentBest.kind.contains(candidate.kind) ? candidate : currentBest;\r\n }, undefined);\r\n }\r\n}\r\nCodeActionKeybindingResolver.codeActionCommands = [\r\n _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.refactorCommandId,\r\n _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.codeActionCommandId,\r\n _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.sourceActionCommandId,\r\n _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.organizeImportsCommandId,\r\n _codeAction_js__WEBPACK_IMPORTED_MODULE_7__.fixAllCommandId\r\n];\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SUPPORTED_CODE_ACTIONS\": () => (/* binding */ SUPPORTED_CODE_ACTIONS),\n/* harmony export */ \"CodeActionsState\": () => (/* binding */ CodeActionsState),\n/* harmony export */ \"CodeActionModel\": () => (/* binding */ CodeActionModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./codeAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n};\r\nvar __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n};\r\nvar _isDisposed;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst SUPPORTED_CODE_ACTIONS = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.RawContextKey('supportedCodeAction', '');\r\nclass CodeActionOracle extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(_editor, _markerService, _signalChange, _delay = 250) {\r\n super();\r\n this._editor = _editor;\r\n this._markerService = _markerService;\r\n this._signalChange = _signalChange;\r\n this._delay = _delay;\r\n this._autoTriggerTimer = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer());\r\n this._register(this._markerService.onMarkerChanged(e => this._onMarkerChanges(e)));\r\n this._register(this._editor.onDidChangeCursorPosition(() => this._onCursorChange()));\r\n }\r\n trigger(trigger) {\r\n const selection = this._getRangeOfSelectionUnlessWhitespaceEnclosed(trigger);\r\n return this._createEventAndSignalChange(trigger, selection);\r\n }\r\n _onMarkerChanges(resources) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (resources.some(resource => (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_4__.isEqual)(resource, model.uri))) {\r\n this._autoTriggerTimer.cancelAndSet(() => {\r\n this.trigger({ type: 1 /* Auto */ });\r\n }, this._delay);\r\n }\r\n }\r\n _onCursorChange() {\r\n this._autoTriggerTimer.cancelAndSet(() => {\r\n this.trigger({ type: 1 /* Auto */ });\r\n }, this._delay);\r\n }\r\n _getRangeOfMarker(selection) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return undefined;\r\n }\r\n for (const marker of this._markerService.read({ resource: model.uri })) {\r\n const markerRange = model.validateRange(marker);\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.intersectRanges(markerRange, selection)) {\r\n return _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(markerRange);\r\n }\r\n }\r\n return undefined;\r\n }\r\n _getRangeOfSelectionUnlessWhitespaceEnclosed(trigger) {\r\n if (!this._editor.hasModel()) {\r\n return undefined;\r\n }\r\n const model = this._editor.getModel();\r\n const selection = this._editor.getSelection();\r\n if (selection.isEmpty() && trigger.type === 1 /* Auto */) {\r\n const { lineNumber, column } = selection.getPosition();\r\n const line = model.getLineContent(lineNumber);\r\n if (line.length === 0) {\r\n // empty line\r\n return undefined;\r\n }\r\n else if (column === 1) {\r\n // look only right\r\n if (/\\s/.test(line[0])) {\r\n return undefined;\r\n }\r\n }\r\n else if (column === model.getLineMaxColumn(lineNumber)) {\r\n // look only left\r\n if (/\\s/.test(line[line.length - 1])) {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n // look left and right\r\n if (/\\s/.test(line[column - 2]) && /\\s/.test(line[column - 1])) {\r\n return undefined;\r\n }\r\n }\r\n }\r\n return selection;\r\n }\r\n _createEventAndSignalChange(trigger, selection) {\r\n const model = this._editor.getModel();\r\n if (!selection || !model) {\r\n // cancel\r\n this._signalChange(undefined);\r\n return undefined;\r\n }\r\n const markerRange = this._getRangeOfMarker(selection);\r\n const position = markerRange ? markerRange.getStartPosition() : selection.getStartPosition();\r\n const e = {\r\n trigger,\r\n selection,\r\n position\r\n };\r\n this._signalChange(e);\r\n return e;\r\n }\r\n}\r\nvar CodeActionsState;\r\n(function (CodeActionsState) {\r\n CodeActionsState.Empty = { type: 0 /* Empty */ };\r\n class Triggered {\r\n constructor(trigger, rangeOrSelection, position, _cancellablePromise) {\r\n this.trigger = trigger;\r\n this.rangeOrSelection = rangeOrSelection;\r\n this.position = position;\r\n this._cancellablePromise = _cancellablePromise;\r\n this.type = 1 /* Triggered */;\r\n this.actions = _cancellablePromise.catch((e) => {\r\n if ((0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.isPromiseCanceledError)(e)) {\r\n return emptyCodeActionSet;\r\n }\r\n throw e;\r\n });\r\n }\r\n cancel() {\r\n this._cancellablePromise.cancel();\r\n }\r\n }\r\n CodeActionsState.Triggered = Triggered;\r\n})(CodeActionsState || (CodeActionsState = {}));\r\nconst emptyCodeActionSet = {\r\n allActions: [],\r\n validActions: [],\r\n dispose: () => { },\r\n documentation: [],\r\n hasAutoFix: false\r\n};\r\nclass CodeActionModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(_editor, _markerService, contextKeyService, _progressService) {\r\n super();\r\n this._editor = _editor;\r\n this._markerService = _markerService;\r\n this._progressService = _progressService;\r\n this._codeActionOracle = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.MutableDisposable());\r\n this._state = CodeActionsState.Empty;\r\n this._onDidChangeState = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onDidChangeState = this._onDidChangeState.event;\r\n _isDisposed.set(this, false);\r\n this._supportedCodeActions = SUPPORTED_CODE_ACTIONS.bindTo(contextKeyService);\r\n this._register(this._editor.onDidChangeModel(() => this._update()));\r\n this._register(this._editor.onDidChangeModelLanguage(() => this._update()));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_6__.CodeActionProviderRegistry.onDidChange(() => this._update()));\r\n this._update();\r\n }\r\n dispose() {\r\n if (__classPrivateFieldGet(this, _isDisposed)) {\r\n return;\r\n }\r\n __classPrivateFieldSet(this, _isDisposed, true);\r\n super.dispose();\r\n this.setState(CodeActionsState.Empty, true);\r\n }\r\n _update() {\r\n if (__classPrivateFieldGet(this, _isDisposed)) {\r\n return;\r\n }\r\n this._codeActionOracle.value = undefined;\r\n this.setState(CodeActionsState.Empty);\r\n const model = this._editor.getModel();\r\n if (model\r\n && _common_modes_js__WEBPACK_IMPORTED_MODULE_6__.CodeActionProviderRegistry.has(model)\r\n && !this._editor.getOption(75 /* readOnly */)) {\r\n const supportedActions = [];\r\n for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_6__.CodeActionProviderRegistry.all(model)) {\r\n if (Array.isArray(provider.providedCodeActionKinds)) {\r\n supportedActions.push(...provider.providedCodeActionKinds);\r\n }\r\n }\r\n this._supportedCodeActions.set(supportedActions.join(' '));\r\n this._codeActionOracle.value = new CodeActionOracle(this._editor, this._markerService, trigger => {\r\n var _a;\r\n if (!trigger) {\r\n this.setState(CodeActionsState.Empty);\r\n return;\r\n }\r\n const actions = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => (0,_codeAction_js__WEBPACK_IMPORTED_MODULE_9__.getCodeActions)(model, trigger.selection, trigger.trigger, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_8__.Progress.None, token));\r\n if (trigger.trigger.type === 2 /* Manual */) {\r\n (_a = this._progressService) === null || _a === void 0 ? void 0 : _a.showWhile(actions, 250);\r\n }\r\n this.setState(new CodeActionsState.Triggered(trigger.trigger, trigger.selection, trigger.position, actions));\r\n }, undefined);\r\n this._codeActionOracle.value.trigger({ type: 1 /* Auto */ });\r\n }\r\n else {\r\n this._supportedCodeActions.reset();\r\n }\r\n }\r\n trigger(trigger) {\r\n if (this._codeActionOracle.value) {\r\n this._codeActionOracle.value.trigger(trigger);\r\n }\r\n }\r\n setState(newState, skipNotify) {\r\n if (newState === this._state) {\r\n return;\r\n }\r\n // Cancel old request\r\n if (this._state.type === 1 /* Triggered */) {\r\n this._state.cancel();\r\n }\r\n this._state = newState;\r\n if (!skipNotify && !__classPrivateFieldGet(this, _isDisposed)) {\r\n this._onDidChangeState.fire(newState);\r\n }\r\n }\r\n}\r\n_isDisposed = new WeakMap();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeActionUi\": () => (/* binding */ CodeActionUi)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lazy.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lazy.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../message/messageController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _codeActionMenu_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./codeActionMenu.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js\");\n/* harmony import */ var _lightBulbWidget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lightBulbWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n};\r\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n};\r\nvar _disposed;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet CodeActionUi = class CodeActionUi extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(_editor, quickFixActionId, preferredFixActionId, delegate, instantiationService) {\r\n super();\r\n this._editor = _editor;\r\n this.delegate = delegate;\r\n this._activeCodeActions = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.MutableDisposable());\r\n _disposed.set(this, false);\r\n this._codeActionWidget = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__.Lazy(() => {\r\n return this._register(instantiationService.createInstance(_codeActionMenu_js__WEBPACK_IMPORTED_MODULE_5__.CodeActionMenu, this._editor, {\r\n onSelectCodeAction: (action) => __awaiter(this, void 0, void 0, function* () {\r\n this.delegate.applyCodeAction(action, /* retrigger */ true);\r\n })\r\n }));\r\n });\r\n this._lightBulbWidget = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__.Lazy(() => {\r\n const widget = this._register(instantiationService.createInstance(_lightBulbWidget_js__WEBPACK_IMPORTED_MODULE_6__.LightBulbWidget, this._editor, quickFixActionId, preferredFixActionId));\r\n this._register(widget.onClick(e => this.showCodeActionList(e.trigger, e.actions, e, { includeDisabledActions: false })));\r\n return widget;\r\n });\r\n }\r\n dispose() {\r\n __classPrivateFieldSet(this, _disposed, true);\r\n super.dispose();\r\n }\r\n update(newState) {\r\n var _a, _b, _c;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (newState.type !== 1 /* Triggered */) {\r\n (_a = this._lightBulbWidget.rawValue) === null || _a === void 0 ? void 0 : _a.hide();\r\n return;\r\n }\r\n let actions;\r\n try {\r\n actions = yield newState.actions;\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedError)(e);\r\n return;\r\n }\r\n if (__classPrivateFieldGet(this, _disposed)) {\r\n return;\r\n }\r\n this._lightBulbWidget.getValue().update(actions, newState.trigger, newState.position);\r\n if (newState.trigger.type === 2 /* Manual */) {\r\n if ((_b = newState.trigger.filter) === null || _b === void 0 ? void 0 : _b.include) { // Triggered for specific scope\r\n // Check to see if we want to auto apply.\r\n const validActionToApply = this.tryGetValidActionToApply(newState.trigger, actions);\r\n if (validActionToApply) {\r\n try {\r\n yield this.delegate.applyCodeAction(validActionToApply, false);\r\n }\r\n finally {\r\n actions.dispose();\r\n }\r\n return;\r\n }\r\n // Check to see if there is an action that we would have applied were it not invalid\r\n if (newState.trigger.context) {\r\n const invalidAction = this.getInvalidActionThatWouldHaveBeenApplied(newState.trigger, actions);\r\n if (invalidAction && invalidAction.action.disabled) {\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__.MessageController.get(this._editor).showMessage(invalidAction.action.disabled, newState.trigger.context.position);\r\n actions.dispose();\r\n return;\r\n }\r\n }\r\n }\r\n const includeDisabledActions = !!((_c = newState.trigger.filter) === null || _c === void 0 ? void 0 : _c.include);\r\n if (newState.trigger.context) {\r\n if (!actions.allActions.length || !includeDisabledActions && !actions.validActions.length) {\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__.MessageController.get(this._editor).showMessage(newState.trigger.context.notAvailableMessage, newState.trigger.context.position);\r\n this._activeCodeActions.value = actions;\r\n actions.dispose();\r\n return;\r\n }\r\n }\r\n this._activeCodeActions.value = actions;\r\n this._codeActionWidget.getValue().show(newState.trigger, actions, newState.position, { includeDisabledActions });\r\n }\r\n else {\r\n // auto magically triggered\r\n if (this._codeActionWidget.getValue().isVisible) {\r\n // TODO: Figure out if we should update the showing menu?\r\n actions.dispose();\r\n }\r\n else {\r\n this._activeCodeActions.value = actions;\r\n }\r\n }\r\n });\r\n }\r\n getInvalidActionThatWouldHaveBeenApplied(trigger, actions) {\r\n if (!actions.allActions.length) {\r\n return undefined;\r\n }\r\n if ((trigger.autoApply === \"first\" /* First */ && actions.validActions.length === 0)\r\n || (trigger.autoApply === \"ifSingle\" /* IfSingle */ && actions.allActions.length === 1)) {\r\n return actions.allActions.find(({ action }) => action.disabled);\r\n }\r\n return undefined;\r\n }\r\n tryGetValidActionToApply(trigger, actions) {\r\n if (!actions.validActions.length) {\r\n return undefined;\r\n }\r\n if ((trigger.autoApply === \"first\" /* First */ && actions.validActions.length > 0)\r\n || (trigger.autoApply === \"ifSingle\" /* IfSingle */ && actions.validActions.length === 1)) {\r\n return actions.validActions[0];\r\n }\r\n return undefined;\r\n }\r\n showCodeActionList(trigger, actions, at, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this._codeActionWidget.getValue().show(trigger, actions, at, options);\r\n });\r\n }\r\n};\r\n_disposed = new WeakMap();\r\nCodeActionUi = __decorate([\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__.IInstantiationService)\r\n], CodeActionUi);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LightBulbWidget\": () => (/* binding */ LightBulbWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lightBulbWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/touch.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/touch.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar LightBulbState;\r\n(function (LightBulbState) {\r\n LightBulbState.Hidden = { type: 0 /* Hidden */ };\r\n class Showing {\r\n constructor(actions, trigger, editorPosition, widgetPosition) {\r\n this.actions = actions;\r\n this.trigger = trigger;\r\n this.editorPosition = editorPosition;\r\n this.widgetPosition = widgetPosition;\r\n this.type = 1 /* Showing */;\r\n }\r\n }\r\n LightBulbState.Showing = Showing;\r\n})(LightBulbState || (LightBulbState = {}));\r\nlet LightBulbWidget = class LightBulbWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(_editor, _quickFixActionId, _preferredFixActionId, _keybindingService) {\r\n super();\r\n this._editor = _editor;\r\n this._quickFixActionId = _quickFixActionId;\r\n this._preferredFixActionId = _preferredFixActionId;\r\n this._keybindingService = _keybindingService;\r\n this._onClick = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onClick = this._onClick.event;\r\n this._state = LightBulbState.Hidden;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightBulb.classNames;\r\n this._editor.addContentWidget(this);\r\n this._register(this._editor.onDidChangeModelContent(_ => {\r\n // cancel when the line in question has been removed\r\n const editorModel = this._editor.getModel();\r\n if (this.state.type !== 1 /* Showing */ || !editorModel || this.state.editorPosition.lineNumber >= editorModel.getLineCount()) {\r\n this.hide();\r\n }\r\n }));\r\n _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_10__.Gesture.ignoreTarget(this._domNode);\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addStandardDisposableGenericMouseDownListner(this._domNode, e => {\r\n if (this.state.type !== 1 /* Showing */) {\r\n return;\r\n }\r\n // Make sure that focus / cursor location is not lost when clicking widget icon\r\n this._editor.focus();\r\n e.preventDefault();\r\n // a bit of extra work to make sure the menu\r\n // doesn't cover the line-text\r\n const { top, height } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.getDomNodePagePosition(this._domNode);\r\n const lineHeight = this._editor.getOption(53 /* lineHeight */);\r\n let pad = Math.floor(lineHeight / 3);\r\n if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) {\r\n pad += lineHeight;\r\n }\r\n this._onClick.fire({\r\n x: e.posx,\r\n y: top + height + pad,\r\n actions: this.state.actions,\r\n trigger: this.state.trigger,\r\n });\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this._domNode, 'mouseenter', (e) => {\r\n if ((e.buttons & 1) !== 1) {\r\n return;\r\n }\r\n // mouse enters lightbulb while the primary/left button\r\n // is being pressed -> hide the lightbulb and block future\r\n // showings until mouse is released\r\n this.hide();\r\n const monitor = new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__.GlobalMouseMoveMonitor();\r\n monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__.standardMouseMoveMerger, () => { }, () => {\r\n monitor.dispose();\r\n });\r\n }));\r\n this._register(this._editor.onDidChangeConfiguration(e => {\r\n // hide when told to do so\r\n if (e.hasChanged(51 /* lightbulb */) && !this._editor.getOption(51 /* lightbulb */).enabled) {\r\n this.hide();\r\n }\r\n }));\r\n this._updateLightBulbTitleAndIcon();\r\n this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon, this));\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return 'LightBulbWidget';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return this._state.type === 1 /* Showing */ ? this._state.widgetPosition : null;\r\n }\r\n update(actions, trigger, atPosition) {\r\n if (actions.validActions.length <= 0) {\r\n return this.hide();\r\n }\r\n const options = this._editor.getOptions();\r\n if (!options.get(51 /* lightbulb */).enabled) {\r\n return this.hide();\r\n }\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return this.hide();\r\n }\r\n const { lineNumber, column } = model.validatePosition(atPosition);\r\n const tabSize = model.getOptions().tabSize;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const lineContent = model.getLineContent(lineNumber);\r\n const indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_5__.TextModel.computeIndentLevel(lineContent, tabSize);\r\n const lineHasSpace = fontInfo.spaceWidth * indent > 22;\r\n const isFolded = (lineNumber) => {\r\n return lineNumber > 2 && this._editor.getTopForLineNumber(lineNumber) === this._editor.getTopForLineNumber(lineNumber - 1);\r\n };\r\n let effectiveLineNumber = lineNumber;\r\n if (!lineHasSpace) {\r\n if (lineNumber > 1 && !isFolded(lineNumber - 1)) {\r\n effectiveLineNumber -= 1;\r\n }\r\n else if (!isFolded(lineNumber + 1)) {\r\n effectiveLineNumber += 1;\r\n }\r\n else if (column * fontInfo.spaceWidth < 22) {\r\n // cannot show lightbulb above/below and showing\r\n // it inline would overlay the cursor...\r\n return this.hide();\r\n }\r\n }\r\n this.state = new LightBulbState.Showing(actions, trigger, atPosition, {\r\n position: { lineNumber: effectiveLineNumber, column: 1 },\r\n preference: LightBulbWidget._posPref\r\n });\r\n this._editor.layoutContentWidget(this);\r\n }\r\n hide() {\r\n this.state = LightBulbState.Hidden;\r\n this._editor.layoutContentWidget(this);\r\n }\r\n get state() { return this._state; }\r\n set state(value) {\r\n this._state = value;\r\n this._updateLightBulbTitleAndIcon();\r\n }\r\n _updateLightBulbTitleAndIcon() {\r\n if (this.state.type === 1 /* Showing */ && this.state.actions.hasAutoFix) {\r\n // update icon\r\n this._domNode.classList.remove(..._base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightBulb.classNamesArray);\r\n this._domNode.classList.add(..._base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightbulbAutofix.classNamesArray);\r\n const preferredKb = this._keybindingService.lookupKeybinding(this._preferredFixActionId);\r\n if (preferredKb) {\r\n this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__.localize('prefferedQuickFixWithKb', \"Show Fixes. Preferred Fix Available ({0})\", preferredKb.getLabel());\r\n return;\r\n }\r\n }\r\n // update icon\r\n this._domNode.classList.remove(..._base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightbulbAutofix.classNamesArray);\r\n this._domNode.classList.add(..._base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightBulb.classNamesArray);\r\n const kb = this._keybindingService.lookupKeybinding(this._quickFixActionId);\r\n if (kb) {\r\n this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__.localize('quickFixWithKb', \"Show Fixes ({0})\", kb.getLabel());\r\n }\r\n else {\r\n this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__.localize('quickFix', \"Show Fixes\");\r\n }\r\n }\r\n set title(value) {\r\n this._domNode.title = value;\r\n }\r\n};\r\nLightBulbWidget._posPref = [0 /* EXACT */];\r\nLightBulbWidget = __decorate([\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__.IKeybindingService)\r\n], LightBulbWidget);\r\n\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__.registerThemingParticipant)((theme, collector) => {\r\n var _a;\r\n const editorBackgroundColor = (_a = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorBackground)) === null || _a === void 0 ? void 0 : _a.transparent(0.7);\r\n // Lightbulb Icon\r\n const editorLightBulbForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorLightBulbForeground);\r\n if (editorLightBulbForegroundColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .contentWidgets ${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightBulb.cssSelector} {\n\t\t\tcolor: ${editorLightBulbForegroundColor};\n\t\t\tbackground-color: ${editorBackgroundColor};\n\t\t}`);\r\n }\r\n // Lightbulb Auto Fix Icon\r\n const editorLightBulbAutoFixForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorLightBulbAutoFixForeground);\r\n if (editorLightBulbAutoFixForegroundColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .contentWidgets ${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__.Codicon.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${editorLightBulbAutoFixForegroundColor};\n\t\t\tbackground-color: ${editorBackgroundColor};\n\t\t}`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeActionKind\": () => (/* binding */ CodeActionKind),\n/* harmony export */ \"mayIncludeActionsOfKind\": () => (/* binding */ mayIncludeActionsOfKind),\n/* harmony export */ \"filtersAction\": () => (/* binding */ filtersAction),\n/* harmony export */ \"CodeActionCommandArgs\": () => (/* binding */ CodeActionCommandArgs)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass CodeActionKind {\r\n constructor(value) {\r\n this.value = value;\r\n }\r\n equals(other) {\r\n return this.value === other.value;\r\n }\r\n contains(other) {\r\n return this.equals(other) || this.value === '' || other.value.startsWith(this.value + CodeActionKind.sep);\r\n }\r\n intersects(other) {\r\n return this.contains(other) || other.contains(this);\r\n }\r\n append(part) {\r\n return new CodeActionKind(this.value + CodeActionKind.sep + part);\r\n }\r\n}\r\nCodeActionKind.sep = '.';\r\nCodeActionKind.None = new CodeActionKind('@@none@@'); // Special code action that contains nothing\r\nCodeActionKind.Empty = new CodeActionKind('');\r\nCodeActionKind.QuickFix = new CodeActionKind('quickfix');\r\nCodeActionKind.Refactor = new CodeActionKind('refactor');\r\nCodeActionKind.Source = new CodeActionKind('source');\r\nCodeActionKind.SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');\r\nCodeActionKind.SourceFixAll = CodeActionKind.Source.append('fixAll');\r\nfunction mayIncludeActionsOfKind(filter, providedKind) {\r\n // A provided kind may be a subset or superset of our filtered kind.\r\n if (filter.include && !filter.include.intersects(providedKind)) {\r\n return false;\r\n }\r\n if (filter.excludes) {\r\n if (filter.excludes.some(exclude => excludesAction(providedKind, exclude, filter.include))) {\r\n return false;\r\n }\r\n }\r\n // Don't return source actions unless they are explicitly requested\r\n if (!filter.includeSourceActions && CodeActionKind.Source.contains(providedKind)) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction filtersAction(filter, action) {\r\n const actionKind = action.kind ? new CodeActionKind(action.kind) : undefined;\r\n // Filter out actions by kind\r\n if (filter.include) {\r\n if (!actionKind || !filter.include.contains(actionKind)) {\r\n return false;\r\n }\r\n }\r\n if (filter.excludes) {\r\n if (actionKind && filter.excludes.some(exclude => excludesAction(actionKind, exclude, filter.include))) {\r\n return false;\r\n }\r\n }\r\n // Don't return source actions unless they are explicitly requested\r\n if (!filter.includeSourceActions) {\r\n if (actionKind && CodeActionKind.Source.contains(actionKind)) {\r\n return false;\r\n }\r\n }\r\n if (filter.onlyIncludePreferredActions) {\r\n if (!action.isPreferred) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction excludesAction(providedKind, exclude, include) {\r\n if (!exclude.contains(providedKind)) {\r\n return false;\r\n }\r\n if (include && exclude.contains(include)) {\r\n // The include is more specific, don't filter out\r\n return false;\r\n }\r\n return true;\r\n}\r\nclass CodeActionCommandArgs {\r\n constructor(kind, apply, preferred) {\r\n this.kind = kind;\r\n this.apply = apply;\r\n this.preferred = preferred;\r\n }\r\n static fromUser(arg, defaults) {\r\n if (!arg || typeof arg !== 'object') {\r\n return new CodeActionCommandArgs(defaults.kind, defaults.apply, false);\r\n }\r\n return new CodeActionCommandArgs(CodeActionCommandArgs.getKindFromUser(arg, defaults.kind), CodeActionCommandArgs.getApplyFromUser(arg, defaults.apply), CodeActionCommandArgs.getPreferredUser(arg));\r\n }\r\n static getApplyFromUser(arg, defaultAutoApply) {\r\n switch (typeof arg.apply === 'string' ? arg.apply.toLowerCase() : '') {\r\n case 'first': return \"first\" /* First */;\r\n case 'never': return \"never\" /* Never */;\r\n case 'ifsingle': return \"ifSingle\" /* IfSingle */;\r\n default: return defaultAutoApply;\r\n }\r\n }\r\n static getKindFromUser(arg, defaultKind) {\r\n return typeof arg.kind === 'string'\r\n ? new CodeActionKind(arg.kind)\r\n : defaultKind;\r\n }\r\n static getPreferredUser(arg) {\r\n return typeof arg.preferred === 'boolean'\r\n ? arg.preferred\r\n : false;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ICodeLensCache\": () => (/* binding */ ICodeLensCache),\n/* harmony export */ \"CodeLensCache\": () => (/* binding */ CodeLensCache)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _codelens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codelens.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ICodeLensCache = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('ICodeLensCache');\r\nclass CacheItem {\r\n constructor(lineCount, data) {\r\n this.lineCount = lineCount;\r\n this.data = data;\r\n }\r\n}\r\nlet CodeLensCache = class CodeLensCache {\r\n constructor(storageService) {\r\n this._fakeProvider = new class {\r\n provideCodeLenses() {\r\n throw new Error('not supported');\r\n }\r\n };\r\n this._cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__.LRUCache(20, 0.75);\r\n // remove old data\r\n const oldkey = 'codelens/cache';\r\n (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_6__.runWhenIdle)(() => storageService.remove(oldkey, 1 /* WORKSPACE */));\r\n // restore lens data on start\r\n const key = 'codelens/cache2';\r\n const raw = storageService.get(key, 1 /* WORKSPACE */, '{}');\r\n this._deserialize(raw);\r\n // store lens data on shutdown\r\n (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_7__.once)(storageService.onWillSaveState)(e => {\r\n if (e.reason === _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.WillSaveStateReason.SHUTDOWN) {\r\n storageService.store(key, this._serialize(), 1 /* WORKSPACE */, 1 /* MACHINE */);\r\n }\r\n });\r\n }\r\n put(model, data) {\r\n // create a copy of the model that is without command-ids\r\n // but with comand-labels\r\n const copyItems = data.lenses.map(item => {\r\n var _a;\r\n return {\r\n range: item.symbol.range,\r\n command: item.symbol.command && { id: '', title: (_a = item.symbol.command) === null || _a === void 0 ? void 0 : _a.title },\r\n };\r\n });\r\n const copyModel = new _codelens_js__WEBPACK_IMPORTED_MODULE_2__.CodeLensModel();\r\n copyModel.add({ lenses: copyItems, dispose: () => { } }, this._fakeProvider);\r\n const item = new CacheItem(model.getLineCount(), copyModel);\r\n this._cache.set(model.uri.toString(), item);\r\n }\r\n get(model) {\r\n const item = this._cache.get(model.uri.toString());\r\n return item && item.lineCount === model.getLineCount() ? item.data : undefined;\r\n }\r\n delete(model) {\r\n this._cache.delete(model.uri.toString());\r\n }\r\n // --- persistence\r\n _serialize() {\r\n const data = Object.create(null);\r\n for (const [key, value] of this._cache) {\r\n const lines = new Set();\r\n for (const d of value.data.lenses) {\r\n lines.add(d.symbol.range.startLineNumber);\r\n }\r\n data[key] = {\r\n lineCount: value.lineCount,\r\n lines: [...lines.values()]\r\n };\r\n }\r\n return JSON.stringify(data);\r\n }\r\n _deserialize(raw) {\r\n try {\r\n const data = JSON.parse(raw);\r\n for (const key in data) {\r\n const element = data[key];\r\n const lenses = [];\r\n for (const line of element.lines) {\r\n lenses.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(line, 1, line, 11) });\r\n }\r\n const model = new _codelens_js__WEBPACK_IMPORTED_MODULE_2__.CodeLensModel();\r\n model.add({ lenses, dispose() { } }, this._fakeProvider);\r\n this._cache.set(key, new CacheItem(element.lineCount, model));\r\n }\r\n }\r\n catch (_a) {\r\n // ignore...\r\n }\r\n }\r\n};\r\nCodeLensCache = __decorate([\r\n __param(0, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.IStorageService)\r\n], CodeLensCache);\r\n\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_1__.registerSingleton)(ICodeLensCache, CodeLensCache);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeLensModel\": () => (/* binding */ CodeLensModel),\n/* harmony export */ \"getCodeLensModel\": () => (/* binding */ getCodeLensModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CodeLensModel {\r\n constructor() {\r\n this.lenses = [];\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.DisposableStore();\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n add(list, provider) {\r\n this._disposables.add(list);\r\n for (const symbol of list.lenses) {\r\n this.lenses.push({ symbol, provider });\r\n }\r\n }\r\n}\r\nfunction getCodeLensModel(model, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.CodeLensProviderRegistry.ordered(model);\r\n const providerRanks = new Map();\r\n const result = new CodeLensModel();\r\n const promises = provider.map((provider, i) => __awaiter(this, void 0, void 0, function* () {\r\n providerRanks.set(provider, i);\r\n try {\r\n const list = yield Promise.resolve(provider.provideCodeLenses(model, token));\r\n if (list) {\r\n result.add(list, provider);\r\n }\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedExternalError)(err);\r\n }\r\n }));\r\n yield Promise.all(promises);\r\n result.lenses = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.mergeSort)(result.lenses, (a, b) => {\r\n // sort by lineNumber, provider-rank, and column\r\n if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) {\r\n return -1;\r\n }\r\n else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) {\r\n return 1;\r\n }\r\n else if ((providerRanks.get(a.provider)) < (providerRanks.get(b.provider))) {\r\n return -1;\r\n }\r\n else if ((providerRanks.get(a.provider)) > (providerRanks.get(b.provider))) {\r\n return 1;\r\n }\r\n else if (a.symbol.range.startColumn < b.symbol.range.startColumn) {\r\n return -1;\r\n }\r\n else if (a.symbol.range.startColumn > b.symbol.range.startColumn) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n return result;\r\n });\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__.CommandsRegistry.registerCommand('_executeCodeLensProvider', function (accessor, ...args) {\r\n let [uri, itemResolveCount] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_8__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__.URI.isUri(uri));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_8__.assertType)(typeof itemResolveCount === 'number' || !itemResolveCount);\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__.IModelService).getModel(uri);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.illegalArgument)();\r\n }\r\n const result = [];\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.DisposableStore();\r\n return getCodeLensModel(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None).then(value => {\r\n disposables.add(value);\r\n let resolve = [];\r\n for (const item of value.lenses) {\r\n if (itemResolveCount === undefined || itemResolveCount === null || Boolean(item.symbol.command)) {\r\n result.push(item.symbol);\r\n }\r\n else if (itemResolveCount-- > 0 && item.provider.resolveCodeLens) {\r\n resolve.push(Promise.resolve(item.provider.resolveCodeLens(model, item.symbol, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None)).then(symbol => result.push(symbol || item.symbol)));\r\n }\r\n }\r\n return Promise.all(resolve);\r\n }).then(() => {\r\n return result;\r\n }).finally(() => {\r\n // make sure to return results, then (on next tick)\r\n // dispose the results\r\n setTimeout(() => disposables.dispose(), 100);\r\n });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeLensContribution\": () => (/* binding */ CodeLensContribution)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _codelens_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./codelens.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js\");\n/* harmony import */ var _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codelensWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _codeLensCache_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./codeLensCache.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/modes/languageFeatureRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet CodeLensContribution = class CodeLensContribution {\r\n constructor(_editor, _commandService, _notificationService, _codeLensCache) {\r\n this._editor = _editor;\r\n this._commandService = _commandService;\r\n this._notificationService = _notificationService;\r\n this._codeLensCache = _codeLensCache;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._localToDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._lenses = [];\r\n this._getCodeLensModelDelays = new _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_16__.LanguageFeatureRequestDelays(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CodeLensProviderRegistry, 250, 2500);\r\n this._oldCodeLensModels = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._resolveCodeLensesDelays = new _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_16__.LanguageFeatureRequestDelays(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CodeLensProviderRegistry, 250, 2500);\r\n this._resolveCodeLensesScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._resolveCodeLensesInViewport(), this._resolveCodeLensesDelays.min);\r\n this._disposables.add(this._editor.onDidChangeModel(() => this._onModelChange()));\r\n this._disposables.add(this._editor.onDidChangeModelLanguage(() => this._onModelChange()));\r\n this._disposables.add(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */) || e.hasChanged(13 /* codeLensFontSize */) || e.hasChanged(12 /* codeLensFontFamily */)) {\r\n this._updateLensStyle();\r\n }\r\n if (e.hasChanged(11 /* codeLens */)) {\r\n this._onModelChange();\r\n }\r\n }));\r\n this._disposables.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CodeLensProviderRegistry.onDidChange(this._onModelChange, this));\r\n this._onModelChange();\r\n this._styleClassName = '_' + (0,_base_common_hash_js__WEBPACK_IMPORTED_MODULE_12__.hash)(this._editor.getId()).toString(16);\r\n this._styleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__.createStyleSheet(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__.isInShadowDOM(this._editor.getContainerDomNode())\r\n ? this._editor.getContainerDomNode()\r\n : undefined);\r\n this._updateLensStyle();\r\n }\r\n dispose() {\r\n var _a;\r\n this._localDispose();\r\n this._disposables.dispose();\r\n this._oldCodeLensModels.dispose();\r\n (_a = this._currentCodeLensModel) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._styleElement.remove();\r\n }\r\n _getLayoutInfo() {\r\n let fontSize = this._editor.getOption(13 /* codeLensFontSize */);\r\n let codeLensHeight;\r\n if (!fontSize || fontSize < 5) {\r\n fontSize = (this._editor.getOption(40 /* fontSize */) * .9) | 0;\r\n codeLensHeight = this._editor.getOption(53 /* lineHeight */);\r\n }\r\n else {\r\n codeLensHeight = (fontSize * Math.max(1.3, this._editor.getOption(53 /* lineHeight */) / this._editor.getOption(40 /* fontSize */))) | 0;\r\n }\r\n return { codeLensHeight, fontSize };\r\n }\r\n _updateLensStyle() {\r\n const { codeLensHeight, fontSize } = this._getLayoutInfo();\r\n const fontFamily = this._editor.getOption(12 /* codeLensFontFamily */);\r\n const editorFontInfo = this._editor.getOption(38 /* fontInfo */);\r\n const fontFamilyVar = `--codelens-font-family${this._styleClassName}`;\r\n let newStyle = `\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontSize * 0.5)}px; font-feature-settings: ${editorFontInfo.fontFeatureSettings} }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; }\n\t\t`;\r\n if (fontFamily) {\r\n newStyle += `.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${fontFamilyVar})}`;\r\n }\r\n this._styleElement.textContent = newStyle;\r\n this._editor.getContainerDomNode().style.setProperty(fontFamilyVar, fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'inherit');\r\n //\r\n this._editor.changeViewZones(accessor => {\r\n for (let lens of this._lenses) {\r\n lens.updateHeight(codeLensHeight, accessor);\r\n }\r\n });\r\n }\r\n _localDispose() {\r\n var _a, _b, _c;\r\n (_a = this._getCodeLensModelPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._getCodeLensModelPromise = undefined;\r\n (_b = this._resolveCodeLensesPromise) === null || _b === void 0 ? void 0 : _b.cancel();\r\n this._resolveCodeLensesPromise = undefined;\r\n this._localToDispose.clear();\r\n this._oldCodeLensModels.clear();\r\n (_c = this._currentCodeLensModel) === null || _c === void 0 ? void 0 : _c.dispose();\r\n }\r\n _onModelChange() {\r\n this._localDispose();\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (!this._editor.getOption(11 /* codeLens */)) {\r\n return;\r\n }\r\n const cachedLenses = this._codeLensCache.get(model);\r\n if (cachedLenses) {\r\n this._renderCodeLensSymbols(cachedLenses);\r\n }\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CodeLensProviderRegistry.has(model)) {\r\n // no provider -> return but check with\r\n // cached lenses. they expire after 30 seconds\r\n if (cachedLenses) {\r\n this._localToDispose.add((0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.disposableTimeout)(() => {\r\n const cachedLensesNow = this._codeLensCache.get(model);\r\n if (cachedLenses === cachedLensesNow) {\r\n this._codeLensCache.delete(model);\r\n this._onModelChange();\r\n }\r\n }, 30 * 1000));\r\n }\r\n return;\r\n }\r\n for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CodeLensProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChange === 'function') {\r\n let registration = provider.onDidChange(() => scheduler.schedule());\r\n this._localToDispose.add(registration);\r\n }\r\n }\r\n const scheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => {\r\n var _a;\r\n const t1 = Date.now();\r\n (_a = this._getCodeLensModelPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._getCodeLensModelPromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => (0,_codelens_js__WEBPACK_IMPORTED_MODULE_6__.getCodeLensModel)(model, token));\r\n this._getCodeLensModelPromise.then(result => {\r\n if (this._currentCodeLensModel) {\r\n this._oldCodeLensModels.add(this._currentCodeLensModel);\r\n }\r\n this._currentCodeLensModel = result;\r\n // cache model to reduce flicker\r\n this._codeLensCache.put(model, result);\r\n // update moving average\r\n const newDelay = this._getCodeLensModelDelays.update(model, Date.now() - t1);\r\n scheduler.delay = newDelay;\r\n // render lenses\r\n this._renderCodeLensSymbols(result);\r\n this._resolveCodeLensesInViewport();\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError);\r\n }, this._getCodeLensModelDelays.get(model));\r\n this._localToDispose.add(scheduler);\r\n this._localToDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => this._resolveCodeLensesScheduler.cancel()));\r\n this._localToDispose.add(this._editor.onDidChangeModelContent(() => {\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZonesAccessor => {\r\n let toDispose = [];\r\n let lastLensLineNumber = -1;\r\n this._lenses.forEach((lens) => {\r\n if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) {\r\n // invalid -> lens collapsed, attach range doesn't exist anymore\r\n // line_number -> lenses should never be on the same line\r\n toDispose.push(lens);\r\n }\r\n else {\r\n lens.update(viewZonesAccessor);\r\n lastLensLineNumber = lens.getLineNumber();\r\n }\r\n });\r\n let helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__.CodeLensHelper();\r\n toDispose.forEach((l) => {\r\n l.dispose(helper, viewZonesAccessor);\r\n this._lenses.splice(this._lenses.indexOf(l), 1);\r\n });\r\n helper.commit(decorationsAccessor);\r\n });\r\n });\r\n // Ask for all references again\r\n scheduler.schedule();\r\n }));\r\n this._localToDispose.add(this._editor.onDidFocusEditorWidget(() => {\r\n scheduler.schedule();\r\n }));\r\n this._localToDispose.add(this._editor.onDidScrollChange(e => {\r\n if (e.scrollTopChanged && this._lenses.length > 0) {\r\n this._resolveCodeLensesInViewportSoon();\r\n }\r\n }));\r\n this._localToDispose.add(this._editor.onDidLayoutChange(() => {\r\n this._resolveCodeLensesInViewportSoon();\r\n }));\r\n this._localToDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => {\r\n if (this._editor.getModel()) {\r\n const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__.StableEditorScrollState.capture(this._editor);\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZonesAccessor => {\r\n this._disposeAllLenses(decorationsAccessor, viewZonesAccessor);\r\n });\r\n });\r\n scrollState.restore(this._editor);\r\n }\r\n else {\r\n // No accessors available\r\n this._disposeAllLenses(undefined, undefined);\r\n }\r\n }));\r\n this._localToDispose.add(this._editor.onMouseDown(e => {\r\n if (e.target.type !== 9 /* CONTENT_WIDGET */) {\r\n return;\r\n }\r\n let target = e.target.element;\r\n if ((target === null || target === void 0 ? void 0 : target.tagName) === 'SPAN') {\r\n target = target.parentElement;\r\n }\r\n if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {\r\n for (const lens of this._lenses) {\r\n let command = lens.getCommand(target);\r\n if (command) {\r\n this._commandService.executeCommand(command.id, ...(command.arguments || [])).catch(err => this._notificationService.error(err));\r\n break;\r\n }\r\n }\r\n }\r\n }));\r\n scheduler.schedule();\r\n }\r\n _disposeAllLenses(decChangeAccessor, viewZoneChangeAccessor) {\r\n const helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__.CodeLensHelper();\r\n for (const lens of this._lenses) {\r\n lens.dispose(helper, viewZoneChangeAccessor);\r\n }\r\n if (decChangeAccessor) {\r\n helper.commit(decChangeAccessor);\r\n }\r\n this._lenses.length = 0;\r\n }\r\n _renderCodeLensSymbols(symbols) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let maxLineNumber = this._editor.getModel().getLineCount();\r\n let groups = [];\r\n let lastGroup;\r\n for (let symbol of symbols.lenses) {\r\n let line = symbol.symbol.range.startLineNumber;\r\n if (line < 1 || line > maxLineNumber) {\r\n // invalid code lens\r\n continue;\r\n }\r\n else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) {\r\n // on same line as previous\r\n lastGroup.push(symbol);\r\n }\r\n else {\r\n // on later line as previous\r\n lastGroup = [symbol];\r\n groups.push(lastGroup);\r\n }\r\n }\r\n const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__.StableEditorScrollState.capture(this._editor);\r\n const layoutInfo = this._getLayoutInfo();\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZoneAccessor => {\r\n const helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__.CodeLensHelper();\r\n let codeLensIndex = 0;\r\n let groupsIndex = 0;\r\n while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) {\r\n let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber;\r\n let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber();\r\n if (codeLensLineNumber < symbolsLineNumber) {\r\n this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor);\r\n this._lenses.splice(codeLensIndex, 1);\r\n }\r\n else if (codeLensLineNumber === symbolsLineNumber) {\r\n this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper);\r\n groupsIndex++;\r\n codeLensIndex++;\r\n }\r\n else {\r\n this._lenses.splice(codeLensIndex, 0, new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__.CodeLensWidget(groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, layoutInfo.codeLensHeight, () => this._resolveCodeLensesInViewportSoon()));\r\n codeLensIndex++;\r\n groupsIndex++;\r\n }\r\n }\r\n // Delete extra code lenses\r\n while (codeLensIndex < this._lenses.length) {\r\n this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor);\r\n this._lenses.splice(codeLensIndex, 1);\r\n }\r\n // Create extra symbols\r\n while (groupsIndex < groups.length) {\r\n this._lenses.push(new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__.CodeLensWidget(groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, layoutInfo.codeLensHeight, () => this._resolveCodeLensesInViewportSoon()));\r\n groupsIndex++;\r\n }\r\n helper.commit(decorationsAccessor);\r\n });\r\n });\r\n scrollState.restore(this._editor);\r\n }\r\n _resolveCodeLensesInViewportSoon() {\r\n const model = this._editor.getModel();\r\n if (model) {\r\n this._resolveCodeLensesScheduler.schedule();\r\n }\r\n }\r\n _resolveCodeLensesInViewport() {\r\n var _a;\r\n (_a = this._resolveCodeLensesPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._resolveCodeLensesPromise = undefined;\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n const toResolve = [];\r\n const lenses = [];\r\n this._lenses.forEach((lens) => {\r\n const request = lens.computeIfNecessary(model);\r\n if (request) {\r\n toResolve.push(request);\r\n lenses.push(lens);\r\n }\r\n });\r\n if (toResolve.length === 0) {\r\n return;\r\n }\r\n const t1 = Date.now();\r\n const resolvePromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => {\r\n const promises = toResolve.map((request, i) => {\r\n const resolvedSymbols = new Array(request.length);\r\n const promises = request.map((request, i) => {\r\n if (!request.symbol.command && typeof request.provider.resolveCodeLens === 'function') {\r\n return Promise.resolve(request.provider.resolveCodeLens(model, request.symbol, token)).then(symbol => {\r\n resolvedSymbols[i] = symbol;\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError);\r\n }\r\n else {\r\n resolvedSymbols[i] = request.symbol;\r\n return Promise.resolve(undefined);\r\n }\r\n });\r\n return Promise.all(promises).then(() => {\r\n if (!token.isCancellationRequested && !lenses[i].isDisposed()) {\r\n lenses[i].updateCommands(resolvedSymbols);\r\n }\r\n });\r\n });\r\n return Promise.all(promises);\r\n });\r\n this._resolveCodeLensesPromise = resolvePromise;\r\n this._resolveCodeLensesPromise.then(() => {\r\n // update moving average\r\n const newDelay = this._resolveCodeLensesDelays.update(model, Date.now() - t1);\r\n this._resolveCodeLensesScheduler.delay = newDelay;\r\n if (this._currentCodeLensModel) { // update the cached state with new resolved items\r\n this._codeLensCache.put(model, this._currentCodeLensModel);\r\n }\r\n this._oldCodeLensModels.clear(); // dispose old models once we have updated the UI with the current model\r\n if (resolvePromise === this._resolveCodeLensesPromise) {\r\n this._resolveCodeLensesPromise = undefined;\r\n }\r\n }, err => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(err); // can also be cancellation!\r\n if (resolvePromise === this._resolveCodeLensesPromise) {\r\n this._resolveCodeLensesPromise = undefined;\r\n }\r\n });\r\n }\r\n getLenses() {\r\n return this._lenses;\r\n }\r\n};\r\nCodeLensContribution.ID = 'css.editor.codeLens';\r\nCodeLensContribution = __decorate([\r\n __param(1, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__.ICommandService),\r\n __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__.INotificationService),\r\n __param(3, _codeLensCache_js__WEBPACK_IMPORTED_MODULE_10__.ICodeLensCache)\r\n], CodeLensContribution);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(CodeLensContribution.ID, CodeLensContribution);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(class ShowLensesInCurrentLine extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'codelens.showLensesInCurrentLine',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_15__.EditorContextKeys.hasCodeLensProvider,\r\n label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_14__.localize)('showLensOnLine', \"Show CodeLens Commands For Current Line\"),\r\n alias: 'Show CodeLens Commands For Current Line',\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const quickInputService = accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__.IQuickInputService);\r\n const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__.ICommandService);\r\n const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__.INotificationService);\r\n const lineNumber = editor.getSelection().positionLineNumber;\r\n const codelensController = editor.getContribution(CodeLensContribution.ID);\r\n const items = [];\r\n for (let lens of codelensController.getLenses()) {\r\n if (lens.getLineNumber() === lineNumber) {\r\n for (let item of lens.getItems()) {\r\n const { command } = item.symbol;\r\n if (command) {\r\n items.push({\r\n label: command.title,\r\n command: command\r\n });\r\n }\r\n }\r\n }\r\n }\r\n if (items.length === 0) {\r\n // We dont want an empty picker\r\n return;\r\n }\r\n const item = yield quickInputService.pick(items, { canPickMany: false });\r\n if (!item) {\r\n // Nothing picked\r\n return;\r\n }\r\n try {\r\n yield commandService.executeCommand(item.command.id, ...(item.command.arguments || []));\r\n }\r\n catch (err) {\r\n notificationService.error(err);\r\n }\r\n });\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CodeLensHelper\": () => (/* binding */ CodeLensHelper),\n/* harmony export */ \"CodeLensWidget\": () => (/* binding */ CodeLensWidget)\n/* harmony export */ });\n/* harmony import */ var _codelensWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codelensWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_browser_ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/ui/iconLabel/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CodeLensViewZone {\r\n constructor(afterLineNumber, heightInPx, onHeight) {\r\n this.afterLineNumber = afterLineNumber;\r\n this.heightInPx = heightInPx;\r\n this._onHeight = onHeight;\r\n this.suppressMouseDown = true;\r\n this.domNode = document.createElement('div');\r\n }\r\n onComputedHeight(height) {\r\n if (this._lastHeight === undefined) {\r\n this._lastHeight = height;\r\n }\r\n else if (this._lastHeight !== height) {\r\n this._lastHeight = height;\r\n this._onHeight();\r\n }\r\n }\r\n}\r\nclass CodeLensContentWidget {\r\n constructor(editor, className, line) {\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = false;\r\n this.suppressMouseDown = true;\r\n this._commands = new Map();\r\n this._isEmpty = true;\r\n this._editor = editor;\r\n this._id = `codelens.widget-${(CodeLensContentWidget._idPool++)}`;\r\n this.updatePosition(line);\r\n this._domNode = document.createElement('span');\r\n this._domNode.className = `codelens-decoration ${className}`;\r\n }\r\n withCommands(lenses, animate) {\r\n this._commands.clear();\r\n let children = [];\r\n let hasSymbol = false;\r\n for (let i = 0; i < lenses.length; i++) {\r\n const lens = lenses[i];\r\n if (!lens) {\r\n continue;\r\n }\r\n hasSymbol = true;\r\n if (lens.command) {\r\n const title = (0,_base_browser_ui_iconLabel_iconLabels_js__WEBPACK_IMPORTED_MODULE_7__.renderLabelWithIcons)(lens.command.title.trim());\r\n if (lens.command.id) {\r\n children.push(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('a', { id: String(i) }, ...title));\r\n this._commands.set(String(i), lens.command);\r\n }\r\n else {\r\n children.push(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span', undefined, ...title));\r\n }\r\n if (i + 1 < lenses.length) {\r\n children.push(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span', undefined, '\\u00a0|\\u00a0'));\r\n }\r\n }\r\n }\r\n if (!hasSymbol) {\r\n // symbols but no commands\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.reset(this._domNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span', undefined, 'no commands'));\r\n }\r\n else {\r\n // symbols and commands\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.reset(this._domNode, ...children);\r\n if (this._isEmpty && animate) {\r\n this._domNode.classList.add('fadein');\r\n }\r\n this._isEmpty = false;\r\n }\r\n }\r\n getCommand(link) {\r\n return link.parentElement === this._domNode\r\n ? this._commands.get(link.id)\r\n : undefined;\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n updatePosition(line) {\r\n const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(line);\r\n this._widgetPosition = {\r\n position: { lineNumber: line, column: column },\r\n preference: [1 /* ABOVE */]\r\n };\r\n }\r\n getPosition() {\r\n return this._widgetPosition || null;\r\n }\r\n}\r\nCodeLensContentWidget._idPool = 0;\r\nclass CodeLensHelper {\r\n constructor() {\r\n this._removeDecorations = [];\r\n this._addDecorations = [];\r\n this._addDecorationsCallbacks = [];\r\n }\r\n addDecoration(decoration, callback) {\r\n this._addDecorations.push(decoration);\r\n this._addDecorationsCallbacks.push(callback);\r\n }\r\n removeDecoration(decorationId) {\r\n this._removeDecorations.push(decorationId);\r\n }\r\n commit(changeAccessor) {\r\n let resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations);\r\n for (let i = 0, len = resultingDecorations.length; i < len; i++) {\r\n this._addDecorationsCallbacks[i](resultingDecorations[i]);\r\n }\r\n }\r\n}\r\nclass CodeLensWidget {\r\n constructor(data, editor, className, helper, viewZoneChangeAccessor, heightInPx, updateCallback) {\r\n this._isDisposed = false;\r\n this._editor = editor;\r\n this._className = className;\r\n this._data = data;\r\n // create combined range, track all ranges with decorations,\r\n // check if there is already something to render\r\n this._decorationIds = [];\r\n let range;\r\n let lenses = [];\r\n this._data.forEach((codeLensData, i) => {\r\n if (codeLensData.symbol.command) {\r\n lenses.push(codeLensData.symbol);\r\n }\r\n helper.addDecoration({\r\n range: codeLensData.symbol.range,\r\n options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_3__.ModelDecorationOptions.EMPTY\r\n }, id => this._decorationIds[i] = id);\r\n // the range contains all lenses on this line\r\n if (!range) {\r\n range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.lift(codeLensData.symbol.range);\r\n }\r\n else {\r\n range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.plusRange(range, codeLensData.symbol.range);\r\n }\r\n });\r\n this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, heightInPx, updateCallback);\r\n this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone);\r\n if (lenses.length > 0) {\r\n this._createContentWidgetIfNecessary();\r\n this._contentWidget.withCommands(lenses, false);\r\n }\r\n }\r\n _createContentWidgetIfNecessary() {\r\n if (!this._contentWidget) {\r\n this._contentWidget = new CodeLensContentWidget(this._editor, this._className, this._viewZone.afterLineNumber + 1);\r\n this._editor.addContentWidget(this._contentWidget);\r\n }\r\n else {\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n dispose(helper, viewZoneChangeAccessor) {\r\n this._decorationIds.forEach(helper.removeDecoration, helper);\r\n this._decorationIds = [];\r\n if (viewZoneChangeAccessor) {\r\n viewZoneChangeAccessor.removeZone(this._viewZoneId);\r\n }\r\n if (this._contentWidget) {\r\n this._editor.removeContentWidget(this._contentWidget);\r\n this._contentWidget = undefined;\r\n }\r\n this._isDisposed = true;\r\n }\r\n isDisposed() {\r\n return this._isDisposed;\r\n }\r\n isValid() {\r\n return this._decorationIds.some((id, i) => {\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n const symbol = this._data[i].symbol;\r\n return !!(range && _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.isEmpty(symbol.range) === range.isEmpty());\r\n });\r\n }\r\n updateCodeLensSymbols(data, helper) {\r\n this._decorationIds.forEach(helper.removeDecoration, helper);\r\n this._decorationIds = [];\r\n this._data = data;\r\n this._data.forEach((codeLensData, i) => {\r\n helper.addDecoration({\r\n range: codeLensData.symbol.range,\r\n options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_3__.ModelDecorationOptions.EMPTY\r\n }, id => this._decorationIds[i] = id);\r\n });\r\n }\r\n updateHeight(height, viewZoneChangeAccessor) {\r\n this._viewZone.heightInPx = height;\r\n viewZoneChangeAccessor.layoutZone(this._viewZoneId);\r\n if (this._contentWidget) {\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n computeIfNecessary(model) {\r\n if (!this._viewZone.domNode.hasAttribute('monaco-visible-view-zone')) {\r\n return null;\r\n }\r\n // Read editor current state\r\n for (let i = 0; i < this._decorationIds.length; i++) {\r\n const range = model.getDecorationRange(this._decorationIds[i]);\r\n if (range) {\r\n this._data[i].symbol.range = range;\r\n }\r\n }\r\n return this._data;\r\n }\r\n updateCommands(symbols) {\r\n this._createContentWidgetIfNecessary();\r\n this._contentWidget.withCommands(symbols, true);\r\n for (let i = 0; i < this._data.length; i++) {\r\n const resolved = symbols[i];\r\n if (resolved) {\r\n const { symbol } = this._data[i];\r\n symbol.command = resolved.command || symbol.command;\r\n }\r\n }\r\n }\r\n getCommand(link) {\r\n var _a;\r\n return (_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.getCommand(link);\r\n }\r\n getLineNumber() {\r\n const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\r\n if (range) {\r\n return range.startLineNumber;\r\n }\r\n return -1;\r\n }\r\n update(viewZoneChangeAccessor) {\r\n if (this.isValid()) {\r\n const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\r\n if (range) {\r\n this._viewZone.afterLineNumber = range.startLineNumber - 1;\r\n viewZoneChangeAccessor.layoutZone(this._viewZoneId);\r\n if (this._contentWidget) {\r\n this._contentWidget.updatePosition(range.startLineNumber);\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n }\r\n }\r\n getItems() {\r\n return this._data;\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__.registerThemingParticipant)((theme, collector) => {\r\n const codeLensForeground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__.editorCodeLensForeground);\r\n if (codeLensForeground) {\r\n collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`);\r\n collector.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${codeLensForeground}; }`);\r\n }\r\n const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`);\r\n collector.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getColors\": () => (/* binding */ getColors),\n/* harmony export */ \"getColorPresentations\": () => (/* binding */ getColorPresentations)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction getColors(model, token) {\r\n const colors = [];\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, token)).then(result => {\r\n if (Array.isArray(result)) {\r\n for (let colorInfo of result) {\r\n colors.push({ colorInfo, provider });\r\n }\r\n }\r\n }));\r\n return Promise.all(promises).then(() => colors);\r\n}\r\nfunction getColorPresentations(model, colorInfo, provider, token) {\r\n return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token));\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__.CommandsRegistry.registerCommand('_executeDocumentColorProvider', function (accessor, ...args) {\r\n const [resource] = args;\r\n if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI)) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.illegalArgument)();\r\n }\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__.IModelService).getModel(resource);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.illegalArgument)();\r\n }\r\n const rawCIs = [];\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None)).then(result => {\r\n if (Array.isArray(result)) {\r\n for (let ci of result) {\r\n rawCIs.push({ range: ci.range, color: [ci.color.red, ci.color.green, ci.color.blue, ci.color.alpha] });\r\n }\r\n }\r\n }));\r\n return Promise.all(promises).then(() => rawCIs);\r\n});\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__.CommandsRegistry.registerCommand('_executeColorPresentationProvider', function (accessor, ...args) {\r\n const [color, context] = args;\r\n const { uri, range } = context;\r\n if (!(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI) || !Array.isArray(color) || color.length !== 4 || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.isIRange(range)) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.illegalArgument)();\r\n }\r\n const [red, green, blue, alpha] = color;\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__.IModelService).getModel(uri);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.illegalArgument)();\r\n }\r\n const colorInfo = {\r\n range,\r\n color: { red, green, blue, alpha }\r\n };\r\n const presentations = [];\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideColorPresentations(model, colorInfo, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None)).then(result => {\r\n if (Array.isArray(result)) {\r\n presentations.push(...result);\r\n }\r\n }));\r\n return Promise.all(promises).then(() => presentations);\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorContributions.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorContributions.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorContribution\": () => (/* binding */ ColorContribution)\n/* harmony export */ });\n/* harmony import */ var _colorDetector_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorDetector.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _hover_hover_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hover/hover.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// import color detector contribution\r\n\r\n\r\n\r\n\r\n\r\nclass ColorContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(_editor) {\r\n super();\r\n this._editor = _editor;\r\n this._register(_editor.onMouseDown((e) => this.onMouseDown(e)));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n onMouseDown(mouseEvent) {\r\n var _a;\r\n const targetType = mouseEvent.target.type;\r\n if (targetType !== 6 /* CONTENT_TEXT */) {\r\n return;\r\n }\r\n const hoverOnColorDecorator = [...((_a = mouseEvent.target.element) === null || _a === void 0 ? void 0 : _a.classList.values()) || []].find(className => className.startsWith('ced-colorBox'));\r\n if (!hoverOnColorDecorator) {\r\n return;\r\n }\r\n if (!mouseEvent.target.range) {\r\n return;\r\n }\r\n const hoverController = this._editor.getContribution(_hover_hover_js__WEBPACK_IMPORTED_MODULE_3__.ModesHoverController.ID);\r\n if (!hoverController.isColorPickerVisible()) {\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(mouseEvent.target.range.startLineNumber, mouseEvent.target.range.startColumn + 1, mouseEvent.target.range.endLineNumber, mouseEvent.target.range.endColumn + 1);\r\n hoverController.showContentHover(range, 0 /* Delayed */, false);\r\n }\r\n }\r\n}\r\nColorContribution.ID = 'editor.contrib.colorContribution'; // ms\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorContribution)(ColorContribution.ID, ColorContribution);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorContributions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorDetector\": () => (/* binding */ ColorDetector)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./color.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst MAX_DECORATORS = 500;\r\nlet ColorDetector = class ColorDetector extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(_editor, _codeEditorService, _configurationService) {\r\n super();\r\n this._editor = _editor;\r\n this._codeEditorService = _codeEditorService;\r\n this._configurationService = _configurationService;\r\n this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore());\r\n this._decorationsIds = [];\r\n this._colorDatas = new Map();\r\n this._colorDecoratorIds = [];\r\n this._decorationsTypes = new Set();\r\n this._register(_editor.onDidChangeModel(() => {\r\n this._isEnabled = this.isEnabled();\r\n this.onModelChanged();\r\n }));\r\n this._register(_editor.onDidChangeModelLanguage(() => this.onModelChanged()));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.ColorProviderRegistry.onDidChange(() => this.onModelChanged()));\r\n this._register(_editor.onDidChangeConfiguration(() => {\r\n let prevIsEnabled = this._isEnabled;\r\n this._isEnabled = this.isEnabled();\r\n if (prevIsEnabled !== this._isEnabled) {\r\n if (this._isEnabled) {\r\n this.onModelChanged();\r\n }\r\n else {\r\n this.removeAllDecorations();\r\n }\r\n }\r\n }));\r\n this._timeoutTimer = null;\r\n this._computePromise = null;\r\n this._isEnabled = this.isEnabled();\r\n this.onModelChanged();\r\n }\r\n isEnabled() {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return false;\r\n }\r\n const languageId = model.getLanguageIdentifier();\r\n // handle deprecated settings. [languageId].colorDecorators.enable\r\n const deprecatedConfig = this._configurationService.getValue(languageId.language);\r\n if (deprecatedConfig) {\r\n const colorDecorators = deprecatedConfig['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\r\n if (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\r\n return colorDecorators['enable'];\r\n }\r\n }\r\n return this._editor.getOption(14 /* colorDecorators */);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(this.ID);\r\n }\r\n dispose() {\r\n this.stop();\r\n this.removeAllDecorations();\r\n super.dispose();\r\n }\r\n onModelChanged() {\r\n this.stop();\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model || !_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.ColorProviderRegistry.has(model)) {\r\n return;\r\n }\r\n this._localToDispose.add(this._editor.onDidChangeModelContent(() => {\r\n if (!this._timeoutTimer) {\r\n this._timeoutTimer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer();\r\n this._timeoutTimer.cancelAndSet(() => {\r\n this._timeoutTimer = null;\r\n this.beginCompute();\r\n }, ColorDetector.RECOMPUTE_TIME);\r\n }\r\n }));\r\n this.beginCompute();\r\n }\r\n beginCompute() {\r\n this._computePromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return Promise.resolve([]);\r\n }\r\n return (0,_color_js__WEBPACK_IMPORTED_MODULE_10__.getColors)(model, token);\r\n });\r\n this._computePromise.then((colorInfos) => {\r\n this.updateDecorations(colorInfos);\r\n this.updateColorDecorators(colorInfos);\r\n this._computePromise = null;\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedError);\r\n }\r\n stop() {\r\n if (this._timeoutTimer) {\r\n this._timeoutTimer.cancel();\r\n this._timeoutTimer = null;\r\n }\r\n if (this._computePromise) {\r\n this._computePromise.cancel();\r\n this._computePromise = null;\r\n }\r\n this._localToDispose.clear();\r\n }\r\n updateDecorations(colorDatas) {\r\n const decorations = colorDatas.map(c => ({\r\n range: {\r\n startLineNumber: c.colorInfo.range.startLineNumber,\r\n startColumn: c.colorInfo.range.startColumn,\r\n endLineNumber: c.colorInfo.range.endLineNumber,\r\n endColumn: c.colorInfo.range.endColumn\r\n },\r\n options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__.ModelDecorationOptions.EMPTY\r\n }));\r\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, decorations);\r\n this._colorDatas = new Map();\r\n this._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\r\n }\r\n updateColorDecorators(colorData) {\r\n let decorations = [];\r\n let newDecorationsTypes = {};\r\n for (let i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) {\r\n const { red, green, blue, alpha } = colorData[i].colorInfo.color;\r\n const rgba = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\r\n let subKey = (0,_base_common_hash_js__WEBPACK_IMPORTED_MODULE_3__.hash)(`rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`).toString(16);\r\n let color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\r\n let key = 'colorBox-' + subKey;\r\n if (!this._decorationsTypes.has(key) && !newDecorationsTypes[key]) {\r\n this._codeEditorService.registerDecorationType(key, {\r\n before: {\r\n contentText: ' ',\r\n border: 'solid 0.1em #000',\r\n margin: '0.1em 0.2em 0 0.2em',\r\n width: '0.8em',\r\n height: '0.8em',\r\n backgroundColor: color\r\n },\r\n dark: {\r\n before: {\r\n border: 'solid 0.1em #eee'\r\n }\r\n }\r\n }, undefined, this._editor);\r\n }\r\n newDecorationsTypes[key] = true;\r\n decorations.push({\r\n range: {\r\n startLineNumber: colorData[i].colorInfo.range.startLineNumber,\r\n startColumn: colorData[i].colorInfo.range.startColumn,\r\n endLineNumber: colorData[i].colorInfo.range.endLineNumber,\r\n endColumn: colorData[i].colorInfo.range.endColumn\r\n },\r\n options: this._codeEditorService.resolveDecorationOptions(key, true)\r\n });\r\n }\r\n this._decorationsTypes.forEach(subType => {\r\n if (!newDecorationsTypes[subType]) {\r\n this._codeEditorService.removeDecorationType(subType);\r\n }\r\n });\r\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, decorations);\r\n }\r\n removeAllDecorations() {\r\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []);\r\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []);\r\n this._decorationsTypes.forEach(subType => {\r\n this._codeEditorService.removeDecorationType(subType);\r\n });\r\n }\r\n getColorData(position) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return null;\r\n }\r\n const decorations = model\r\n .getDecorationsInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.fromPositions(position, position))\r\n .filter(d => this._colorDatas.has(d.id));\r\n if (decorations.length === 0) {\r\n return null;\r\n }\r\n return this._colorDatas.get(decorations[0].id);\r\n }\r\n};\r\nColorDetector.ID = 'editor.contrib.colorDetector';\r\nColorDetector.RECOMPUTE_TIME = 1000; // ms\r\nColorDetector = __decorate([\r\n __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__.ICodeEditorService),\r\n __param(2, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__.IConfigurationService)\r\n], ColorDetector);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorContribution)(ColorDetector.ID, ColorDetector);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorPickerModel\": () => (/* binding */ ColorPickerModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ColorPickerModel {\r\n constructor(color, availableColorPresentations, presentationIndex) {\r\n this.presentationIndex = presentationIndex;\r\n this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this._onDidChangeColor = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChangeColor = this._onDidChangeColor.event;\r\n this._onDidChangePresentation = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChangePresentation = this._onDidChangePresentation.event;\r\n this.originalColor = color;\r\n this._color = color;\r\n this._colorPresentations = availableColorPresentations;\r\n }\r\n get color() {\r\n return this._color;\r\n }\r\n set color(color) {\r\n if (this._color.equals(color)) {\r\n return;\r\n }\r\n this._color = color;\r\n this._onDidChangeColor.fire(color);\r\n }\r\n get presentation() { return this.colorPresentations[this.presentationIndex]; }\r\n get colorPresentations() {\r\n return this._colorPresentations;\r\n }\r\n set colorPresentations(colorPresentations) {\r\n this._colorPresentations = colorPresentations;\r\n if (this.presentationIndex > colorPresentations.length - 1) {\r\n this.presentationIndex = 0;\r\n }\r\n this._onDidChangePresentation.fire(this.presentation);\r\n }\r\n selectNextColorPresentation() {\r\n this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length;\r\n this.flushColor();\r\n this._onDidChangePresentation.fire(this.presentation);\r\n }\r\n guessColorPresentation(color, originalText) {\r\n for (let i = 0; i < this.colorPresentations.length; i++) {\r\n if (originalText.toLowerCase() === this.colorPresentations[i].label) {\r\n this.presentationIndex = i;\r\n this._onDidChangePresentation.fire(this.presentation);\r\n break;\r\n }\r\n }\r\n }\r\n flushColor() {\r\n this._onColorFlushed.fire(this._color);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorPickerHeader\": () => (/* binding */ ColorPickerHeader),\n/* harmony export */ \"ColorPickerBody\": () => (/* binding */ ColorPickerBody),\n/* harmony export */ \"ColorPickerWidget\": () => (/* binding */ ColorPickerWidget)\n/* harmony export */ });\n/* harmony import */ var _colorPicker_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorPicker.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/globalMouseMoveMonitor.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js\");\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$;\r\nclass ColorPickerHeader extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(container, model, themeService) {\r\n super();\r\n this.model = model;\r\n this.domNode = $('.colorpicker-header');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, this.domNode);\r\n this.pickedColorNode = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, $('.picked-color'));\r\n const colorBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, $('.original-color'));\r\n colorBox.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.Format.CSS.format(this.model.originalColor) || '';\r\n this.backgroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__.editorHoverBackground) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.white;\r\n this._register((0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_9__.registerThemingParticipant)((theme, collector) => {\r\n this.backgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__.editorHoverBackground) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.white;\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(this.pickedColorNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.CLICK, () => this.model.selectNextColorPresentation()));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(colorBox, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.EventType.CLICK, () => {\r\n this.model.color = this.model.originalColor;\r\n this.model.flushColor();\r\n }));\r\n this._register(model.onDidChangeColor(this.onDidChangeColor, this));\r\n this._register(model.onDidChangePresentation(this.onDidChangePresentation, this));\r\n this.pickedColorNode.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.Format.CSS.format(model.color) || '';\r\n this.pickedColorNode.classList.toggle('light', model.color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : model.color.isLighter());\r\n }\r\n onDidChangeColor(color) {\r\n this.pickedColorNode.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.Format.CSS.format(color) || '';\r\n this.pickedColorNode.classList.toggle('light', color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : color.isLighter());\r\n this.onDidChangePresentation();\r\n }\r\n onDidChangePresentation() {\r\n this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : '';\r\n }\r\n}\r\nclass ColorPickerBody extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(container, model, pixelRatio) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this.domNode = $('.colorpicker-body');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, this.domNode);\r\n this.saturationBox = new SaturationBox(this.domNode, this.model, this.pixelRatio);\r\n this._register(this.saturationBox);\r\n this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange, this));\r\n this._register(this.saturationBox.onColorFlushed(this.flushColor, this));\r\n this.opacityStrip = new OpacityStrip(this.domNode, this.model);\r\n this._register(this.opacityStrip);\r\n this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange, this));\r\n this._register(this.opacityStrip.onColorFlushed(this.flushColor, this));\r\n this.hueStrip = new HueStrip(this.domNode, this.model);\r\n this._register(this.hueStrip);\r\n this._register(this.hueStrip.onDidChange(this.onDidHueChange, this));\r\n this._register(this.hueStrip.onColorFlushed(this.flushColor, this));\r\n }\r\n flushColor() {\r\n this.model.flushColor();\r\n }\r\n onDidSaturationValueChange({ s, v }) {\r\n const hsva = this.model.color.hsva;\r\n this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.HSVA(hsva.h, s, v, hsva.a));\r\n }\r\n onDidOpacityChange(a) {\r\n const hsva = this.model.color.hsva;\r\n this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.HSVA(hsva.h, hsva.s, hsva.v, a));\r\n }\r\n onDidHueChange(value) {\r\n const hsva = this.model.color.hsva;\r\n const h = (1 - value) * 360;\r\n this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.HSVA(h === 360 ? 0 : h, hsva.s, hsva.v, hsva.a));\r\n }\r\n layout() {\r\n this.saturationBox.layout();\r\n this.opacityStrip.layout();\r\n this.hueStrip.layout();\r\n }\r\n}\r\nclass SaturationBox extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(container, model, pixelRatio) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this.domNode = $('.saturation-wrap');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, this.domNode);\r\n // Create canvas, draw selected color\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.className = 'saturation-box';\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, this.canvas);\r\n // Add selection circle\r\n this.selection = $('.saturation-selection');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, this.selection);\r\n this.layout();\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));\r\n this._register(this.model.onDidChangeColor(this.onDidChangeColor, this));\r\n this.monitor = null;\r\n }\r\n onMouseDown(e) {\r\n this.monitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.GlobalMouseMoveMonitor());\r\n const origin = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getDomNodePagePosition(this.domNode);\r\n if (e.target !== this.selection) {\r\n this.onDidChangePosition(e.offsetX, e.offsetY);\r\n }\r\n this.monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.standardMouseMoveMerger, event => this.onDidChangePosition(event.posx - origin.left, event.posy - origin.top), () => null);\r\n const mouseUpListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableGenericMouseUpListner(document, () => {\r\n this._onColorFlushed.fire();\r\n mouseUpListener.dispose();\r\n if (this.monitor) {\r\n this.monitor.stopMonitoring(true);\r\n this.monitor = null;\r\n }\r\n }, true);\r\n }\r\n onDidChangePosition(left, top) {\r\n const s = Math.max(0, Math.min(1, left / this.width));\r\n const v = Math.max(0, Math.min(1, 1 - (top / this.height)));\r\n this.paintSelection(s, v);\r\n this._onDidChange.fire({ s, v });\r\n }\r\n layout() {\r\n this.width = this.domNode.offsetWidth;\r\n this.height = this.domNode.offsetHeight;\r\n this.canvas.width = this.width * this.pixelRatio;\r\n this.canvas.height = this.height * this.pixelRatio;\r\n this.paint();\r\n const hsva = this.model.color.hsva;\r\n this.paintSelection(hsva.s, hsva.v);\r\n }\r\n paint() {\r\n const hsva = this.model.color.hsva;\r\n const saturatedColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.HSVA(hsva.h, 1, 1, 1));\r\n const ctx = this.canvas.getContext('2d');\r\n const whiteGradient = ctx.createLinearGradient(0, 0, this.canvas.width, 0);\r\n whiteGradient.addColorStop(0, 'rgba(255, 255, 255, 1)');\r\n whiteGradient.addColorStop(0.5, 'rgba(255, 255, 255, 0.5)');\r\n whiteGradient.addColorStop(1, 'rgba(255, 255, 255, 0)');\r\n const blackGradient = ctx.createLinearGradient(0, 0, 0, this.canvas.height);\r\n blackGradient.addColorStop(0, 'rgba(0, 0, 0, 0)');\r\n blackGradient.addColorStop(1, 'rgba(0, 0, 0, 1)');\r\n ctx.rect(0, 0, this.canvas.width, this.canvas.height);\r\n ctx.fillStyle = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color.Format.CSS.format(saturatedColor);\r\n ctx.fill();\r\n ctx.fillStyle = whiteGradient;\r\n ctx.fill();\r\n ctx.fillStyle = blackGradient;\r\n ctx.fill();\r\n }\r\n paintSelection(s, v) {\r\n this.selection.style.left = `${s * this.width}px`;\r\n this.selection.style.top = `${this.height - v * this.height}px`;\r\n }\r\n onDidChangeColor() {\r\n if (this.monitor && this.monitor.isMonitoring()) {\r\n return;\r\n }\r\n this.paint();\r\n }\r\n}\r\nclass Strip extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.Disposable {\r\n constructor(container, model) {\r\n super();\r\n this.model = model;\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this.domNode = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, $('.strip'));\r\n this.overlay = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, $('.overlay'));\r\n this.slider = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, $('.slider'));\r\n this.slider.style.top = `0px`;\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));\r\n this.layout();\r\n }\r\n layout() {\r\n this.height = this.domNode.offsetHeight - this.slider.offsetHeight;\r\n const value = this.getValue(this.model.color);\r\n this.updateSliderPosition(value);\r\n }\r\n onMouseDown(e) {\r\n const monitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.GlobalMouseMoveMonitor());\r\n const origin = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getDomNodePagePosition(this.domNode);\r\n this.domNode.classList.add('grabbing');\r\n if (e.target !== this.slider) {\r\n this.onDidChangeTop(e.offsetY);\r\n }\r\n monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__.standardMouseMoveMerger, event => this.onDidChangeTop(event.posy - origin.top), () => null);\r\n const mouseUpListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableGenericMouseUpListner(document, () => {\r\n this._onColorFlushed.fire();\r\n mouseUpListener.dispose();\r\n monitor.stopMonitoring(true);\r\n this.domNode.classList.remove('grabbing');\r\n }, true);\r\n }\r\n onDidChangeTop(top) {\r\n const value = Math.max(0, Math.min(1, 1 - (top / this.height)));\r\n this.updateSliderPosition(value);\r\n this._onDidChange.fire(value);\r\n }\r\n updateSliderPosition(value) {\r\n this.slider.style.top = `${(1 - value) * this.height}px`;\r\n }\r\n}\r\nclass OpacityStrip extends Strip {\r\n constructor(container, model) {\r\n super(container, model);\r\n this.domNode.classList.add('opacity-strip');\r\n this._register(model.onDidChangeColor(this.onDidChangeColor, this));\r\n this.onDidChangeColor(this.model.color);\r\n }\r\n onDidChangeColor(color) {\r\n const { r, g, b } = color.rgba;\r\n const opaque = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.RGBA(r, g, b, 1));\r\n const transparent = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__.RGBA(r, g, b, 0));\r\n this.overlay.style.background = `linear-gradient(to bottom, ${opaque} 0%, ${transparent} 100%)`;\r\n }\r\n getValue(color) {\r\n return color.hsva.a;\r\n }\r\n}\r\nclass HueStrip extends Strip {\r\n constructor(container, model) {\r\n super(container, model);\r\n this.domNode.classList.add('hue-strip');\r\n }\r\n getValue(color) {\r\n return 1 - (color.hsva.h / 360);\r\n }\r\n}\r\nclass ColorPickerWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_4__.Widget {\r\n constructor(container, model, pixelRatio, themeService) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this._register((0,_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__.onDidChangeZoomLevel)(() => this.layout()));\r\n const element = $('.colorpicker-widget');\r\n container.appendChild(element);\r\n const header = new ColorPickerHeader(element, this.model, themeService);\r\n this.body = new ColorPickerBody(element, this.model, this.pixelRatio);\r\n this._register(header);\r\n this._register(this.body);\r\n }\r\n layout() {\r\n this.body.layout();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BlockCommentCommand\": () => (/* binding */ BlockCommentCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass BlockCommentCommand {\r\n constructor(selection, insertSpace) {\r\n this._selection = selection;\r\n this._insertSpace = insertSpace;\r\n this._usedEndToken = null;\r\n }\r\n static _haystackHasNeedleAtOffset(haystack, needle, offset) {\r\n if (offset < 0) {\r\n return false;\r\n }\r\n const needleLength = needle.length;\r\n const haystackLength = haystack.length;\r\n if (offset + needleLength > haystackLength) {\r\n return false;\r\n }\r\n for (let i = 0; i < needleLength; i++) {\r\n const codeA = haystack.charCodeAt(offset + i);\r\n const codeB = needle.charCodeAt(i);\r\n if (codeA === codeB) {\r\n continue;\r\n }\r\n if (codeA >= 65 /* A */ && codeA <= 90 /* Z */ && codeA + 32 === codeB) {\r\n // codeA is upper-case variant of codeB\r\n continue;\r\n }\r\n if (codeB >= 65 /* A */ && codeB <= 90 /* Z */ && codeB + 32 === codeA) {\r\n // codeB is upper-case variant of codeA\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n _createOperationsForBlockComment(selection, startToken, endToken, insertSpace, model, builder) {\r\n const startLineNumber = selection.startLineNumber;\r\n const startColumn = selection.startColumn;\r\n const endLineNumber = selection.endLineNumber;\r\n const endColumn = selection.endColumn;\r\n const startLineText = model.getLineContent(startLineNumber);\r\n const endLineText = model.getLineContent(endLineNumber);\r\n let startTokenIndex = startLineText.lastIndexOf(startToken, startColumn - 1 + startToken.length);\r\n let endTokenIndex = endLineText.indexOf(endToken, endColumn - 1 - endToken.length);\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n if (startLineNumber === endLineNumber) {\r\n const lineBetweenTokens = startLineText.substring(startTokenIndex + startToken.length, endTokenIndex);\r\n if (lineBetweenTokens.indexOf(endToken) >= 0) {\r\n // force to add a block comment\r\n startTokenIndex = -1;\r\n endTokenIndex = -1;\r\n }\r\n }\r\n else {\r\n const startLineAfterStartToken = startLineText.substring(startTokenIndex + startToken.length);\r\n const endLineBeforeEndToken = endLineText.substring(0, endTokenIndex);\r\n if (startLineAfterStartToken.indexOf(endToken) >= 0 || endLineBeforeEndToken.indexOf(endToken) >= 0) {\r\n // force to add a block comment\r\n startTokenIndex = -1;\r\n endTokenIndex = -1;\r\n }\r\n }\r\n }\r\n let ops;\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n // Consider spaces as part of the comment tokens\r\n if (insertSpace && startTokenIndex + startToken.length < startLineText.length && startLineText.charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\r\n // Pretend the start token contains a trailing space\r\n startToken = startToken + ' ';\r\n }\r\n if (insertSpace && endTokenIndex > 0 && endLineText.charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\r\n // Pretend the end token contains a leading space\r\n endToken = ' ' + endToken;\r\n endTokenIndex -= 1;\r\n }\r\n ops = BlockCommentCommand._createRemoveBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\r\n }\r\n else {\r\n ops = BlockCommentCommand._createAddBlockCommentOperations(selection, startToken, endToken, this._insertSpace);\r\n this._usedEndToken = ops.length === 1 ? endToken : null;\r\n }\r\n for (const op of ops) {\r\n builder.addTrackedEditOperation(op.range, op.text);\r\n }\r\n }\r\n static _createRemoveBlockCommentOperations(r, startToken, endToken) {\r\n let res = [];\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.isEmpty(r)) {\r\n // Remove block comment start\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(r.startLineNumber, r.startColumn - startToken.length, r.startLineNumber, r.startColumn)));\r\n // Remove block comment end\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(r.endLineNumber, r.endColumn, r.endLineNumber, r.endColumn + endToken.length)));\r\n }\r\n else {\r\n // Remove both continuously\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(r.startLineNumber, r.startColumn - startToken.length, r.endLineNumber, r.endColumn + endToken.length)));\r\n }\r\n return res;\r\n }\r\n static _createAddBlockCommentOperations(r, startToken, endToken, insertSpace) {\r\n let res = [];\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.isEmpty(r)) {\r\n // Insert block comment start\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(r.startLineNumber, r.startColumn), startToken + (insertSpace ? ' ' : '')));\r\n // Insert block comment end\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position(r.endLineNumber, r.endColumn), (insertSpace ? ' ' : '') + endToken));\r\n }\r\n else {\r\n // Insert both continuously\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.replace(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn), startToken + ' ' + endToken));\r\n }\r\n return res;\r\n }\r\n getEditOperations(model, builder) {\r\n const startLineNumber = this._selection.startLineNumber;\r\n const startColumn = this._selection.startColumn;\r\n model.tokenizeIfCheap(startLineNumber);\r\n const languageId = model.getLanguageIdAtPosition(startLineNumber, startColumn);\r\n const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__.LanguageConfigurationRegistry.getComments(languageId);\r\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\r\n // Mode does not support block comments\r\n return;\r\n }\r\n this._createOperationsForBlockComment(this._selection, config.blockCommentStartToken, config.blockCommentEndToken, this._insertSpace, model, builder);\r\n }\r\n computeCursorState(model, helper) {\r\n const inverseEditOperations = helper.getInverseEditOperations();\r\n if (inverseEditOperations.length === 2) {\r\n const startTokenEditOperation = inverseEditOperations[0];\r\n const endTokenEditOperation = inverseEditOperations[1];\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(startTokenEditOperation.range.endLineNumber, startTokenEditOperation.range.endColumn, endTokenEditOperation.range.startLineNumber, endTokenEditOperation.range.startColumn);\r\n }\r\n else {\r\n const srcRange = inverseEditOperations[0].range;\r\n const deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(srcRange.endLineNumber, srcRange.endColumn + deltaColumn, srcRange.endLineNumber, srcRange.endColumn + deltaColumn);\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./blockCommentCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js\");\n/* harmony import */ var _lineCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lineCommentCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CommentLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor(type, opts) {\r\n super(opts);\r\n this._type = type;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const commands = [];\r\n const modelOptions = model.getOptions();\r\n const commentsOptions = editor.getOption(16 /* comments */);\r\n const selections = editor.getSelections().map((selection, index) => ({ selection, index, ignoreFirstLine: false }));\r\n selections.sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.compareRangesUsingStarts(a.selection, b.selection));\r\n // Remove selections that would result in copying the same line\r\n let prev = selections[0];\r\n for (let i = 1; i < selections.length; i++) {\r\n const curr = selections[i];\r\n if (prev.selection.endLineNumber === curr.selection.startLineNumber) {\r\n // these two selections would copy the same line\r\n if (prev.index < curr.index) {\r\n // prev wins\r\n curr.ignoreFirstLine = true;\r\n }\r\n else {\r\n // curr wins\r\n prev.ignoreFirstLine = true;\r\n prev = curr;\r\n }\r\n }\r\n }\r\n for (const selection of selections) {\r\n commands.push(new _lineCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__.LineCommentCommand(selection.selection, modelOptions.tabSize, this._type, commentsOptions.insertSpace, commentsOptions.ignoreEmptyLines, selection.ignoreFirstLine));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass ToggleCommentLineAction extends CommentLineAction {\r\n constructor() {\r\n super(0 /* Toggle */, {\r\n id: 'editor.action.commentLine',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comment.line', \"Toggle Line Comment\"),\r\n alias: 'Toggle Line Comment',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.MenubarEditMenu,\r\n group: '5_insert',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miToggleLineComment', comment: ['&& denotes a mnemonic'] }, \"&&Toggle Line Comment\"),\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass AddLineCommentAction extends CommentLineAction {\r\n constructor() {\r\n super(1 /* ForceAdd */, {\r\n id: 'editor.action.addCommentLine',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comment.line.add', \"Add Line Comment\"),\r\n alias: 'Add Line Comment',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 33 /* KEY_C */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass RemoveLineCommentAction extends CommentLineAction {\r\n constructor() {\r\n super(2 /* ForceRemove */, {\r\n id: 'editor.action.removeCommentLine',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comment.line.remove', \"Remove Line Comment\"),\r\n alias: 'Remove Line Comment',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 51 /* KEY_U */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass BlockCommentAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.blockComment',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('comment.block', \"Toggle Block Comment\"),\r\n alias: 'Toggle Block Comment',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 31 /* KEY_A */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 31 /* KEY_A */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__.MenuId.MenubarEditMenu,\r\n group: '5_insert',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miToggleBlockComment', comment: ['&& denotes a mnemonic'] }, \"Toggle &&Block Comment\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const commentsOptions = editor.getOption(16 /* comments */);\r\n const commands = [];\r\n const selections = editor.getSelections();\r\n for (const selection of selections) {\r\n commands.push(new _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_5__.BlockCommentCommand(selection, commentsOptions.insertSpace));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(ToggleCommentLineAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(AddLineCommentAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(RemoveLineCommentAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(BlockCommentAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineCommentCommand\": () => (/* binding */ LineCommentCommand)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blockCommentCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass LineCommentCommand {\r\n constructor(selection, tabSize, type, insertSpace, ignoreEmptyLines, ignoreFirstLine) {\r\n this._selection = selection;\r\n this._tabSize = tabSize;\r\n this._type = type;\r\n this._insertSpace = insertSpace;\r\n this._selectionId = null;\r\n this._deltaColumn = 0;\r\n this._moveEndPositionDown = false;\r\n this._ignoreEmptyLines = ignoreEmptyLines;\r\n this._ignoreFirstLine = ignoreFirstLine || false;\r\n }\r\n /**\r\n * Do an initial pass over the lines and gather info about the line comment string.\r\n * Returns null if any of the lines doesn't support a line comment string.\r\n */\r\n static _gatherPreflightCommentStrings(model, startLineNumber, endLineNumber) {\r\n model.tokenizeIfCheap(startLineNumber);\r\n const languageId = model.getLanguageIdAtPosition(startLineNumber, 1);\r\n const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getComments(languageId);\r\n const commentStr = (config ? config.lineCommentToken : null);\r\n if (!commentStr) {\r\n // Mode does not support line comments\r\n return null;\r\n }\r\n let lines = [];\r\n for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) {\r\n lines[i] = {\r\n ignore: false,\r\n commentStr: commentStr,\r\n commentStrOffset: 0,\r\n commentStrLength: commentStr.length\r\n };\r\n }\r\n return lines;\r\n }\r\n /**\r\n * Analyze lines and decide which lines are relevant and what the toggle should do.\r\n * Also, build up several offsets and lengths useful in the generation of editor operations.\r\n */\r\n static _analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines, ignoreFirstLine) {\r\n let onlyWhitespaceLines = true;\r\n let shouldRemoveComments;\r\n if (type === 0 /* Toggle */) {\r\n shouldRemoveComments = true;\r\n }\r\n else if (type === 1 /* ForceAdd */) {\r\n shouldRemoveComments = false;\r\n }\r\n else {\r\n shouldRemoveComments = true;\r\n }\r\n for (let i = 0, lineCount = lines.length; i < lineCount; i++) {\r\n const lineData = lines[i];\r\n const lineNumber = startLineNumber + i;\r\n if (lineNumber === startLineNumber && ignoreFirstLine) {\r\n // first line ignored\r\n lineData.ignore = true;\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(lineNumber);\r\n const lineContentStartOffset = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineContent);\r\n if (lineContentStartOffset === -1) {\r\n // Empty or whitespace only line\r\n lineData.ignore = ignoreEmptyLines;\r\n lineData.commentStrOffset = lineContent.length;\r\n continue;\r\n }\r\n onlyWhitespaceLines = false;\r\n lineData.ignore = false;\r\n lineData.commentStrOffset = lineContentStartOffset;\r\n if (shouldRemoveComments && !_blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__.BlockCommentCommand._haystackHasNeedleAtOffset(lineContent, lineData.commentStr, lineContentStartOffset)) {\r\n if (type === 0 /* Toggle */) {\r\n // Every line so far has been a line comment, but this one is not\r\n shouldRemoveComments = false;\r\n }\r\n else if (type === 1 /* ForceAdd */) {\r\n // Will not happen\r\n }\r\n else {\r\n lineData.ignore = true;\r\n }\r\n }\r\n if (shouldRemoveComments && insertSpace) {\r\n // Remove a following space if present\r\n const commentStrEndOffset = lineContentStartOffset + lineData.commentStrLength;\r\n if (commentStrEndOffset < lineContent.length && lineContent.charCodeAt(commentStrEndOffset) === 32 /* Space */) {\r\n lineData.commentStrLength += 1;\r\n }\r\n }\r\n }\r\n if (type === 0 /* Toggle */ && onlyWhitespaceLines) {\r\n // For only whitespace lines, we insert comments\r\n shouldRemoveComments = false;\r\n // Also, no longer ignore them\r\n for (let i = 0, lineCount = lines.length; i < lineCount; i++) {\r\n lines[i].ignore = false;\r\n }\r\n }\r\n return {\r\n supported: true,\r\n shouldRemoveComments: shouldRemoveComments,\r\n lines: lines\r\n };\r\n }\r\n /**\r\n * Analyze all lines and decide exactly what to do => not supported | insert line comments | remove line comments\r\n */\r\n static _gatherPreflightData(type, insertSpace, model, startLineNumber, endLineNumber, ignoreEmptyLines, ignoreFirstLine) {\r\n const lines = LineCommentCommand._gatherPreflightCommentStrings(model, startLineNumber, endLineNumber);\r\n if (lines === null) {\r\n return {\r\n supported: false\r\n };\r\n }\r\n return LineCommentCommand._analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines, ignoreFirstLine);\r\n }\r\n /**\r\n * Given a successful analysis, execute either insert line comments, either remove line comments\r\n */\r\n _executeLineComments(model, builder, data, s) {\r\n let ops;\r\n if (data.shouldRemoveComments) {\r\n ops = LineCommentCommand._createRemoveLineCommentsOperations(data.lines, s.startLineNumber);\r\n }\r\n else {\r\n LineCommentCommand._normalizeInsertionPoint(model, data.lines, s.startLineNumber, this._tabSize);\r\n ops = this._createAddLineCommentsOperations(data.lines, s.startLineNumber);\r\n }\r\n const cursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(s.positionLineNumber, s.positionColumn);\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n builder.addEditOperation(ops[i].range, ops[i].text);\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.isEmpty(ops[i].range) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.getStartPosition(ops[i].range).equals(cursorPosition)) {\r\n const lineContent = model.getLineContent(cursorPosition.lineNumber);\r\n if (lineContent.length + 1 === cursorPosition.column) {\r\n this._deltaColumn = (ops[i].text || '').length;\r\n }\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n }\r\n _attemptRemoveBlockComment(model, s, startToken, endToken) {\r\n let startLineNumber = s.startLineNumber;\r\n let endLineNumber = s.endLineNumber;\r\n let startTokenAllowedBeforeColumn = endToken.length + Math.max(model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.startColumn);\r\n let startTokenIndex = model.getLineContent(startLineNumber).lastIndexOf(startToken, startTokenAllowedBeforeColumn - 1);\r\n let endTokenIndex = model.getLineContent(endLineNumber).indexOf(endToken, s.endColumn - 1 - startToken.length);\r\n if (startTokenIndex !== -1 && endTokenIndex === -1) {\r\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\r\n endLineNumber = startLineNumber;\r\n }\r\n if (startTokenIndex === -1 && endTokenIndex !== -1) {\r\n startTokenIndex = model.getLineContent(endLineNumber).lastIndexOf(startToken, endTokenIndex);\r\n startLineNumber = endLineNumber;\r\n }\r\n if (s.isEmpty() && (startTokenIndex === -1 || endTokenIndex === -1)) {\r\n startTokenIndex = model.getLineContent(startLineNumber).indexOf(startToken);\r\n if (startTokenIndex !== -1) {\r\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\r\n }\r\n }\r\n // We have to adjust to possible inner white space.\r\n // For Space after startToken, add Space to startToken - range math will work out.\r\n if (startTokenIndex !== -1 && model.getLineContent(startLineNumber).charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\r\n startToken += ' ';\r\n }\r\n // For Space before endToken, add Space before endToken and shift index one left.\r\n if (endTokenIndex !== -1 && model.getLineContent(endLineNumber).charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\r\n endToken = ' ' + endToken;\r\n endTokenIndex -= 1;\r\n }\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n return _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__.BlockCommentCommand._createRemoveBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\r\n }\r\n return null;\r\n }\r\n /**\r\n * Given an unsuccessful analysis, delegate to the block comment command\r\n */\r\n _executeBlockComment(model, builder, s) {\r\n model.tokenizeIfCheap(s.startLineNumber);\r\n let languageId = model.getLanguageIdAtPosition(s.startLineNumber, 1);\r\n let config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getComments(languageId);\r\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\r\n // Mode does not support block comments\r\n return;\r\n }\r\n const startToken = config.blockCommentStartToken;\r\n const endToken = config.blockCommentEndToken;\r\n let ops = this._attemptRemoveBlockComment(model, s, startToken, endToken);\r\n if (!ops) {\r\n if (s.isEmpty()) {\r\n const lineContent = model.getLineContent(s.startLineNumber);\r\n let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.firstNonWhitespaceIndex(lineContent);\r\n if (firstNonWhitespaceIndex === -1) {\r\n // Line is empty or contains only whitespace\r\n firstNonWhitespaceIndex = lineContent.length;\r\n }\r\n ops = _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__.BlockCommentCommand._createAddBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(s.startLineNumber, firstNonWhitespaceIndex + 1, s.startLineNumber, lineContent.length + 1), startToken, endToken, this._insertSpace);\r\n }\r\n else {\r\n ops = _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__.BlockCommentCommand._createAddBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(s.startLineNumber, model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), startToken, endToken, this._insertSpace);\r\n }\r\n if (ops.length === 1) {\r\n // Leave cursor after token and Space\r\n this._deltaColumn = startToken.length + 1;\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n for (const op of ops) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n }\r\n getEditOperations(model, builder) {\r\n let s = this._selection;\r\n this._moveEndPositionDown = false;\r\n if (s.startLineNumber === s.endLineNumber && this._ignoreFirstLine) {\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(s.startLineNumber, model.getLineMaxColumn(s.startLineNumber), s.startLineNumber + 1, 1), s.startLineNumber === model.getLineCount() ? '' : '\\n');\r\n this._selectionId = builder.trackSelection(s);\r\n return;\r\n }\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._moveEndPositionDown = true;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n const data = LineCommentCommand._gatherPreflightData(this._type, this._insertSpace, model, s.startLineNumber, s.endLineNumber, this._ignoreEmptyLines, this._ignoreFirstLine);\r\n if (data.supported) {\r\n return this._executeLineComments(model, builder, data, s);\r\n }\r\n return this._executeBlockComment(model, builder, s);\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._moveEndPositionDown) {\r\n result = result.setEndPosition(result.endLineNumber + 1, 1);\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__.Selection(result.selectionStartLineNumber, result.selectionStartColumn + this._deltaColumn, result.positionLineNumber, result.positionColumn + this._deltaColumn);\r\n }\r\n /**\r\n * Generate edit operations in the remove line comment case\r\n */\r\n static _createRemoveLineCommentsOperations(lines, startLineNumber) {\r\n let res = [];\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n const lineData = lines[i];\r\n if (lineData.ignore) {\r\n continue;\r\n }\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__.EditOperation.delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(startLineNumber + i, lineData.commentStrOffset + 1, startLineNumber + i, lineData.commentStrOffset + lineData.commentStrLength + 1)));\r\n }\r\n return res;\r\n }\r\n /**\r\n * Generate edit operations in the add line comment case\r\n */\r\n _createAddLineCommentsOperations(lines, startLineNumber) {\r\n let res = [];\r\n const afterCommentStr = this._insertSpace ? ' ' : '';\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n const lineData = lines[i];\r\n if (lineData.ignore) {\r\n continue;\r\n }\r\n res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__.EditOperation.insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(startLineNumber + i, lineData.commentStrOffset + 1), lineData.commentStr + afterCommentStr));\r\n }\r\n return res;\r\n }\r\n static nextVisibleColumn(currentVisibleColumn, tabSize, isTab, columnSize) {\r\n if (isTab) {\r\n return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize));\r\n }\r\n return currentVisibleColumn + columnSize;\r\n }\r\n /**\r\n * Adjust insertion points to have them vertically aligned in the add line comment case\r\n */\r\n static _normalizeInsertionPoint(model, lines, startLineNumber, tabSize) {\r\n let minVisibleColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let j;\r\n let lenJ;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].ignore) {\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(startLineNumber + i);\r\n let currentVisibleColumn = 0;\r\n for (let j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) {\r\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1);\r\n }\r\n if (currentVisibleColumn < minVisibleColumn) {\r\n minVisibleColumn = currentVisibleColumn;\r\n }\r\n }\r\n minVisibleColumn = Math.floor(minVisibleColumn / tabSize) * tabSize;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].ignore) {\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(startLineNumber + i);\r\n let currentVisibleColumn = 0;\r\n for (j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) {\r\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1);\r\n }\r\n if (currentVisibleColumn > minVisibleColumn) {\r\n lines[i].commentStrOffset = j - 1;\r\n }\r\n else {\r\n lines[i].commentStrOffset = j;\r\n }\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContextMenuController\": () => (/* binding */ ContextMenuController)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionViewItems.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet ContextMenuController = class ContextMenuController {\r\n constructor(editor, _contextMenuService, _contextViewService, _contextKeyService, _keybindingService, _menuService) {\r\n this._contextMenuService = _contextMenuService;\r\n this._contextViewService = _contextViewService;\r\n this._contextKeyService = _contextKeyService;\r\n this._keybindingService = _keybindingService;\r\n this._menuService = _menuService;\r\n this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._contextMenuIsBeingShownCount = 0;\r\n this._editor = editor;\r\n this._toDispose.add(this._editor.onContextMenu((e) => this._onContextMenu(e)));\r\n this._toDispose.add(this._editor.onMouseWheel((e) => {\r\n if (this._contextMenuIsBeingShownCount > 0) {\r\n const view = this._contextViewService.getContextViewElement();\r\n const target = e.srcElement;\r\n // Event triggers on shadow root host first\r\n // Check if the context view is under this host before hiding it #103169\r\n if (!(target.shadowRoot && _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getShadowRoot(view) === target.shadowRoot)) {\r\n this._contextViewService.hideContextView();\r\n }\r\n }\r\n }));\r\n this._toDispose.add(this._editor.onKeyDown((e) => {\r\n if (e.keyCode === 58 /* ContextMenu */) {\r\n // Chrome is funny like that\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.showContextMenu();\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ContextMenuController.ID);\r\n }\r\n _onContextMenu(e) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._editor.getOption(17 /* contextmenu */)) {\r\n this._editor.focus();\r\n // Ensure the cursor is at the position of the mouse click\r\n if (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\r\n this._editor.setPosition(e.target.position);\r\n }\r\n return; // Context menu is turned off through configuration\r\n }\r\n if (e.target.type === 12 /* OVERLAY_WIDGET */) {\r\n return; // allow native menu on widgets to support right click on input field for example in find\r\n }\r\n e.event.preventDefault();\r\n if (e.target.type !== 6 /* CONTENT_TEXT */ && e.target.type !== 7 /* CONTENT_EMPTY */ && e.target.type !== 1 /* TEXTAREA */) {\r\n return; // only support mouse click into text or native context menu key for now\r\n }\r\n // Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions\r\n this._editor.focus();\r\n // Ensure the cursor is at the position of the mouse click\r\n if (e.target.position) {\r\n let hasSelectionAtPosition = false;\r\n for (const selection of this._editor.getSelections()) {\r\n if (selection.containsPosition(e.target.position)) {\r\n hasSelectionAtPosition = true;\r\n break;\r\n }\r\n }\r\n if (!hasSelectionAtPosition) {\r\n this._editor.setPosition(e.target.position);\r\n }\r\n }\r\n // Unless the user triggerd the context menu through Shift+F10, use the mouse position as menu position\r\n let anchor = null;\r\n if (e.target.type !== 1 /* TEXTAREA */) {\r\n anchor = { x: e.event.posx - 1, width: 2, y: e.event.posy - 1, height: 2 };\r\n }\r\n // Show the context menu\r\n this.showContextMenu(anchor);\r\n }\r\n showContextMenu(anchor) {\r\n if (!this._editor.getOption(17 /* contextmenu */)) {\r\n return; // Context menu is turned off through configuration\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._contextMenuService) {\r\n this._editor.focus();\r\n return; // We need the context menu service to function\r\n }\r\n // Find actions available for menu\r\n const menuActions = this._getMenuActions(this._editor.getModel(), _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuId.EditorContext);\r\n // Show menu if we have actions to show\r\n if (menuActions.length > 0) {\r\n this._doShowContextMenu(menuActions, anchor);\r\n }\r\n }\r\n _getMenuActions(model, menuId) {\r\n const result = [];\r\n // get menu groups\r\n const menu = this._menuService.createMenu(menuId, this._contextKeyService);\r\n const groups = menu.getActions({ arg: model.uri });\r\n menu.dispose();\r\n // translate them into other actions\r\n for (let group of groups) {\r\n const [, actions] = group;\r\n let addedItems = 0;\r\n for (const action of actions) {\r\n if (action instanceof _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.SubmenuItemAction) {\r\n const subActions = this._getMenuActions(model, action.item.submenu);\r\n if (subActions.length > 0) {\r\n result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__.SubmenuAction(action.id, action.label, subActions));\r\n addedItems++;\r\n }\r\n }\r\n else {\r\n result.push(action);\r\n addedItems++;\r\n }\r\n }\r\n if (addedItems) {\r\n result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__.Separator());\r\n }\r\n }\r\n if (result.length) {\r\n result.pop(); // remove last separator\r\n }\r\n return result;\r\n }\r\n _doShowContextMenu(actions, anchor = null) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // Disable hover\r\n const oldHoverSetting = this._editor.getOption(48 /* hover */);\r\n this._editor.updateOptions({\r\n hover: {\r\n enabled: false\r\n }\r\n });\r\n if (!anchor) {\r\n // Ensure selection is visible\r\n this._editor.revealPosition(this._editor.getPosition(), 1 /* Immediate */);\r\n this._editor.render();\r\n const cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\r\n // Translate to absolute editor position\r\n const editorCoords = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(this._editor.getDomNode());\r\n const posx = editorCoords.left + cursorCoords.left;\r\n const posy = editorCoords.top + cursorCoords.top + cursorCoords.height;\r\n anchor = { x: posx, y: posy };\r\n }\r\n // Show menu\r\n this._contextMenuIsBeingShownCount++;\r\n this._contextMenuService.showContextMenu({\r\n domForShadowRoot: this._editor.getDomNode(),\r\n getAnchor: () => anchor,\r\n getActions: () => actions,\r\n getActionViewItem: (action) => {\r\n const keybinding = this._keybindingFor(action);\r\n if (keybinding) {\r\n return new _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__.ActionViewItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true });\r\n }\r\n const customActionViewItem = action;\r\n if (typeof customActionViewItem.getActionViewItem === 'function') {\r\n return customActionViewItem.getActionViewItem();\r\n }\r\n return new _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__.ActionViewItem(action, action, { icon: true, label: true, isMenu: true });\r\n },\r\n getKeyBinding: (action) => {\r\n return this._keybindingFor(action);\r\n },\r\n onHide: (wasCancelled) => {\r\n this._contextMenuIsBeingShownCount--;\r\n this._editor.focus();\r\n this._editor.updateOptions({\r\n hover: oldHoverSetting\r\n });\r\n }\r\n });\r\n }\r\n _keybindingFor(action) {\r\n return this._keybindingService.lookupKeybinding(action.id);\r\n }\r\n dispose() {\r\n if (this._contextMenuIsBeingShownCount > 0) {\r\n this._contextViewService.hideContextView();\r\n }\r\n this._toDispose.dispose();\r\n }\r\n};\r\nContextMenuController.ID = 'editor.contrib.contextmenu';\r\nContextMenuController = __decorate([\r\n __param(1, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__.IContextMenuService),\r\n __param(2, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__.IContextViewService),\r\n __param(3, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.IContextKeyService),\r\n __param(4, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__.IKeybindingService),\r\n __param(5, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.IMenuService)\r\n], ContextMenuController);\r\n\r\nclass ShowContextMenu extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showContextMenu',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('action.showContextMenu.label', \"Show Editor Context Menu\"),\r\n alias: 'Show Editor Context Menu',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 68 /* F10 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let contribution = ContextMenuController.get(editor);\r\n contribution.showContextMenu();\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(ContextMenuController.ID, ContextMenuController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(ShowContextMenu);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CursorUndoRedoController\": () => (/* binding */ CursorUndoRedoController),\n/* harmony export */ \"CursorUndo\": () => (/* binding */ CursorUndo),\n/* harmony export */ \"CursorRedo\": () => (/* binding */ CursorRedo)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass CursorState {\r\n constructor(selections) {\r\n this.selections = selections;\r\n }\r\n equals(other) {\r\n const thisLen = this.selections.length;\r\n const otherLen = other.selections.length;\r\n if (thisLen !== otherLen) {\r\n return false;\r\n }\r\n for (let i = 0; i < thisLen; i++) {\r\n if (!this.selections[i].equalsSelection(other.selections[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nclass StackElement {\r\n constructor(cursorState, scrollTop, scrollLeft) {\r\n this.cursorState = cursorState;\r\n this.scrollTop = scrollTop;\r\n this.scrollLeft = scrollLeft;\r\n }\r\n}\r\nclass CursorUndoRedoController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._isCursorUndoRedo = false;\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n }));\r\n this._register(editor.onDidChangeCursorSelection((e) => {\r\n if (this._isCursorUndoRedo) {\r\n return;\r\n }\r\n if (!e.oldSelections) {\r\n return;\r\n }\r\n if (e.oldModelVersionId !== e.modelVersionId) {\r\n return;\r\n }\r\n const prevState = new CursorState(e.oldSelections);\r\n const isEqualToLastUndoStack = (this._undoStack.length > 0 && this._undoStack[this._undoStack.length - 1].cursorState.equals(prevState));\r\n if (!isEqualToLastUndoStack) {\r\n this._undoStack.push(new StackElement(prevState, editor.getScrollTop(), editor.getScrollLeft()));\r\n this._redoStack = [];\r\n if (this._undoStack.length > 50) {\r\n // keep the cursor undo stack bounded\r\n this._undoStack.shift();\r\n }\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(CursorUndoRedoController.ID);\r\n }\r\n cursorUndo() {\r\n if (!this._editor.hasModel() || this._undoStack.length === 0) {\r\n return;\r\n }\r\n this._redoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft()));\r\n this._applyState(this._undoStack.pop());\r\n }\r\n cursorRedo() {\r\n if (!this._editor.hasModel() || this._redoStack.length === 0) {\r\n return;\r\n }\r\n this._undoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft()));\r\n this._applyState(this._redoStack.pop());\r\n }\r\n _applyState(stackElement) {\r\n this._isCursorUndoRedo = true;\r\n this._editor.setSelections(stackElement.cursorState.selections);\r\n this._editor.setScrollPosition({\r\n scrollTop: stackElement.scrollTop,\r\n scrollLeft: stackElement.scrollLeft\r\n });\r\n this._isCursorUndoRedo = false;\r\n }\r\n}\r\nCursorUndoRedoController.ID = 'editor.contrib.cursorUndoRedoController';\r\nclass CursorUndo extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'cursorUndo',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursor.undo', \"Cursor Undo\"),\r\n alias: 'Cursor Undo',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 51 /* KEY_U */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n CursorUndoRedoController.get(editor).cursorUndo();\r\n }\r\n}\r\nclass CursorRedo extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'cursorRedo',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cursor.redo', \"Cursor Redo\"),\r\n alias: 'Cursor Redo',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n CursorUndoRedoController.get(editor).cursorRedo();\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorContribution)(CursorUndoRedoController.ID, CursorUndoRedoController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(CursorUndo);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(CursorRedo);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DragAndDropController\": () => (/* binding */ DragAndDropController)\n/* harmony export */ });\n/* harmony import */ var _dnd_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dnd.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _dragAndDropCommand_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dragAndDropCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction hasTriggerModifier(e) {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n return e.altKey;\r\n }\r\n else {\r\n return e.ctrlKey;\r\n }\r\n}\r\nclass DragAndDropController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(e)));\r\n this._register(this._editor.onMouseDrag((e) => this._onEditorMouseDrag(e)));\r\n this._register(this._editor.onMouseDrop((e) => this._onEditorMouseDrop(e)));\r\n this._register(this._editor.onMouseDropCanceled(() => this._onEditorMouseDropCanceled()));\r\n this._register(this._editor.onKeyDown((e) => this.onEditorKeyDown(e)));\r\n this._register(this._editor.onKeyUp((e) => this.onEditorKeyUp(e)));\r\n this._register(this._editor.onDidBlurEditorWidget(() => this.onEditorBlur()));\r\n this._register(this._editor.onDidBlurEditorText(() => this.onEditorBlur()));\r\n this._dndDecorationIds = [];\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n this._dragSelection = null;\r\n }\r\n onEditorBlur() {\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n }\r\n onEditorKeyDown(e) {\r\n if (!this._editor.getOption(27 /* dragAndDrop */) || this._editor.getOption(15 /* columnSelection */)) {\r\n return;\r\n }\r\n if (hasTriggerModifier(e)) {\r\n this._modifierPressed = true;\r\n }\r\n if (this._mouseDown && hasTriggerModifier(e)) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'copy'\r\n });\r\n }\r\n }\r\n onEditorKeyUp(e) {\r\n if (!this._editor.getOption(27 /* dragAndDrop */) || this._editor.getOption(15 /* columnSelection */)) {\r\n return;\r\n }\r\n if (hasTriggerModifier(e)) {\r\n this._modifierPressed = false;\r\n }\r\n if (this._mouseDown && e.keyCode === DragAndDropController.TRIGGER_KEY_VALUE) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'default'\r\n });\r\n }\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n this._mouseDown = true;\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n this._mouseDown = false;\r\n // Whenever users release the mouse, the drag and drop operation should finish and the cursor should revert to text.\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n }\r\n _onEditorMouseDrag(mouseEvent) {\r\n let target = mouseEvent.target;\r\n if (this._dragSelection === null) {\r\n const selections = this._editor.getSelections() || [];\r\n let possibleSelections = selections.filter(selection => target.position && selection.containsPosition(target.position));\r\n if (possibleSelections.length === 1) {\r\n this._dragSelection = possibleSelections[0];\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (hasTriggerModifier(mouseEvent.event)) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'copy'\r\n });\r\n }\r\n else {\r\n this._editor.updateOptions({\r\n mouseStyle: 'default'\r\n });\r\n }\r\n if (target.position) {\r\n if (this._dragSelection.containsPosition(target.position)) {\r\n this._removeDecoration();\r\n }\r\n else {\r\n this.showAt(target.position);\r\n }\r\n }\r\n }\r\n _onEditorMouseDropCanceled() {\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n }\r\n _onEditorMouseDrop(mouseEvent) {\r\n if (mouseEvent.target && (this._hitContent(mouseEvent.target) || this._hitMargin(mouseEvent.target)) && mouseEvent.target.position) {\r\n let newCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(mouseEvent.target.position.lineNumber, mouseEvent.target.position.column);\r\n if (this._dragSelection === null) {\r\n let newSelections = null;\r\n if (mouseEvent.event.shiftKey) {\r\n let primarySelection = this._editor.getSelection();\r\n if (primarySelection) {\r\n const { selectionStartLineNumber, selectionStartColumn } = primarySelection;\r\n newSelections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection(selectionStartLineNumber, selectionStartColumn, newCursorPosition.lineNumber, newCursorPosition.column)];\r\n }\r\n }\r\n else {\r\n newSelections = (this._editor.getSelections() || []).map(selection => {\r\n if (selection.containsPosition(newCursorPosition)) {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column);\r\n }\r\n else {\r\n return selection;\r\n }\r\n });\r\n }\r\n // Use `mouse` as the source instead of `api` and setting the reason to explicit (to behave like any other mouse operation).\r\n this._editor.setSelections(newSelections || [], 'mouse', 3 /* Explicit */);\r\n }\r\n else if (!this._dragSelection.containsPosition(newCursorPosition) ||\r\n ((hasTriggerModifier(mouseEvent.event) ||\r\n this._modifierPressed) && (this._dragSelection.getEndPosition().equals(newCursorPosition) || this._dragSelection.getStartPosition().equals(newCursorPosition)) // we allow users to paste content beside the selection\r\n )) {\r\n this._editor.pushUndoStop();\r\n this._editor.executeCommand(DragAndDropController.ID, new _dragAndDropCommand_js__WEBPACK_IMPORTED_MODULE_7__.DragAndDropCommand(this._dragSelection, newCursorPosition, hasTriggerModifier(mouseEvent.event) || this._modifierPressed));\r\n this._editor.pushUndoStop();\r\n }\r\n }\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n }\r\n showAt(position) {\r\n let newDecorations = [{\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, position.column, position.lineNumber, position.column),\r\n options: DragAndDropController._DECORATION_OPTIONS\r\n }];\r\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, newDecorations);\r\n this._editor.revealPosition(position, 1 /* Immediate */);\r\n }\r\n _removeDecoration() {\r\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, []);\r\n }\r\n _hitContent(target) {\r\n return target.type === 6 /* CONTENT_TEXT */ ||\r\n target.type === 7 /* CONTENT_EMPTY */;\r\n }\r\n _hitMargin(target) {\r\n return target.type === 2 /* GUTTER_GLYPH_MARGIN */ ||\r\n target.type === 3 /* GUTTER_LINE_NUMBERS */ ||\r\n target.type === 4 /* GUTTER_LINE_DECORATIONS */;\r\n }\r\n dispose() {\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n super.dispose();\r\n }\r\n}\r\nDragAndDropController.ID = 'editor.contrib.dragAndDrop';\r\nDragAndDropController.TRIGGER_KEY_VALUE = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh ? 6 /* Alt */ : 5 /* Ctrl */;\r\nDragAndDropController._DECORATION_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__.ModelDecorationOptions.register({\r\n className: 'dnd-target'\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorContribution)(DragAndDropController.ID, DragAndDropController);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DragAndDropCommand\": () => (/* binding */ DragAndDropCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass DragAndDropCommand {\r\n constructor(selection, targetPosition, copy) {\r\n this.selection = selection;\r\n this.targetPosition = targetPosition;\r\n this.copy = copy;\r\n this.targetSelection = null;\r\n }\r\n getEditOperations(model, builder) {\r\n let text = model.getValueInRange(this.selection);\r\n if (!this.copy) {\r\n builder.addEditOperation(this.selection, null);\r\n }\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), text);\r\n if (this.selection.containsPosition(this.targetPosition) && !(this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) // we allow users to paste content beside the selection\r\n )) {\r\n this.targetSelection = this.selection;\r\n return;\r\n }\r\n if (this.copy) {\r\n this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n if (this.targetPosition.lineNumber > this.selection.endLineNumber) {\r\n // Drag the selection downwards\r\n this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n if (this.targetPosition.lineNumber < this.selection.endLineNumber) {\r\n // Drag the selection upwards\r\n this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n // The target position is at the same line as the selection's end position.\r\n if (this.selection.endColumn <= this.targetPosition.column) {\r\n // The target position is after the selection's end position\r\n this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn :\r\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column :\r\n this.selection.endColumn);\r\n }\r\n else {\r\n // The target position is before the selection's end position. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection.\r\n this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n return this.targetSelection;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/documentSymbols.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/documentSymbols.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getDocumentSymbols\": () => (/* binding */ getDocumentSymbols)\n/* harmony export */ });\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _outlineModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./outlineModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction getDocumentSymbols(document, flat, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = yield _outlineModel_js__WEBPACK_IMPORTED_MODULE_4__.OutlineModel.create(document, token);\r\n return flat\r\n ? model.asListOfDocumentSymbols()\r\n : model.getTopLevelSymbols();\r\n });\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_executeDocumentSymbolProvider', function (accessor, ...args) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const [resource] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.isUri(resource));\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_1__.IModelService).getModel(resource);\r\n if (model) {\r\n return getDocumentSymbols(model, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationToken.None);\r\n }\r\n const reference = yield accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_3__.ITextModelService).createModelReference(resource);\r\n try {\r\n return yield getDocumentSymbols(reference.object.textEditorModel, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationToken.None);\r\n }\r\n finally {\r\n reference.dispose();\r\n }\r\n });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/documentSymbols.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TreeElement\": () => (/* binding */ TreeElement),\n/* harmony export */ \"OutlineElement\": () => (/* binding */ OutlineElement),\n/* harmony export */ \"OutlineGroup\": () => (/* binding */ OutlineGroup),\n/* harmony export */ \"OutlineModel\": () => (/* binding */ OutlineModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes/languageFeatureRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass TreeElement {\r\n remove() {\r\n if (this.parent) {\r\n this.parent.children.delete(this.id);\r\n }\r\n }\r\n static findId(candidate, container) {\r\n // complex id-computation which contains the origin/extension,\r\n // the parent path, and some dedupe logic when names collide\r\n let candidateId;\r\n if (typeof candidate === 'string') {\r\n candidateId = `${container.id}/${candidate}`;\r\n }\r\n else {\r\n candidateId = `${container.id}/${candidate.name}`;\r\n if (container.children.get(candidateId) !== undefined) {\r\n candidateId = `${container.id}/${candidate.name}_${candidate.range.startLineNumber}_${candidate.range.startColumn}`;\r\n }\r\n }\r\n let id = candidateId;\r\n for (let i = 0; container.children.get(id) !== undefined; i++) {\r\n id = `${candidateId}_${i}`;\r\n }\r\n return id;\r\n }\r\n static empty(element) {\r\n return element.children.size === 0;\r\n }\r\n}\r\nclass OutlineElement extends TreeElement {\r\n constructor(id, parent, symbol) {\r\n super();\r\n this.id = id;\r\n this.parent = parent;\r\n this.symbol = symbol;\r\n this.children = new Map();\r\n }\r\n}\r\nclass OutlineGroup extends TreeElement {\r\n constructor(id, parent, label, order) {\r\n super();\r\n this.id = id;\r\n this.parent = parent;\r\n this.label = label;\r\n this.order = order;\r\n this.children = new Map();\r\n }\r\n}\r\nclass OutlineModel extends TreeElement {\r\n constructor(uri) {\r\n super();\r\n this.uri = uri;\r\n this.id = 'root';\r\n this.parent = undefined;\r\n this._groups = new Map();\r\n this.children = new Map();\r\n this.id = 'root';\r\n this.parent = undefined;\r\n }\r\n static create(textModel, token) {\r\n let key = this._keys.for(textModel, true);\r\n let data = OutlineModel._requests.get(key);\r\n if (!data) {\r\n let source = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationTokenSource();\r\n data = {\r\n promiseCnt: 0,\r\n source,\r\n promise: OutlineModel._create(textModel, source.token),\r\n model: undefined,\r\n };\r\n OutlineModel._requests.set(key, data);\r\n // keep moving average of request durations\r\n const now = Date.now();\r\n data.promise.then(() => {\r\n this._requestDurations.update(textModel, Date.now() - now);\r\n });\r\n }\r\n if (data.model) {\r\n // resolved -> return data\r\n return Promise.resolve(data.model);\r\n }\r\n // increase usage counter\r\n data.promiseCnt += 1;\r\n token.onCancellationRequested(() => {\r\n // last -> cancel provider request, remove cached promise\r\n if (--data.promiseCnt === 0) {\r\n data.source.cancel();\r\n OutlineModel._requests.delete(key);\r\n }\r\n });\r\n return new Promise((resolve, reject) => {\r\n data.promise.then(model => {\r\n data.model = model;\r\n resolve(model);\r\n }, err => {\r\n OutlineModel._requests.delete(key);\r\n reject(err);\r\n });\r\n });\r\n }\r\n static _create(textModel, token) {\r\n const cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationTokenSource(token);\r\n const result = new OutlineModel(textModel.uri);\r\n const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.ordered(textModel);\r\n const promises = provider.map((provider, index) => {\r\n var _a;\r\n let id = TreeElement.findId(`provider_${index}`, result);\r\n let group = new OutlineGroup(id, result, (_a = provider.displayName) !== null && _a !== void 0 ? _a : 'Unknown Outline Provider', index);\r\n return Promise.resolve(provider.provideDocumentSymbols(textModel, cts.token)).then(result => {\r\n for (const info of result || []) {\r\n OutlineModel._makeOutlineElement(info, group);\r\n }\r\n return group;\r\n }, err => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedExternalError)(err);\r\n return group;\r\n }).then(group => {\r\n if (!TreeElement.empty(group)) {\r\n result._groups.set(id, group);\r\n }\r\n else {\r\n group.remove();\r\n }\r\n });\r\n });\r\n const listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.onDidChange(() => {\r\n const newProvider = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.ordered(textModel);\r\n if (!(0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.equals)(newProvider, provider)) {\r\n cts.cancel();\r\n }\r\n });\r\n return Promise.all(promises).then(() => {\r\n if (cts.token.isCancellationRequested && !token.isCancellationRequested) {\r\n return OutlineModel._create(textModel, token);\r\n }\r\n else {\r\n return result._compact();\r\n }\r\n }).finally(() => {\r\n listener.dispose();\r\n });\r\n }\r\n static _makeOutlineElement(info, container) {\r\n let id = TreeElement.findId(info, container);\r\n let res = new OutlineElement(id, container, info);\r\n if (info.children) {\r\n for (const childInfo of info.children) {\r\n OutlineModel._makeOutlineElement(childInfo, res);\r\n }\r\n }\r\n container.children.set(res.id, res);\r\n }\r\n _compact() {\r\n let count = 0;\r\n for (const [key, group] of this._groups) {\r\n if (group.children.size === 0) { // empty\r\n this._groups.delete(key);\r\n }\r\n else {\r\n count += 1;\r\n }\r\n }\r\n if (count !== 1) {\r\n //\r\n this.children = this._groups;\r\n }\r\n else {\r\n // adopt all elements of the first group\r\n let group = _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.first(this._groups.values());\r\n for (let [, child] of group.children) {\r\n child.parent = this;\r\n this.children.set(child.id, child);\r\n }\r\n }\r\n return this;\r\n }\r\n getTopLevelSymbols() {\r\n const roots = [];\r\n for (const child of this.children.values()) {\r\n if (child instanceof OutlineElement) {\r\n roots.push(child.symbol);\r\n }\r\n else {\r\n roots.push(..._base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.map(child.children.values(), child => child.symbol));\r\n }\r\n }\r\n return roots.sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n asListOfDocumentSymbols() {\r\n const roots = this.getTopLevelSymbols();\r\n const bucket = [];\r\n OutlineModel._flattenDocumentSymbols(bucket, roots, '');\r\n return bucket.sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n static _flattenDocumentSymbols(bucket, entries, overrideContainerLabel) {\r\n for (const entry of entries) {\r\n bucket.push({\r\n kind: entry.kind,\r\n tags: entry.tags,\r\n name: entry.name,\r\n detail: entry.detail,\r\n containerName: entry.containerName || overrideContainerLabel,\r\n range: entry.range,\r\n selectionRange: entry.selectionRange,\r\n children: undefined, // we flatten it...\r\n });\r\n // Recurse over children\r\n if (entry.children) {\r\n OutlineModel._flattenDocumentSymbols(bucket, entry.children, entry.name);\r\n }\r\n }\r\n }\r\n}\r\nOutlineModel._requestDurations = new _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_7__.LanguageFeatureRequestDelays(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry, 350);\r\nOutlineModel._requests = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__.LRUCache(9, 0.75);\r\nOutlineModel._keys = new class {\r\n constructor() {\r\n this._counter = 1;\r\n this._data = new WeakMap();\r\n }\r\n for(textModel, version) {\r\n return `${textModel.id}/${version ? textModel.getVersionId() : ''}/${this._hash(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.all(textModel))}`;\r\n }\r\n _hash(providers) {\r\n let result = '';\r\n for (const provider of providers) {\r\n let n = this._data.get(provider);\r\n if (typeof n === 'undefined') {\r\n n = this._counter++;\r\n this._data.set(provider, n);\r\n }\r\n result += n;\r\n }\r\n return result;\r\n }\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getSelectionSearchString\": () => (/* binding */ getSelectionSearchString),\n/* harmony export */ \"CommonFindController\": () => (/* binding */ CommonFindController),\n/* harmony export */ \"FindController\": () => (/* binding */ FindController),\n/* harmony export */ \"StartFindAction\": () => (/* binding */ StartFindAction),\n/* harmony export */ \"StartFindWithSelectionAction\": () => (/* binding */ StartFindWithSelectionAction),\n/* harmony export */ \"MatchFindAction\": () => (/* binding */ MatchFindAction),\n/* harmony export */ \"NextMatchFindAction\": () => (/* binding */ NextMatchFindAction),\n/* harmony export */ \"NextMatchFindAction2\": () => (/* binding */ NextMatchFindAction2),\n/* harmony export */ \"PreviousMatchFindAction\": () => (/* binding */ PreviousMatchFindAction),\n/* harmony export */ \"PreviousMatchFindAction2\": () => (/* binding */ PreviousMatchFindAction2),\n/* harmony export */ \"SelectionMatchFindAction\": () => (/* binding */ SelectionMatchFindAction),\n/* harmony export */ \"NextSelectionMatchFindAction\": () => (/* binding */ NextSelectionMatchFindAction),\n/* harmony export */ \"PreviousSelectionMatchFindAction\": () => (/* binding */ PreviousSelectionMatchFindAction),\n/* harmony export */ \"StartFindReplaceAction\": () => (/* binding */ StartFindReplaceAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./findModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js\");\n/* harmony import */ var _findOptionsWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./findOptionsWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js\");\n/* harmony import */ var _findState_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./findState.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js\");\n/* harmony import */ var _findWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./findWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst SEARCH_STRING_MAX_LENGTH = 524288;\r\nfunction getSelectionSearchString(editor, seedSearchStringFromSelection = 'single') {\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const selection = editor.getSelection();\r\n // if selection spans multiple lines, default search string to empty\r\n if ((seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber)\r\n || seedSearchStringFromSelection === 'multiple') {\r\n if (selection.isEmpty()) {\r\n const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition());\r\n if (wordAtPosition) {\r\n return wordAtPosition.word;\r\n }\r\n }\r\n else {\r\n if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) {\r\n return editor.getModel().getValueInRange(selection);\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\nlet CommonFindController = class CommonFindController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(editor, contextKeyService, storageService, clipboardService) {\r\n super();\r\n this._editor = editor;\r\n this._findWidgetVisible = _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService);\r\n this._contextKeyService = contextKeyService;\r\n this._storageService = storageService;\r\n this._clipboardService = clipboardService;\r\n this._updateHistoryDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.Delayer(500);\r\n this._state = this._register(new _findState_js__WEBPACK_IMPORTED_MODULE_8__.FindReplaceState());\r\n this.loadQueryState();\r\n this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this._model = null;\r\n this._register(this._editor.onDidChangeModel(() => {\r\n let shouldRestartFind = (this._editor.getModel() && this._state.isRevealed);\r\n this.disposeModel();\r\n this._state.change({\r\n searchScope: null,\r\n matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, false),\r\n wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, false),\r\n isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, false),\r\n preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, false)\r\n }, false);\r\n if (shouldRestartFind) {\r\n this._start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: 'none',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: false,\r\n updateSearchScope: false,\r\n loop: this._editor.getOption(31 /* find */).loop\r\n });\r\n }\r\n }));\r\n }\r\n get editor() {\r\n return this._editor;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(CommonFindController.ID);\r\n }\r\n dispose() {\r\n this.disposeModel();\r\n super.dispose();\r\n }\r\n disposeModel() {\r\n if (this._model) {\r\n this._model.dispose();\r\n this._model = null;\r\n }\r\n }\r\n _onStateChanged(e) {\r\n this.saveQueryState(e);\r\n if (e.isRevealed) {\r\n if (this._state.isRevealed) {\r\n this._findWidgetVisible.set(true);\r\n }\r\n else {\r\n this._findWidgetVisible.reset();\r\n this.disposeModel();\r\n }\r\n }\r\n if (e.searchString) {\r\n this.setGlobalBufferTerm(this._state.searchString);\r\n }\r\n }\r\n saveQueryState(e) {\r\n if (e.isRegex) {\r\n this._storageService.store('editor.isRegex', this._state.actualIsRegex, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.wholeWord) {\r\n this._storageService.store('editor.wholeWord', this._state.actualWholeWord, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.matchCase) {\r\n this._storageService.store('editor.matchCase', this._state.actualMatchCase, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.preserveCase) {\r\n this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n }\r\n loadQueryState() {\r\n this._state.change({\r\n matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, this._state.matchCase),\r\n wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, this._state.wholeWord),\r\n isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, this._state.isRegex),\r\n preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, this._state.preserveCase)\r\n }, false);\r\n }\r\n isFindInputFocused() {\r\n return !!_findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService);\r\n }\r\n getState() {\r\n return this._state;\r\n }\r\n closeFindWidget() {\r\n this._state.change({\r\n isRevealed: false,\r\n searchScope: null\r\n }, false);\r\n this._editor.focus();\r\n }\r\n toggleCaseSensitive() {\r\n this._state.change({ matchCase: !this._state.matchCase }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleWholeWords() {\r\n this._state.change({ wholeWord: !this._state.wholeWord }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleRegex() {\r\n this._state.change({ isRegex: !this._state.isRegex }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n togglePreserveCase() {\r\n this._state.change({ preserveCase: !this._state.preserveCase }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleSearchScope() {\r\n if (this._state.searchScope) {\r\n this._state.change({ searchScope: null }, true);\r\n }\r\n else {\r\n if (this._editor.hasModel()) {\r\n let selections = this._editor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n }\r\n setSearchString(searchString) {\r\n if (this._state.isRegex) {\r\n searchString = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.escapeRegExpCharacters(searchString);\r\n }\r\n this._state.change({ searchString: searchString }, false);\r\n }\r\n highlightFindOptions(ignoreWhenVisible = false) {\r\n // overwritten in subclass\r\n }\r\n _start(opts) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.disposeModel();\r\n if (!this._editor.hasModel()) {\r\n // cannot do anything with an editor that doesn't have a model...\r\n return;\r\n }\r\n let stateChanges = {\r\n isRevealed: true\r\n };\r\n if (opts.seedSearchStringFromSelection === 'single') {\r\n let selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection);\r\n if (selectionSearchString) {\r\n if (this._state.isRegex) {\r\n stateChanges.searchString = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.escapeRegExpCharacters(selectionSearchString);\r\n }\r\n else {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n }\r\n else if (opts.seedSearchStringFromSelection === 'multiple' && !opts.updateSearchScope) {\r\n let selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection);\r\n if (selectionSearchString) {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) {\r\n let selectionSearchString = yield this.getGlobalBufferTerm();\r\n if (!this._editor.hasModel()) {\r\n // the editor has lost its model in the meantime\r\n return;\r\n }\r\n if (selectionSearchString) {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n // Overwrite isReplaceRevealed\r\n if (opts.forceRevealReplace) {\r\n stateChanges.isReplaceRevealed = true;\r\n }\r\n else if (!this._findWidgetVisible.get()) {\r\n stateChanges.isReplaceRevealed = false;\r\n }\r\n if (opts.updateSearchScope) {\r\n let currentSelections = this._editor.getSelections();\r\n if (currentSelections.some(selection => !selection.isEmpty())) {\r\n stateChanges.searchScope = currentSelections;\r\n }\r\n }\r\n stateChanges.loop = opts.loop;\r\n this._state.change(stateChanges, false);\r\n if (!this._model) {\r\n this._model = new _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FindModelBoundToEditorModel(this._editor, this._state);\r\n }\r\n });\r\n }\r\n start(opts) {\r\n return this._start(opts);\r\n }\r\n moveToNextMatch() {\r\n if (this._model) {\r\n this._model.moveToNextMatch();\r\n return true;\r\n }\r\n return false;\r\n }\r\n moveToPrevMatch() {\r\n if (this._model) {\r\n this._model.moveToPrevMatch();\r\n return true;\r\n }\r\n return false;\r\n }\r\n replace() {\r\n if (this._model) {\r\n this._model.replace();\r\n return true;\r\n }\r\n return false;\r\n }\r\n replaceAll() {\r\n if (this._model) {\r\n this._model.replaceAll();\r\n return true;\r\n }\r\n return false;\r\n }\r\n selectAllMatches() {\r\n if (this._model) {\r\n this._model.selectAllMatches();\r\n this._editor.focus();\r\n return true;\r\n }\r\n return false;\r\n }\r\n getGlobalBufferTerm() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._editor.getOption(31 /* find */).globalFindClipboard\r\n && this._editor.hasModel()\r\n && !this._editor.getModel().isTooLargeForSyncing()) {\r\n return this._clipboardService.readFindText();\r\n }\r\n return '';\r\n });\r\n }\r\n setGlobalBufferTerm(text) {\r\n if (this._editor.getOption(31 /* find */).globalFindClipboard\r\n && this._editor.hasModel()\r\n && !this._editor.getModel().isTooLargeForSyncing()) {\r\n // intentionally not awaited\r\n this._clipboardService.writeFindText(text);\r\n }\r\n }\r\n};\r\nCommonFindController.ID = 'editor.contrib.findController';\r\nCommonFindController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(2, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__.IStorageService),\r\n __param(3, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__.IClipboardService)\r\n], CommonFindController);\r\n\r\nlet FindController = class FindController extends CommonFindController {\r\n constructor(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, _notificationService, _storageService, clipboardService) {\r\n super(editor, _contextKeyService, _storageService, clipboardService);\r\n this._contextViewService = _contextViewService;\r\n this._keybindingService = _keybindingService;\r\n this._themeService = _themeService;\r\n this._notificationService = _notificationService;\r\n this._widget = null;\r\n this._findOptionsWidget = null;\r\n }\r\n _start(opts) {\r\n const _super = Object.create(null, {\r\n _start: { get: () => super._start }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._widget) {\r\n this._createFindWidget();\r\n }\r\n const selection = this._editor.getSelection();\r\n let updateSearchScope = false;\r\n switch (this._editor.getOption(31 /* find */).autoFindInSelection) {\r\n case 'always':\r\n updateSearchScope = true;\r\n break;\r\n case 'never':\r\n updateSearchScope = false;\r\n break;\r\n case 'multiline':\r\n const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber;\r\n updateSearchScope = isSelectionMultipleLine;\r\n break;\r\n default:\r\n break;\r\n }\r\n opts.updateSearchScope = updateSearchScope;\r\n yield _super._start.call(this, opts);\r\n if (this._widget) {\r\n if (opts.shouldFocus === 2 /* FocusReplaceInput */) {\r\n this._widget.focusReplaceInput();\r\n }\r\n else if (opts.shouldFocus === 1 /* FocusFindInput */) {\r\n this._widget.focusFindInput();\r\n }\r\n }\r\n });\r\n }\r\n highlightFindOptions(ignoreWhenVisible = false) {\r\n if (!this._widget) {\r\n this._createFindWidget();\r\n }\r\n if (this._state.isRevealed && !ignoreWhenVisible) {\r\n this._widget.highlightFindOptions();\r\n }\r\n else {\r\n this._findOptionsWidget.highlightFindOptions();\r\n }\r\n }\r\n _createFindWidget() {\r\n this._widget = this._register(new _findWidget_js__WEBPACK_IMPORTED_MODULE_9__.FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService));\r\n this._findOptionsWidget = this._register(new _findOptionsWidget_js__WEBPACK_IMPORTED_MODULE_7__.FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService));\r\n }\r\n};\r\nFindController = __decorate([\r\n __param(1, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__.IContextViewService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_14__.IKeybindingService),\r\n __param(4, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__.IThemeService),\r\n __param(5, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_17__.INotificationService),\r\n __param(6, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__.IStorageService),\r\n __param(7, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__.IClipboardService)\r\n], FindController);\r\n\r\nconst StartFindAction = (0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerMultiEditorAction)(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.MultiEditorAction({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.StartFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('startFindAction', \"Find\"),\r\n alias: 'Find',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.or(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.has('editorIsOpen')),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 36 /* KEY_F */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__.MenuId.MenubarEditMenu,\r\n group: '3_find',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, \"&&Find\"),\r\n order: 1\r\n }\r\n}));\r\nStartFindAction.addImplementation(0, (accessor, args) => {\r\n const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_18__.ICodeEditorService);\r\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\r\n if (!editor) {\r\n return false;\r\n }\r\n const controller = CommonFindController.get(editor);\r\n if (!controller) {\r\n return false;\r\n }\r\n return controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: editor.getOption(31 /* find */).globalFindClipboard,\r\n shouldFocus: 1 /* FocusFindInput */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n});\r\nclass StartFindWithSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.StartFindWithSelection,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('startFindWithSelectionAction', \"Find With Selection\"),\r\n alias: 'Find With Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 0,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 35 /* KEY_E */,\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (controller) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: 'multiple',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n controller.setGlobalBufferTerm(controller.getState().searchString);\r\n }\r\n });\r\n }\r\n}\r\nclass MatchFindAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (controller && !this._run(controller)) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: true,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n this._run(controller);\r\n }\r\n });\r\n }\r\n}\r\nclass NextMatchFindAction extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.NextMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('findNextMatchAction', \"Find Next\"),\r\n alias: 'Find Next',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 61 /* F3 */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */, secondary: [61 /* F3 */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n const result = controller.moveToNextMatch();\r\n if (result) {\r\n controller.editor.pushUndoStop();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nclass NextMatchFindAction2 extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.NextMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('findNextMatchAction', \"Find Next\"),\r\n alias: 'Find Next',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_INPUT_FOCUSED),\r\n primary: 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n const result = controller.moveToNextMatch();\r\n if (result) {\r\n controller.editor.pushUndoStop();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nclass PreviousMatchFindAction extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.PreviousMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('findPreviousMatchAction', \"Find Previous\"),\r\n alias: 'Find Previous',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 61 /* F3 */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 37 /* KEY_G */, secondary: [1024 /* Shift */ | 61 /* F3 */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nclass PreviousMatchFindAction2 extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.PreviousMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('findPreviousMatchAction', \"Find Previous\"),\r\n alias: 'Find Previous',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_INPUT_FOCUSED),\r\n primary: 1024 /* Shift */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nclass SelectionMatchFindAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n let selectionSearchString = getSelectionSearchString(editor);\r\n if (selectionSearchString) {\r\n controller.setSearchString(selectionSearchString);\r\n }\r\n if (!this._run(controller)) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n this._run(controller);\r\n }\r\n });\r\n }\r\n}\r\nclass NextSelectionMatchFindAction extends SelectionMatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.NextSelectionMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('nextSelectionMatchFindAction', \"Find Next Selection\"),\r\n alias: 'Find Next Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 61 /* F3 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToNextMatch();\r\n }\r\n}\r\nclass PreviousSelectionMatchFindAction extends SelectionMatchFindAction {\r\n constructor() {\r\n super({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.PreviousSelectionMatchFindAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('previousSelectionMatchFindAction', \"Find Previous Selection\"),\r\n alias: 'Find Previous Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 61 /* F3 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nconst StartFindReplaceAction = (0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerMultiEditorAction)(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.MultiEditorAction({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.StartFindReplaceAction,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('startReplace', \"Replace\"),\r\n alias: 'Replace',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.or(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.has('editorIsOpen')),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 38 /* KEY_H */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 36 /* KEY_F */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__.MenuId.MenubarEditMenu,\r\n group: '3_find',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, \"&&Replace\"),\r\n order: 2\r\n }\r\n}));\r\nStartFindReplaceAction.addImplementation(0, (accessor, args) => {\r\n const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_18__.ICodeEditorService);\r\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\r\n if (!editor || !editor.hasModel() || editor.getOption(75 /* readOnly */)) {\r\n return false;\r\n }\r\n const controller = CommonFindController.get(editor);\r\n if (!controller) {\r\n return false;\r\n }\r\n const currentSelection = editor.getSelection();\r\n const findInputFocused = controller.isFindInputFocused();\r\n // we only seed search string from selection when the current selection is single line and not empty,\r\n // + the find input is not focused\r\n const seedSearchStringFromSelection = !currentSelection.isEmpty()\r\n && currentSelection.startLineNumber === currentSelection.endLineNumber && editor.getOption(31 /* find */).seedSearchStringFromSelection\r\n && !findInputFocused;\r\n /*\r\n * if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input is still empty, so we should focus the Find Input instead of Replace Input.\r\n\r\n * findInputFocused true -> seedSearchStringFromSelection false, FocusReplaceInput\r\n * findInputFocused false, seedSearchStringFromSelection true FocusReplaceInput\r\n * findInputFocused false seedSearchStringFromSelection false FocusFindInput\r\n */\r\n const shouldFocus = (findInputFocused || seedSearchStringFromSelection) ?\r\n 2 /* FocusReplaceInput */ : 1 /* FocusFindInput */;\r\n return controller.start({\r\n forceRevealReplace: true,\r\n seedSearchStringFromSelection: seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: editor.getOption(31 /* find */).seedSearchStringFromSelection,\r\n shouldFocus: shouldFocus,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(CommonFindController.ID, FindController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(StartFindWithSelectionAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(NextMatchFindAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(NextMatchFindAction2);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(PreviousMatchFindAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(PreviousMatchFindAction2);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(NextSelectionMatchFindAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(PreviousSelectionMatchFindAction);\r\nconst FindCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorCommand.bindToContribution(CommonFindController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.CloseFindWidgetCommand,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.closeFindWidget(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.not('isComposing')),\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ToggleCaseSensitiveCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleCaseSensitive(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleCaseSensitiveKeybinding.primary,\r\n mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleCaseSensitiveKeybinding.mac,\r\n win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleCaseSensitiveKeybinding.win,\r\n linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleCaseSensitiveKeybinding.linux\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ToggleWholeWordCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleWholeWords(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleWholeWordKeybinding.primary,\r\n mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleWholeWordKeybinding.mac,\r\n win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleWholeWordKeybinding.win,\r\n linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleWholeWordKeybinding.linux\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ToggleRegexCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleRegex(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleRegexKeybinding.primary,\r\n mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleRegexKeybinding.mac,\r\n win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleRegexKeybinding.win,\r\n linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleRegexKeybinding.linux\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ToggleSearchScopeCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleSearchScope(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleSearchScopeKeybinding.primary,\r\n mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleSearchScopeKeybinding.mac,\r\n win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleSearchScopeKeybinding.win,\r\n linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.ToggleSearchScopeKeybinding.linux\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.TogglePreserveCaseCommand,\r\n precondition: undefined,\r\n handler: x => x.togglePreserveCase(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.TogglePreserveCaseKeybinding.primary,\r\n mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.TogglePreserveCaseKeybinding.mac,\r\n win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.TogglePreserveCaseKeybinding.win,\r\n linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.TogglePreserveCaseKeybinding.linux\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ReplaceOneAction,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replace(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 22 /* KEY_1 */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ReplaceOneAction,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replace(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_REPLACE_INPUT_FOCUSED),\r\n primary: 3 /* Enter */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ReplaceAllAction,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replaceAll(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 3 /* Enter */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.ReplaceAllAction,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replaceAll(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_REPLACE_INPUT_FOCUSED),\r\n primary: undefined,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n }\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new FindCommand({\r\n id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.FIND_IDS.SelectAllMatchesAction,\r\n precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.selectAllMatches(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 512 /* Alt */ | 3 /* Enter */\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FindDecorations\": () => (/* binding */ FindDecorations)\n/* harmony export */ });\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass FindDecorations {\r\n constructor(editor) {\r\n this._editor = editor;\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n this._startPosition = this._editor.getPosition();\r\n }\r\n dispose() {\r\n this._editor.deltaDecorations(this._allDecorations(), []);\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n }\r\n reset() {\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n }\r\n getCount() {\r\n return this._decorations.length;\r\n }\r\n /** @deprecated use getFindScopes to support multiple selections */\r\n getFindScope() {\r\n if (this._findScopeDecorationIds[0]) {\r\n return this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]);\r\n }\r\n return null;\r\n }\r\n getFindScopes() {\r\n if (this._findScopeDecorationIds.length) {\r\n const scopes = this._findScopeDecorationIds.map(findScopeDecorationId => this._editor.getModel().getDecorationRange(findScopeDecorationId)).filter(element => !!element);\r\n if (scopes.length) {\r\n return scopes;\r\n }\r\n }\r\n return null;\r\n }\r\n getStartPosition() {\r\n return this._startPosition;\r\n }\r\n setStartPosition(newStartPosition) {\r\n this._startPosition = newStartPosition;\r\n this.setCurrentFindMatch(null);\r\n }\r\n _getDecorationIndex(decorationId) {\r\n const index = this._decorations.indexOf(decorationId);\r\n if (index >= 0) {\r\n return index + 1;\r\n }\r\n return 1;\r\n }\r\n getCurrentMatchesPosition(desiredRange) {\r\n let candidates = this._editor.getModel().getDecorationsInRange(desiredRange);\r\n for (const candidate of candidates) {\r\n const candidateOpts = candidate.options;\r\n if (candidateOpts === FindDecorations._FIND_MATCH_DECORATION || candidateOpts === FindDecorations._CURRENT_FIND_MATCH_DECORATION) {\r\n return this._getDecorationIndex(candidate.id);\r\n }\r\n }\r\n // We don't know the current match position, so returns zero to show '?' in find widget\r\n return 0;\r\n }\r\n setCurrentFindMatch(nextMatch) {\r\n let newCurrentDecorationId = null;\r\n let matchPosition = 0;\r\n if (nextMatch) {\r\n for (let i = 0, len = this._decorations.length; i < len; i++) {\r\n let range = this._editor.getModel().getDecorationRange(this._decorations[i]);\r\n if (nextMatch.equalsRange(range)) {\r\n newCurrentDecorationId = this._decorations[i];\r\n matchPosition = (i + 1);\r\n break;\r\n }\r\n }\r\n }\r\n if (this._highlightedDecorationId !== null || newCurrentDecorationId !== null) {\r\n this._editor.changeDecorations((changeAccessor) => {\r\n if (this._highlightedDecorationId !== null) {\r\n changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._FIND_MATCH_DECORATION);\r\n this._highlightedDecorationId = null;\r\n }\r\n if (newCurrentDecorationId !== null) {\r\n this._highlightedDecorationId = newCurrentDecorationId;\r\n changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._CURRENT_FIND_MATCH_DECORATION);\r\n }\r\n if (this._rangeHighlightDecorationId !== null) {\r\n changeAccessor.removeDecoration(this._rangeHighlightDecorationId);\r\n this._rangeHighlightDecorationId = null;\r\n }\r\n if (newCurrentDecorationId !== null) {\r\n let rng = this._editor.getModel().getDecorationRange(newCurrentDecorationId);\r\n if (rng.startLineNumber !== rng.endLineNumber && rng.endColumn === 1) {\r\n let lineBeforeEnd = rng.endLineNumber - 1;\r\n let lineBeforeEndMaxColumn = this._editor.getModel().getLineMaxColumn(lineBeforeEnd);\r\n rng = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(rng.startLineNumber, rng.startColumn, lineBeforeEnd, lineBeforeEndMaxColumn);\r\n }\r\n this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION);\r\n }\r\n });\r\n }\r\n return matchPosition;\r\n }\r\n set(findMatches, findScopes) {\r\n this._editor.changeDecorations((accessor) => {\r\n let findMatchesOptions = FindDecorations._FIND_MATCH_DECORATION;\r\n let newOverviewRulerApproximateDecorations = [];\r\n if (findMatches.length > 1000) {\r\n // we go into a mode where the overview ruler gets \"approximate\" decorations\r\n // the reason is that the overview ruler paints all the decorations in the file and we don't want to cause freezes\r\n findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;\r\n // approximate a distance in lines where matches should be merged\r\n const lineCount = this._editor.getModel().getLineCount();\r\n const height = this._editor.getLayoutInfo().height;\r\n const approxPixelsPerLine = height / lineCount;\r\n const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));\r\n // merge decorations as much as possible\r\n let prevStartLineNumber = findMatches[0].range.startLineNumber;\r\n let prevEndLineNumber = findMatches[0].range.endLineNumber;\r\n for (let i = 1, len = findMatches.length; i < len; i++) {\r\n const range = findMatches[i].range;\r\n if (prevEndLineNumber + mergeLinesDelta >= range.startLineNumber) {\r\n if (range.endLineNumber > prevEndLineNumber) {\r\n prevEndLineNumber = range.endLineNumber;\r\n }\r\n }\r\n else {\r\n newOverviewRulerApproximateDecorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\r\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\r\n });\r\n prevStartLineNumber = range.startLineNumber;\r\n prevEndLineNumber = range.endLineNumber;\r\n }\r\n }\r\n newOverviewRulerApproximateDecorations.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\r\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\r\n });\r\n }\r\n // Find matches\r\n let newFindMatchesDecorations = new Array(findMatches.length);\r\n for (let i = 0, len = findMatches.length; i < len; i++) {\r\n newFindMatchesDecorations[i] = {\r\n range: findMatches[i].range,\r\n options: findMatchesOptions\r\n };\r\n }\r\n this._decorations = accessor.deltaDecorations(this._decorations, newFindMatchesDecorations);\r\n // Overview ruler approximate decorations\r\n this._overviewRulerApproximateDecorations = accessor.deltaDecorations(this._overviewRulerApproximateDecorations, newOverviewRulerApproximateDecorations);\r\n // Range highlight\r\n if (this._rangeHighlightDecorationId) {\r\n accessor.removeDecoration(this._rangeHighlightDecorationId);\r\n this._rangeHighlightDecorationId = null;\r\n }\r\n // Find scope\r\n if (this._findScopeDecorationIds.length) {\r\n this._findScopeDecorationIds.forEach(findScopeDecorationId => accessor.removeDecoration(findScopeDecorationId));\r\n this._findScopeDecorationIds = [];\r\n }\r\n if (findScopes === null || findScopes === void 0 ? void 0 : findScopes.length) {\r\n this._findScopeDecorationIds = findScopes.map(findScope => accessor.addDecoration(findScope, FindDecorations._FIND_SCOPE_DECORATION));\r\n }\r\n });\r\n }\r\n matchBeforePosition(position) {\r\n if (this._decorations.length === 0) {\r\n return null;\r\n }\r\n for (let i = this._decorations.length - 1; i >= 0; i--) {\r\n let decorationId = this._decorations[i];\r\n let r = this._editor.getModel().getDecorationRange(decorationId);\r\n if (!r || r.endLineNumber > position.lineNumber) {\r\n continue;\r\n }\r\n if (r.endLineNumber < position.lineNumber) {\r\n return r;\r\n }\r\n if (r.endColumn > position.column) {\r\n continue;\r\n }\r\n return r;\r\n }\r\n return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1]);\r\n }\r\n matchAfterPosition(position) {\r\n if (this._decorations.length === 0) {\r\n return null;\r\n }\r\n for (let i = 0, len = this._decorations.length; i < len; i++) {\r\n let decorationId = this._decorations[i];\r\n let r = this._editor.getModel().getDecorationRange(decorationId);\r\n if (!r || r.startLineNumber < position.lineNumber) {\r\n continue;\r\n }\r\n if (r.startLineNumber > position.lineNumber) {\r\n return r;\r\n }\r\n if (r.startColumn < position.column) {\r\n continue;\r\n }\r\n return r;\r\n }\r\n return this._editor.getModel().getDecorationRange(this._decorations[0]);\r\n }\r\n _allDecorations() {\r\n let result = [];\r\n result = result.concat(this._decorations);\r\n result = result.concat(this._overviewRulerApproximateDecorations);\r\n if (this._findScopeDecorationIds.length) {\r\n result.push(...this._findScopeDecorationIds);\r\n }\r\n if (this._rangeHighlightDecorationId) {\r\n result.push(this._rangeHighlightDecorationId);\r\n }\r\n return result;\r\n }\r\n}\r\nFindDecorations._CURRENT_FIND_MATCH_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n zIndex: 13,\r\n className: 'currentFindMatch',\r\n showIfCollapsed: true,\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.overviewRulerFindMatchForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__.OverviewRulerLane.Center\r\n },\r\n minimap: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.minimapFindMatch),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__.MinimapPosition.Inline\r\n }\r\n});\r\nFindDecorations._FIND_MATCH_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'findMatch',\r\n showIfCollapsed: true,\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.overviewRulerFindMatchForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__.OverviewRulerLane.Center\r\n },\r\n minimap: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.minimapFindMatch),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__.MinimapPosition.Inline\r\n }\r\n});\r\nFindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'findMatch',\r\n showIfCollapsed: true\r\n});\r\nFindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.overviewRulerFindMatchForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__.OverviewRulerLane.Center\r\n }\r\n});\r\nFindDecorations._RANGE_HIGHLIGHT_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'rangeHighlight',\r\n isWholeLine: true\r\n});\r\nFindDecorations._FIND_SCOPE_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__.ModelDecorationOptions.register({\r\n className: 'findScope',\r\n isWholeLine: true\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CONTEXT_FIND_WIDGET_VISIBLE\": () => (/* binding */ CONTEXT_FIND_WIDGET_VISIBLE),\n/* harmony export */ \"CONTEXT_FIND_INPUT_FOCUSED\": () => (/* binding */ CONTEXT_FIND_INPUT_FOCUSED),\n/* harmony export */ \"CONTEXT_REPLACE_INPUT_FOCUSED\": () => (/* binding */ CONTEXT_REPLACE_INPUT_FOCUSED),\n/* harmony export */ \"ToggleCaseSensitiveKeybinding\": () => (/* binding */ ToggleCaseSensitiveKeybinding),\n/* harmony export */ \"ToggleWholeWordKeybinding\": () => (/* binding */ ToggleWholeWordKeybinding),\n/* harmony export */ \"ToggleRegexKeybinding\": () => (/* binding */ ToggleRegexKeybinding),\n/* harmony export */ \"ToggleSearchScopeKeybinding\": () => (/* binding */ ToggleSearchScopeKeybinding),\n/* harmony export */ \"TogglePreserveCaseKeybinding\": () => (/* binding */ TogglePreserveCaseKeybinding),\n/* harmony export */ \"FIND_IDS\": () => (/* binding */ FIND_IDS),\n/* harmony export */ \"MATCHES_LIMIT\": () => (/* binding */ MATCHES_LIMIT),\n/* harmony export */ \"FindModelBoundToEditorModel\": () => (/* binding */ FindModelBoundToEditorModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_model_textModelSearch_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/textModelSearch.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js\");\n/* harmony import */ var _findDecorations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./findDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js\");\n/* harmony import */ var _replaceAllCommand_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./replaceAllCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js\");\n/* harmony import */ var _replacePattern_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./replacePattern.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CONTEXT_FIND_WIDGET_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.RawContextKey('findWidgetVisible', false);\r\n// Keep ContextKey use of 'Focussed' to not break when clauses\r\nconst CONTEXT_FIND_INPUT_FOCUSED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.RawContextKey('findInputFocussed', false);\r\nconst CONTEXT_REPLACE_INPUT_FOCUSED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.RawContextKey('replaceInputFocussed', false);\r\nconst ToggleCaseSensitiveKeybinding = {\r\n primary: 512 /* Alt */ | 33 /* KEY_C */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 33 /* KEY_C */ }\r\n};\r\nconst ToggleWholeWordKeybinding = {\r\n primary: 512 /* Alt */ | 53 /* KEY_W */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 53 /* KEY_W */ }\r\n};\r\nconst ToggleRegexKeybinding = {\r\n primary: 512 /* Alt */ | 48 /* KEY_R */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 48 /* KEY_R */ }\r\n};\r\nconst ToggleSearchScopeKeybinding = {\r\n primary: 512 /* Alt */ | 42 /* KEY_L */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 42 /* KEY_L */ }\r\n};\r\nconst TogglePreserveCaseKeybinding = {\r\n primary: 512 /* Alt */ | 46 /* KEY_P */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 46 /* KEY_P */ }\r\n};\r\nconst FIND_IDS = {\r\n StartFindAction: 'actions.find',\r\n StartFindWithSelection: 'actions.findWithSelection',\r\n NextMatchFindAction: 'editor.action.nextMatchFindAction',\r\n PreviousMatchFindAction: 'editor.action.previousMatchFindAction',\r\n NextSelectionMatchFindAction: 'editor.action.nextSelectionMatchFindAction',\r\n PreviousSelectionMatchFindAction: 'editor.action.previousSelectionMatchFindAction',\r\n StartFindReplaceAction: 'editor.action.startFindReplaceAction',\r\n CloseFindWidgetCommand: 'closeFindWidget',\r\n ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive',\r\n ToggleWholeWordCommand: 'toggleFindWholeWord',\r\n ToggleRegexCommand: 'toggleFindRegex',\r\n ToggleSearchScopeCommand: 'toggleFindInSelection',\r\n TogglePreserveCaseCommand: 'togglePreserveCase',\r\n ReplaceOneAction: 'editor.action.replaceOne',\r\n ReplaceAllAction: 'editor.action.replaceAll',\r\n SelectAllMatchesAction: 'editor.action.selectAllMatches'\r\n};\r\nconst MATCHES_LIMIT = 19999;\r\nconst RESEARCH_DELAY = 240;\r\nclass FindModelBoundToEditorModel {\r\n constructor(editor, state) {\r\n this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._editor = editor;\r\n this._state = state;\r\n this._isDisposed = false;\r\n this._startSearchingTimer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer();\r\n this._decorations = new _findDecorations_js__WEBPACK_IMPORTED_MODULE_7__.FindDecorations(editor);\r\n this._toDispose.add(this._decorations);\r\n this._updateDecorationsScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this.research(false), 100);\r\n this._toDispose.add(this._updateDecorationsScheduler);\r\n this._toDispose.add(this._editor.onDidChangeCursorPosition((e) => {\r\n if (e.reason === 3 /* Explicit */\r\n || e.reason === 5 /* Undo */\r\n || e.reason === 6 /* Redo */) {\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n }\r\n }));\r\n this._ignoreModelContentChanged = false;\r\n this._toDispose.add(this._editor.onDidChangeModelContent((e) => {\r\n if (this._ignoreModelContentChanged) {\r\n return;\r\n }\r\n if (e.isFlush) {\r\n // a model.setValue() was called\r\n this._decorations.reset();\r\n }\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n this._updateDecorationsScheduler.schedule();\r\n }));\r\n this._toDispose.add(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this.research(false, this._state.searchScope);\r\n }\r\n dispose() {\r\n this._isDisposed = true;\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this._startSearchingTimer);\r\n this._toDispose.dispose();\r\n }\r\n _onStateChanged(e) {\r\n if (this._isDisposed) {\r\n // The find model is disposed during a find state changed event\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n // The find model will be disposed momentarily\r\n return;\r\n }\r\n if (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) {\r\n let model = this._editor.getModel();\r\n if (model.isTooLargeForSyncing()) {\r\n this._startSearchingTimer.cancel();\r\n this._startSearchingTimer.setIfNotSet(() => {\r\n if (e.searchScope) {\r\n this.research(e.moveCursor, this._state.searchScope);\r\n }\r\n else {\r\n this.research(e.moveCursor);\r\n }\r\n }, RESEARCH_DELAY);\r\n }\r\n else {\r\n if (e.searchScope) {\r\n this.research(e.moveCursor, this._state.searchScope);\r\n }\r\n else {\r\n this.research(e.moveCursor);\r\n }\r\n }\r\n }\r\n }\r\n static _getSearchRange(model, findScope) {\r\n // If we have set now or before a find scope, use it for computing the search range\r\n if (findScope) {\r\n return findScope;\r\n }\r\n return model.getFullModelRange();\r\n }\r\n research(moveCursor, newFindScope) {\r\n let findScopes = null;\r\n if (typeof newFindScope !== 'undefined') {\r\n if (newFindScope !== null) {\r\n if (!Array.isArray(newFindScope)) {\r\n findScopes = [newFindScope];\r\n }\r\n else {\r\n findScopes = newFindScope;\r\n }\r\n }\r\n }\r\n else {\r\n findScopes = this._decorations.getFindScopes();\r\n }\r\n if (findScopes !== null) {\r\n findScopes = findScopes.map(findScope => {\r\n if (findScope.startLineNumber !== findScope.endLineNumber) {\r\n let endLineNumber = findScope.endLineNumber;\r\n if (findScope.endColumn === 1) {\r\n endLineNumber = endLineNumber - 1;\r\n }\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(findScope.startLineNumber, 1, endLineNumber, this._editor.getModel().getLineMaxColumn(endLineNumber));\r\n }\r\n return findScope;\r\n });\r\n }\r\n let findMatches = this._findMatches(findScopes, false, MATCHES_LIMIT);\r\n this._decorations.set(findMatches, findScopes);\r\n const editorSelection = this._editor.getSelection();\r\n let currentMatchesPosition = this._decorations.getCurrentMatchesPosition(editorSelection);\r\n if (currentMatchesPosition === 0 && findMatches.length > 0) {\r\n // current selection is not on top of a match\r\n // try to find its nearest result from the top of the document\r\n const matchAfterSelection = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__.findFirstInSorted)(findMatches.map(match => match.range), range => _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.compareRangesUsingStarts(range, editorSelection) >= 0);\r\n currentMatchesPosition = matchAfterSelection > 0 ? matchAfterSelection - 1 + 1 /** match position is one based */ : currentMatchesPosition;\r\n }\r\n this._state.changeMatchInfo(currentMatchesPosition, this._decorations.getCount(), undefined);\r\n if (moveCursor && this._editor.getOption(31 /* find */).cursorMoveOnType) {\r\n this._moveToNextMatch(this._decorations.getStartPosition());\r\n }\r\n }\r\n _hasMatches() {\r\n return (this._state.matchesCount > 0);\r\n }\r\n _cannotFind() {\r\n if (!this._hasMatches()) {\r\n let findScope = this._decorations.getFindScope();\r\n if (findScope) {\r\n // Reveal the selection so user is reminded that 'selection find' is on.\r\n this._editor.revealRangeInCenterIfOutsideViewport(findScope, 0 /* Smooth */);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n _setCurrentFindMatch(match) {\r\n let matchesPosition = this._decorations.setCurrentFindMatch(match);\r\n this._state.changeMatchInfo(matchesPosition, this._decorations.getCount(), match);\r\n this._editor.setSelection(match);\r\n this._editor.revealRangeInCenterIfOutsideViewport(match, 0 /* Smooth */);\r\n }\r\n _prevSearchPosition(before) {\r\n let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\r\n || this._state.searchString.indexOf('$') >= 0);\r\n let { lineNumber, column } = before;\r\n let model = this._editor.getModel();\r\n if (isUsingLineStops || column === 1) {\r\n if (lineNumber === 1) {\r\n lineNumber = model.getLineCount();\r\n }\r\n else {\r\n lineNumber--;\r\n }\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n else {\r\n column--;\r\n }\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, column);\r\n }\r\n _moveToPrevMatch(before, isRecursed = false) {\r\n if (!this._state.canNavigateBack()) {\r\n // we are beyond the first matched find result\r\n // instead of doing nothing, we should refocus the first item\r\n const nextMatchRange = this._decorations.matchAfterPosition(before);\r\n if (nextMatchRange) {\r\n this._setCurrentFindMatch(nextMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._decorations.getCount() < MATCHES_LIMIT) {\r\n let prevMatchRange = this._decorations.matchBeforePosition(before);\r\n if (prevMatchRange && prevMatchRange.isEmpty() && prevMatchRange.getStartPosition().equals(before)) {\r\n before = this._prevSearchPosition(before);\r\n prevMatchRange = this._decorations.matchBeforePosition(before);\r\n }\r\n if (prevMatchRange) {\r\n this._setCurrentFindMatch(prevMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._cannotFind()) {\r\n return;\r\n }\r\n let findScope = this._decorations.getFindScope();\r\n let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\r\n // ...(----)...|...\r\n if (searchRange.getEndPosition().isBefore(before)) {\r\n before = searchRange.getEndPosition();\r\n }\r\n // ...|...(----)...\r\n if (before.isBefore(searchRange.getStartPosition())) {\r\n before = searchRange.getEndPosition();\r\n }\r\n let { lineNumber, column } = before;\r\n let model = this._editor.getModel();\r\n let position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, column);\r\n let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n position = this._prevSearchPosition(position);\r\n prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n }\r\n if (!prevMatch) {\r\n // there is precisely one match and selection is on top of it\r\n return;\r\n }\r\n if (!isRecursed && !searchRange.containsRange(prevMatch.range)) {\r\n return this._moveToPrevMatch(prevMatch.range.getStartPosition(), true);\r\n }\r\n this._setCurrentFindMatch(prevMatch.range);\r\n }\r\n moveToPrevMatch() {\r\n this._moveToPrevMatch(this._editor.getSelection().getStartPosition());\r\n }\r\n _nextSearchPosition(after) {\r\n let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\r\n || this._state.searchString.indexOf('$') >= 0);\r\n let { lineNumber, column } = after;\r\n let model = this._editor.getModel();\r\n if (isUsingLineStops || column === model.getLineMaxColumn(lineNumber)) {\r\n if (lineNumber === model.getLineCount()) {\r\n lineNumber = 1;\r\n }\r\n else {\r\n lineNumber++;\r\n }\r\n column = 1;\r\n }\r\n else {\r\n column++;\r\n }\r\n return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, column);\r\n }\r\n _moveToNextMatch(after) {\r\n if (!this._state.canNavigateForward()) {\r\n // we are beyond the last matched find result\r\n // instead of doing nothing, we should refocus the last item\r\n const prevMatchRange = this._decorations.matchBeforePosition(after);\r\n if (prevMatchRange) {\r\n this._setCurrentFindMatch(prevMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._decorations.getCount() < MATCHES_LIMIT) {\r\n let nextMatchRange = this._decorations.matchAfterPosition(after);\r\n if (nextMatchRange && nextMatchRange.isEmpty() && nextMatchRange.getStartPosition().equals(after)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n after = this._nextSearchPosition(after);\r\n nextMatchRange = this._decorations.matchAfterPosition(after);\r\n }\r\n if (nextMatchRange) {\r\n this._setCurrentFindMatch(nextMatchRange);\r\n }\r\n return;\r\n }\r\n let nextMatch = this._getNextMatch(after, false, true);\r\n if (nextMatch) {\r\n this._setCurrentFindMatch(nextMatch.range);\r\n }\r\n }\r\n _getNextMatch(after, captureMatches, forceMove, isRecursed = false) {\r\n if (this._cannotFind()) {\r\n return null;\r\n }\r\n let findScope = this._decorations.getFindScope();\r\n let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\r\n // ...(----)...|...\r\n if (searchRange.getEndPosition().isBefore(after)) {\r\n after = searchRange.getStartPosition();\r\n }\r\n // ...|...(----)...\r\n if (after.isBefore(searchRange.getStartPosition())) {\r\n after = searchRange.getStartPosition();\r\n }\r\n let { lineNumber, column } = after;\r\n let model = this._editor.getModel();\r\n let position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(lineNumber, column);\r\n let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches);\r\n if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n position = this._nextSearchPosition(position);\r\n nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches);\r\n }\r\n if (!nextMatch) {\r\n // there is precisely one match and selection is on top of it\r\n return null;\r\n }\r\n if (!isRecursed && !searchRange.containsRange(nextMatch.range)) {\r\n return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true);\r\n }\r\n return nextMatch;\r\n }\r\n moveToNextMatch() {\r\n this._moveToNextMatch(this._editor.getSelection().getEndPosition());\r\n }\r\n _getReplacePattern() {\r\n if (this._state.isRegex) {\r\n return (0,_replacePattern_js__WEBPACK_IMPORTED_MODULE_9__.parseReplaceString)(this._state.replaceString);\r\n }\r\n return _replacePattern_js__WEBPACK_IMPORTED_MODULE_9__.ReplacePattern.fromStaticValue(this._state.replaceString);\r\n }\r\n replace() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n let replacePattern = this._getReplacePattern();\r\n let selection = this._editor.getSelection();\r\n let nextMatch = this._getNextMatch(selection.getStartPosition(), true, false);\r\n if (nextMatch) {\r\n if (selection.equalsRange(nextMatch.range)) {\r\n // selection sits on a find match => replace it!\r\n let replaceString = replacePattern.buildReplaceString(nextMatch.matches, this._state.preserveCase);\r\n let command = new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(selection, replaceString);\r\n this._executeEditorCommand('replace', command);\r\n this._decorations.setStartPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(selection.startLineNumber, selection.startColumn + replaceString.length));\r\n this.research(true);\r\n }\r\n else {\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n this._setCurrentFindMatch(nextMatch.range);\r\n }\r\n }\r\n }\r\n _findMatches(findScopes, captureMatches, limitResultCount) {\r\n const searchRanges = (findScopes || [null]).map((scope) => FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), scope));\r\n return this._editor.getModel().findMatches(this._state.searchString, searchRanges, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches, limitResultCount);\r\n }\r\n replaceAll() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n const findScopes = this._decorations.getFindScopes();\r\n if (findScopes === null && this._state.matchesCount >= MATCHES_LIMIT) {\r\n // Doing a replace on the entire file that is over ${MATCHES_LIMIT} matches\r\n this._largeReplaceAll();\r\n }\r\n else {\r\n this._regularReplaceAll(findScopes);\r\n }\r\n this.research(false);\r\n }\r\n _largeReplaceAll() {\r\n const searchParams = new _common_model_textModelSearch_js__WEBPACK_IMPORTED_MODULE_6__.SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null);\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return;\r\n }\r\n let searchRegex = searchData.regex;\r\n if (!searchRegex.multiline) {\r\n let mod = 'mu';\r\n if (searchRegex.ignoreCase) {\r\n mod += 'i';\r\n }\r\n if (searchRegex.global) {\r\n mod += 'g';\r\n }\r\n searchRegex = new RegExp(searchRegex.source, mod);\r\n }\r\n const model = this._editor.getModel();\r\n const modelText = model.getValue(1 /* LF */);\r\n const fullModelRange = model.getFullModelRange();\r\n const replacePattern = this._getReplacePattern();\r\n let resultText;\r\n const preserveCase = this._state.preserveCase;\r\n if (replacePattern.hasReplacementPatterns || preserveCase) {\r\n resultText = modelText.replace(searchRegex, function () {\r\n return replacePattern.buildReplaceString(arguments, preserveCase);\r\n });\r\n }\r\n else {\r\n resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null, preserveCase));\r\n }\r\n let command = new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommandThatPreservesSelection(fullModelRange, resultText, this._editor.getSelection());\r\n this._executeEditorCommand('replaceAll', command);\r\n }\r\n _regularReplaceAll(findScopes) {\r\n const replacePattern = this._getReplacePattern();\r\n // Get all the ranges (even more than the highlighted ones)\r\n let matches = this._findMatches(findScopes, replacePattern.hasReplacementPatterns || this._state.preserveCase, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n let replaceStrings = [];\r\n for (let i = 0, len = matches.length; i < len; i++) {\r\n replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches, this._state.preserveCase);\r\n }\r\n let command = new _replaceAllCommand_js__WEBPACK_IMPORTED_MODULE_8__.ReplaceAllCommand(this._editor.getSelection(), matches.map(m => m.range), replaceStrings);\r\n this._executeEditorCommand('replaceAll', command);\r\n }\r\n selectAllMatches() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n let findScopes = this._decorations.getFindScopes();\r\n // Get all the ranges (even more than the highlighted ones)\r\n let matches = this._findMatches(findScopes, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n let selections = matches.map(m => new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__.Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn));\r\n // If one of the ranges is the editor selection, then maintain it as primary\r\n let editorSelection = this._editor.getSelection();\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let sel = selections[i];\r\n if (sel.equalsRange(editorSelection)) {\r\n selections = [editorSelection].concat(selections.slice(0, i)).concat(selections.slice(i + 1));\r\n break;\r\n }\r\n }\r\n this._editor.setSelections(selections);\r\n }\r\n _executeEditorCommand(source, command) {\r\n try {\r\n this._ignoreModelContentChanged = true;\r\n this._editor.pushUndoStop();\r\n this._editor.executeCommand(source, command);\r\n this._editor.pushUndoStop();\r\n }\r\n finally {\r\n this._ignoreModelContentChanged = false;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FindOptionsWidget\": () => (/* binding */ FindOptionsWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/findinput/findInputCheckboxes.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js\");\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./findModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass FindOptionsWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_2__.Widget {\r\n constructor(editor, state, keybindingService, themeService) {\r\n super();\r\n this._hideSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_3__.RunOnceScheduler(() => this._hide(), 2000));\r\n this._isVisible = false;\r\n this._editor = editor;\r\n this._state = state;\r\n this._keybindingService = keybindingService;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'findOptionsWidget';\r\n this._domNode.style.display = 'none';\r\n this._domNode.style.top = '10px';\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n const inputActiveOptionBorderColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionBorder);\r\n const inputActiveOptionForegroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionForeground);\r\n const inputActiveOptionBackgroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionBackground);\r\n this.caseSensitive = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__.CaseSensitiveCheckbox({\r\n appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__.FIND_IDS.ToggleCaseSensitiveCommand),\r\n isChecked: this._state.matchCase,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.caseSensitive.domNode);\r\n this._register(this.caseSensitive.onChange(() => {\r\n this._state.change({\r\n matchCase: this.caseSensitive.checked\r\n }, false);\r\n }));\r\n this.wholeWords = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__.WholeWordsCheckbox({\r\n appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__.FIND_IDS.ToggleWholeWordCommand),\r\n isChecked: this._state.wholeWord,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.wholeWords.domNode);\r\n this._register(this.wholeWords.onChange(() => {\r\n this._state.change({\r\n wholeWord: this.wholeWords.checked\r\n }, false);\r\n }));\r\n this.regex = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__.RegexCheckbox({\r\n appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__.FIND_IDS.ToggleRegexCommand),\r\n isChecked: this._state.isRegex,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.regex.domNode);\r\n this._register(this.regex.onChange(() => {\r\n this._state.change({\r\n isRegex: this.regex.checked\r\n }, false);\r\n }));\r\n this._editor.addOverlayWidget(this);\r\n this._register(this._state.onFindReplaceStateChange((e) => {\r\n let somethingChanged = false;\r\n if (e.isRegex) {\r\n this.regex.checked = this._state.isRegex;\r\n somethingChanged = true;\r\n }\r\n if (e.wholeWord) {\r\n this.wholeWords.checked = this._state.wholeWord;\r\n somethingChanged = true;\r\n }\r\n if (e.matchCase) {\r\n this.caseSensitive.checked = this._state.matchCase;\r\n somethingChanged = true;\r\n }\r\n if (!this._state.isRevealed && somethingChanged) {\r\n this._revealTemporarily();\r\n }\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableNonBubblingMouseOutListener(this._domNode, (e) => this._onMouseOut()));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\r\n this._applyTheme(themeService.getColorTheme());\r\n this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n }\r\n _keybindingLabelFor(actionId) {\r\n let kb = this._keybindingService.lookupKeybinding(actionId);\r\n if (!kb) {\r\n return '';\r\n }\r\n return ` (${kb.getLabel()})`;\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return FindOptionsWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: 0 /* TOP_RIGHT_CORNER */\r\n };\r\n }\r\n highlightFindOptions() {\r\n this._revealTemporarily();\r\n }\r\n _revealTemporarily() {\r\n this._show();\r\n this._hideSoon.schedule();\r\n }\r\n _onMouseOut() {\r\n this._hideSoon.schedule();\r\n }\r\n _onMouseOver() {\r\n this._hideSoon.cancel();\r\n }\r\n _show() {\r\n if (this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = true;\r\n this._domNode.style.display = 'block';\r\n }\r\n _hide() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = false;\r\n this._domNode.style.display = 'none';\r\n }\r\n _applyTheme(theme) {\r\n let inputStyles = {\r\n inputActiveOptionBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionBorder),\r\n inputActiveOptionForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionForeground),\r\n inputActiveOptionBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputActiveOptionBackground)\r\n };\r\n this.caseSensitive.style(inputStyles);\r\n this.wholeWords.style(inputStyles);\r\n this.regex.style(inputStyles);\r\n }\r\n}\r\nFindOptionsWidget.ID = 'editor.contrib.findOptionsWidget';\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__.registerThemingParticipant)((theme, collector) => {\r\n const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorWidgetBackground);\r\n if (widgetBackground) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { background-color: ${widgetBackground}; }`);\r\n }\r\n const widgetForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorWidgetForeground);\r\n if (widgetForeground) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { color: ${widgetForeground}; }`);\r\n }\r\n const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);\r\n }\r\n const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${hcBorder}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FindReplaceState\": () => (/* binding */ FindReplaceState)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./findModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nfunction effectiveOptionValue(override, value) {\r\n if (override === 1 /* True */) {\r\n return true;\r\n }\r\n if (override === 2 /* False */) {\r\n return false;\r\n }\r\n return value;\r\n}\r\nclass FindReplaceState extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super();\r\n this._onFindReplaceStateChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter());\r\n this.onFindReplaceStateChange = this._onFindReplaceStateChange.event;\r\n this._searchString = '';\r\n this._replaceString = '';\r\n this._isRevealed = false;\r\n this._isReplaceRevealed = false;\r\n this._isRegex = false;\r\n this._isRegexOverride = 0 /* NotSet */;\r\n this._wholeWord = false;\r\n this._wholeWordOverride = 0 /* NotSet */;\r\n this._matchCase = false;\r\n this._matchCaseOverride = 0 /* NotSet */;\r\n this._preserveCase = false;\r\n this._preserveCaseOverride = 0 /* NotSet */;\r\n this._searchScope = null;\r\n this._matchesPosition = 0;\r\n this._matchesCount = 0;\r\n this._currentMatch = null;\r\n this._loop = true;\r\n }\r\n get searchString() { return this._searchString; }\r\n get replaceString() { return this._replaceString; }\r\n get isRevealed() { return this._isRevealed; }\r\n get isReplaceRevealed() { return this._isReplaceRevealed; }\r\n get isRegex() { return effectiveOptionValue(this._isRegexOverride, this._isRegex); }\r\n get wholeWord() { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); }\r\n get matchCase() { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); }\r\n get preserveCase() { return effectiveOptionValue(this._preserveCaseOverride, this._preserveCase); }\r\n get actualIsRegex() { return this._isRegex; }\r\n get actualWholeWord() { return this._wholeWord; }\r\n get actualMatchCase() { return this._matchCase; }\r\n get actualPreserveCase() { return this._preserveCase; }\r\n get searchScope() { return this._searchScope; }\r\n get matchesPosition() { return this._matchesPosition; }\r\n get matchesCount() { return this._matchesCount; }\r\n get currentMatch() { return this._currentMatch; }\r\n changeMatchInfo(matchesPosition, matchesCount, currentMatch) {\r\n let changeEvent = {\r\n moveCursor: false,\r\n updateHistory: false,\r\n searchString: false,\r\n replaceString: false,\r\n isRevealed: false,\r\n isReplaceRevealed: false,\r\n isRegex: false,\r\n wholeWord: false,\r\n matchCase: false,\r\n preserveCase: false,\r\n searchScope: false,\r\n matchesPosition: false,\r\n matchesCount: false,\r\n currentMatch: false,\r\n loop: false\r\n };\r\n let somethingChanged = false;\r\n if (matchesCount === 0) {\r\n matchesPosition = 0;\r\n }\r\n if (matchesPosition > matchesCount) {\r\n matchesPosition = matchesCount;\r\n }\r\n if (this._matchesPosition !== matchesPosition) {\r\n this._matchesPosition = matchesPosition;\r\n changeEvent.matchesPosition = true;\r\n somethingChanged = true;\r\n }\r\n if (this._matchesCount !== matchesCount) {\r\n this._matchesCount = matchesCount;\r\n changeEvent.matchesCount = true;\r\n somethingChanged = true;\r\n }\r\n if (typeof currentMatch !== 'undefined') {\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.equalsRange(this._currentMatch, currentMatch)) {\r\n this._currentMatch = currentMatch;\r\n changeEvent.currentMatch = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (somethingChanged) {\r\n this._onFindReplaceStateChange.fire(changeEvent);\r\n }\r\n }\r\n change(newState, moveCursor, updateHistory = true) {\r\n var _a;\r\n let changeEvent = {\r\n moveCursor: moveCursor,\r\n updateHistory: updateHistory,\r\n searchString: false,\r\n replaceString: false,\r\n isRevealed: false,\r\n isReplaceRevealed: false,\r\n isRegex: false,\r\n wholeWord: false,\r\n matchCase: false,\r\n preserveCase: false,\r\n searchScope: false,\r\n matchesPosition: false,\r\n matchesCount: false,\r\n currentMatch: false,\r\n loop: false\r\n };\r\n let somethingChanged = false;\r\n const oldEffectiveIsRegex = this.isRegex;\r\n const oldEffectiveWholeWords = this.wholeWord;\r\n const oldEffectiveMatchCase = this.matchCase;\r\n const oldEffectivePreserveCase = this.preserveCase;\r\n if (typeof newState.searchString !== 'undefined') {\r\n if (this._searchString !== newState.searchString) {\r\n this._searchString = newState.searchString;\r\n changeEvent.searchString = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.replaceString !== 'undefined') {\r\n if (this._replaceString !== newState.replaceString) {\r\n this._replaceString = newState.replaceString;\r\n changeEvent.replaceString = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isRevealed !== 'undefined') {\r\n if (this._isRevealed !== newState.isRevealed) {\r\n this._isRevealed = newState.isRevealed;\r\n changeEvent.isRevealed = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isReplaceRevealed !== 'undefined') {\r\n if (this._isReplaceRevealed !== newState.isReplaceRevealed) {\r\n this._isReplaceRevealed = newState.isReplaceRevealed;\r\n changeEvent.isReplaceRevealed = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isRegex !== 'undefined') {\r\n this._isRegex = newState.isRegex;\r\n }\r\n if (typeof newState.wholeWord !== 'undefined') {\r\n this._wholeWord = newState.wholeWord;\r\n }\r\n if (typeof newState.matchCase !== 'undefined') {\r\n this._matchCase = newState.matchCase;\r\n }\r\n if (typeof newState.preserveCase !== 'undefined') {\r\n this._preserveCase = newState.preserveCase;\r\n }\r\n if (typeof newState.searchScope !== 'undefined') {\r\n if (!((_a = newState.searchScope) === null || _a === void 0 ? void 0 : _a.every((newSearchScope) => {\r\n var _a;\r\n return (_a = this._searchScope) === null || _a === void 0 ? void 0 : _a.some(existingSearchScope => {\r\n return !_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.equalsRange(existingSearchScope, newSearchScope);\r\n });\r\n }))) {\r\n this._searchScope = newState.searchScope;\r\n changeEvent.searchScope = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.loop !== 'undefined') {\r\n if (this._loop !== newState.loop) {\r\n this._loop = newState.loop;\r\n changeEvent.loop = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n // Overrides get set when they explicitly come in and get reset anytime something else changes\r\n this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : 0 /* NotSet */);\r\n this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : 0 /* NotSet */);\r\n this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : 0 /* NotSet */);\r\n this._preserveCaseOverride = (typeof newState.preserveCaseOverride !== 'undefined' ? newState.preserveCaseOverride : 0 /* NotSet */);\r\n if (oldEffectiveIsRegex !== this.isRegex) {\r\n somethingChanged = true;\r\n changeEvent.isRegex = true;\r\n }\r\n if (oldEffectiveWholeWords !== this.wholeWord) {\r\n somethingChanged = true;\r\n changeEvent.wholeWord = true;\r\n }\r\n if (oldEffectiveMatchCase !== this.matchCase) {\r\n somethingChanged = true;\r\n changeEvent.matchCase = true;\r\n }\r\n if (oldEffectivePreserveCase !== this.preserveCase) {\r\n somethingChanged = true;\r\n changeEvent.preserveCase = true;\r\n }\r\n if (somethingChanged) {\r\n this._onFindReplaceStateChange.fire(changeEvent);\r\n }\r\n }\r\n canNavigateBack() {\r\n return this.canNavigateInLoop() || (this.matchesPosition !== 1);\r\n }\r\n canNavigateForward() {\r\n return this.canNavigateInLoop() || (this.matchesPosition < this.matchesCount);\r\n }\r\n canNavigateInLoop() {\r\n return this._loop || (this.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_3__.MATCHES_LIMIT);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"findReplaceIcon\": () => (/* binding */ findReplaceIcon),\n/* harmony export */ \"findReplaceAllIcon\": () => (/* binding */ findReplaceAllIcon),\n/* harmony export */ \"findPreviousMatchIcon\": () => (/* binding */ findPreviousMatchIcon),\n/* harmony export */ \"findNextMatchIcon\": () => (/* binding */ findNextMatchIcon),\n/* harmony export */ \"FindWidgetViewZone\": () => (/* binding */ FindWidgetViewZone),\n/* harmony export */ \"FindWidget\": () => (/* binding */ FindWidget),\n/* harmony export */ \"SimpleButton\": () => (/* binding */ SimpleButton)\n/* harmony export */ });\n/* harmony import */ var _findWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_browser_ui_checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/checkbox/checkbox.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js\");\n/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js\");\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./findModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/browser/contextScopedHistoryWidget.js */ \"./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst findSelectionIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-selection', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.selection, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findSelectionIcon', 'Icon for \\'Find in Selection\\' in the editor find widget.'));\r\nconst findCollapsedIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-collapsed', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.chevronRight, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findCollapsedIcon', 'Icon to indicate that the editor find widget is collapsed.'));\r\nconst findExpandedIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-expanded', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.chevronDown, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findExpandedIcon', 'Icon to indicate that the editor find widget is expanded.'));\r\nconst findReplaceIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-replace', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.replace, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findReplaceIcon', 'Icon for \\'Replace\\' in the editor find widget.'));\r\nconst findReplaceAllIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-replace-all', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.replaceAll, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findReplaceAllIcon', 'Icon for \\'Replace All\\' in the editor find widget.'));\r\nconst findPreviousMatchIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-previous-match', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.arrowUp, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findPreviousMatchIcon', 'Icon for \\'Find Previous\\' in the editor find widget.'));\r\nconst findNextMatchIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.registerIcon)('find-next-match', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.arrowDown, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('findNextMatchIcon', 'Icon for \\'Find Next\\' in the editor find widget.'));\r\nconst NLS_FIND_INPUT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.find', \"Find\");\r\nconst NLS_FIND_INPUT_PLACEHOLDER = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('placeholder.find', \"Find\");\r\nconst NLS_PREVIOUS_MATCH_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.previousMatchButton', \"Previous match\");\r\nconst NLS_NEXT_MATCH_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.nextMatchButton', \"Next match\");\r\nconst NLS_TOGGLE_SELECTION_FIND_TITLE = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.toggleSelectionFind', \"Find in selection\");\r\nconst NLS_CLOSE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.closeButton', \"Close\");\r\nconst NLS_REPLACE_INPUT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.replace', \"Replace\");\r\nconst NLS_REPLACE_INPUT_PLACEHOLDER = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('placeholder.replace', \"Replace\");\r\nconst NLS_REPLACE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.replaceButton', \"Replace\");\r\nconst NLS_REPLACE_ALL_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.replaceAllButton', \"Replace All\");\r\nconst NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.toggleReplaceButton', \"Toggle Replace mode\");\r\nconst NLS_MATCHES_COUNT_LIMIT_TITLE = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('title.matchesCountLimit', \"Only the first {0} results are highlighted, but all find operations work on the entire text.\", _findModel_js__WEBPACK_IMPORTED_MODULE_13__.MATCHES_LIMIT);\r\nconst NLS_MATCHES_LOCATION = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.matchesLocation', \"{0} of {1}\");\r\nconst NLS_NO_RESULTS = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label.noResults', \"No results\");\r\nconst FIND_WIDGET_INITIAL_WIDTH = 419;\r\nconst PART_WIDTH = 275;\r\nconst FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54;\r\nlet MAX_MATCHES_COUNT_WIDTH = 69;\r\n// let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */;\r\nconst FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible.\r\nconst ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask';\r\nconst ctrlKeyMod = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isMacintosh ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */);\r\nclass FindWidgetViewZone {\r\n constructor(afterLineNumber) {\r\n this.afterLineNumber = afterLineNumber;\r\n this.heightInPx = FIND_INPUT_AREA_HEIGHT;\r\n this.suppressMouseDown = false;\r\n this.domNode = document.createElement('div');\r\n this.domNode.className = 'dock-find-viewzone';\r\n }\r\n}\r\nfunction stopPropagationForMultiLineUpwards(event, value, textarea) {\r\n const isMultiline = !!value.match(/\\n/);\r\n if (textarea && isMultiline && textarea.selectionStart > 0) {\r\n event.stopPropagation();\r\n return;\r\n }\r\n}\r\nfunction stopPropagationForMultiLineDownwards(event, value, textarea) {\r\n const isMultiline = !!value.match(/\\n/);\r\n if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) {\r\n event.stopPropagation();\r\n return;\r\n }\r\n}\r\nclass FindWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__.Widget {\r\n constructor(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService, storageService, notificationService) {\r\n super();\r\n this._cachedHeight = null;\r\n this._revealTimeouts = [];\r\n this._codeEditor = codeEditor;\r\n this._controller = controller;\r\n this._state = state;\r\n this._contextViewProvider = contextViewProvider;\r\n this._keybindingService = keybindingService;\r\n this._contextKeyService = contextKeyService;\r\n this._storageService = storageService;\r\n this._notificationService = notificationService;\r\n this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, 0 /* GLOBAL */);\r\n this._isVisible = false;\r\n this._isReplaceVisible = false;\r\n this._ignoreChangeEvent = false;\r\n this._updateHistoryDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_7__.Delayer(500);\r\n this._register((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.toDisposable)(() => this._updateHistoryDelayer.cancel()));\r\n this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this._buildDomNode();\r\n this._updateButtons();\r\n this._tryUpdateWidgetWidth();\r\n this._findInput.inputBox.layout();\r\n this._register(this._codeEditor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(75 /* readOnly */)) {\r\n if (this._codeEditor.getOption(75 /* readOnly */)) {\r\n // Hide replace part if editor becomes read only\r\n this._state.change({ isReplaceRevealed: false }, false);\r\n }\r\n this._updateButtons();\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._tryUpdateWidgetWidth();\r\n }\r\n if (e.hasChanged(2 /* accessibilitySupport */)) {\r\n this.updateAccessibilitySupport();\r\n }\r\n if (e.hasChanged(31 /* find */)) {\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (addExtraSpaceOnTop && !this._viewZone) {\r\n this._viewZone = new FindWidgetViewZone(0);\r\n this._showViewZone();\r\n }\r\n if (!addExtraSpaceOnTop && this._viewZone) {\r\n this._removeViewZone();\r\n }\r\n }\r\n }));\r\n this.updateAccessibilitySupport();\r\n this._register(this._codeEditor.onDidChangeCursorSelection(() => {\r\n if (this._isVisible) {\r\n this._updateToggleSelectionFindButton();\r\n }\r\n }));\r\n this._register(this._codeEditor.onDidFocusEditorWidget(() => __awaiter(this, void 0, void 0, function* () {\r\n if (this._isVisible) {\r\n let globalBufferTerm = yield this._controller.getGlobalBufferTerm();\r\n if (globalBufferTerm && globalBufferTerm !== this._state.searchString) {\r\n this._state.change({ searchString: globalBufferTerm }, false);\r\n this._findInput.select();\r\n }\r\n }\r\n })));\r\n this._findInputFocused = _findModel_js__WEBPACK_IMPORTED_MODULE_13__.CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService);\r\n this._findFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.trackFocus(this._findInput.inputBox.inputElement));\r\n this._register(this._findFocusTracker.onDidFocus(() => {\r\n this._findInputFocused.set(true);\r\n this._updateSearchScope();\r\n }));\r\n this._register(this._findFocusTracker.onDidBlur(() => {\r\n this._findInputFocused.set(false);\r\n }));\r\n this._replaceInputFocused = _findModel_js__WEBPACK_IMPORTED_MODULE_13__.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService);\r\n this._replaceFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.trackFocus(this._replaceInput.inputBox.inputElement));\r\n this._register(this._replaceFocusTracker.onDidFocus(() => {\r\n this._replaceInputFocused.set(true);\r\n this._updateSearchScope();\r\n }));\r\n this._register(this._replaceFocusTracker.onDidBlur(() => {\r\n this._replaceInputFocused.set(false);\r\n }));\r\n this._codeEditor.addOverlayWidget(this);\r\n if (this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop) {\r\n this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line.\r\n }\r\n this._applyTheme(themeService.getColorTheme());\r\n this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this._register(this._codeEditor.onDidChangeModel(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._viewZoneId = undefined;\r\n }));\r\n this._register(this._codeEditor.onDidScrollChange((e) => {\r\n if (e.scrollTopChanged) {\r\n this._layoutViewZone();\r\n return;\r\n }\r\n // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering.\r\n setTimeout(() => {\r\n this._layoutViewZone();\r\n }, 0);\r\n }));\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return FindWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n if (this._isVisible) {\r\n return {\r\n preference: 0 /* TOP_RIGHT_CORNER */\r\n };\r\n }\r\n return null;\r\n }\r\n // ----- React to state changes\r\n _onStateChanged(e) {\r\n if (e.searchString) {\r\n try {\r\n this._ignoreChangeEvent = true;\r\n this._findInput.setValue(this._state.searchString);\r\n }\r\n finally {\r\n this._ignoreChangeEvent = false;\r\n }\r\n this._updateButtons();\r\n }\r\n if (e.replaceString) {\r\n this._replaceInput.inputBox.value = this._state.replaceString;\r\n }\r\n if (e.isRevealed) {\r\n if (this._state.isRevealed) {\r\n this._reveal();\r\n }\r\n else {\r\n this._hide(true);\r\n }\r\n }\r\n if (e.isReplaceRevealed) {\r\n if (this._state.isReplaceRevealed) {\r\n if (!this._codeEditor.getOption(75 /* readOnly */) && !this._isReplaceVisible) {\r\n this._isReplaceVisible = true;\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n this._updateButtons();\r\n this._replaceInput.inputBox.layout();\r\n }\r\n }\r\n else {\r\n if (this._isReplaceVisible) {\r\n this._isReplaceVisible = false;\r\n this._updateButtons();\r\n }\r\n }\r\n }\r\n if ((e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed)) {\r\n if (this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }\r\n if (e.isRegex) {\r\n this._findInput.setRegex(this._state.isRegex);\r\n }\r\n if (e.wholeWord) {\r\n this._findInput.setWholeWords(this._state.wholeWord);\r\n }\r\n if (e.matchCase) {\r\n this._findInput.setCaseSensitive(this._state.matchCase);\r\n }\r\n if (e.preserveCase) {\r\n this._replaceInput.setPreserveCase(this._state.preserveCase);\r\n }\r\n if (e.searchScope) {\r\n if (this._state.searchScope) {\r\n this._toggleSelectionFind.checked = true;\r\n }\r\n else {\r\n this._toggleSelectionFind.checked = false;\r\n }\r\n this._updateToggleSelectionFindButton();\r\n }\r\n if (e.searchString || e.matchesCount || e.matchesPosition) {\r\n let showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0);\r\n this._domNode.classList.toggle('no-results', showRedOutline);\r\n this._updateMatchesCount();\r\n this._updateButtons();\r\n }\r\n if (e.searchString || e.currentMatch) {\r\n this._layoutViewZone();\r\n }\r\n if (e.updateHistory) {\r\n this._delayedUpdateHistory();\r\n }\r\n if (e.loop) {\r\n this._updateButtons();\r\n }\r\n }\r\n _delayedUpdateHistory() {\r\n this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError);\r\n }\r\n _updateHistory() {\r\n if (this._state.searchString) {\r\n this._findInput.inputBox.addToHistory();\r\n }\r\n if (this._state.replaceString) {\r\n this._replaceInput.inputBox.addToHistory();\r\n }\r\n }\r\n _updateMatchesCount() {\r\n this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px';\r\n if (this._state.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_13__.MATCHES_LIMIT) {\r\n this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE;\r\n }\r\n else {\r\n this._matchesCount.title = '';\r\n }\r\n // remove previous content\r\n if (this._matchesCount.firstChild) {\r\n this._matchesCount.removeChild(this._matchesCount.firstChild);\r\n }\r\n let label;\r\n if (this._state.matchesCount > 0) {\r\n let matchesCount = String(this._state.matchesCount);\r\n if (this._state.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_13__.MATCHES_LIMIT) {\r\n matchesCount += '+';\r\n }\r\n let matchesPosition = String(this._state.matchesPosition);\r\n if (matchesPosition === '0') {\r\n matchesPosition = '?';\r\n }\r\n label = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount);\r\n }\r\n else {\r\n label = NLS_NO_RESULTS;\r\n }\r\n this._matchesCount.appendChild(document.createTextNode(label));\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_3__.alert)(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString));\r\n MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth);\r\n }\r\n // ----- actions\r\n _getAriaLabel(label, currentMatch, searchString) {\r\n if (label === NLS_NO_RESULTS) {\r\n return searchString === ''\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('ariaSearchNoResultEmpty', \"{0} found\", label)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('ariaSearchNoResult', \"{0} found for '{1}'\", label, searchString);\r\n }\r\n if (currentMatch) {\r\n const ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('ariaSearchNoResultWithLineNum', \"{0} found for '{1}', at {2}\", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn);\r\n const model = this._codeEditor.getModel();\r\n if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) {\r\n const lineContent = model.getLineContent(currentMatch.startLineNumber);\r\n return `${lineContent}, ${ariaLabel}`;\r\n }\r\n return ariaLabel;\r\n }\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('ariaSearchNoResultWithLineNumNoCurrentMatch', \"{0} found for '{1}'\", label, searchString);\r\n }\r\n /**\r\n * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find').\r\n * If 'selection find' is OFF we enable the button only if there is a selection.\r\n */\r\n _updateToggleSelectionFindButton() {\r\n let selection = this._codeEditor.getSelection();\r\n let isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false;\r\n let isChecked = this._toggleSelectionFind.checked;\r\n if (this._isVisible && (isChecked || isSelection)) {\r\n this._toggleSelectionFind.enable();\r\n }\r\n else {\r\n this._toggleSelectionFind.disable();\r\n }\r\n }\r\n _updateButtons() {\r\n this._findInput.setEnabled(this._isVisible);\r\n this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible);\r\n this._updateToggleSelectionFindButton();\r\n this._closeBtn.setEnabled(this._isVisible);\r\n let findInputIsNonEmpty = (this._state.searchString.length > 0);\r\n let matchesCount = this._state.matchesCount ? true : false;\r\n this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateBack());\r\n this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateForward());\r\n this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\r\n this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\r\n this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible);\r\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\r\n let canReplace = !this._codeEditor.getOption(75 /* readOnly */);\r\n this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace);\r\n }\r\n _reveal() {\r\n this._revealTimeouts.forEach(e => {\r\n clearTimeout(e);\r\n });\r\n this._revealTimeouts = [];\r\n if (!this._isVisible) {\r\n this._isVisible = true;\r\n const selection = this._codeEditor.getSelection();\r\n switch (this._codeEditor.getOption(31 /* find */).autoFindInSelection) {\r\n case 'always':\r\n this._toggleSelectionFind.checked = true;\r\n break;\r\n case 'never':\r\n this._toggleSelectionFind.checked = false;\r\n break;\r\n case 'multiline':\r\n const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber;\r\n this._toggleSelectionFind.checked = isSelectionMultipleLine;\r\n break;\r\n default:\r\n break;\r\n }\r\n this._tryUpdateWidgetWidth();\r\n this._updateButtons();\r\n this._revealTimeouts.push(setTimeout(() => {\r\n this._domNode.classList.add('visible');\r\n this._domNode.setAttribute('aria-hidden', 'false');\r\n }, 0));\r\n // validate query again as it's being dismissed when we hide the find widget.\r\n this._revealTimeouts.push(setTimeout(() => {\r\n this._findInput.validate();\r\n }, 200));\r\n this._codeEditor.layoutOverlayWidget(this);\r\n let adjustEditorScrollTop = true;\r\n if (this._codeEditor.getOption(31 /* find */).seedSearchStringFromSelection && selection) {\r\n const domNode = this._codeEditor.getDomNode();\r\n if (domNode) {\r\n const editorCoords = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getDomNodePagePosition(domNode);\r\n const startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition());\r\n const startLeft = editorCoords.left + (startCoords ? startCoords.left : 0);\r\n const startTop = startCoords ? startCoords.top : 0;\r\n if (this._viewZone && startTop < this._viewZone.heightInPx) {\r\n if (selection.endLineNumber > selection.startLineNumber) {\r\n adjustEditorScrollTop = false;\r\n }\r\n const leftOfFindWidget = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTopLeftOffset(this._domNode).left;\r\n if (startLeft > leftOfFindWidget) {\r\n adjustEditorScrollTop = false;\r\n }\r\n const endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition());\r\n const endLeft = editorCoords.left + (endCoords ? endCoords.left : 0);\r\n if (endLeft > leftOfFindWidget) {\r\n adjustEditorScrollTop = false;\r\n }\r\n }\r\n }\r\n }\r\n this._showViewZone(adjustEditorScrollTop);\r\n }\r\n }\r\n _hide(focusTheEditor) {\r\n this._revealTimeouts.forEach(e => {\r\n clearTimeout(e);\r\n });\r\n this._revealTimeouts = [];\r\n if (this._isVisible) {\r\n this._isVisible = false;\r\n this._updateButtons();\r\n this._domNode.classList.remove('visible');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._findInput.clearMessage();\r\n if (focusTheEditor) {\r\n this._codeEditor.focus();\r\n }\r\n this._codeEditor.layoutOverlayWidget(this);\r\n this._removeViewZone();\r\n }\r\n }\r\n _layoutViewZone(targetScrollTop) {\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (!addExtraSpaceOnTop) {\r\n this._removeViewZone();\r\n return;\r\n }\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n const viewZone = this._viewZone;\r\n if (this._viewZoneId !== undefined || !viewZone) {\r\n return;\r\n }\r\n this._codeEditor.changeViewZones((accessor) => {\r\n viewZone.heightInPx = this._getHeight();\r\n this._viewZoneId = accessor.addZone(viewZone);\r\n // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning.\r\n this._codeEditor.setScrollTop(targetScrollTop || this._codeEditor.getScrollTop() + viewZone.heightInPx);\r\n });\r\n }\r\n _showViewZone(adjustScroll = true) {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (!addExtraSpaceOnTop) {\r\n return;\r\n }\r\n if (this._viewZone === undefined) {\r\n this._viewZone = new FindWidgetViewZone(0);\r\n }\r\n const viewZone = this._viewZone;\r\n this._codeEditor.changeViewZones((accessor) => {\r\n if (this._viewZoneId !== undefined) {\r\n // the view zone already exists, we need to update the height\r\n const newHeight = this._getHeight();\r\n if (newHeight === viewZone.heightInPx) {\r\n return;\r\n }\r\n let scrollAdjustment = newHeight - viewZone.heightInPx;\r\n viewZone.heightInPx = newHeight;\r\n accessor.layoutZone(this._viewZoneId);\r\n if (adjustScroll) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment);\r\n }\r\n return;\r\n }\r\n else {\r\n let scrollAdjustment = this._getHeight();\r\n // if the editor has top padding, factor that into the zone height\r\n scrollAdjustment -= this._codeEditor.getOption(69 /* padding */).top;\r\n if (scrollAdjustment <= 0) {\r\n return;\r\n }\r\n viewZone.heightInPx = scrollAdjustment;\r\n this._viewZoneId = accessor.addZone(viewZone);\r\n if (adjustScroll) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment);\r\n }\r\n }\r\n });\r\n }\r\n _removeViewZone() {\r\n this._codeEditor.changeViewZones((accessor) => {\r\n if (this._viewZoneId !== undefined) {\r\n accessor.removeZone(this._viewZoneId);\r\n this._viewZoneId = undefined;\r\n if (this._viewZone) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx);\r\n this._viewZone = undefined;\r\n }\r\n }\r\n });\r\n }\r\n _applyTheme(theme) {\r\n let inputStyles = {\r\n inputActiveOptionBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputActiveOptionBorder),\r\n inputActiveOptionBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputActiveOptionBackground),\r\n inputActiveOptionForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputActiveOptionForeground),\r\n inputBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputBackground),\r\n inputForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputForeground),\r\n inputBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputBorder),\r\n inputValidationInfoBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationInfoBackground),\r\n inputValidationInfoForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationInfoForeground),\r\n inputValidationInfoBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationInfoBorder),\r\n inputValidationWarningBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationWarningBackground),\r\n inputValidationWarningForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationWarningForeground),\r\n inputValidationWarningBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationWarningBorder),\r\n inputValidationErrorBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationErrorBackground),\r\n inputValidationErrorForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationErrorForeground),\r\n inputValidationErrorBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.inputValidationErrorBorder),\r\n };\r\n this._findInput.style(inputStyles);\r\n this._replaceInput.style(inputStyles);\r\n this._toggleSelectionFind.style(inputStyles);\r\n }\r\n _tryUpdateWidgetWidth() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.isInDOM(this._domNode)) {\r\n // the widget is not in the DOM\r\n return;\r\n }\r\n const layoutInfo = this._codeEditor.getLayoutInfo();\r\n const editorContentWidth = layoutInfo.contentWidth;\r\n if (editorContentWidth <= 0) {\r\n // for example, diff view original editor\r\n this._domNode.classList.add('hiddenEditor');\r\n return;\r\n }\r\n else if (this._domNode.classList.contains('hiddenEditor')) {\r\n this._domNode.classList.remove('hiddenEditor');\r\n }\r\n const editorWidth = layoutInfo.width;\r\n const minimapWidth = layoutInfo.minimap.minimapWidth;\r\n let collapsedFindWidget = false;\r\n let reducedFindWidget = false;\r\n let narrowFindWidget = false;\r\n if (this._resized) {\r\n let widgetWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._domNode);\r\n if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) {\r\n // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes.\r\n this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`;\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n return;\r\n }\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) {\r\n reducedFindWidget = true;\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) {\r\n narrowFindWidget = true;\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) {\r\n collapsedFindWidget = true;\r\n }\r\n this._domNode.classList.toggle('collapsed-find-widget', collapsedFindWidget);\r\n this._domNode.classList.toggle('narrow-find-widget', narrowFindWidget);\r\n this._domNode.classList.toggle('reduced-find-widget', reducedFindWidget);\r\n if (!narrowFindWidget && !collapsedFindWidget) {\r\n // the minimal left offset of findwidget is 15px.\r\n this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`;\r\n }\r\n if (this._resized) {\r\n this._findInput.inputBox.layout();\r\n let findInputWidth = this._findInput.inputBox.element.clientWidth;\r\n if (findInputWidth > 0) {\r\n this._replaceInput.width = findInputWidth;\r\n }\r\n }\r\n else if (this._isReplaceVisible) {\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n }\r\n }\r\n _getHeight() {\r\n let totalheight = 0;\r\n // find input margin top\r\n totalheight += 4;\r\n // find input height\r\n totalheight += this._findInput.inputBox.height + 2 /** input box border */;\r\n if (this._isReplaceVisible) {\r\n // replace input margin\r\n totalheight += 4;\r\n totalheight += this._replaceInput.inputBox.height + 2 /** input box border */;\r\n }\r\n // margin bottom\r\n totalheight += 4;\r\n return totalheight;\r\n }\r\n _tryUpdateHeight() {\r\n const totalHeight = this._getHeight();\r\n if (this._cachedHeight !== null && this._cachedHeight === totalHeight) {\r\n return false;\r\n }\r\n this._cachedHeight = totalHeight;\r\n this._domNode.style.height = `${totalHeight}px`;\r\n return true;\r\n }\r\n // ----- Public\r\n focusFindInput() {\r\n this._findInput.select();\r\n // Edge browser requires focus() in addition to select()\r\n this._findInput.focus();\r\n }\r\n focusReplaceInput() {\r\n this._replaceInput.select();\r\n // Edge browser requires focus() in addition to select()\r\n this._replaceInput.focus();\r\n }\r\n highlightFindOptions() {\r\n this._findInput.highlightFindOptions();\r\n }\r\n _updateSearchScope() {\r\n if (!this._codeEditor.hasModel()) {\r\n return;\r\n }\r\n if (this._toggleSelectionFind.checked) {\r\n let selections = this._codeEditor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n const currentMatch = this._state.currentMatch;\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_12__.Range.equalsRange(selection, currentMatch)) {\r\n return selection;\r\n }\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n _onFindInputMouseDown(e) {\r\n // on linux, middle key does pasting.\r\n if (e.middleButton) {\r\n e.stopPropagation();\r\n }\r\n }\r\n _onFindInputKeyDown(e) {\r\n if (e.equals(ctrlKeyMod | 3 /* Enter */)) {\r\n this._findInput.inputBox.insertAtCursor('\\n');\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focus();\r\n }\r\n else {\r\n this._findInput.focusOnCaseSensitive();\r\n }\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\r\n this._codeEditor.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(16 /* UpArrow */)) {\r\n return stopPropagationForMultiLineUpwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea'));\r\n }\r\n if (e.equals(18 /* DownArrow */)) {\r\n return stopPropagationForMultiLineDownwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea'));\r\n }\r\n }\r\n _onReplaceInputKeyDown(e) {\r\n if (e.equals(ctrlKeyMod | 3 /* Enter */)) {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isWindows && _base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isNative && !this._ctrlEnterReplaceAllWarningPrompted) {\r\n // this is the first time when users press Ctrl + Enter to replace all\r\n this._notificationService.info(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('ctrlEnter.keybindingChanged', 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.'));\r\n this._ctrlEnterReplaceAllWarningPrompted = true;\r\n this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n this._replaceInput.inputBox.insertAtCursor('\\n');\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2 /* Tab */)) {\r\n this._findInput.focusOnCaseSensitive();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n this._findInput.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\r\n this._codeEditor.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(16 /* UpArrow */)) {\r\n return stopPropagationForMultiLineUpwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea'));\r\n }\r\n if (e.equals(18 /* DownArrow */)) {\r\n return stopPropagationForMultiLineDownwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea'));\r\n }\r\n }\r\n // ----- sash\r\n getVerticalSashLeft(_sash) {\r\n return 0;\r\n }\r\n // ----- initialization\r\n _keybindingLabelFor(actionId) {\r\n let kb = this._keybindingService.lookupKeybinding(actionId);\r\n if (!kb) {\r\n return '';\r\n }\r\n return ` (${kb.getLabel()})`;\r\n }\r\n _buildDomNode() {\r\n const flexibleHeight = true;\r\n const flexibleWidth = true;\r\n // Find input\r\n this._findInput = this._register(new _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__.ContextScopedFindInput(null, this._contextViewProvider, {\r\n width: FIND_INPUT_AREA_WIDTH,\r\n label: NLS_FIND_INPUT_LABEL,\r\n placeholder: NLS_FIND_INPUT_PLACEHOLDER,\r\n appendCaseSensitiveLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ToggleCaseSensitiveCommand),\r\n appendWholeWordsLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ToggleWholeWordCommand),\r\n appendRegexLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ToggleRegexCommand),\r\n validation: (value) => {\r\n if (value.length === 0 || !this._findInput.getRegex()) {\r\n return null;\r\n }\r\n try {\r\n // use `g` and `u` which are also used by the TextModel search\r\n new RegExp(value, 'gu');\r\n return null;\r\n }\r\n catch (e) {\r\n return { content: e.message };\r\n }\r\n },\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight: 118\r\n }, this._contextKeyService, true));\r\n this._findInput.setRegex(!!this._state.isRegex);\r\n this._findInput.setCaseSensitive(!!this._state.matchCase);\r\n this._findInput.setWholeWords(!!this._state.wholeWord);\r\n this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e)));\r\n this._register(this._findInput.inputBox.onDidChange(() => {\r\n if (this._ignoreChangeEvent) {\r\n return;\r\n }\r\n this._state.change({ searchString: this._findInput.getValue() }, true);\r\n }));\r\n this._register(this._findInput.onDidOptionChange(() => {\r\n this._state.change({\r\n isRegex: this._findInput.getRegex(),\r\n wholeWord: this._findInput.getWholeWords(),\r\n matchCase: this._findInput.getCaseSensitive()\r\n }, true);\r\n }));\r\n this._register(this._findInput.onCaseSensitiveKeyDown((e) => {\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n this._register(this._findInput.onRegexKeyDown((e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focusOnPreserve();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n this._register(this._findInput.inputBox.onDidHeightChange((e) => {\r\n if (this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }));\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__.isLinux) {\r\n this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e)));\r\n }\r\n this._matchesCount = document.createElement('div');\r\n this._matchesCount.className = 'matchesCount';\r\n this._updateMatchesCount();\r\n // Previous button\r\n this._prevBtn = this._register(new SimpleButton({\r\n label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.PreviousMatchFindAction),\r\n icon: findPreviousMatchIcon,\r\n onTrigger: () => {\r\n this._codeEditor.getAction(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.PreviousMatchFindAction).run().then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError);\r\n }\r\n }));\r\n // Next button\r\n this._nextBtn = this._register(new SimpleButton({\r\n label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.NextMatchFindAction),\r\n icon: findNextMatchIcon,\r\n onTrigger: () => {\r\n this._codeEditor.getAction(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.NextMatchFindAction).run().then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError);\r\n }\r\n }));\r\n let findPart = document.createElement('div');\r\n findPart.className = 'find-part';\r\n findPart.appendChild(this._findInput.domNode);\r\n const actionsContainer = document.createElement('div');\r\n actionsContainer.className = 'find-actions';\r\n findPart.appendChild(actionsContainer);\r\n actionsContainer.appendChild(this._matchesCount);\r\n actionsContainer.appendChild(this._prevBtn.domNode);\r\n actionsContainer.appendChild(this._nextBtn.domNode);\r\n // Toggle selection button\r\n this._toggleSelectionFind = this._register(new _base_browser_ui_checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_4__.Checkbox({\r\n icon: findSelectionIcon,\r\n title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ToggleSearchScopeCommand),\r\n isChecked: false\r\n }));\r\n this._register(this._toggleSelectionFind.onChange(() => {\r\n if (this._toggleSelectionFind.checked) {\r\n if (this._codeEditor.hasModel()) {\r\n let selections = this._codeEditor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n else {\r\n this._state.change({ searchScope: null }, true);\r\n }\r\n }));\r\n actionsContainer.appendChild(this._toggleSelectionFind.domNode);\r\n // Close button\r\n this._closeBtn = this._register(new SimpleButton({\r\n label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.CloseFindWidgetCommand),\r\n icon: _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_18__.widgetClose,\r\n onTrigger: () => {\r\n this._state.change({ isRevealed: false, searchScope: null }, false);\r\n },\r\n onKeyDown: (e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n if (this._replaceBtn.isEnabled()) {\r\n this._replaceBtn.focus();\r\n }\r\n else {\r\n this._codeEditor.focus();\r\n }\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n }));\r\n actionsContainer.appendChild(this._closeBtn.domNode);\r\n // Replace input\r\n this._replaceInput = this._register(new _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__.ContextScopedReplaceInput(null, undefined, {\r\n label: NLS_REPLACE_INPUT_LABEL,\r\n placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,\r\n appendPreserveCaseLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.TogglePreserveCaseCommand),\r\n history: [],\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight: 118\r\n }, this._contextKeyService, true));\r\n this._replaceInput.setPreserveCase(!!this._state.preserveCase);\r\n this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e)));\r\n this._register(this._replaceInput.inputBox.onDidChange(() => {\r\n this._state.change({ replaceString: this._replaceInput.inputBox.value }, false);\r\n }));\r\n this._register(this._replaceInput.inputBox.onDidHeightChange((e) => {\r\n if (this._isReplaceVisible && this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }));\r\n this._register(this._replaceInput.onDidOptionChange(() => {\r\n this._state.change({\r\n preserveCase: this._replaceInput.getPreserveCase()\r\n }, true);\r\n }));\r\n this._register(this._replaceInput.onPreserveCaseKeyDown((e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._prevBtn.isEnabled()) {\r\n this._prevBtn.focus();\r\n }\r\n else if (this._nextBtn.isEnabled()) {\r\n this._nextBtn.focus();\r\n }\r\n else if (this._toggleSelectionFind.enabled) {\r\n this._toggleSelectionFind.focus();\r\n }\r\n else if (this._closeBtn.isEnabled()) {\r\n this._closeBtn.focus();\r\n }\r\n e.preventDefault();\r\n }\r\n }));\r\n // Replace one button\r\n this._replaceBtn = this._register(new SimpleButton({\r\n label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ReplaceOneAction),\r\n icon: findReplaceIcon,\r\n onTrigger: () => {\r\n this._controller.replace();\r\n },\r\n onKeyDown: (e) => {\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n this._closeBtn.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n // Replace all button\r\n this._replaceAllBtn = this._register(new SimpleButton({\r\n label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__.FIND_IDS.ReplaceAllAction),\r\n icon: findReplaceAllIcon,\r\n onTrigger: () => {\r\n this._controller.replaceAll();\r\n }\r\n }));\r\n let replacePart = document.createElement('div');\r\n replacePart.className = 'replace-part';\r\n replacePart.appendChild(this._replaceInput.domNode);\r\n const replaceActionsContainer = document.createElement('div');\r\n replaceActionsContainer.className = 'replace-actions';\r\n replacePart.appendChild(replaceActionsContainer);\r\n replaceActionsContainer.appendChild(this._replaceBtn.domNode);\r\n replaceActionsContainer.appendChild(this._replaceAllBtn.domNode);\r\n // Toggle replace button\r\n this._toggleReplaceBtn = this._register(new SimpleButton({\r\n label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,\r\n className: 'codicon toggle left',\r\n onTrigger: () => {\r\n this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false);\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n this._replaceInput.inputBox.layout();\r\n }\r\n this._showViewZone();\r\n }\r\n }));\r\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\r\n // Widget\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'editor-widget find-widget';\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work.\r\n this._domNode.style.width = `${FIND_WIDGET_INITIAL_WIDTH}px`;\r\n this._domNode.appendChild(this._toggleReplaceBtn.domNode);\r\n this._domNode.appendChild(findPart);\r\n this._domNode.appendChild(replacePart);\r\n this._resizeSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_5__.Sash(this._domNode, this, { orientation: 0 /* VERTICAL */, size: 2 });\r\n this._resized = false;\r\n let originalWidth = FIND_WIDGET_INITIAL_WIDTH;\r\n this._register(this._resizeSash.onDidStart(() => {\r\n originalWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._domNode);\r\n }));\r\n this._register(this._resizeSash.onDidChange((evt) => {\r\n this._resized = true;\r\n let width = originalWidth + evt.startX - evt.currentX;\r\n if (width < FIND_WIDGET_INITIAL_WIDTH) {\r\n // narrow down the find widget should be handled by CSS.\r\n return;\r\n }\r\n const maxWidth = parseFloat(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getComputedStyle(this._domNode).maxWidth) || 0;\r\n if (width > maxWidth) {\r\n return;\r\n }\r\n this._domNode.style.width = `${width}px`;\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n }\r\n this._findInput.inputBox.layout();\r\n this._tryUpdateHeight();\r\n }));\r\n this._register(this._resizeSash.onDidReset(() => {\r\n // users double click on the sash\r\n const currentWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._domNode);\r\n if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) {\r\n // The editor is narrow and the width of the find widget is controlled fully by CSS.\r\n return;\r\n }\r\n let width = FIND_WIDGET_INITIAL_WIDTH;\r\n if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) {\r\n // 1. never resized before, double click should maximizes it\r\n // 2. users resized it already but its width is the same as default\r\n const layoutInfo = this._codeEditor.getLayoutInfo();\r\n width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15;\r\n this._resized = true;\r\n }\r\n else {\r\n /**\r\n * no op, the find widget should be shrinked to its default size.\r\n */\r\n }\r\n this._domNode.style.width = `${width}px`;\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getTotalWidth(this._findInput.domNode);\r\n }\r\n this._findInput.inputBox.layout();\r\n }));\r\n }\r\n updateAccessibilitySupport() {\r\n const value = this._codeEditor.getOption(2 /* accessibilitySupport */);\r\n this._findInput.setFocusInputOnOptionClick(value !== 2 /* Enabled */);\r\n }\r\n}\r\nFindWidget.ID = 'editor.contrib.findWidget';\r\nclass SimpleButton extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__.Widget {\r\n constructor(opts) {\r\n super();\r\n this._opts = opts;\r\n let className = 'button';\r\n if (this._opts.className) {\r\n className = className + ' ' + this._opts.className;\r\n }\r\n if (this._opts.icon) {\r\n className = className + ' ' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.ThemeIcon.asClassName(this._opts.icon);\r\n }\r\n this._domNode = document.createElement('div');\r\n this._domNode.title = this._opts.label;\r\n this._domNode.tabIndex = 0;\r\n this._domNode.className = className;\r\n this._domNode.setAttribute('role', 'button');\r\n this._domNode.setAttribute('aria-label', this._opts.label);\r\n this.onclick(this._domNode, (e) => {\r\n this._opts.onTrigger();\r\n e.preventDefault();\r\n });\r\n this.onkeydown(this._domNode, (e) => {\r\n if (e.equals(10 /* Space */) || e.equals(3 /* Enter */)) {\r\n this._opts.onTrigger();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (this._opts.onKeyDown) {\r\n this._opts.onKeyDown(e);\r\n }\r\n });\r\n }\r\n get domNode() {\r\n return this._domNode;\r\n }\r\n isEnabled() {\r\n return (this._domNode.tabIndex >= 0);\r\n }\r\n focus() {\r\n this._domNode.focus();\r\n }\r\n setEnabled(enabled) {\r\n this._domNode.classList.toggle('disabled', !enabled);\r\n this._domNode.setAttribute('aria-disabled', String(!enabled));\r\n this._domNode.tabIndex = enabled ? 0 : -1;\r\n }\r\n setExpanded(expanded) {\r\n this._domNode.setAttribute('aria-expanded', String(!!expanded));\r\n if (expanded) {\r\n this._domNode.classList.remove(..._platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.ThemeIcon.asClassNameArray(findCollapsedIcon));\r\n this._domNode.classList.add(..._platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.ThemeIcon.asClassNameArray(findExpandedIcon));\r\n }\r\n else {\r\n this._domNode.classList.remove(..._platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.ThemeIcon.asClassNameArray(findExpandedIcon));\r\n this._domNode.classList.add(..._platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.ThemeIcon.asClassNameArray(findCollapsedIcon));\r\n }\r\n }\r\n}\r\n// theming\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.registerThemingParticipant)((theme, collector) => {\r\n const addBackgroundColorRule = (selector, color) => {\r\n if (color) {\r\n collector.addRule(`.monaco-editor ${selector} { background-color: ${color}; }`);\r\n }\r\n };\r\n addBackgroundColorRule('.findMatch', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindMatchHighlight));\r\n addBackgroundColorRule('.currentFindMatch', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindMatch));\r\n addBackgroundColorRule('.findScope', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindRangeHighlight));\r\n const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBackground);\r\n addBackgroundColorRule('.find-widget', widgetBackground);\r\n const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);\r\n }\r\n const findMatchHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindMatchHighlightBorder);\r\n if (findMatchHighlightBorder) {\r\n collector.addRule(`.monaco-editor .findMatch { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const findMatchBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindMatchBorder);\r\n if (findMatchBorder) {\r\n collector.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${findMatchBorder}; padding: 1px; box-sizing: border-box; }`);\r\n }\r\n const findRangeHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorFindRangeHighlightBorder);\r\n if (findRangeHighlightBorder) {\r\n collector.addRule(`.monaco-editor .findScope { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${findRangeHighlightBorder}; }`);\r\n }\r\n const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`);\r\n }\r\n const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .find-widget { color: ${foreground}; }`);\r\n }\r\n const error = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.errorForeground);\r\n if (error) {\r\n collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`);\r\n }\r\n const resizeBorderBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetResizeBorder);\r\n if (resizeBorderBackground) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${resizeBorderBackground}; }`);\r\n }\r\n else {\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; }`);\r\n }\r\n }\r\n // This rule is used to override the outline color for synthetic-focus find input.\r\n const focusOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.focusBorder);\r\n if (focusOutline) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${focusOutline}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ReplaceAllCommand\": () => (/* binding */ ReplaceAllCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass ReplaceAllCommand {\r\n constructor(editorSelection, ranges, replaceStrings) {\r\n this._editorSelection = editorSelection;\r\n this._ranges = ranges;\r\n this._replaceStrings = replaceStrings;\r\n this._trackedEditorSelectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n if (this._ranges.length > 0) {\r\n // Collect all edit operations\r\n let ops = [];\r\n for (let i = 0; i < this._ranges.length; i++) {\r\n ops.push({\r\n range: this._ranges[i],\r\n text: this._replaceStrings[i]\r\n });\r\n }\r\n // Sort them in ascending order by range starts\r\n ops.sort((o1, o2) => {\r\n return _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range.compareRangesUsingStarts(o1.range, o2.range);\r\n });\r\n // Merge operations that touch each other\r\n let resultOps = [];\r\n let previousOp = ops[0];\r\n for (let i = 1; i < ops.length; i++) {\r\n if (previousOp.range.endLineNumber === ops[i].range.startLineNumber && previousOp.range.endColumn === ops[i].range.startColumn) {\r\n // These operations are one after another and can be merged\r\n previousOp.range = previousOp.range.plusRange(ops[i].range);\r\n previousOp.text = previousOp.text + ops[i].text;\r\n }\r\n else {\r\n resultOps.push(previousOp);\r\n previousOp = ops[i];\r\n }\r\n }\r\n resultOps.push(previousOp);\r\n for (const op of resultOps) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n }\r\n this._trackedEditorSelectionId = builder.trackSelection(this._editorSelection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._trackedEditorSelectionId);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ReplacePattern\": () => (/* binding */ ReplacePattern),\n/* harmony export */ \"ReplacePiece\": () => (/* binding */ ReplacePiece),\n/* harmony export */ \"parseReplaceString\": () => (/* binding */ parseReplaceString)\n/* harmony export */ });\n/* harmony import */ var _base_common_search_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/search.js */ \"./node_modules/monaco-editor/esm/vs/base/common/search.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/**\r\n * Assigned when the replace pattern is entirely static.\r\n */\r\nclass StaticValueReplacePattern {\r\n constructor(staticValue) {\r\n this.staticValue = staticValue;\r\n this.kind = 0 /* StaticValue */;\r\n }\r\n}\r\n/**\r\n * Assigned when the replace pattern has replacement patterns.\r\n */\r\nclass DynamicPiecesReplacePattern {\r\n constructor(pieces) {\r\n this.pieces = pieces;\r\n this.kind = 1 /* DynamicPieces */;\r\n }\r\n}\r\nclass ReplacePattern {\r\n constructor(pieces) {\r\n if (!pieces || pieces.length === 0) {\r\n this._state = new StaticValueReplacePattern('');\r\n }\r\n else if (pieces.length === 1 && pieces[0].staticValue !== null) {\r\n this._state = new StaticValueReplacePattern(pieces[0].staticValue);\r\n }\r\n else {\r\n this._state = new DynamicPiecesReplacePattern(pieces);\r\n }\r\n }\r\n static fromStaticValue(value) {\r\n return new ReplacePattern([ReplacePiece.staticValue(value)]);\r\n }\r\n get hasReplacementPatterns() {\r\n return (this._state.kind === 1 /* DynamicPieces */);\r\n }\r\n buildReplaceString(matches, preserveCase) {\r\n if (this._state.kind === 0 /* StaticValue */) {\r\n if (preserveCase) {\r\n return (0,_base_common_search_js__WEBPACK_IMPORTED_MODULE_0__.buildReplaceStringWithCasePreserved)(matches, this._state.staticValue);\r\n }\r\n else {\r\n return this._state.staticValue;\r\n }\r\n }\r\n let result = '';\r\n for (let i = 0, len = this._state.pieces.length; i < len; i++) {\r\n let piece = this._state.pieces[i];\r\n if (piece.staticValue !== null) {\r\n // static value ReplacePiece\r\n result += piece.staticValue;\r\n continue;\r\n }\r\n // match index ReplacePiece\r\n let match = ReplacePattern._substitute(piece.matchIndex, matches);\r\n if (piece.caseOps !== null && piece.caseOps.length > 0) {\r\n let repl = [];\r\n let lenOps = piece.caseOps.length;\r\n let opIdx = 0;\r\n for (let idx = 0, len = match.length; idx < len; idx++) {\r\n if (opIdx >= lenOps) {\r\n repl.push(match.slice(idx));\r\n break;\r\n }\r\n switch (piece.caseOps[opIdx]) {\r\n case 'U':\r\n repl.push(match[idx].toUpperCase());\r\n break;\r\n case 'u':\r\n repl.push(match[idx].toUpperCase());\r\n opIdx++;\r\n break;\r\n case 'L':\r\n repl.push(match[idx].toLowerCase());\r\n break;\r\n case 'l':\r\n repl.push(match[idx].toLowerCase());\r\n opIdx++;\r\n break;\r\n default:\r\n repl.push(match[idx]);\r\n }\r\n }\r\n match = repl.join('');\r\n }\r\n result += match;\r\n }\r\n return result;\r\n }\r\n static _substitute(matchIndex, matches) {\r\n if (matches === null) {\r\n return '';\r\n }\r\n if (matchIndex === 0) {\r\n return matches[0];\r\n }\r\n let remainder = '';\r\n while (matchIndex > 0) {\r\n if (matchIndex < matches.length) {\r\n // A match can be undefined\r\n let match = (matches[matchIndex] || '');\r\n return match + remainder;\r\n }\r\n remainder = String(matchIndex % 10) + remainder;\r\n matchIndex = Math.floor(matchIndex / 10);\r\n }\r\n return '$' + remainder;\r\n }\r\n}\r\n/**\r\n * A replace piece can either be a static string or an index to a specific match.\r\n */\r\nclass ReplacePiece {\r\n constructor(staticValue, matchIndex, caseOps) {\r\n this.staticValue = staticValue;\r\n this.matchIndex = matchIndex;\r\n if (!caseOps || caseOps.length === 0) {\r\n this.caseOps = null;\r\n }\r\n else {\r\n this.caseOps = caseOps.slice(0);\r\n }\r\n }\r\n static staticValue(value) {\r\n return new ReplacePiece(value, -1, null);\r\n }\r\n static caseOps(index, caseOps) {\r\n return new ReplacePiece(null, index, caseOps);\r\n }\r\n}\r\nclass ReplacePieceBuilder {\r\n constructor(source) {\r\n this._source = source;\r\n this._lastCharIndex = 0;\r\n this._result = [];\r\n this._resultLen = 0;\r\n this._currentStaticPiece = '';\r\n }\r\n emitUnchanged(toCharIndex) {\r\n this._emitStatic(this._source.substring(this._lastCharIndex, toCharIndex));\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n emitStatic(value, toCharIndex) {\r\n this._emitStatic(value);\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n _emitStatic(value) {\r\n if (value.length === 0) {\r\n return;\r\n }\r\n this._currentStaticPiece += value;\r\n }\r\n emitMatchIndex(index, toCharIndex, caseOps) {\r\n if (this._currentStaticPiece.length !== 0) {\r\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\r\n this._currentStaticPiece = '';\r\n }\r\n this._result[this._resultLen++] = ReplacePiece.caseOps(index, caseOps);\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n finalize() {\r\n this.emitUnchanged(this._source.length);\r\n if (this._currentStaticPiece.length !== 0) {\r\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\r\n this._currentStaticPiece = '';\r\n }\r\n return new ReplacePattern(this._result);\r\n }\r\n}\r\n/**\r\n * \\n\t\t\t=> inserts a LF\r\n * \\t\t\t\t=> inserts a TAB\r\n * \\\\\t\t\t=> inserts a \"\\\".\r\n * \\u\t\t\t=> upper-cases one character in a match.\r\n * \\U\t\t\t=> upper-cases ALL remaining characters in a match.\r\n * \\l\t\t\t=> lower-cases one character in a match.\r\n * \\L\t\t\t=> lower-cases ALL remaining characters in a match.\r\n * $$\t\t\t=> inserts a \"$\".\r\n * $& and $0\t=> inserts the matched substring.\r\n * $n\t\t\t=> Where n is a non-negative integer lesser than 100, inserts the nth parenthesized submatch string\r\n * everything else stays untouched\r\n *\r\n * Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter\r\n */\r\nfunction parseReplaceString(replaceString) {\r\n if (!replaceString || replaceString.length === 0) {\r\n return new ReplacePattern(null);\r\n }\r\n let caseOps = [];\r\n let result = new ReplacePieceBuilder(replaceString);\r\n for (let i = 0, len = replaceString.length; i < len; i++) {\r\n let chCode = replaceString.charCodeAt(i);\r\n if (chCode === 92 /* Backslash */) {\r\n // move to next char\r\n i++;\r\n if (i >= len) {\r\n // string ends with a \\\r\n break;\r\n }\r\n let nextChCode = replaceString.charCodeAt(i);\r\n // let replaceWithCharacter: string | null = null;\r\n switch (nextChCode) {\r\n case 92 /* Backslash */:\r\n // \\\\ => inserts a \"\\\"\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\\\', i + 1);\r\n break;\r\n case 110 /* n */:\r\n // \\n => inserts a LF\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\n', i + 1);\r\n break;\r\n case 116 /* t */:\r\n // \\t => inserts a TAB\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\t', i + 1);\r\n break;\r\n // Case modification of string replacements, patterned after Boost, but only applied\r\n // to the replacement text, not subsequent content.\r\n case 117 /* u */:\r\n // \\u => upper-cases one character.\r\n case 85 /* U */:\r\n // \\U => upper-cases ALL following characters.\r\n case 108 /* l */:\r\n // \\l => lower-cases one character.\r\n case 76 /* L */:\r\n // \\L => lower-cases ALL following characters.\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('', i + 1);\r\n caseOps.push(String.fromCharCode(nextChCode));\r\n break;\r\n }\r\n continue;\r\n }\r\n if (chCode === 36 /* DollarSign */) {\r\n // move to next char\r\n i++;\r\n if (i >= len) {\r\n // string ends with a $\r\n break;\r\n }\r\n let nextChCode = replaceString.charCodeAt(i);\r\n if (nextChCode === 36 /* DollarSign */) {\r\n // $$ => inserts a \"$\"\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('$', i + 1);\r\n continue;\r\n }\r\n if (nextChCode === 48 /* Digit0 */ || nextChCode === 38 /* Ampersand */) {\r\n // $& and $0 => inserts the matched substring.\r\n result.emitUnchanged(i - 1);\r\n result.emitMatchIndex(0, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n if (49 /* Digit1 */ <= nextChCode && nextChCode <= 57 /* Digit9 */) {\r\n // $n\r\n let matchIndex = nextChCode - 48 /* Digit0 */;\r\n // peek next char to probe for $nn\r\n if (i + 1 < len) {\r\n let nextNextChCode = replaceString.charCodeAt(i + 1);\r\n if (48 /* Digit0 */ <= nextNextChCode && nextNextChCode <= 57 /* Digit9 */) {\r\n // $nn\r\n // move to next char\r\n i++;\r\n matchIndex = matchIndex * 10 + (nextNextChCode - 48 /* Digit0 */);\r\n result.emitUnchanged(i - 2);\r\n result.emitMatchIndex(matchIndex, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n }\r\n result.emitUnchanged(i - 1);\r\n result.emitMatchIndex(matchIndex, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n return result.finalize();\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FoldingController\": () => (/* binding */ FoldingController),\n/* harmony export */ \"foldBackgroundBackground\": () => (/* binding */ foldBackgroundBackground),\n/* harmony export */ \"editorFoldForeground\": () => (/* binding */ editorFoldForeground)\n/* harmony export */ });\n/* harmony import */ var _folding_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./folding.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _foldingModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./foldingModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js\");\n/* harmony import */ var _foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./foldingDecorations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _hiddenRangeModel_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hiddenRangeModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _indentRangeProvider_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./indentRangeProvider.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./syntaxRangeProvider.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js\");\n/* harmony import */ var _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./intializingRangeProvider.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CONTEXT_FOLDING_ENABLED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__.RawContextKey('foldingEnabled', false);\r\nlet FoldingController = class FoldingController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this.contextKeyService = contextKeyService;\r\n this.localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.DisposableStore());\r\n this.editor = editor;\r\n const options = this.editor.getOptions();\r\n this._isEnabled = options.get(33 /* folding */);\r\n this._useFoldingProviders = options.get(34 /* foldingStrategy */) !== 'indentation';\r\n this._unfoldOnClickAfterEndOfLine = options.get(36 /* unfoldOnClickAfterEndOfLine */);\r\n this._restoringViewState = false;\r\n this.foldingModel = null;\r\n this.hiddenRangeModel = null;\r\n this.rangeProvider = null;\r\n this.foldingRegionPromise = null;\r\n this.foldingStateMemento = null;\r\n this.foldingModelPromise = null;\r\n this.updateScheduler = null;\r\n this.cursorChangedScheduler = null;\r\n this.mouseDownInfo = null;\r\n this.foldingDecorationProvider = new _foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__.FoldingDecorationProvider(editor);\r\n this.foldingDecorationProvider.autoHideFoldingControls = options.get(94 /* showFoldingControls */) === 'mouseover';\r\n this.foldingDecorationProvider.showFoldingHighlights = options.get(35 /* foldingHighlight */);\r\n this.foldingEnabled = CONTEXT_FOLDING_ENABLED.bindTo(this.contextKeyService);\r\n this.foldingEnabled.set(this._isEnabled);\r\n this._register(this.editor.onDidChangeModel(() => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(33 /* folding */)) {\r\n this._isEnabled = this.editor.getOptions().get(33 /* folding */);\r\n this.foldingEnabled.set(this._isEnabled);\r\n this.onModelChanged();\r\n }\r\n if (e.hasChanged(94 /* showFoldingControls */) || e.hasChanged(35 /* foldingHighlight */)) {\r\n const options = this.editor.getOptions();\r\n this.foldingDecorationProvider.autoHideFoldingControls = options.get(94 /* showFoldingControls */) === 'mouseover';\r\n this.foldingDecorationProvider.showFoldingHighlights = options.get(35 /* foldingHighlight */);\r\n this.onModelContentChanged();\r\n }\r\n if (e.hasChanged(34 /* foldingStrategy */)) {\r\n this._useFoldingProviders = this.editor.getOptions().get(34 /* foldingStrategy */) !== 'indentation';\r\n this.onFoldingStrategyChanged();\r\n }\r\n if (e.hasChanged(36 /* unfoldOnClickAfterEndOfLine */)) {\r\n this._unfoldOnClickAfterEndOfLine = this.editor.getOptions().get(36 /* unfoldOnClickAfterEndOfLine */);\r\n }\r\n }));\r\n this.onModelChanged();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(FoldingController.ID);\r\n }\r\n /**\r\n * Store view state.\r\n */\r\n saveViewState() {\r\n let model = this.editor.getModel();\r\n if (!model || !this._isEnabled || model.isTooLargeForTokenization()) {\r\n return {};\r\n }\r\n if (this.foldingModel) { // disposed ?\r\n let collapsedRegions = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento();\r\n let provider = this.rangeProvider ? this.rangeProvider.id : undefined;\r\n return { collapsedRegions, lineCount: model.getLineCount(), provider };\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Restore view state.\r\n */\r\n restoreViewState(state) {\r\n let model = this.editor.getModel();\r\n if (!model || !this._isEnabled || model.isTooLargeForTokenization() || !this.hiddenRangeModel) {\r\n return;\r\n }\r\n if (!state || !state.collapsedRegions || state.lineCount !== model.getLineCount()) {\r\n return;\r\n }\r\n if (state.provider === _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__.ID_SYNTAX_PROVIDER || state.provider === _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__.ID_INIT_PROVIDER) {\r\n this.foldingStateMemento = state;\r\n }\r\n const collapsedRegions = state.collapsedRegions;\r\n // set the hidden ranges right away, before waiting for the folding model.\r\n if (this.hiddenRangeModel.applyMemento(collapsedRegions)) {\r\n const foldingModel = this.getFoldingModel();\r\n if (foldingModel) {\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n this._restoringViewState = true;\r\n try {\r\n foldingModel.applyMemento(collapsedRegions);\r\n }\r\n finally {\r\n this._restoringViewState = false;\r\n }\r\n }\r\n }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__.onUnexpectedError);\r\n }\r\n }\r\n }\r\n onModelChanged() {\r\n this.localToDispose.clear();\r\n let model = this.editor.getModel();\r\n if (!this._isEnabled || !model || model.isTooLargeForTokenization()) {\r\n // huge files get no view model, so they cannot support hidden areas\r\n return;\r\n }\r\n this.foldingModel = new _foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.FoldingModel(model, this.foldingDecorationProvider);\r\n this.localToDispose.add(this.foldingModel);\r\n this.hiddenRangeModel = new _hiddenRangeModel_js__WEBPACK_IMPORTED_MODULE_11__.HiddenRangeModel(this.foldingModel);\r\n this.localToDispose.add(this.hiddenRangeModel);\r\n this.localToDispose.add(this.hiddenRangeModel.onDidChange(hr => this.onHiddenRangesChanges(hr)));\r\n this.updateScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__.Delayer(200);\r\n this.cursorChangedScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__.RunOnceScheduler(() => this.revealCursor(), 200);\r\n this.localToDispose.add(this.cursorChangedScheduler);\r\n this.localToDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_14__.FoldingRangeProviderRegistry.onDidChange(() => this.onFoldingStrategyChanged()));\r\n this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(() => this.onFoldingStrategyChanged())); // covers model language changes as well\r\n this.localToDispose.add(this.editor.onDidChangeModelContent(() => this.onModelContentChanged()));\r\n this.localToDispose.add(this.editor.onDidChangeCursorPosition(() => this.onCursorPositionChanged()));\r\n this.localToDispose.add(this.editor.onMouseDown(e => this.onEditorMouseDown(e)));\r\n this.localToDispose.add(this.editor.onMouseUp(e => this.onEditorMouseUp(e)));\r\n this.localToDispose.add({\r\n dispose: () => {\r\n if (this.foldingRegionPromise) {\r\n this.foldingRegionPromise.cancel();\r\n this.foldingRegionPromise = null;\r\n }\r\n if (this.updateScheduler) {\r\n this.updateScheduler.cancel();\r\n }\r\n this.updateScheduler = null;\r\n this.foldingModel = null;\r\n this.foldingModelPromise = null;\r\n this.hiddenRangeModel = null;\r\n this.cursorChangedScheduler = null;\r\n this.foldingStateMemento = null;\r\n if (this.rangeProvider) {\r\n this.rangeProvider.dispose();\r\n }\r\n this.rangeProvider = null;\r\n }\r\n });\r\n this.onModelContentChanged();\r\n }\r\n onFoldingStrategyChanged() {\r\n if (this.rangeProvider) {\r\n this.rangeProvider.dispose();\r\n }\r\n this.rangeProvider = null;\r\n this.onModelContentChanged();\r\n }\r\n getRangeProvider(editorModel) {\r\n if (this.rangeProvider) {\r\n return this.rangeProvider;\r\n }\r\n this.rangeProvider = new _indentRangeProvider_js__WEBPACK_IMPORTED_MODULE_13__.IndentRangeProvider(editorModel); // fallback\r\n if (this._useFoldingProviders && this.foldingModel) {\r\n let foldingProviders = _common_modes_js__WEBPACK_IMPORTED_MODULE_14__.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);\r\n if (foldingProviders.length === 0 && this.foldingStateMemento && this.foldingStateMemento.collapsedRegions) {\r\n const rangeProvider = this.rangeProvider = new _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__.InitializingRangeProvider(editorModel, this.foldingStateMemento.collapsedRegions, () => {\r\n // if after 30 the InitializingRangeProvider is still not replaced, force a refresh\r\n this.foldingStateMemento = null;\r\n this.onFoldingStrategyChanged();\r\n }, 30000);\r\n return rangeProvider; // keep memento in case there are still no foldingProviders on the next request.\r\n }\r\n else if (foldingProviders.length > 0) {\r\n this.rangeProvider = new _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__.SyntaxRangeProvider(editorModel, foldingProviders, () => this.onModelContentChanged());\r\n }\r\n }\r\n this.foldingStateMemento = null;\r\n return this.rangeProvider;\r\n }\r\n getFoldingModel() {\r\n return this.foldingModelPromise;\r\n }\r\n onModelContentChanged() {\r\n if (this.updateScheduler) {\r\n if (this.foldingRegionPromise) {\r\n this.foldingRegionPromise.cancel();\r\n this.foldingRegionPromise = null;\r\n }\r\n this.foldingModelPromise = this.updateScheduler.trigger(() => {\r\n const foldingModel = this.foldingModel;\r\n if (!foldingModel) { // null if editor has been disposed, or folding turned off\r\n return null;\r\n }\r\n let foldingRegionPromise = this.foldingRegionPromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_4__.createCancelablePromise)(token => this.getRangeProvider(foldingModel.textModel).compute(token));\r\n return foldingRegionPromise.then(foldingRanges => {\r\n if (foldingRanges && foldingRegionPromise === this.foldingRegionPromise) { // new request or cancelled in the meantime?\r\n // some cursors might have moved into hidden regions, make sure they are in expanded regions\r\n let selections = this.editor.getSelections();\r\n let selectionLineNumbers = selections ? selections.map(s => s.startLineNumber) : [];\r\n foldingModel.update(foldingRanges, selectionLineNumbers);\r\n }\r\n return foldingModel;\r\n });\r\n }).then(undefined, (err) => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__.onUnexpectedError)(err);\r\n return null;\r\n });\r\n }\r\n }\r\n onHiddenRangesChanges(hiddenRanges) {\r\n if (this.hiddenRangeModel && hiddenRanges.length && !this._restoringViewState) {\r\n let selections = this.editor.getSelections();\r\n if (selections) {\r\n if (this.hiddenRangeModel.adjustSelections(selections)) {\r\n this.editor.setSelections(selections);\r\n }\r\n }\r\n }\r\n this.editor.setHiddenAreas(hiddenRanges);\r\n }\r\n onCursorPositionChanged() {\r\n if (this.hiddenRangeModel && this.hiddenRangeModel.hasRanges()) {\r\n this.cursorChangedScheduler.schedule();\r\n }\r\n }\r\n revealCursor() {\r\n const foldingModel = this.getFoldingModel();\r\n if (!foldingModel) {\r\n return;\r\n }\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n let selections = this.editor.getSelections();\r\n if (selections && selections.length > 0) {\r\n let toToggle = [];\r\n for (let selection of selections) {\r\n let lineNumber = selection.selectionStartLineNumber;\r\n if (this.hiddenRangeModel && this.hiddenRangeModel.isHidden(lineNumber)) {\r\n toToggle.push(...foldingModel.getAllRegionsAtLine(lineNumber, r => r.isCollapsed && lineNumber > r.startLineNumber));\r\n }\r\n }\r\n if (toToggle.length) {\r\n foldingModel.toggleCollapseState(toToggle);\r\n this.reveal(selections[0].getPosition());\r\n }\r\n }\r\n }\r\n }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__.onUnexpectedError);\r\n }\r\n onEditorMouseDown(e) {\r\n this.mouseDownInfo = null;\r\n if (!this.hiddenRangeModel || !e.target || !e.target.range) {\r\n return;\r\n }\r\n if (!e.event.leftButton && !e.event.middleButton) {\r\n return;\r\n }\r\n const range = e.target.range;\r\n let iconClicked = false;\r\n switch (e.target.type) {\r\n case 4 /* GUTTER_LINE_DECORATIONS */:\r\n const data = e.target.detail;\r\n const offsetLeftInGutter = e.target.element.offsetLeft;\r\n const gutterOffsetX = data.offsetX - offsetLeftInGutter;\r\n // const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;\r\n // TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff\r\n if (gutterOffsetX < 5) { // the whitespace between the border and the real folding icon border is 5px\r\n return;\r\n }\r\n iconClicked = true;\r\n break;\r\n case 7 /* CONTENT_EMPTY */: {\r\n if (this._unfoldOnClickAfterEndOfLine && this.hiddenRangeModel.hasRanges()) {\r\n const data = e.target.detail;\r\n if (!data.isAfterLines) {\r\n break;\r\n }\r\n }\r\n return;\r\n }\r\n case 6 /* CONTENT_TEXT */: {\r\n if (this.hiddenRangeModel.hasRanges()) {\r\n let model = this.editor.getModel();\r\n if (model && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) {\r\n break;\r\n }\r\n }\r\n return;\r\n }\r\n default:\r\n return;\r\n }\r\n this.mouseDownInfo = { lineNumber: range.startLineNumber, iconClicked };\r\n }\r\n onEditorMouseUp(e) {\r\n const foldingModel = this.getFoldingModel();\r\n if (!foldingModel || !this.mouseDownInfo || !e.target) {\r\n return;\r\n }\r\n let lineNumber = this.mouseDownInfo.lineNumber;\r\n let iconClicked = this.mouseDownInfo.iconClicked;\r\n let range = e.target.range;\r\n if (!range || range.startLineNumber !== lineNumber) {\r\n return;\r\n }\r\n if (iconClicked) {\r\n if (e.target.type !== 4 /* GUTTER_LINE_DECORATIONS */) {\r\n return;\r\n }\r\n }\r\n else {\r\n let model = this.editor.getModel();\r\n if (!model || range.startColumn !== model.getLineMaxColumn(lineNumber)) {\r\n return;\r\n }\r\n }\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region && region.startLineNumber === lineNumber) {\r\n let isCollapsed = region.isCollapsed;\r\n if (iconClicked || isCollapsed) {\r\n let toToggle = [];\r\n let recursive = e.event.middleButton || e.event.shiftKey;\r\n if (recursive) {\r\n for (const r of foldingModel.getRegionsInside(region)) {\r\n if (r.isCollapsed === isCollapsed) {\r\n toToggle.push(r);\r\n }\r\n }\r\n }\r\n // when recursive, first only collapse all children. If all are already folded or there are no children, also fold parent.\r\n if (isCollapsed || !recursive || toToggle.length === 0) {\r\n toToggle.push(region);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n this.reveal({ lineNumber, column: 1 });\r\n }\r\n }\r\n }\r\n }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__.onUnexpectedError);\r\n }\r\n reveal(position) {\r\n this.editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */);\r\n }\r\n};\r\nFoldingController.ID = 'editor.contrib.folding';\r\nFoldingController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__.IContextKeyService)\r\n], FoldingController);\r\n\r\nclass FoldingAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.EditorAction {\r\n runEditorCommand(accessor, editor, args) {\r\n let foldingController = FoldingController.get(editor);\r\n if (!foldingController) {\r\n return;\r\n }\r\n let foldingModelPromise = foldingController.getFoldingModel();\r\n if (foldingModelPromise) {\r\n this.reportTelemetry(accessor, editor);\r\n return foldingModelPromise.then(foldingModel => {\r\n if (foldingModel) {\r\n this.invoke(foldingController, foldingModel, editor, args);\r\n const selection = editor.getSelection();\r\n if (selection) {\r\n foldingController.reveal(selection.getStartPosition());\r\n }\r\n }\r\n });\r\n }\r\n }\r\n getSelectedLines(editor) {\r\n let selections = editor.getSelections();\r\n return selections ? selections.map(s => s.startLineNumber) : [];\r\n }\r\n getLineNumbers(args, editor) {\r\n if (args && args.selectionLines) {\r\n return args.selectionLines.map(l => l + 1); // to 0-bases line numbers\r\n }\r\n return this.getSelectedLines(editor);\r\n }\r\n run(_accessor, _editor) {\r\n }\r\n}\r\nfunction foldingArgumentsConstraint(args) {\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(args)) {\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject(args)) {\r\n return false;\r\n }\r\n const foldingArgs = args;\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(foldingArgs.levels) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isNumber(foldingArgs.levels)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(foldingArgs.direction) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isString(foldingArgs.direction)) {\r\n return false;\r\n }\r\n if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isUndefined(foldingArgs.selectionLines) && (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isArray(foldingArgs.selectionLines) || !foldingArgs.selectionLines.every(_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isNumber))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nclass UnfoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfold',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('unfoldAction.label', \"Unfold\"),\r\n alias: 'Unfold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 89 /* US_CLOSE_SQUARE_BRACKET */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n description: {\r\n description: 'Unfold the content in the editor',\r\n args: [\r\n {\r\n name: 'Unfold editor argument',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t`,\r\n constraint: foldingArgumentsConstraint,\r\n schema: {\r\n 'type': 'object',\r\n 'properties': {\r\n 'levels': {\r\n 'type': 'number',\r\n 'default': 1\r\n },\r\n 'direction': {\r\n 'type': 'string',\r\n 'enum': ['up', 'down'],\r\n 'default': 'down'\r\n },\r\n 'selectionLines': {\r\n 'type': 'array',\r\n 'items': {\r\n 'type': 'number'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, args) {\r\n let levels = args && args.levels || 1;\r\n let lineNumbers = this.getLineNumbers(args, editor);\r\n if (args && args.direction === 'up') {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsUp)(foldingModel, false, levels, lineNumbers);\r\n }\r\n else {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, false, levels, lineNumbers);\r\n }\r\n }\r\n}\r\nclass UnFoldRecursivelyAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldRecursively',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('unFoldRecursivelyAction.label', \"Unfold Recursively\"),\r\n alias: 'Unfold Recursively',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, _args) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, false, Number.MAX_VALUE, this.getSelectedLines(editor));\r\n }\r\n}\r\nclass FoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.fold',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldAction.label', \"Fold\"),\r\n alias: 'Fold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 87 /* US_OPEN_SQUARE_BRACKET */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 87 /* US_OPEN_SQUARE_BRACKET */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n description: {\r\n description: 'Fold the content in the editor',\r\n args: [\r\n {\r\n name: 'Fold editor argument',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t`,\r\n constraint: foldingArgumentsConstraint,\r\n schema: {\r\n 'type': 'object',\r\n 'properties': {\r\n 'levels': {\r\n 'type': 'number',\r\n },\r\n 'direction': {\r\n 'type': 'string',\r\n 'enum': ['up', 'down'],\r\n },\r\n 'selectionLines': {\r\n 'type': 'array',\r\n 'items': {\r\n 'type': 'number'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, args) {\r\n let lineNumbers = this.getLineNumbers(args, editor);\r\n const levels = args && args.levels;\r\n const direction = args && args.direction;\r\n if (typeof levels !== 'number' && typeof direction !== 'string') {\r\n // fold the region at the location or if already collapsed, the first uncollapsed parent instead.\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateUp)(foldingModel, true, lineNumbers);\r\n }\r\n else {\r\n if (direction === 'up') {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsUp)(foldingModel, true, levels || 1, lineNumbers);\r\n }\r\n else {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, true, levels || 1, lineNumbers);\r\n }\r\n }\r\n }\r\n}\r\nclass ToggleFoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.toggleFold',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('toggleFoldAction.label', \"Toggle Fold\"),\r\n alias: 'Toggle Fold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 42 /* KEY_L */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n let selectedLines = this.getSelectedLines(editor);\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.toggleCollapseState)(foldingModel, 1, selectedLines);\r\n }\r\n}\r\nclass FoldRecursivelyAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldRecursively',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldRecursivelyAction.label', \"Fold Recursively\"),\r\n alias: 'Fold Recursively',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n let selectedLines = this.getSelectedLines(editor);\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, true, Number.MAX_VALUE, selectedLines);\r\n }\r\n}\r\nclass FoldAllBlockCommentsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAllBlockComments',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldAllBlockComments.label', \"Fold All Block Comments\"),\r\n alias: 'Fold All Block Comments',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 85 /* US_SLASH */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForType)(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__.FoldingRangeKind.Comment.value, true);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let comments = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__.LanguageConfigurationRegistry.getComments(editorModel.getLanguageIdentifier().id);\r\n if (comments && comments.blockCommentStartToken) {\r\n let regExp = new RegExp('^\\\\s*' + (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__.escapeRegExpCharacters)(comments.blockCommentStartToken));\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForMatchingLines)(foldingModel, regExp, true);\r\n }\r\n }\r\n }\r\n}\r\nclass FoldAllRegionsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAllMarkerRegions',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldAllMarkerRegions.label', \"Fold All Regions\"),\r\n alias: 'Fold All Regions',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 29 /* KEY_8 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForType)(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__.FoldingRangeKind.Region.value, true);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__.LanguageConfigurationRegistry.getFoldingRules(editorModel.getLanguageIdentifier().id);\r\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\r\n let regExp = new RegExp(foldingRules.markers.start);\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForMatchingLines)(foldingModel, regExp, true);\r\n }\r\n }\r\n }\r\n}\r\nclass UnfoldAllRegionsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldAllMarkerRegions',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('unfoldAllMarkerRegions.label', \"Unfold All Regions\"),\r\n alias: 'Unfold All Regions',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 30 /* KEY_9 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForType)(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__.FoldingRangeKind.Region.value, false);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__.LanguageConfigurationRegistry.getFoldingRules(editorModel.getLanguageIdentifier().id);\r\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\r\n let regExp = new RegExp(foldingRules.markers.start);\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateForMatchingLines)(foldingModel, regExp, false);\r\n }\r\n }\r\n }\r\n}\r\nclass FoldAllAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAll',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldAllAction.label', \"Fold All\"),\r\n alias: 'Fold All',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 21 /* KEY_0 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, _editor) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, true);\r\n }\r\n}\r\nclass UnfoldAllAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldAll',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('unfoldAllAction.label', \"Unfold All\"),\r\n alias: 'Unfold All',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 40 /* KEY_J */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, _editor) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateLevelsDown)(foldingModel, false);\r\n }\r\n}\r\nclass FoldLevelAction extends FoldingAction {\r\n getFoldingLevel() {\r\n return parseInt(this.id.substr(FoldLevelAction.ID_PREFIX.length));\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n (0,_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__.setCollapseStateAtLevel)(foldingModel, this.getFoldingLevel(), true, this.getSelectedLines(editor));\r\n }\r\n}\r\nFoldLevelAction.ID_PREFIX = 'editor.foldLevel';\r\nFoldLevelAction.ID = (level) => FoldLevelAction.ID_PREFIX + level;\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorContribution)(FoldingController.ID, FoldingController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(UnfoldAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(UnFoldRecursivelyAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(FoldAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(FoldRecursivelyAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(FoldAllAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(UnfoldAllAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(FoldAllBlockCommentsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(FoldAllRegionsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(UnfoldAllRegionsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(ToggleFoldAction);\r\nfor (let i = 1; i <= 7; i++) {\r\n (0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerInstantiatedEditorAction)(new FoldLevelAction({\r\n id: FoldLevelAction.ID(i),\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldLevelAction.label', \"Fold Level {0}\", i),\r\n alias: `Fold Level ${i}`,\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | (21 /* KEY_0 */ + i)),\r\n weight: 100 /* EditorContrib */\r\n }\r\n }));\r\n}\r\nconst foldBackgroundBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.registerColor)('editor.foldBackground', { light: (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.transparent)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.editorSelectionBackground, 0.3), dark: (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.transparent)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.editorSelectionBackground, 0.3), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('foldBackgroundBackground', \"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\nconst editorFoldForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.registerColor)('editorGutter.foldingControlForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.iconForeground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.iconForeground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__.iconForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.'));\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.registerThemingParticipant)((theme, collector) => {\r\n const foldBackground = theme.getColor(foldBackgroundBackground);\r\n if (foldBackground) {\r\n collector.addRule(`.monaco-editor .folded-background { background-color: ${foldBackground}; }`);\r\n }\r\n const editorFoldColor = theme.getColor(editorFoldForeground);\r\n if (editorFoldColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .cldr${_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.ThemeIcon.asCSSSelector(_foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__.foldingExpandedIcon)},\n\t\t.monaco-editor .cldr${_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__.ThemeIcon.asCSSSelector(_foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__.foldingCollapsedIcon)} {\n\t\t\tcolor: ${editorFoldColor} !important;\n\t\t}\n\t\t`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"foldingExpandedIcon\": () => (/* binding */ foldingExpandedIcon),\n/* harmony export */ \"foldingCollapsedIcon\": () => (/* binding */ foldingCollapsedIcon),\n/* harmony export */ \"FoldingDecorationProvider\": () => (/* binding */ FoldingDecorationProvider)\n/* harmony export */ });\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst foldingExpandedIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_3__.registerIcon)('folding-expanded', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__.Codicon.chevronDown, (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('foldingExpandedIcon', 'Icon for expanded ranges in the editor glyph margin.'));\r\nconst foldingCollapsedIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_3__.registerIcon)('folding-collapsed', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__.Codicon.chevronRight, (0,_nls_js__WEBPACK_IMPORTED_MODULE_2__.localize)('foldingCollapsedIcon', 'Icon for collapsed ranges in the editor glyph margin.'));\r\nclass FoldingDecorationProvider {\r\n constructor(editor) {\r\n this.editor = editor;\r\n this.autoHideFoldingControls = true;\r\n this.showFoldingHighlights = true;\r\n }\r\n getDecorationOption(isCollapsed, isHidden) {\r\n if (isHidden) {\r\n return FoldingDecorationProvider.HIDDEN_RANGE_DECORATION;\r\n }\r\n if (isCollapsed) {\r\n return this.showFoldingHighlights ? FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION;\r\n }\r\n else if (this.autoHideFoldingControls) {\r\n return FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION;\r\n }\r\n else {\r\n return FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION;\r\n }\r\n }\r\n deltaDecorations(oldDecorations, newDecorations) {\r\n return this.editor.deltaDecorations(oldDecorations, newDecorations);\r\n }\r\n changeDecorations(callback) {\r\n return this.editor.changeDecorations(callback);\r\n }\r\n}\r\nFoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n afterContentClassName: 'inline-folded',\r\n isWholeLine: true,\r\n firstLineDecorationClassName: _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.ThemeIcon.asClassName(foldingCollapsedIcon)\r\n});\r\nFoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n afterContentClassName: 'inline-folded',\r\n className: 'folded-background',\r\n isWholeLine: true,\r\n firstLineDecorationClassName: _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.ThemeIcon.asClassName(foldingCollapsedIcon)\r\n});\r\nFoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n isWholeLine: true,\r\n firstLineDecorationClassName: _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.ThemeIcon.asClassName(foldingExpandedIcon)\r\n});\r\nFoldingDecorationProvider.EXPANDED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n isWholeLine: true,\r\n firstLineDecorationClassName: 'alwaysShowFoldIcons ' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.ThemeIcon.asClassName(foldingExpandedIcon)\r\n});\r\nFoldingDecorationProvider.HIDDEN_RANGE_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FoldingModel\": () => (/* binding */ FoldingModel),\n/* harmony export */ \"toggleCollapseState\": () => (/* binding */ toggleCollapseState),\n/* harmony export */ \"setCollapseStateLevelsDown\": () => (/* binding */ setCollapseStateLevelsDown),\n/* harmony export */ \"setCollapseStateLevelsUp\": () => (/* binding */ setCollapseStateLevelsUp),\n/* harmony export */ \"setCollapseStateUp\": () => (/* binding */ setCollapseStateUp),\n/* harmony export */ \"setCollapseStateAtLevel\": () => (/* binding */ setCollapseStateAtLevel),\n/* harmony export */ \"setCollapseStateForMatchingLines\": () => (/* binding */ setCollapseStateForMatchingLines),\n/* harmony export */ \"setCollapseStateForType\": () => (/* binding */ setCollapseStateForType)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foldingRanges.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass FoldingModel {\r\n constructor(textModel, decorationProvider) {\r\n this._updateEventEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidChange = this._updateEventEmitter.event;\r\n this._textModel = textModel;\r\n this._decorationProvider = decorationProvider;\r\n this._regions = new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRegions(new Uint32Array(0), new Uint32Array(0));\r\n this._editorDecorationIds = [];\r\n this._isInitialized = false;\r\n }\r\n get regions() { return this._regions; }\r\n get textModel() { return this._textModel; }\r\n get isInitialized() { return this._isInitialized; }\r\n toggleCollapseState(toggledRegions) {\r\n if (!toggledRegions.length) {\r\n return;\r\n }\r\n toggledRegions = toggledRegions.sort((r1, r2) => r1.regionIndex - r2.regionIndex);\r\n const processed = {};\r\n this._decorationProvider.changeDecorations(accessor => {\r\n let k = 0; // index from [0 ... this.regions.length]\r\n let dirtyRegionEndLine = -1; // end of the range where decorations need to be updated\r\n let lastHiddenLine = -1; // the end of the last hidden lines\r\n const updateDecorationsUntil = (index) => {\r\n while (k < index) {\r\n const endLineNumber = this._regions.getEndLineNumber(k);\r\n const isCollapsed = this._regions.isCollapsed(k);\r\n if (endLineNumber <= dirtyRegionEndLine) {\r\n accessor.changeDecorationOptions(this._editorDecorationIds[k], this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine));\r\n }\r\n if (isCollapsed && endLineNumber > lastHiddenLine) {\r\n lastHiddenLine = endLineNumber;\r\n }\r\n k++;\r\n }\r\n };\r\n for (let region of toggledRegions) {\r\n let index = region.regionIndex;\r\n let editorDecorationId = this._editorDecorationIds[index];\r\n if (editorDecorationId && !processed[editorDecorationId]) {\r\n processed[editorDecorationId] = true;\r\n updateDecorationsUntil(index); // update all decorations up to current index using the old dirtyRegionEndLine\r\n let newCollapseState = !this._regions.isCollapsed(index);\r\n this._regions.setCollapsed(index, newCollapseState);\r\n dirtyRegionEndLine = Math.max(dirtyRegionEndLine, this._regions.getEndLineNumber(index));\r\n }\r\n }\r\n updateDecorationsUntil(this._regions.length);\r\n });\r\n this._updateEventEmitter.fire({ model: this, collapseStateChanged: toggledRegions });\r\n }\r\n update(newRegions, blockedLineNumers = []) {\r\n let newEditorDecorations = [];\r\n let isBlocked = (startLineNumber, endLineNumber) => {\r\n for (let blockedLineNumber of blockedLineNumers) {\r\n if (startLineNumber < blockedLineNumber && blockedLineNumber <= endLineNumber) { // first line is visible\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n let lastHiddenLine = -1;\r\n let initRange = (index, isCollapsed) => {\r\n const startLineNumber = newRegions.getStartLineNumber(index);\r\n const endLineNumber = newRegions.getEndLineNumber(index);\r\n if (isCollapsed && isBlocked(startLineNumber, endLineNumber)) {\r\n isCollapsed = false;\r\n }\r\n newRegions.setCollapsed(index, isCollapsed);\r\n const maxColumn = this._textModel.getLineMaxColumn(startLineNumber);\r\n const decorationRange = {\r\n startLineNumber: startLineNumber,\r\n startColumn: Math.max(maxColumn - 1, 1),\r\n endLineNumber: startLineNumber,\r\n endColumn: maxColumn\r\n };\r\n newEditorDecorations.push({ range: decorationRange, options: this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine) });\r\n if (isCollapsed && endLineNumber > lastHiddenLine) {\r\n lastHiddenLine = endLineNumber;\r\n }\r\n };\r\n let i = 0;\r\n let nextCollapsed = () => {\r\n while (i < this._regions.length) {\r\n let isCollapsed = this._regions.isCollapsed(i);\r\n i++;\r\n if (isCollapsed) {\r\n return i - 1;\r\n }\r\n }\r\n return -1;\r\n };\r\n let k = 0;\r\n let collapsedIndex = nextCollapsed();\r\n while (collapsedIndex !== -1 && k < newRegions.length) {\r\n // get the latest range\r\n let decRange = this._textModel.getDecorationRange(this._editorDecorationIds[collapsedIndex]);\r\n if (decRange) {\r\n let collapsedStartLineNumber = decRange.startLineNumber;\r\n if (decRange.startColumn === Math.max(decRange.endColumn - 1, 1) && this._textModel.getLineMaxColumn(collapsedStartLineNumber) === decRange.endColumn) { // test that the decoration is still covering the full line else it got deleted\r\n while (k < newRegions.length) {\r\n let startLineNumber = newRegions.getStartLineNumber(k);\r\n if (collapsedStartLineNumber >= startLineNumber) {\r\n initRange(k, collapsedStartLineNumber === startLineNumber);\r\n k++;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n collapsedIndex = nextCollapsed();\r\n }\r\n while (k < newRegions.length) {\r\n initRange(k, false);\r\n k++;\r\n }\r\n this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, newEditorDecorations);\r\n this._regions = newRegions;\r\n this._isInitialized = true;\r\n this._updateEventEmitter.fire({ model: this });\r\n }\r\n /**\r\n * Collapse state memento, for persistence only\r\n */\r\n getMemento() {\r\n let collapsedRanges = [];\r\n for (let i = 0; i < this._regions.length; i++) {\r\n if (this._regions.isCollapsed(i)) {\r\n let range = this._textModel.getDecorationRange(this._editorDecorationIds[i]);\r\n if (range) {\r\n let startLineNumber = range.startLineNumber;\r\n let endLineNumber = range.endLineNumber + this._regions.getEndLineNumber(i) - this._regions.getStartLineNumber(i);\r\n collapsedRanges.push({ startLineNumber, endLineNumber });\r\n }\r\n }\r\n }\r\n if (collapsedRanges.length > 0) {\r\n return collapsedRanges;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Apply persisted state, for persistence only\r\n */\r\n applyMemento(state) {\r\n if (!Array.isArray(state)) {\r\n return;\r\n }\r\n let toToogle = [];\r\n for (let range of state) {\r\n let region = this.getRegionAtLine(range.startLineNumber);\r\n if (region && !region.isCollapsed) {\r\n toToogle.push(region);\r\n }\r\n }\r\n this.toggleCollapseState(toToogle);\r\n }\r\n dispose() {\r\n this._decorationProvider.deltaDecorations(this._editorDecorationIds, []);\r\n }\r\n getAllRegionsAtLine(lineNumber, filter) {\r\n let result = [];\r\n if (this._regions) {\r\n let index = this._regions.findRange(lineNumber);\r\n let level = 1;\r\n while (index >= 0) {\r\n let current = this._regions.toRegion(index);\r\n if (!filter || filter(current, level)) {\r\n result.push(current);\r\n }\r\n level++;\r\n index = current.parentIndex;\r\n }\r\n }\r\n return result;\r\n }\r\n getRegionAtLine(lineNumber) {\r\n if (this._regions) {\r\n let index = this._regions.findRange(lineNumber);\r\n if (index >= 0) {\r\n return this._regions.toRegion(index);\r\n }\r\n }\r\n return null;\r\n }\r\n getRegionsInside(region, filter) {\r\n let result = [];\r\n let index = region ? region.regionIndex + 1 : 0;\r\n let endLineNumber = region ? region.endLineNumber : Number.MAX_VALUE;\r\n if (filter && filter.length === 2) {\r\n const levelStack = [];\r\n for (let i = index, len = this._regions.length; i < len; i++) {\r\n let current = this._regions.toRegion(i);\r\n if (this._regions.getStartLineNumber(i) < endLineNumber) {\r\n while (levelStack.length > 0 && !current.containedBy(levelStack[levelStack.length - 1])) {\r\n levelStack.pop();\r\n }\r\n levelStack.push(current);\r\n if (filter(current, levelStack.length)) {\r\n result.push(current);\r\n }\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n for (let i = index, len = this._regions.length; i < len; i++) {\r\n let current = this._regions.toRegion(i);\r\n if (this._regions.getStartLineNumber(i) < endLineNumber) {\r\n if (!filter || filter(current)) {\r\n result.push(current);\r\n }\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\r\n */\r\nfunction toggleCollapseState(foldingModel, levels, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region) {\r\n const doCollapse = !region.isCollapsed;\r\n toToggle.push(region);\r\n if (levels > 1) {\r\n let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations including all children.\r\n * @param doCollapse Whether to collapse or expand\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\r\n */\r\nfunction setCollapseStateLevelsDown(foldingModel, doCollapse, levels = Number.MAX_VALUE, lineNumbers) {\r\n let toToggle = [];\r\n if (lineNumbers && lineNumbers.length > 0) {\r\n for (let lineNumber of lineNumbers) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region) {\r\n if (region.isCollapsed !== doCollapse) {\r\n toToggle.push(region);\r\n }\r\n if (levels > 1) {\r\n let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n let regionsInside = foldingModel.getRegionsInside(null, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations including all parents.\r\n * @param doCollapse Whether to collapse or expand\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand.\r\n */\r\nfunction setCollapseStateLevelsUp(foldingModel, doCollapse, levels, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region, level) => region.isCollapsed !== doCollapse && level <= levels);\r\n toToggle.push(...regions);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand a region at the given locations. If the inner most region is already collapsed/expanded, uses the first parent instead.\r\n * @param doCollapse Whether to collapse or expand\r\n * @param lineNumbers the location of the regions to collapse or expand.\r\n */\r\nfunction setCollapseStateUp(foldingModel, doCollapse, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region) => region.isCollapsed !== doCollapse);\r\n if (regions.length > 0) {\r\n toToggle.push(regions[0]);\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds or unfolds all regions that have a given level, except if they contain one of the blocked lines.\r\n * @param foldLevel level. Level == 1 is the top level\r\n * @param doCollapse Whether to collapse or expand\r\n*/\r\nfunction setCollapseStateAtLevel(foldingModel, foldLevel, doCollapse, blockedLineNumbers) {\r\n let filter = (region, level) => level === foldLevel && region.isCollapsed !== doCollapse && !blockedLineNumbers.some(line => region.containsLine(line));\r\n let toToggle = foldingModel.getRegionsInside(null, filter);\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds all regions for which the lines start with a given regex\r\n * @param foldingModel the folding model\r\n */\r\nfunction setCollapseStateForMatchingLines(foldingModel, regExp, doCollapse) {\r\n let editorModel = foldingModel.textModel;\r\n let regions = foldingModel.regions;\r\n let toToggle = [];\r\n for (let i = regions.length - 1; i >= 0; i--) {\r\n if (doCollapse !== regions.isCollapsed(i)) {\r\n let startLineNumber = regions.getStartLineNumber(i);\r\n if (regExp.test(editorModel.getLineContent(startLineNumber))) {\r\n toToggle.push(regions.toRegion(i));\r\n }\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds all regions of the given type\r\n * @param foldingModel the folding model\r\n */\r\nfunction setCollapseStateForType(foldingModel, type, doCollapse) {\r\n let regions = foldingModel.regions;\r\n let toToggle = [];\r\n for (let i = regions.length - 1; i >= 0; i--) {\r\n if (doCollapse !== regions.isCollapsed(i) && type === regions.getType(i)) {\r\n toToggle.push(regions.toRegion(i));\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MAX_FOLDING_REGIONS\": () => (/* binding */ MAX_FOLDING_REGIONS),\n/* harmony export */ \"MAX_LINE_NUMBER\": () => (/* binding */ MAX_LINE_NUMBER),\n/* harmony export */ \"FoldingRegions\": () => (/* binding */ FoldingRegions),\n/* harmony export */ \"FoldingRegion\": () => (/* binding */ FoldingRegion)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst MAX_FOLDING_REGIONS = 0xFFFF;\r\nconst MAX_LINE_NUMBER = 0xFFFFFF;\r\nconst MASK_INDENT = 0xFF000000;\r\nclass FoldingRegions {\r\n constructor(startIndexes, endIndexes, types) {\r\n if (startIndexes.length !== endIndexes.length || startIndexes.length > MAX_FOLDING_REGIONS) {\r\n throw new Error('invalid startIndexes or endIndexes size');\r\n }\r\n this._startIndexes = startIndexes;\r\n this._endIndexes = endIndexes;\r\n this._collapseStates = new Uint32Array(Math.ceil(startIndexes.length / 32));\r\n this._types = types;\r\n this._parentsComputed = false;\r\n }\r\n ensureParentIndices() {\r\n if (!this._parentsComputed) {\r\n this._parentsComputed = true;\r\n let parentIndexes = [];\r\n let isInsideLast = (startLineNumber, endLineNumber) => {\r\n let index = parentIndexes[parentIndexes.length - 1];\r\n return this.getStartLineNumber(index) <= startLineNumber && this.getEndLineNumber(index) >= endLineNumber;\r\n };\r\n for (let i = 0, len = this._startIndexes.length; i < len; i++) {\r\n let startLineNumber = this._startIndexes[i];\r\n let endLineNumber = this._endIndexes[i];\r\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\r\n throw new Error('startLineNumber or endLineNumber must not exceed ' + MAX_LINE_NUMBER);\r\n }\r\n while (parentIndexes.length > 0 && !isInsideLast(startLineNumber, endLineNumber)) {\r\n parentIndexes.pop();\r\n }\r\n let parentIndex = parentIndexes.length > 0 ? parentIndexes[parentIndexes.length - 1] : -1;\r\n parentIndexes.push(i);\r\n this._startIndexes[i] = startLineNumber + ((parentIndex & 0xFF) << 24);\r\n this._endIndexes[i] = endLineNumber + ((parentIndex & 0xFF00) << 16);\r\n }\r\n }\r\n }\r\n get length() {\r\n return this._startIndexes.length;\r\n }\r\n getStartLineNumber(index) {\r\n return this._startIndexes[index] & MAX_LINE_NUMBER;\r\n }\r\n getEndLineNumber(index) {\r\n return this._endIndexes[index] & MAX_LINE_NUMBER;\r\n }\r\n getType(index) {\r\n return this._types ? this._types[index] : undefined;\r\n }\r\n hasTypes() {\r\n return !!this._types;\r\n }\r\n isCollapsed(index) {\r\n let arrayIndex = (index / 32) | 0;\r\n let bit = index % 32;\r\n return (this._collapseStates[arrayIndex] & (1 << bit)) !== 0;\r\n }\r\n setCollapsed(index, newState) {\r\n let arrayIndex = (index / 32) | 0;\r\n let bit = index % 32;\r\n let value = this._collapseStates[arrayIndex];\r\n if (newState) {\r\n this._collapseStates[arrayIndex] = value | (1 << bit);\r\n }\r\n else {\r\n this._collapseStates[arrayIndex] = value & ~(1 << bit);\r\n }\r\n }\r\n toRegion(index) {\r\n return new FoldingRegion(this, index);\r\n }\r\n getParentIndex(index) {\r\n this.ensureParentIndices();\r\n let parent = ((this._startIndexes[index] & MASK_INDENT) >>> 24) + ((this._endIndexes[index] & MASK_INDENT) >>> 16);\r\n if (parent === MAX_FOLDING_REGIONS) {\r\n return -1;\r\n }\r\n return parent;\r\n }\r\n contains(index, line) {\r\n return this.getStartLineNumber(index) <= line && this.getEndLineNumber(index) >= line;\r\n }\r\n findIndex(line) {\r\n let low = 0, high = this._startIndexes.length;\r\n if (high === 0) {\r\n return -1; // no children\r\n }\r\n while (low < high) {\r\n let mid = Math.floor((low + high) / 2);\r\n if (line < this.getStartLineNumber(mid)) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n return low - 1;\r\n }\r\n findRange(line) {\r\n let index = this.findIndex(line);\r\n if (index >= 0) {\r\n let endLineNumber = this.getEndLineNumber(index);\r\n if (endLineNumber >= line) {\r\n return index;\r\n }\r\n index = this.getParentIndex(index);\r\n while (index !== -1) {\r\n if (this.contains(index, line)) {\r\n return index;\r\n }\r\n index = this.getParentIndex(index);\r\n }\r\n }\r\n return -1;\r\n }\r\n toString() {\r\n let res = [];\r\n for (let i = 0; i < this.length; i++) {\r\n res[i] = `[${this.isCollapsed(i) ? '+' : '-'}] ${this.getStartLineNumber(i)}/${this.getEndLineNumber(i)}`;\r\n }\r\n return res.join(', ');\r\n }\r\n}\r\nclass FoldingRegion {\r\n constructor(ranges, index) {\r\n this.ranges = ranges;\r\n this.index = index;\r\n }\r\n get startLineNumber() {\r\n return this.ranges.getStartLineNumber(this.index);\r\n }\r\n get endLineNumber() {\r\n return this.ranges.getEndLineNumber(this.index);\r\n }\r\n get regionIndex() {\r\n return this.index;\r\n }\r\n get parentIndex() {\r\n return this.ranges.getParentIndex(this.index);\r\n }\r\n get isCollapsed() {\r\n return this.ranges.isCollapsed(this.index);\r\n }\r\n containedBy(range) {\r\n return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber;\r\n }\r\n containsLine(lineNumber) {\r\n return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HiddenRangeModel\": () => (/* binding */ HiddenRangeModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass HiddenRangeModel {\r\n constructor(model) {\r\n this._updateEventEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this._foldingModel = model;\r\n this._foldingModelListener = model.onDidChange(_ => this.updateHiddenRanges());\r\n this._hiddenRanges = [];\r\n if (model.regions.length) {\r\n this.updateHiddenRanges();\r\n }\r\n }\r\n get onDidChange() { return this._updateEventEmitter.event; }\r\n get hiddenRanges() { return this._hiddenRanges; }\r\n updateHiddenRanges() {\r\n let updateHiddenAreas = false;\r\n let newHiddenAreas = [];\r\n let i = 0; // index into hidden\r\n let k = 0;\r\n let lastCollapsedStart = Number.MAX_VALUE;\r\n let lastCollapsedEnd = -1;\r\n let ranges = this._foldingModel.regions;\r\n for (; i < ranges.length; i++) {\r\n if (!ranges.isCollapsed(i)) {\r\n continue;\r\n }\r\n let startLineNumber = ranges.getStartLineNumber(i) + 1; // the first line is not hidden\r\n let endLineNumber = ranges.getEndLineNumber(i);\r\n if (lastCollapsedStart <= startLineNumber && endLineNumber <= lastCollapsedEnd) {\r\n // ignore ranges contained in collapsed regions\r\n continue;\r\n }\r\n if (!updateHiddenAreas && k < this._hiddenRanges.length && this._hiddenRanges[k].startLineNumber === startLineNumber && this._hiddenRanges[k].endLineNumber === endLineNumber) {\r\n // reuse the old ranges\r\n newHiddenAreas.push(this._hiddenRanges[k]);\r\n k++;\r\n }\r\n else {\r\n updateHiddenAreas = true;\r\n newHiddenAreas.push(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(startLineNumber, 1, endLineNumber, 1));\r\n }\r\n lastCollapsedStart = startLineNumber;\r\n lastCollapsedEnd = endLineNumber;\r\n }\r\n if (updateHiddenAreas || k < this._hiddenRanges.length) {\r\n this.applyHiddenRanges(newHiddenAreas);\r\n }\r\n }\r\n applyMemento(state) {\r\n if (!Array.isArray(state) || state.length === 0) {\r\n return false;\r\n }\r\n let hiddenRanges = [];\r\n for (let r of state) {\r\n if (!r.startLineNumber || !r.endLineNumber) {\r\n return false;\r\n }\r\n hiddenRanges.push(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(r.startLineNumber + 1, 1, r.endLineNumber, 1));\r\n }\r\n this.applyHiddenRanges(hiddenRanges);\r\n return true;\r\n }\r\n /**\r\n * Collapse state memento, for persistence only, only used if folding model is not yet initialized\r\n */\r\n getMemento() {\r\n return this._hiddenRanges.map(r => ({ startLineNumber: r.startLineNumber - 1, endLineNumber: r.endLineNumber }));\r\n }\r\n applyHiddenRanges(newHiddenAreas) {\r\n this._hiddenRanges = newHiddenAreas;\r\n this._updateEventEmitter.fire(newHiddenAreas);\r\n }\r\n hasRanges() {\r\n return this._hiddenRanges.length > 0;\r\n }\r\n isHidden(line) {\r\n return findRange(this._hiddenRanges, line) !== null;\r\n }\r\n adjustSelections(selections) {\r\n let hasChanges = false;\r\n let editorModel = this._foldingModel.textModel;\r\n let lastRange = null;\r\n let adjustLine = (line) => {\r\n if (!lastRange || !isInside(line, lastRange)) {\r\n lastRange = findRange(this._hiddenRanges, line);\r\n }\r\n if (lastRange) {\r\n return lastRange.startLineNumber - 1;\r\n }\r\n return null;\r\n };\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n let adjustedStartLine = adjustLine(selection.startLineNumber);\r\n if (adjustedStartLine) {\r\n selection = selection.setStartPosition(adjustedStartLine, editorModel.getLineMaxColumn(adjustedStartLine));\r\n hasChanges = true;\r\n }\r\n let adjustedEndLine = adjustLine(selection.endLineNumber);\r\n if (adjustedEndLine) {\r\n selection = selection.setEndPosition(adjustedEndLine, editorModel.getLineMaxColumn(adjustedEndLine));\r\n hasChanges = true;\r\n }\r\n selections[i] = selection;\r\n }\r\n return hasChanges;\r\n }\r\n dispose() {\r\n if (this.hiddenRanges.length > 0) {\r\n this._hiddenRanges = [];\r\n this._updateEventEmitter.fire(this._hiddenRanges);\r\n }\r\n if (this._foldingModelListener) {\r\n this._foldingModelListener.dispose();\r\n this._foldingModelListener = null;\r\n }\r\n }\r\n}\r\nfunction isInside(line, range) {\r\n return line >= range.startLineNumber && line <= range.endLineNumber;\r\n}\r\nfunction findRange(ranges, line) {\r\n let i = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__.findFirstInSorted)(ranges, r => line < r.startLineNumber) - 1;\r\n if (i >= 0 && ranges[i].endLineNumber >= line) {\r\n return ranges[i];\r\n }\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ID_INDENT_PROVIDER\": () => (/* binding */ ID_INDENT_PROVIDER),\n/* harmony export */ \"IndentRangeProvider\": () => (/* binding */ IndentRangeProvider),\n/* harmony export */ \"RangesCollector\": () => (/* binding */ RangesCollector),\n/* harmony export */ \"computeRanges\": () => (/* binding */ computeRanges)\n/* harmony export */ });\n/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foldingRanges.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT = 5000;\r\nconst ID_INDENT_PROVIDER = 'indent';\r\nclass IndentRangeProvider {\r\n constructor(editorModel) {\r\n this.editorModel = editorModel;\r\n this.id = ID_INDENT_PROVIDER;\r\n }\r\n dispose() {\r\n }\r\n compute(cancelationToken) {\r\n let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id);\r\n let offSide = foldingRules && !!foldingRules.offSide;\r\n let markers = foldingRules && foldingRules.markers;\r\n return Promise.resolve(computeRanges(this.editorModel, offSide, markers));\r\n }\r\n}\r\n// public only for testing\r\nclass RangesCollector {\r\n constructor(foldingRangesLimit) {\r\n this._startIndexes = [];\r\n this._endIndexes = [];\r\n this._indentOccurrences = [];\r\n this._length = 0;\r\n this._foldingRangesLimit = foldingRangesLimit;\r\n }\r\n insertFirst(startLineNumber, endLineNumber, indent) {\r\n if (startLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__.MAX_LINE_NUMBER || endLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__.MAX_LINE_NUMBER) {\r\n return;\r\n }\r\n let index = this._length;\r\n this._startIndexes[index] = startLineNumber;\r\n this._endIndexes[index] = endLineNumber;\r\n this._length++;\r\n if (indent < 1000) {\r\n this._indentOccurrences[indent] = (this._indentOccurrences[indent] || 0) + 1;\r\n }\r\n }\r\n toIndentRanges(model) {\r\n if (this._length <= this._foldingRangesLimit) {\r\n // reverse and create arrays of the exact length\r\n let startIndexes = new Uint32Array(this._length);\r\n let endIndexes = new Uint32Array(this._length);\r\n for (let i = this._length - 1, k = 0; i >= 0; i--, k++) {\r\n startIndexes[k] = this._startIndexes[i];\r\n endIndexes[k] = this._endIndexes[i];\r\n }\r\n return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRegions(startIndexes, endIndexes);\r\n }\r\n else {\r\n let entries = 0;\r\n let maxIndent = this._indentOccurrences.length;\r\n for (let i = 0; i < this._indentOccurrences.length; i++) {\r\n let n = this._indentOccurrences[i];\r\n if (n) {\r\n if (n + entries > this._foldingRangesLimit) {\r\n maxIndent = i;\r\n break;\r\n }\r\n entries += n;\r\n }\r\n }\r\n const tabSize = model.getOptions().tabSize;\r\n // reverse and create arrays of the exact length\r\n let startIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let endIndexes = new Uint32Array(this._foldingRangesLimit);\r\n for (let i = this._length - 1, k = 0; i >= 0; i--) {\r\n let startIndex = this._startIndexes[i];\r\n let lineContent = model.getLineContent(startIndex);\r\n let indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__.TextModel.computeIndentLevel(lineContent, tabSize);\r\n if (indent < maxIndent || (indent === maxIndent && entries++ < this._foldingRangesLimit)) {\r\n startIndexes[k] = startIndex;\r\n endIndexes[k] = this._endIndexes[i];\r\n k++;\r\n }\r\n }\r\n return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRegions(startIndexes, endIndexes);\r\n }\r\n }\r\n}\r\nfunction computeRanges(model, offSide, markers, foldingRangesLimit = MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT) {\r\n const tabSize = model.getOptions().tabSize;\r\n let result = new RangesCollector(foldingRangesLimit);\r\n let pattern = undefined;\r\n if (markers) {\r\n pattern = new RegExp(`(${markers.start.source})|(?:${markers.end.source})`);\r\n }\r\n let previousRegions = [];\r\n let line = model.getLineCount() + 1;\r\n previousRegions.push({ indent: -1, endAbove: line, line }); // sentinel, to make sure there's at least one entry\r\n for (let line = model.getLineCount(); line > 0; line--) {\r\n let lineContent = model.getLineContent(line);\r\n let indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__.TextModel.computeIndentLevel(lineContent, tabSize);\r\n let previous = previousRegions[previousRegions.length - 1];\r\n if (indent === -1) {\r\n if (offSide) {\r\n // for offSide languages, empty lines are associated to the previous block\r\n // note: the next block is already written to the results, so this only\r\n // impacts the end position of the block before\r\n previous.endAbove = line;\r\n }\r\n continue; // only whitespace\r\n }\r\n let m;\r\n if (pattern && (m = lineContent.match(pattern))) {\r\n // folding pattern match\r\n if (m[1]) { // start pattern match\r\n // discard all regions until the folding pattern\r\n let i = previousRegions.length - 1;\r\n while (i > 0 && previousRegions[i].indent !== -2) {\r\n i--;\r\n }\r\n if (i > 0) {\r\n previousRegions.length = i + 1;\r\n previous = previousRegions[i];\r\n // new folding range from pattern, includes the end line\r\n result.insertFirst(line, previous.line, indent);\r\n previous.line = line;\r\n previous.indent = indent;\r\n previous.endAbove = line;\r\n continue;\r\n }\r\n else {\r\n // no end marker found, treat line as a regular line\r\n }\r\n }\r\n else { // end pattern match\r\n previousRegions.push({ indent: -2, endAbove: line, line });\r\n continue;\r\n }\r\n }\r\n if (previous.indent > indent) {\r\n // discard all regions with larger indent\r\n do {\r\n previousRegions.pop();\r\n previous = previousRegions[previousRegions.length - 1];\r\n } while (previous.indent > indent);\r\n // new folding range\r\n let endLineNumber = previous.endAbove - 1;\r\n if (endLineNumber - line >= 1) { // needs at east size 1\r\n result.insertFirst(line, endLineNumber, indent);\r\n }\r\n }\r\n if (previous.indent === indent) {\r\n previous.endAbove = line;\r\n }\r\n else { // previous.indent < indent\r\n // new region with a bigger indent\r\n previousRegions.push({ indent, endAbove: line, line });\r\n }\r\n }\r\n return result.toIndentRanges(model);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ID_INIT_PROVIDER\": () => (/* binding */ ID_INIT_PROVIDER),\n/* harmony export */ \"InitializingRangeProvider\": () => (/* binding */ InitializingRangeProvider)\n/* harmony export */ });\n/* harmony import */ var _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./syntaxRangeProvider.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ID_INIT_PROVIDER = 'init';\r\nclass InitializingRangeProvider {\r\n constructor(editorModel, initialRanges, onTimeout, timeoutTime) {\r\n this.editorModel = editorModel;\r\n this.id = ID_INIT_PROVIDER;\r\n if (initialRanges.length) {\r\n let toDecorationRange = (range) => {\r\n return {\r\n range: {\r\n startLineNumber: range.startLineNumber,\r\n startColumn: 0,\r\n endLineNumber: range.endLineNumber,\r\n endColumn: editorModel.getLineLength(range.endLineNumber)\r\n },\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n };\r\n };\r\n this.decorationIds = editorModel.deltaDecorations([], initialRanges.map(toDecorationRange));\r\n this.timeout = setTimeout(onTimeout, timeoutTime);\r\n }\r\n }\r\n dispose() {\r\n if (this.decorationIds) {\r\n this.editorModel.deltaDecorations(this.decorationIds, []);\r\n this.decorationIds = undefined;\r\n }\r\n if (typeof this.timeout === 'number') {\r\n clearTimeout(this.timeout);\r\n this.timeout = undefined;\r\n }\r\n }\r\n compute(cancelationToken) {\r\n let foldingRangeData = [];\r\n if (this.decorationIds) {\r\n for (let id of this.decorationIds) {\r\n let range = this.editorModel.getDecorationRange(id);\r\n if (range) {\r\n foldingRangeData.push({ start: range.startLineNumber, end: range.endLineNumber, rank: 1 });\r\n }\r\n }\r\n }\r\n return Promise.resolve((0,_syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeRanges)(foldingRangeData, Number.MAX_VALUE));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ID_SYNTAX_PROVIDER\": () => (/* binding */ ID_SYNTAX_PROVIDER),\n/* harmony export */ \"SyntaxRangeProvider\": () => (/* binding */ SyntaxRangeProvider),\n/* harmony export */ \"RangesCollector\": () => (/* binding */ RangesCollector),\n/* harmony export */ \"sanitizeRanges\": () => (/* binding */ sanitizeRanges)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foldingRanges.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst MAX_FOLDING_REGIONS = 5000;\r\nconst foldingContext = {};\r\nconst ID_SYNTAX_PROVIDER = 'syntax';\r\nclass SyntaxRangeProvider {\r\n constructor(editorModel, providers, handleFoldingRangesChange, limit = MAX_FOLDING_REGIONS) {\r\n this.editorModel = editorModel;\r\n this.providers = providers;\r\n this.limit = limit;\r\n this.id = ID_SYNTAX_PROVIDER;\r\n for (const provider of providers) {\r\n if (typeof provider.onDidChange === 'function') {\r\n if (!this.disposables) {\r\n this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n }\r\n this.disposables.add(provider.onDidChange(handleFoldingRangesChange));\r\n }\r\n }\r\n }\r\n compute(cancellationToken) {\r\n return collectSyntaxRanges(this.providers, this.editorModel, cancellationToken).then(ranges => {\r\n if (ranges) {\r\n let res = sanitizeRanges(ranges, this.limit);\r\n return res;\r\n }\r\n return null;\r\n });\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this.disposables) === null || _a === void 0 ? void 0 : _a.dispose();\r\n }\r\n}\r\nfunction collectSyntaxRanges(providers, model, cancellationToken) {\r\n let rangeData = null;\r\n let promises = providers.map((provider, i) => {\r\n return Promise.resolve(provider.provideFoldingRanges(model, foldingContext, cancellationToken)).then(ranges => {\r\n if (cancellationToken.isCancellationRequested) {\r\n return;\r\n }\r\n if (Array.isArray(ranges)) {\r\n if (!Array.isArray(rangeData)) {\r\n rangeData = [];\r\n }\r\n let nLines = model.getLineCount();\r\n for (let r of ranges) {\r\n if (r.start > 0 && r.end > r.start && r.end <= nLines) {\r\n rangeData.push({ start: r.start, end: r.end, rank: i, kind: r.kind });\r\n }\r\n }\r\n }\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedExternalError);\r\n });\r\n return Promise.all(promises).then(_ => {\r\n return rangeData;\r\n });\r\n}\r\nclass RangesCollector {\r\n constructor(foldingRangesLimit) {\r\n this._startIndexes = [];\r\n this._endIndexes = [];\r\n this._nestingLevels = [];\r\n this._nestingLevelCounts = [];\r\n this._types = [];\r\n this._length = 0;\r\n this._foldingRangesLimit = foldingRangesLimit;\r\n }\r\n add(startLineNumber, endLineNumber, type, nestingLevel) {\r\n if (startLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__.MAX_LINE_NUMBER || endLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__.MAX_LINE_NUMBER) {\r\n return;\r\n }\r\n let index = this._length;\r\n this._startIndexes[index] = startLineNumber;\r\n this._endIndexes[index] = endLineNumber;\r\n this._nestingLevels[index] = nestingLevel;\r\n this._types[index] = type;\r\n this._length++;\r\n if (nestingLevel < 30) {\r\n this._nestingLevelCounts[nestingLevel] = (this._nestingLevelCounts[nestingLevel] || 0) + 1;\r\n }\r\n }\r\n toIndentRanges() {\r\n if (this._length <= this._foldingRangesLimit) {\r\n let startIndexes = new Uint32Array(this._length);\r\n let endIndexes = new Uint32Array(this._length);\r\n for (let i = 0; i < this._length; i++) {\r\n startIndexes[i] = this._startIndexes[i];\r\n endIndexes[i] = this._endIndexes[i];\r\n }\r\n return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRegions(startIndexes, endIndexes, this._types);\r\n }\r\n else {\r\n let entries = 0;\r\n let maxLevel = this._nestingLevelCounts.length;\r\n for (let i = 0; i < this._nestingLevelCounts.length; i++) {\r\n let n = this._nestingLevelCounts[i];\r\n if (n) {\r\n if (n + entries > this._foldingRangesLimit) {\r\n maxLevel = i;\r\n break;\r\n }\r\n entries += n;\r\n }\r\n }\r\n let startIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let endIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let types = [];\r\n for (let i = 0, k = 0; i < this._length; i++) {\r\n let level = this._nestingLevels[i];\r\n if (level < maxLevel || (level === maxLevel && entries++ < this._foldingRangesLimit)) {\r\n startIndexes[k] = this._startIndexes[i];\r\n endIndexes[k] = this._endIndexes[i];\r\n types[k] = this._types[i];\r\n k++;\r\n }\r\n }\r\n return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRegions(startIndexes, endIndexes, types);\r\n }\r\n }\r\n}\r\nfunction sanitizeRanges(rangeData, limit) {\r\n let sorted = rangeData.sort((d1, d2) => {\r\n let diff = d1.start - d2.start;\r\n if (diff === 0) {\r\n diff = d1.rank - d2.rank;\r\n }\r\n return diff;\r\n });\r\n let collector = new RangesCollector(limit);\r\n let top = undefined;\r\n let previous = [];\r\n for (let entry of sorted) {\r\n if (!top) {\r\n top = entry;\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n else {\r\n if (entry.start > top.start) {\r\n if (entry.end <= top.end) {\r\n previous.push(top);\r\n top = entry;\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n else {\r\n if (entry.start > top.end) {\r\n do {\r\n top = previous.pop();\r\n } while (top && entry.start > top.end);\r\n if (top) {\r\n previous.push(top);\r\n }\r\n top = entry;\r\n }\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n }\r\n }\r\n }\r\n return collector.toIndentRanges();\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/config/editorZoom.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass EditorFontZoomIn extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomIn',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('EditorFontZoomIn.label', \"Editor Font Zoom In\"),\r\n alias: 'Editor Font Zoom In',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__.EditorZoom.setZoomLevel(_common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__.EditorZoom.getZoomLevel() + 1);\r\n }\r\n}\r\nclass EditorFontZoomOut extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomOut',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('EditorFontZoomOut.label', \"Editor Font Zoom Out\"),\r\n alias: 'Editor Font Zoom Out',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__.EditorZoom.setZoomLevel(_common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__.EditorZoom.getZoomLevel() - 1);\r\n }\r\n}\r\nclass EditorFontZoomReset extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomReset',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('EditorFontZoomReset.label', \"Editor Font Zoom Reset\"),\r\n alias: 'Editor Font Zoom Reset',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__.EditorZoom.setZoomLevel(0);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(EditorFontZoomIn);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(EditorFontZoomOut);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(EditorFontZoomReset);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"alertFormattingEdits\": () => (/* binding */ alertFormattingEdits),\n/* harmony export */ \"getRealAndSyntheticDocumentFormattersOrdered\": () => (/* binding */ getRealAndSyntheticDocumentFormattersOrdered),\n/* harmony export */ \"FormattingConflicts\": () => (/* binding */ FormattingConflicts),\n/* harmony export */ \"formatDocumentRangesWithSelectedProvider\": () => (/* binding */ formatDocumentRangesWithSelectedProvider),\n/* harmony export */ \"formatDocumentRangesWithProvider\": () => (/* binding */ formatDocumentRangesWithProvider),\n/* harmony export */ \"formatDocumentWithSelectedProvider\": () => (/* binding */ formatDocumentWithSelectedProvider),\n/* harmony export */ \"formatDocumentWithProvider\": () => (/* binding */ formatDocumentWithProvider),\n/* harmony export */ \"getDocumentRangeFormattingEditsUntilResult\": () => (/* binding */ getDocumentRangeFormattingEditsUntilResult),\n/* harmony export */ \"getDocumentFormattingEditsUntilResult\": () => (/* binding */ getDocumentFormattingEditsUntilResult),\n/* harmony export */ \"getOnTypeFormattingEdits\": () => (/* binding */ getOnTypeFormattingEdits)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./formattingEdit.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/extensions/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction alertFormattingEdits(edits) {\r\n edits = edits.filter(edit => edit.range);\r\n if (!edits.length) {\r\n return;\r\n }\r\n let { range } = edits[0];\r\n for (let i = 1; i < edits.length; i++) {\r\n range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.plusRange(range, edits[i].range);\r\n }\r\n const { startLineNumber, endLineNumber } = range;\r\n if (startLineNumber === endLineNumber) {\r\n if (edits.length === 1) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_14__.localize('hint11', \"Made 1 formatting edit on line {0}\", startLineNumber));\r\n }\r\n else {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_14__.localize('hintn1', \"Made {0} formatting edits on line {1}\", edits.length, startLineNumber));\r\n }\r\n }\r\n else {\r\n if (edits.length === 1) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_14__.localize('hint1n', \"Made 1 formatting edit between lines {0} and {1}\", startLineNumber, endLineNumber));\r\n }\r\n else {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_14__.localize('hintnn', \"Made {0} formatting edits between lines {1} and {2}\", edits.length, startLineNumber, endLineNumber));\r\n }\r\n }\r\n}\r\nfunction getRealAndSyntheticDocumentFormattersOrdered(model) {\r\n const result = [];\r\n const seen = new Set();\r\n // (1) add all document formatter\r\n const docFormatter = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__.DocumentFormattingEditProviderRegistry.ordered(model);\r\n for (const formatter of docFormatter) {\r\n result.push(formatter);\r\n if (formatter.extensionId) {\r\n seen.add(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__.ExtensionIdentifier.toKey(formatter.extensionId));\r\n }\r\n }\r\n // (2) add all range formatter as document formatter (unless the same extension already did that)\r\n const rangeFormatter = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__.DocumentRangeFormattingEditProviderRegistry.ordered(model);\r\n for (const formatter of rangeFormatter) {\r\n if (formatter.extensionId) {\r\n if (seen.has(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__.ExtensionIdentifier.toKey(formatter.extensionId))) {\r\n continue;\r\n }\r\n seen.add(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__.ExtensionIdentifier.toKey(formatter.extensionId));\r\n }\r\n result.push({\r\n displayName: formatter.displayName,\r\n extensionId: formatter.extensionId,\r\n provideDocumentFormattingEdits(model, options, token) {\r\n return formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\r\n }\r\n });\r\n }\r\n return result;\r\n}\r\nclass FormattingConflicts {\r\n static setFormatterSelector(selector) {\r\n const remove = FormattingConflicts._selectors.unshift(selector);\r\n return { dispose: remove };\r\n }\r\n static select(formatter, document, mode) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (formatter.length === 0) {\r\n return undefined;\r\n }\r\n const selector = _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_20__.Iterable.first(FormattingConflicts._selectors);\r\n if (selector) {\r\n return yield selector(formatter, document, mode);\r\n }\r\n return undefined;\r\n });\r\n }\r\n}\r\nFormattingConflicts._selectors = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_17__.LinkedList();\r\nfunction formatDocumentRangesWithSelectedProvider(accessor, editorOrModel, rangeOrRanges, mode, progress, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService);\r\n const model = (0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\r\n const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__.DocumentRangeFormattingEditProviderRegistry.ordered(model);\r\n const selected = yield FormattingConflicts.select(provider, model, mode);\r\n if (selected) {\r\n progress.report(selected);\r\n yield instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token);\r\n }\r\n });\r\n}\r\nfunction formatDocumentRangesWithProvider(accessor, provider, editorOrModel, rangeOrRanges, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const workerService = accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__.IEditorWorkerService);\r\n let model;\r\n let cts;\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel)) {\r\n model = editorOrModel.getModel();\r\n cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.EditorStateCancellationTokenSource(editorOrModel, 1 /* Value */ | 4 /* Position */, undefined, token);\r\n }\r\n else {\r\n model = editorOrModel;\r\n cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.TextModelCancellationTokenSource(editorOrModel, token);\r\n }\r\n // make sure that ranges don't overlap nor touch each other\r\n let ranges = [];\r\n let len = 0;\r\n for (let range of (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.asArray)(rangeOrRanges).sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.compareRangesUsingStarts)) {\r\n if (len > 0 && _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.areIntersectingOrTouching(ranges[len - 1], range)) {\r\n ranges[len - 1] = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\r\n }\r\n else {\r\n len = ranges.push(range);\r\n }\r\n }\r\n const allEdits = [];\r\n for (let range of ranges) {\r\n try {\r\n const rawEdits = yield provider.provideDocumentRangeFormattingEdits(model, range, model.getFormattingOptions(), cts.token);\r\n const minEdits = yield workerService.computeMoreMinimalEdits(model.uri, rawEdits);\r\n if (minEdits) {\r\n allEdits.push(...minEdits);\r\n }\r\n if (cts.token.isCancellationRequested) {\r\n return true;\r\n }\r\n }\r\n finally {\r\n cts.dispose();\r\n }\r\n }\r\n if (allEdits.length === 0) {\r\n return false;\r\n }\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel)) {\r\n // use editor to apply edits\r\n _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__.FormattingEdit.execute(editorOrModel, allEdits, true);\r\n alertFormattingEdits(allEdits);\r\n editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* Immediate */);\r\n }\r\n else {\r\n // use model to apply edits\r\n const [{ range }] = allEdits;\r\n const initialSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n model.pushEditOperations([initialSelection], allEdits.map(edit => {\r\n return {\r\n text: edit.text,\r\n range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(edit.range),\r\n forceMoveMarkers: true\r\n };\r\n }), undoEdits => {\r\n for (const { range } of undoEdits) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.areIntersectingOrTouching(range, initialSelection)) {\r\n return [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\r\n }\r\n }\r\n return null;\r\n });\r\n }\r\n return true;\r\n });\r\n}\r\nfunction formatDocumentWithSelectedProvider(accessor, editorOrModel, mode, progress, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService);\r\n const model = (0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\r\n const provider = getRealAndSyntheticDocumentFormattersOrdered(model);\r\n const selected = yield FormattingConflicts.select(provider, model, mode);\r\n if (selected) {\r\n progress.report(selected);\r\n yield instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token);\r\n }\r\n });\r\n}\r\nfunction formatDocumentWithProvider(accessor, provider, editorOrModel, mode, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const workerService = accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__.IEditorWorkerService);\r\n let model;\r\n let cts;\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel)) {\r\n model = editorOrModel.getModel();\r\n cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.EditorStateCancellationTokenSource(editorOrModel, 1 /* Value */ | 4 /* Position */, undefined, token);\r\n }\r\n else {\r\n model = editorOrModel;\r\n cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.TextModelCancellationTokenSource(editorOrModel, token);\r\n }\r\n let edits;\r\n try {\r\n const rawEdits = yield provider.provideDocumentFormattingEdits(model, model.getFormattingOptions(), cts.token);\r\n edits = yield workerService.computeMoreMinimalEdits(model.uri, rawEdits);\r\n if (cts.token.isCancellationRequested) {\r\n return true;\r\n }\r\n }\r\n finally {\r\n cts.dispose();\r\n }\r\n if (!edits || edits.length === 0) {\r\n return false;\r\n }\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__.isCodeEditor)(editorOrModel)) {\r\n // use editor to apply edits\r\n _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__.FormattingEdit.execute(editorOrModel, edits, mode !== 2 /* Silent */);\r\n if (mode !== 2 /* Silent */) {\r\n alertFormattingEdits(edits);\r\n editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* Immediate */);\r\n }\r\n }\r\n else {\r\n // use model to apply edits\r\n const [{ range }] = edits;\r\n const initialSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n model.pushEditOperations([initialSelection], edits.map(edit => {\r\n return {\r\n text: edit.text,\r\n range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(edit.range),\r\n forceMoveMarkers: true\r\n };\r\n }), undoEdits => {\r\n for (const { range } of undoEdits) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.areIntersectingOrTouching(range, initialSelection)) {\r\n return [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\r\n }\r\n }\r\n return null;\r\n });\r\n }\r\n return true;\r\n });\r\n}\r\nfunction getDocumentRangeFormattingEditsUntilResult(workerService, model, range, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__.DocumentRangeFormattingEditProviderRegistry.ordered(model);\r\n for (const provider of providers) {\r\n let rawEdits = yield Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedExternalError);\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.isNonEmptyArray)(rawEdits)) {\r\n return yield workerService.computeMoreMinimalEdits(model.uri, rawEdits);\r\n }\r\n }\r\n return undefined;\r\n });\r\n}\r\nfunction getDocumentFormattingEditsUntilResult(workerService, model, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const providers = getRealAndSyntheticDocumentFormattersOrdered(model);\r\n for (const provider of providers) {\r\n let rawEdits = yield Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedExternalError);\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.isNonEmptyArray)(rawEdits)) {\r\n return yield workerService.computeMoreMinimalEdits(model.uri, rawEdits);\r\n }\r\n }\r\n return undefined;\r\n });\r\n}\r\nfunction getOnTypeFormattingEdits(workerService, model, position, ch, options) {\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__.OnTypeFormattingEditProviderRegistry.ordered(model);\r\n if (providers.length === 0) {\r\n return Promise.resolve(undefined);\r\n }\r\n if (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\r\n return Promise.resolve(undefined);\r\n }\r\n return Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationToken.None)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedExternalError).then(edits => {\r\n return workerService.computeMoreMinimalEdits(model.uri, edits);\r\n });\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommand('_executeFormatRangeProvider', function (accessor, ...args) {\r\n const [resource, range, options] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI.isUri(resource));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.isIRange(range));\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__.IModelService).getModel(resource);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.illegalArgument)('resource');\r\n }\r\n return getDocumentRangeFormattingEditsUntilResult(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__.IEditorWorkerService), model, _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(range), options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationToken.None);\r\n});\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommand('_executeFormatDocumentProvider', function (accessor, ...args) {\r\n const [resource, options] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI.isUri(resource));\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__.IModelService).getModel(resource);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.illegalArgument)('resource');\r\n }\r\n return getDocumentFormattingEditsUntilResult(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__.IEditorWorkerService), model, options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__.CancellationToken.None);\r\n});\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommand('_executeFormatOnTypeProvider', function (accessor, ...args) {\r\n const [resource, position, ch, options] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI.isUri(resource));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.isIPosition(position));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__.assertType)(typeof ch === 'string');\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__.IModelService).getModel(resource);\r\n if (!model) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.illegalArgument)('resource');\r\n }\r\n return getOnTypeFormattingEdits(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__.IEditorWorkerService), model, _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.lift(position), ch, options);\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _format_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./format.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js\");\n/* harmony import */ var _formattingEdit_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./formattingEdit.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet FormatOnType = class FormatOnType {\r\n constructor(editor, _workerService) {\r\n this._workerService = _workerService;\r\n this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._editor = editor;\r\n this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModel(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update()));\r\n this._callOnDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.OnTypeFormattingEditProviderRegistry.onDidChange(this._update, this));\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n this._callOnModel.dispose();\r\n }\r\n _update() {\r\n // clean up\r\n this._callOnModel.clear();\r\n // we are disabled\r\n if (!this._editor.getOption(43 /* formatOnType */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n // no support\r\n const [support] = _common_modes_js__WEBPACK_IMPORTED_MODULE_9__.OnTypeFormattingEditProviderRegistry.ordered(model);\r\n if (!support || !support.autoFormatTriggerCharacters) {\r\n return;\r\n }\r\n // register typing listeners that will trigger the format\r\n let triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_6__.CharacterSet();\r\n for (let ch of support.autoFormatTriggerCharacters) {\r\n triggerChars.add(ch.charCodeAt(0));\r\n }\r\n this._callOnModel.add(this._editor.onDidType((text) => {\r\n let lastCharCode = text.charCodeAt(text.length - 1);\r\n if (triggerChars.has(lastCharCode)) {\r\n this._trigger(String.fromCharCode(lastCharCode));\r\n }\r\n }));\r\n }\r\n _trigger(ch) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (this._editor.getSelections().length > 1) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const position = this._editor.getPosition();\r\n let canceled = false;\r\n // install a listener that checks if edits happens before the\r\n // position on which we format right now. If so, we won't\r\n // apply the format edits\r\n const unbind = this._editor.onDidChangeModelContent((e) => {\r\n if (e.isFlush) {\r\n // a model.setValue() was called\r\n // cancel only once\r\n canceled = true;\r\n unbind.dispose();\r\n return;\r\n }\r\n for (let i = 0, len = e.changes.length; i < len; i++) {\r\n const change = e.changes[i];\r\n if (change.range.endLineNumber <= position.lineNumber) {\r\n // cancel only once\r\n canceled = true;\r\n unbind.dispose();\r\n return;\r\n }\r\n }\r\n });\r\n (0,_format_js__WEBPACK_IMPORTED_MODULE_11__.getOnTypeFormattingEdits)(this._workerService, model, position, ch, model.getFormattingOptions()).then(edits => {\r\n unbind.dispose();\r\n if (canceled) {\r\n return;\r\n }\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray)(edits)) {\r\n _formattingEdit_js__WEBPACK_IMPORTED_MODULE_12__.FormattingEdit.execute(this._editor, edits, true);\r\n (0,_format_js__WEBPACK_IMPORTED_MODULE_11__.alertFormattingEdits)(edits);\r\n }\r\n }, (err) => {\r\n unbind.dispose();\r\n throw err;\r\n });\r\n }\r\n};\r\nFormatOnType.ID = 'editor.contrib.autoFormat';\r\nFormatOnType = __decorate([\r\n __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__.IEditorWorkerService)\r\n], FormatOnType);\r\nlet FormatOnPaste = class FormatOnPaste {\r\n constructor(editor, _instantiationService) {\r\n this.editor = editor;\r\n this._instantiationService = _instantiationService;\r\n this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModel(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update()));\r\n this._callOnDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update, this));\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n this._callOnModel.dispose();\r\n }\r\n _update() {\r\n // clean up\r\n this._callOnModel.clear();\r\n // we are disabled\r\n if (!this.editor.getOption(42 /* formatOnPaste */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n // no formatter\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())) {\r\n return;\r\n }\r\n this._callOnModel.add(this.editor.onDidPaste(({ range }) => this._trigger(range)));\r\n }\r\n _trigger(range) {\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n if (this.editor.getSelections().length > 1) {\r\n return;\r\n }\r\n this._instantiationService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__.formatDocumentRangesWithSelectedProvider, this.editor, range, 2 /* Silent */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__.Progress.None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__.onUnexpectedError);\r\n }\r\n};\r\nFormatOnPaste.ID = 'editor.contrib.formatOnPaste';\r\nFormatOnPaste = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService)\r\n], FormatOnPaste);\r\nclass FormatDocumentAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.formatDocument',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('formatDocument.label', \"Format Document\"),\r\n alias: 'Format Document',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.notInCompositeEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.hasDocumentFormattingProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 36 /* KEY_F */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 39 /* KEY_I */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.3\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (editor.hasModel()) {\r\n const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService);\r\n const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__.IEditorProgressService);\r\n yield progressService.showWhile(instaService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__.formatDocumentWithSelectedProvider, editor, 1 /* Explicit */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__.Progress.None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None), 250);\r\n }\r\n });\r\n }\r\n}\r\nclass FormatSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.formatSelection',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('formatSelection.label', \"Format Selection\"),\r\n alias: 'Format Selection',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.hasDocumentSelectionFormattingProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 36 /* KEY_F */),\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.hasNonEmptySelection,\r\n group: '1_modification',\r\n order: 1.31\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService);\r\n const model = editor.getModel();\r\n const ranges = editor.getSelections().map(range => {\r\n return range.isEmpty()\r\n ? new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(range.startLineNumber, 1, range.startLineNumber, model.getLineMaxColumn(range.startLineNumber))\r\n : range;\r\n });\r\n const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__.IEditorProgressService);\r\n yield progressService.showWhile(instaService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__.formatDocumentRangesWithSelectedProvider, editor, ranges, 1 /* Explicit */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__.Progress.None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None), 250);\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(FormatOnType.ID, FormatOnType);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(FormatOnPaste.ID, FormatOnPaste);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(FormatDocumentAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(FormatSelectionAction);\r\n// this is the old format action that does both (format document OR format selection)\r\n// and we keep it here such that existing keybinding configurations etc will still work\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__.CommandsRegistry.registerCommand('editor.action.format', (accessor) => __awaiter(void 0, void 0, void 0, function* () {\r\n const editor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService).getFocusedCodeEditor();\r\n if (!editor || !editor.hasModel()) {\r\n return;\r\n }\r\n const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__.ICommandService);\r\n if (editor.getSelection().isEmpty()) {\r\n yield commandService.executeCommand('editor.action.formatDocument');\r\n }\r\n else {\r\n yield commandService.executeCommand('editor.action.formatSelection');\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FormattingEdit\": () => (/* binding */ FormattingEdit)\n/* harmony export */ });\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass FormattingEdit {\r\n static _handleEolEdits(editor, edits) {\r\n let newEol = undefined;\r\n let singleEdits = [];\r\n for (let edit of edits) {\r\n if (typeof edit.eol === 'number') {\r\n newEol = edit.eol;\r\n }\r\n if (edit.range && typeof edit.text === 'string') {\r\n singleEdits.push(edit);\r\n }\r\n }\r\n if (typeof newEol === 'number') {\r\n if (editor.hasModel()) {\r\n editor.getModel().pushEOL(newEol);\r\n }\r\n }\r\n return singleEdits;\r\n }\r\n static _isFullModelReplaceEdit(editor, edit) {\r\n if (!editor.hasModel()) {\r\n return false;\r\n }\r\n const model = editor.getModel();\r\n const editRange = model.validateRange(edit.range);\r\n const fullModelRange = model.getFullModelRange();\r\n return fullModelRange.equalsRange(editRange);\r\n }\r\n static execute(editor, _edits, addUndoStops) {\r\n if (addUndoStops) {\r\n editor.pushUndoStop();\r\n }\r\n const edits = FormattingEdit._handleEolEdits(editor, _edits);\r\n if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) {\r\n // We use replace semantics and hope that markers stay put...\r\n editor.executeEdits('formatEditsCommand', edits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.lift(edit.range), edit.text)));\r\n }\r\n else {\r\n editor.executeEdits('formatEditsCommand', edits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.replaceMove(_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.lift(edit.range), edit.text)));\r\n }\r\n if (addUndoStops) {\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerController\": () => (/* binding */ MarkerController),\n/* harmony export */ \"NextMarkerAction\": () => (/* binding */ NextMarkerAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./gotoErrorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _markerNavigationService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./markerNavigationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet MarkerController = class MarkerController {\r\n constructor(editor, _markerNavigationService, _contextKeyService, _editorService, _instantiationService) {\r\n this._markerNavigationService = _markerNavigationService;\r\n this._contextKeyService = _contextKeyService;\r\n this._editorService = _editorService;\r\n this._instantiationService = _instantiationService;\r\n this._sessionDispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._editor = editor;\r\n this._widgetVisible = CONTEXT_MARKERS_NAVIGATION_VISIBLE.bindTo(this._contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MarkerController.ID);\r\n }\r\n dispose() {\r\n this._cleanUp();\r\n this._sessionDispoables.dispose();\r\n }\r\n _cleanUp() {\r\n this._widgetVisible.reset();\r\n this._sessionDispoables.clear();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n }\r\n _getOrCreateModel(uri) {\r\n if (this._model && this._model.matches(uri)) {\r\n return this._model;\r\n }\r\n let reusePosition = false;\r\n if (this._model) {\r\n reusePosition = true;\r\n this._cleanUp();\r\n }\r\n this._model = this._markerNavigationService.getMarkerList(uri);\r\n if (reusePosition) {\r\n this._model.move(true, this._editor.getModel(), this._editor.getPosition());\r\n }\r\n this._widget = this._instantiationService.createInstance(_gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__.MarkerNavigationWidget, this._editor);\r\n this._widget.onDidClose(() => this.close(), this, this._sessionDispoables);\r\n this._widgetVisible.set(true);\r\n this._sessionDispoables.add(this._model);\r\n this._sessionDispoables.add(this._widget);\r\n // follow cursor\r\n this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e => {\r\n var _a, _b, _c;\r\n if (!((_a = this._model) === null || _a === void 0 ? void 0 : _a.selected) || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.containsPosition((_b = this._model) === null || _b === void 0 ? void 0 : _b.selected.marker, e.position)) {\r\n (_c = this._model) === null || _c === void 0 ? void 0 : _c.resetIndex();\r\n }\r\n }));\r\n // update markers\r\n this._sessionDispoables.add(this._model.onDidChange(() => {\r\n if (!this._widget || !this._widget.position || !this._model) {\r\n return;\r\n }\r\n const info = this._model.find(this._editor.getModel().uri, this._widget.position);\r\n if (info) {\r\n this._widget.updateMarker(info.marker);\r\n }\r\n else {\r\n this._widget.showStale();\r\n }\r\n }));\r\n // open related\r\n this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(related => {\r\n this._editorService.openCodeEditor({\r\n resource: related.resource,\r\n options: { pinned: true, revealIfOpened: true, selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.lift(related).collapseToStart() }\r\n }, this._editor);\r\n this.close(false);\r\n }));\r\n this._sessionDispoables.add(this._editor.onDidChangeModel(() => this._cleanUp()));\r\n return this._model;\r\n }\r\n close(focusEditor = true) {\r\n this._cleanUp();\r\n if (focusEditor) {\r\n this._editor.focus();\r\n }\r\n }\r\n showAtMarker(marker) {\r\n if (this._editor.hasModel()) {\r\n const model = this._getOrCreateModel(this._editor.getModel().uri);\r\n model.resetIndex();\r\n model.move(true, this._editor.getModel(), new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position(marker.startLineNumber, marker.startColumn));\r\n if (model.selected) {\r\n this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total);\r\n }\r\n }\r\n }\r\n nagivate(next, multiFile) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._editor.hasModel()) {\r\n const model = this._getOrCreateModel(multiFile ? undefined : this._editor.getModel().uri);\r\n model.move(next, this._editor.getModel(), this._editor.getPosition());\r\n if (!model.selected) {\r\n return;\r\n }\r\n if (model.selected.marker.resource.toString() !== this._editor.getModel().uri.toString()) {\r\n // show in different editor\r\n this._cleanUp();\r\n const otherEditor = yield this._editorService.openCodeEditor({\r\n resource: model.selected.marker.resource,\r\n options: { pinned: false, revealIfOpened: true, selectionRevealType: 2 /* NearTop */, selection: model.selected.marker }\r\n }, this._editor);\r\n if (otherEditor) {\r\n MarkerController.get(otherEditor).close();\r\n MarkerController.get(otherEditor).nagivate(next, multiFile);\r\n }\r\n }\r\n else {\r\n // show in this editor\r\n this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total);\r\n }\r\n }\r\n });\r\n }\r\n};\r\nMarkerController.ID = 'editor.contrib.markerController';\r\nMarkerController = __decorate([\r\n __param(1, _markerNavigationService_js__WEBPACK_IMPORTED_MODULE_12__.IMarkerNavigationService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.IContextKeyService),\r\n __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__.ICodeEditorService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_11__.IInstantiationService)\r\n], MarkerController);\r\n\r\nclass MarkerNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.EditorAction {\r\n constructor(_next, _multiFile, opts) {\r\n super(opts);\r\n this._next = _next;\r\n this._multiFile = _multiFile;\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (editor.hasModel()) {\r\n MarkerController.get(editor).nagivate(this._next, this._multiFile);\r\n }\r\n });\r\n }\r\n}\r\nclass NextMarkerAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(true, false, {\r\n id: NextMarkerAction.ID,\r\n label: NextMarkerAction.LABEL,\r\n alias: 'Go to Next Problem (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.focus,\r\n primary: 512 /* Alt */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__.MarkerNavigationWidget.TitleMenu,\r\n title: NextMarkerAction.LABEL,\r\n icon: (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerIcon)('marker-navigation-next', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__.Codicon.chevronDown, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('nextMarkerIcon', 'Icon for goto next marker.')),\r\n group: 'navigation',\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nNextMarkerAction.ID = 'editor.action.marker.next';\r\nNextMarkerAction.LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('markerAction.next.label', \"Go to Next Problem (Error, Warning, Info)\");\r\nclass PrevMarkerAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(false, false, {\r\n id: PrevMarkerAction.ID,\r\n label: PrevMarkerAction.LABEL,\r\n alias: 'Go to Previous Problem (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__.MarkerNavigationWidget.TitleMenu,\r\n title: NextMarkerAction.LABEL,\r\n icon: (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerIcon)('marker-navigation-previous', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__.Codicon.chevronUp, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('previousMarkerIcon', 'Icon for goto previous marker.')),\r\n group: 'navigation',\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\nPrevMarkerAction.ID = 'editor.action.marker.prev';\r\nPrevMarkerAction.LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('markerAction.previous.label', \"Go to Previous Problem (Error, Warning, Info)\");\r\nclass NextMarkerInFilesAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(true, true, {\r\n id: 'editor.action.marker.nextInFiles',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('markerAction.nextInFiles.label', \"Go to Next Problem in Files (Error, Warning, Info)\"),\r\n alias: 'Go to Next Problem in Files (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.focus,\r\n primary: 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuId.MenubarGoMenu,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miGotoNextProblem', comment: ['&& denotes a mnemonic'] }, \"Next &&Problem\"),\r\n group: '6_problem_nav',\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass PrevMarkerInFilesAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(false, true, {\r\n id: 'editor.action.marker.prevInFiles',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('markerAction.previousInFiles.label', \"Go to Previous Problem in Files (Error, Warning, Info)\"),\r\n alias: 'Go to Previous Problem in Files (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuId.MenubarGoMenu,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miGotoPreviousProblem', comment: ['&& denotes a mnemonic'] }, \"Previous &&Problem\"),\r\n group: '6_problem_nav',\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorContribution)(MarkerController.ID, MarkerController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(NextMarkerAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(PrevMarkerAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(NextMarkerInFilesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(PrevMarkerInFilesAction);\r\nconst CONTEXT_MARKERS_NAVIGATION_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.RawContextKey('markersNavigationVisible', false);\r\nconst MarkerCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.EditorCommand.bindToContribution(MarkerController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorCommand)(new MarkerCommand({\r\n id: 'closeMarkersNavigation',\r\n precondition: CONTEXT_MARKERS_NAVIGATION_VISIBLE,\r\n handler: x => x.close(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 50,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerNavigationWidget\": () => (/* binding */ MarkerNavigationWidget),\n/* harmony export */ \"editorMarkerNavigationError\": () => (/* binding */ editorMarkerNavigationError),\n/* harmony export */ \"editorMarkerNavigationWarning\": () => (/* binding */ editorMarkerNavigationWarning),\n/* harmony export */ \"editorMarkerNavigationInfo\": () => (/* binding */ editorMarkerNavigationInfo),\n/* harmony export */ \"editorMarkerNavigationBackground\": () => (/* binding */ editorMarkerNavigationBackground)\n/* harmony export */ });\n/* harmony import */ var _media_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/gotoErrorWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/labels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/labels.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../peekView/peekView.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _platform_severityIcon_common_severityIcon_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/severityIcon/common/severityIcon.js */ \"./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/actions/browser/menuEntryActionViewItem.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/label/common/label.js */ \"./node_modules/monaco-editor/esm/vs/platform/label/common/label.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass MessageWidget {\r\n constructor(parent, editor, onRelatedInformation, _openerService, _labelService) {\r\n this._openerService = _openerService;\r\n this._labelService = _labelService;\r\n this._lines = 0;\r\n this._longestLineLength = 0;\r\n this._relatedDiagnostics = new WeakMap();\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._editor = editor;\r\n const domNode = document.createElement('div');\r\n domNode.className = 'descriptioncontainer';\r\n this._messageBlock = document.createElement('div');\r\n this._messageBlock.classList.add('message');\r\n this._messageBlock.setAttribute('aria-live', 'assertive');\r\n this._messageBlock.setAttribute('role', 'alert');\r\n domNode.appendChild(this._messageBlock);\r\n this._relatedBlock = document.createElement('div');\r\n domNode.appendChild(this._relatedBlock);\r\n this._disposables.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addStandardDisposableListener(this._relatedBlock, 'click', event => {\r\n event.preventDefault();\r\n const related = this._relatedDiagnostics.get(event.target);\r\n if (related) {\r\n onRelatedInformation(related);\r\n }\r\n }));\r\n this._scrollable = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_9__.ScrollableElement(domNode, {\r\n horizontal: 1 /* Auto */,\r\n vertical: 1 /* Auto */,\r\n useShadows: false,\r\n horizontalScrollbarSize: 3,\r\n verticalScrollbarSize: 3\r\n });\r\n parent.appendChild(this._scrollable.getDomNode());\r\n this._disposables.add(this._scrollable.onScroll(e => {\r\n domNode.style.left = `-${e.scrollLeft}px`;\r\n domNode.style.top = `-${e.scrollTop}px`;\r\n }));\r\n this._disposables.add(this._scrollable);\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)(this._disposables);\r\n }\r\n update(marker) {\r\n const { source, message, relatedInformation, code } = marker;\r\n let sourceAndCodeLength = ((source === null || source === void 0 ? void 0 : source.length) || 0) + '()'.length;\r\n if (code) {\r\n if (typeof code === 'string') {\r\n sourceAndCodeLength += code.length;\r\n }\r\n else {\r\n sourceAndCodeLength += code.value.length;\r\n }\r\n }\r\n const lines = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_21__.splitLines)(message);\r\n this._lines = lines.length;\r\n this._longestLineLength = 0;\r\n for (const line of lines) {\r\n this._longestLineLength = Math.max(line.length + sourceAndCodeLength, this._longestLineLength);\r\n }\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._messageBlock);\r\n this._messageBlock.setAttribute('aria-label', this.getAriaLabel(marker));\r\n this._editor.applyFontInfo(this._messageBlock);\r\n let lastLineElement = this._messageBlock;\r\n for (const line of lines) {\r\n lastLineElement = document.createElement('div');\r\n lastLineElement.innerText = line;\r\n if (line === '') {\r\n lastLineElement.style.height = this._messageBlock.style.lineHeight;\r\n }\r\n this._messageBlock.appendChild(lastLineElement);\r\n }\r\n if (source || code) {\r\n const detailsElement = document.createElement('span');\r\n detailsElement.classList.add('details');\r\n lastLineElement.appendChild(detailsElement);\r\n if (source) {\r\n const sourceElement = document.createElement('span');\r\n sourceElement.innerText = source;\r\n sourceElement.classList.add('source');\r\n detailsElement.appendChild(sourceElement);\r\n }\r\n if (code) {\r\n if (typeof code === 'string') {\r\n const codeElement = document.createElement('span');\r\n codeElement.innerText = `(${code})`;\r\n codeElement.classList.add('code');\r\n detailsElement.appendChild(codeElement);\r\n }\r\n else {\r\n this._codeLink = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('a.code-link');\r\n this._codeLink.setAttribute('href', `${code.target.toString()}`);\r\n this._codeLink.onclick = (e) => {\r\n this._openerService.open(code.target);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n const codeElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this._codeLink, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('span'));\r\n codeElement.innerText = code.value;\r\n detailsElement.appendChild(this._codeLink);\r\n }\r\n }\r\n }\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._relatedBlock);\r\n this._editor.applyFontInfo(this._relatedBlock);\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__.isNonEmptyArray)(relatedInformation)) {\r\n const relatedInformationNode = this._relatedBlock.appendChild(document.createElement('div'));\r\n relatedInformationNode.style.paddingTop = `${Math.floor(this._editor.getOption(53 /* lineHeight */) * 0.66)}px`;\r\n this._lines += 1;\r\n for (const related of relatedInformation) {\r\n let container = document.createElement('div');\r\n let relatedResource = document.createElement('a');\r\n relatedResource.classList.add('filename');\r\n relatedResource.innerText = `${(0,_base_common_labels_js__WEBPACK_IMPORTED_MODULE_10__.getBaseLabel)(related.resource)}(${related.startLineNumber}, ${related.startColumn}): `;\r\n relatedResource.title = this._labelService.getUriLabel(related.resource);\r\n this._relatedDiagnostics.set(relatedResource, related);\r\n let relatedMessage = document.createElement('span');\r\n relatedMessage.innerText = related.message;\r\n container.appendChild(relatedResource);\r\n container.appendChild(relatedMessage);\r\n this._lines += 1;\r\n relatedInformationNode.appendChild(container);\r\n }\r\n }\r\n const fontInfo = this._editor.getOption(38 /* fontInfo */);\r\n const scrollWidth = Math.ceil(fontInfo.typicalFullwidthCharacterWidth * this._longestLineLength * 0.75);\r\n const scrollHeight = fontInfo.lineHeight * this._lines;\r\n this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight });\r\n }\r\n layout(height, width) {\r\n this._scrollable.getDomNode().style.height = `${height}px`;\r\n this._scrollable.getDomNode().style.width = `${width}px`;\r\n this._scrollable.setScrollDimensions({ width, height });\r\n }\r\n getHeightInLines() {\r\n return Math.min(17, this._lines);\r\n }\r\n getAriaLabel(marker) {\r\n let severityLabel = '';\r\n switch (marker.severity) {\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Error:\r\n severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('Error', \"Error\");\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Warning:\r\n severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('Warning', \"Warning\");\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Info:\r\n severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('Info', \"Info\");\r\n break;\r\n case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Hint:\r\n severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('Hint', \"Hint\");\r\n break;\r\n }\r\n let ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('marker aria', \"{0} at {1}. \", severityLabel, marker.startLineNumber + ':' + marker.startColumn);\r\n const model = this._editor.getModel();\r\n if (model && (marker.startLineNumber <= model.getLineCount()) && (marker.startLineNumber >= 1)) {\r\n const lineContent = model.getLineContent(marker.startLineNumber);\r\n ariaLabel = `${lineContent}, ${ariaLabel}`;\r\n }\r\n return ariaLabel;\r\n }\r\n}\r\nlet MarkerNavigationWidget = class MarkerNavigationWidget extends _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__.PeekViewWidget {\r\n constructor(editor, _themeService, _openerService, _menuService, instantiationService, _contextKeyService, _labelService) {\r\n super(editor, { showArrow: true, showFrame: true, isAccessible: true }, instantiationService);\r\n this._themeService = _themeService;\r\n this._openerService = _openerService;\r\n this._menuService = _menuService;\r\n this._contextKeyService = _contextKeyService;\r\n this._labelService = _labelService;\r\n this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._onDidSelectRelatedInformation = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_12__.Emitter();\r\n this.onDidSelectRelatedInformation = this._onDidSelectRelatedInformation.event;\r\n this._severity = _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Warning;\r\n this._backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.white;\r\n this._applyTheme(_themeService.getColorTheme());\r\n this._callOnDispose.add(_themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this.create();\r\n }\r\n _applyTheme(theme) {\r\n this._backgroundColor = theme.getColor(editorMarkerNavigationBackground);\r\n let colorId = editorMarkerNavigationError;\r\n if (this._severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Warning) {\r\n colorId = editorMarkerNavigationWarning;\r\n }\r\n else if (this._severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Info) {\r\n colorId = editorMarkerNavigationInfo;\r\n }\r\n const frameColor = theme.getColor(colorId);\r\n this.style({\r\n arrowColor: frameColor,\r\n frameColor: frameColor,\r\n headerBackgroundColor: this._backgroundColor,\r\n primaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__.peekViewTitleForeground),\r\n secondaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__.peekViewTitleInfoForeground)\r\n }); // style() will trigger _applyStyles\r\n }\r\n _applyStyles() {\r\n if (this._parentContainer) {\r\n this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : '';\r\n }\r\n super._applyStyles();\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n super.dispose();\r\n }\r\n _fillHead(container) {\r\n super._fillHead(container);\r\n this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(e => this.editor.focus()));\r\n const actions = [];\r\n const menu = this._menuService.createMenu(MarkerNavigationWidget.TitleMenu, this._contextKeyService);\r\n (0,_platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_19__.createAndFillInActionBarActions)(menu, undefined, actions);\r\n this._actionbarWidget.push(actions, { label: false, icon: true, index: 0 });\r\n menu.dispose();\r\n }\r\n _fillTitleIcon(container) {\r\n this._icon = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(container, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$(''));\r\n }\r\n _fillBody(container) {\r\n this._parentContainer = container;\r\n container.classList.add('marker-widget');\r\n this._parentContainer.tabIndex = 0;\r\n this._parentContainer.setAttribute('role', 'tooltip');\r\n this._container = document.createElement('div');\r\n container.appendChild(this._container);\r\n this._message = new MessageWidget(this._container, this.editor, related => this._onDidSelectRelatedInformation.fire(related), this._openerService, this._labelService);\r\n this._disposables.add(this._message);\r\n }\r\n show() {\r\n throw new Error('call showAtMarker');\r\n }\r\n showAtMarker(marker, markerIdx, markerCount) {\r\n // update:\r\n // * title\r\n // * message\r\n this._container.classList.remove('stale');\r\n this._message.update(marker);\r\n // update frame color (only applied on 'show')\r\n this._severity = marker.severity;\r\n this._applyTheme(this._themeService.getColorTheme());\r\n // show\r\n let range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(marker);\r\n const editorPosition = this.editor.getPosition();\r\n let position = editorPosition && range.containsPosition(editorPosition) ? editorPosition : range.getStartPosition();\r\n super.show(position, this.computeRequiredHeight());\r\n const model = this.editor.getModel();\r\n if (model) {\r\n const detail = markerCount > 1\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('problems', \"{0} of {1} problems\", markerIdx, markerCount)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('change', \"{0} of {1} problem\", markerIdx, markerCount);\r\n this.setTitle((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_14__.basename)(model.uri), detail);\r\n }\r\n this._icon.className = `codicon ${_platform_severityIcon_common_severityIcon_js__WEBPACK_IMPORTED_MODULE_15__.SeverityIcon.className(_platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.toSeverity(this._severity))}`;\r\n this.editor.revealPositionNearTop(position, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n updateMarker(marker) {\r\n this._container.classList.remove('stale');\r\n this._message.update(marker);\r\n }\r\n showStale() {\r\n this._container.classList.add('stale');\r\n this._relayout();\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n super._doLayoutBody(heightInPixel, widthInPixel);\r\n this._heightInPixel = heightInPixel;\r\n this._message.layout(heightInPixel, widthInPixel);\r\n this._container.style.height = `${heightInPixel}px`;\r\n }\r\n _onWidth(widthInPixel) {\r\n this._message.layout(this._heightInPixel, widthInPixel);\r\n }\r\n _relayout() {\r\n super._relayout(this.computeRequiredHeight());\r\n }\r\n computeRequiredHeight() {\r\n return 3 + this._message.getHeightInLines();\r\n }\r\n};\r\nMarkerNavigationWidget.TitleMenu = new _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__.MenuId('gotoErrorTitleMenu');\r\nMarkerNavigationWidget = __decorate([\r\n __param(1, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__.IThemeService),\r\n __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__.IOpenerService),\r\n __param(3, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__.IMenuService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_20__.IInstantiationService),\r\n __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__.IContextKeyService),\r\n __param(6, _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_22__.ILabelService)\r\n], MarkerNavigationWidget);\r\n\r\n// theming\r\nlet errorDefault = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.oneOf)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorErrorForeground, _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorErrorBorder);\r\nlet warningDefault = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.oneOf)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorWarningForeground, _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorWarningBorder);\r\nlet infoDefault = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.oneOf)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorInfoForeground, _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.editorInfoBorder);\r\nconst editorMarkerNavigationError = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.registerColor)('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.'));\r\nconst editorMarkerNavigationWarning = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.registerColor)('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.'));\r\nconst editorMarkerNavigationInfo = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.registerColor)('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hc: infoDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editorMarkerNavigationInfo', 'Editor marker navigation widget info color.'));\r\nconst editorMarkerNavigationBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.registerColor)('editorMarkerNavigation.background', { dark: '#2D2D30', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__.Color.white, hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.'));\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__.registerThemingParticipant)((theme, collector) => {\r\n const linkFg = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__.textLinkForeground);\r\n if (linkFg) {\r\n collector.addRule(`.monaco-editor .marker-widget a { color: ${linkFg}; }`);\r\n collector.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${linkFg}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerCoordinate\": () => (/* binding */ MarkerCoordinate),\n/* harmony export */ \"MarkerList\": () => (/* binding */ MarkerList),\n/* harmony export */ \"IMarkerNavigationService\": () => (/* binding */ IMarkerNavigationService)\n/* harmony export */ });\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass MarkerCoordinate {\r\n constructor(marker, index, total) {\r\n this.marker = marker;\r\n this.index = index;\r\n this.total = total;\r\n }\r\n}\r\nlet MarkerList = class MarkerList {\r\n constructor(resourceFilter, _markerService) {\r\n this._markerService = _markerService;\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._dispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._markers = [];\r\n this._nextIdx = -1;\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.isUri(resourceFilter)) {\r\n this._resourceFilter = uri => uri.toString() === resourceFilter.toString();\r\n }\r\n else if (resourceFilter) {\r\n this._resourceFilter = resourceFilter;\r\n }\r\n const updateMarker = () => {\r\n this._markers = this._markerService.read({\r\n resource: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__.URI.isUri(resourceFilter) ? resourceFilter : undefined,\r\n severities: _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Error | _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Warning | _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info\r\n });\r\n if (typeof resourceFilter === 'function') {\r\n this._markers = this._markers.filter(m => this._resourceFilter(m.resource));\r\n }\r\n this._markers.sort(MarkerList._compareMarker);\r\n };\r\n updateMarker();\r\n this._dispoables.add(_markerService.onMarkerChanged(uris => {\r\n if (!this._resourceFilter || uris.some(uri => this._resourceFilter(uri))) {\r\n updateMarker();\r\n this._nextIdx = -1;\r\n this._onDidChange.fire();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._dispoables.dispose();\r\n this._onDidChange.dispose();\r\n }\r\n matches(uri) {\r\n if (!this._resourceFilter && !uri) {\r\n return true;\r\n }\r\n if (!this._resourceFilter || !uri) {\r\n return false;\r\n }\r\n return this._resourceFilter(uri);\r\n }\r\n get selected() {\r\n const marker = this._markers[this._nextIdx];\r\n return marker && new MarkerCoordinate(marker, this._nextIdx + 1, this._markers.length);\r\n }\r\n _initIdx(model, position, fwd) {\r\n let found = false;\r\n let idx = this._markers.findIndex(marker => marker.resource.toString() === model.uri.toString());\r\n if (idx < 0) {\r\n idx = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__.binarySearch)(this._markers, { resource: model.uri }, (a, b) => (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.compare)(a.resource.toString(), b.resource.toString()));\r\n if (idx < 0) {\r\n idx = ~idx;\r\n }\r\n }\r\n for (let i = idx; i < this._markers.length; i++) {\r\n let range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.lift(this._markers[i]);\r\n if (range.isEmpty()) {\r\n const word = model.getWordAtPosition(range.getStartPosition());\r\n if (word) {\r\n range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(range.startLineNumber, word.startColumn, range.startLineNumber, word.endColumn);\r\n }\r\n }\r\n if (position && (range.containsPosition(position) || position.isBeforeOrEqual(range.getStartPosition()))) {\r\n this._nextIdx = i;\r\n found = true;\r\n break;\r\n }\r\n if (this._markers[i].resource.toString() !== model.uri.toString()) {\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n // after the last change\r\n this._nextIdx = fwd ? 0 : this._markers.length - 1;\r\n }\r\n if (this._nextIdx < 0) {\r\n this._nextIdx = this._markers.length - 1;\r\n }\r\n }\r\n resetIndex() {\r\n this._nextIdx = -1;\r\n }\r\n move(fwd, model, position) {\r\n if (this._markers.length === 0) {\r\n return false;\r\n }\r\n let oldIdx = this._nextIdx;\r\n if (this._nextIdx === -1) {\r\n this._initIdx(model, position, fwd);\r\n }\r\n else if (fwd) {\r\n this._nextIdx = (this._nextIdx + 1) % this._markers.length;\r\n }\r\n else if (!fwd) {\r\n this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length;\r\n }\r\n if (oldIdx !== this._nextIdx) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n find(uri, position) {\r\n let idx = this._markers.findIndex(marker => marker.resource.toString() === uri.toString());\r\n if (idx < 0) {\r\n return undefined;\r\n }\r\n for (; idx < this._markers.length; idx++) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.containsPosition(this._markers[idx], position)) {\r\n return new MarkerCoordinate(this._markers[idx], idx + 1, this._markers.length);\r\n }\r\n }\r\n return undefined;\r\n }\r\n static _compareMarker(a, b) {\r\n let res = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.compare)(a.resource.toString(), b.resource.toString());\r\n if (res === 0) {\r\n res = _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.compare(a.severity, b.severity);\r\n }\r\n if (res === 0) {\r\n res = _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.compareRangesUsingStarts(a, b);\r\n }\r\n return res;\r\n }\r\n};\r\nMarkerList = __decorate([\r\n __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.IMarkerService)\r\n], MarkerList);\r\n\r\nconst IMarkerNavigationService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_7__.createDecorator)('IMarkerNavigationService');\r\nlet MarkerNavigationService = class MarkerNavigationService {\r\n constructor(_markerService) {\r\n this._markerService = _markerService;\r\n this._provider = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_9__.LinkedList();\r\n }\r\n getMarkerList(resource) {\r\n for (let provider of this._provider) {\r\n const result = provider.getMarkerList(resource);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n // default\r\n return new MarkerList(resource, this._markerService);\r\n }\r\n};\r\nMarkerNavigationService = __decorate([\r\n __param(0, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__.IMarkerService)\r\n], MarkerNavigationService);\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_8__.registerSingleton)(IMarkerNavigationService, MarkerNavigationService, true);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DefinitionAction\": () => (/* binding */ DefinitionAction)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../message/messageController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js\");\n/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../peekView/peekView.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js\");\n/* harmony import */ var _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./peek/referencesController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js\");\n/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./referencesModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./goToSymbol.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _symbolNavigation_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./symbolNavigation.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../browser/widget/embeddedCodeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar _a, _b, _c, _d, _e, _f, _g, _h;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuRegistry.appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContext, {\r\n submenu: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('peek.submenu', \"Peek\"),\r\n group: 'navigation',\r\n order: 100\r\n});\r\nclass SymbolNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.EditorAction {\r\n constructor(configuration, opts) {\r\n super(opts);\r\n this._configuration = configuration;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return Promise.resolve(undefined);\r\n }\r\n const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_18__.INotificationService);\r\n const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__.ICodeEditorService);\r\n const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_19__.IEditorProgressService);\r\n const symbolNavService = accessor.get(_symbolNavigation_js__WEBPACK_IMPORTED_MODULE_23__.ISymbolNavigationService);\r\n const model = editor.getModel();\r\n const pos = editor.getPosition();\r\n const cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_22__.EditorStateCancellationTokenSource(editor, 1 /* Value */ | 4 /* Position */);\r\n const promise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.raceCancellation)(this._getLocationModel(model, pos, cts.token), cts.token).then((references) => __awaiter(this, void 0, void 0, function* () {\r\n if (!references || cts.token.isCancellationRequested) {\r\n return;\r\n }\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(references.ariaMessage);\r\n let altAction;\r\n if (references.referenceAt(model.uri, pos)) {\r\n const altActionId = this._getAlternativeCommand(editor);\r\n if (altActionId !== this.id) {\r\n altAction = editor.getAction(altActionId);\r\n }\r\n }\r\n const referenceCount = references.references.length;\r\n if (referenceCount === 0) {\r\n // no result -> show message\r\n if (!this._configuration.muteMessage) {\r\n const info = model.getWordAtPosition(pos);\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__.MessageController.get(editor).showMessage(this._getNoResultFoundMessage(info), pos);\r\n }\r\n }\r\n else if (referenceCount === 1 && altAction) {\r\n // already at the only result, run alternative\r\n altAction.run();\r\n }\r\n else {\r\n // normal results handling\r\n return this._onResult(editorService, symbolNavService, editor, references);\r\n }\r\n }), (err) => {\r\n // report an error\r\n notificationService.error(err);\r\n }).finally(() => {\r\n cts.dispose();\r\n });\r\n progressService.showWhile(promise, 250);\r\n return promise;\r\n }\r\n _onResult(editorService, symbolNavService, editor, model) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const gotoLocation = this._getGoToPreference(editor);\r\n if (!(editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_28__.EmbeddedCodeEditorWidget) && (this._configuration.openInPeek || (gotoLocation === 'peek' && model.references.length > 1))) {\r\n this._openInPeek(editor, model);\r\n }\r\n else {\r\n const next = model.firstReference();\r\n const peek = model.references.length > 1 && gotoLocation === 'gotoAndPeek';\r\n const targetEditor = yield this._openReference(editor, editorService, next, this._configuration.openToSide, !peek);\r\n if (peek && targetEditor) {\r\n this._openInPeek(targetEditor, model);\r\n }\r\n else {\r\n model.dispose();\r\n }\r\n // keep remaining locations around when using\r\n // 'goto'-mode\r\n if (gotoLocation === 'goto') {\r\n symbolNavService.put(next);\r\n }\r\n }\r\n });\r\n }\r\n _openReference(editor, editorService, reference, sideBySide, highlight) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // range is the target-selection-range when we have one\r\n // and the fallback is the 'full' range\r\n let range = undefined;\r\n if ((0,_common_modes_js__WEBPACK_IMPORTED_MODULE_10__.isLocationLink)(reference)) {\r\n range = reference.targetSelectionRange;\r\n }\r\n if (!range) {\r\n range = reference.range;\r\n }\r\n if (!range) {\r\n return undefined;\r\n }\r\n const targetEditor = yield editorService.openCodeEditor({\r\n resource: reference.uri,\r\n options: {\r\n selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.collapseToStart(range),\r\n selectionRevealType: 3 /* NearTopIfOutsideViewport */\r\n }\r\n }, editor, sideBySide);\r\n if (!targetEditor) {\r\n return undefined;\r\n }\r\n if (highlight) {\r\n const modelNow = targetEditor.getModel();\r\n const ids = targetEditor.deltaDecorations([], [{ range, options: { className: 'symbolHighlight' } }]);\r\n setTimeout(() => {\r\n if (targetEditor.getModel() === modelNow) {\r\n targetEditor.deltaDecorations(ids, []);\r\n }\r\n }, 350);\r\n }\r\n return targetEditor;\r\n });\r\n }\r\n _openInPeek(target, model) {\r\n let controller = _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__.ReferencesController.get(target);\r\n if (controller && target.hasModel()) {\r\n controller.toggleWidget(target.getSelection(), (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.createCancelablePromise)(_ => Promise.resolve(model)), this._configuration.openInPeek);\r\n }\r\n else {\r\n model.dispose();\r\n }\r\n }\r\n}\r\n//#region --- DEFINITION\r\nclass DefinitionAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getDefinitionsAtPosition)(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('def.title', 'Definitions'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('noResultWord', \"No definition found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('generic.noResults', \"No definition found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeDefinitionCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleDefinitions;\r\n }\r\n}\r\nconst goToDefinitionKb = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__.isWeb && !_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_24__.isStandalone\r\n ? 2048 /* CtrlCmd */ | 70 /* F12 */\r\n : 70 /* F12 */;\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_a = class GoToDefinitionAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToDefinitionAction.id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.goToDecl.label', \"Go to Definition\"),\r\n alias: 'Go to Definition',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: goToDefinitionKb,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.1\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 2,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Definition\")\r\n }\r\n });\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommandAlias('editor.action.goToDeclaration', GoToDefinitionAction.id);\r\n }\r\n },\r\n _a.id = 'editor.action.revealDefinition',\r\n _a));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_b = class OpenDefinitionToSideAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: true,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: OpenDefinitionToSideAction.id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.goToDeclToSide.label', \"Open Definition to the Side\"),\r\n alias: 'Open Definition to the Side',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, goToDefinitionKb),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommandAlias('editor.action.openDeclarationToTheSide', OpenDefinitionToSideAction.id);\r\n }\r\n },\r\n _b.id = 'editor.action.revealDefinitionAside',\r\n _b));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_c = class PeekDefinitionAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekDefinitionAction.id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.previewDecl.label', \"Peek Definition\"),\r\n alias: 'Peek Definition',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasDefinitionProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 70 /* F12 */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 68 /* F10 */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 2\r\n }\r\n });\r\n _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommandAlias('editor.action.previewDeclaration', PeekDefinitionAction.id);\r\n }\r\n },\r\n _c.id = 'editor.action.peekDefinition',\r\n _c));\r\n//#endregion\r\n//#region --- DECLARATION\r\nclass DeclarationAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getDeclarationsAtPosition)(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('decl.title', 'Declarations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('decl.generic.noResults', \"No declaration found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeDeclarationCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleDeclarations;\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_d = class GoToDeclarationAction extends DeclarationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToDeclarationAction.id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.goToDeclaration.label', \"Go to Declaration\"),\r\n alias: 'Go to Declaration',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasDeclarationProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.3\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 3,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize({ key: 'miGotoDeclaration', comment: ['&& denotes a mnemonic'] }, \"Go to &&Declaration\")\r\n },\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('decl.generic.noResults', \"No declaration found\");\r\n }\r\n },\r\n _d.id = 'editor.action.revealDeclaration',\r\n _d));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(class PeekDeclarationAction extends DeclarationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.peekDeclaration',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.peekDecl.label', \"Peek Declaration\"),\r\n alias: 'Peek Declaration',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasDeclarationProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 3\r\n }\r\n });\r\n }\r\n});\r\n//#endregion\r\n//#region --- TYPE DEFINITION\r\nclass TypeDefinitionAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getTypeDefinitionsAtPosition)(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('typedef.title', 'Type Definitions'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('goToTypeDefinition.noResultWord', \"No type definition found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('goToTypeDefinition.generic.noResults', \"No type definition found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeTypeDefinitionCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleTypeDefinitions;\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_e = class GoToTypeDefinitionAction extends TypeDefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToTypeDefinitionAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.goToTypeDefinition.label', \"Go to Type Definition\"),\r\n alias: 'Go to Type Definition',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasTypeDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.4\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 3,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Type Definition\")\r\n }\r\n });\r\n }\r\n },\r\n _e.ID = 'editor.action.goToTypeDefinition',\r\n _e));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_f = class PeekTypeDefinitionAction extends TypeDefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekTypeDefinitionAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.peekTypeDefinition.label', \"Peek Type Definition\"),\r\n alias: 'Peek Type Definition',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasTypeDefinitionProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 4\r\n }\r\n });\r\n }\r\n },\r\n _f.ID = 'editor.action.peekTypeDefinition',\r\n _f));\r\n//#endregion\r\n//#region --- IMPLEMENTATION\r\nclass ImplementationAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getImplementationsAtPosition)(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('impl.title', 'Implementations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('goToImplementation.noResultWord', \"No implementation found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('goToImplementation.generic.noResults', \"No implementation found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeImplementationCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleImplementations;\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_g = class GoToImplementationAction extends ImplementationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToImplementationAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.goToImplementation.label', \"Go to Implementations\"),\r\n alias: 'Go to Implementations',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasImplementationProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 4,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, \"Go to &&Implementations\")\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.45\r\n }\r\n });\r\n }\r\n },\r\n _g.ID = 'editor.action.goToImplementation',\r\n _g));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)((_h = class PeekImplementationAction extends ImplementationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekImplementationAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('actions.peekImplementation.label', \"Peek Implementations\"),\r\n alias: 'Peek Implementations',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasImplementationProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 5\r\n }\r\n });\r\n }\r\n },\r\n _h.ID = 'editor.action.peekImplementation',\r\n _h));\r\n//#endregion\r\n//#region --- REFERENCES\r\nclass ReferencesAction extends SymbolNavigationAction {\r\n _getNoResultFoundMessage(info) {\r\n return info\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('references.no', \"No references found for '{0}'\", info.word)\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('references.noGeneric', \"No references found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeReferenceCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleReferences;\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(class GoToReferencesAction extends ReferencesAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.goToReferences',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('goToReferences.label', \"Go to References\"),\r\n alias: 'Go to References',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasReferenceProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.45\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 5,\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize({ key: 'miGotoReference', comment: ['&& denotes a mnemonic'] }, \"Go to &&References\")\r\n },\r\n });\r\n }\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getReferencesAtPosition)(model, position, true, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('ref.title', 'References'));\r\n });\r\n }\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(class PeekReferencesAction extends ReferencesAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.referenceSearch.trigger',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('references.action.label', \"Peek References\"),\r\n alias: 'Peek References',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasReferenceProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__.MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 6\r\n }\r\n });\r\n }\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(yield (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getReferencesAtPosition)(model, position, false, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('ref.title', 'References'));\r\n });\r\n }\r\n});\r\n//#endregion\r\n//#region --- GENERIC goto symbols command\r\nclass GenericGoToLocationAction extends SymbolNavigationAction {\r\n constructor(config, _references, _gotoMultipleBehaviour) {\r\n super(config, {\r\n id: 'editor.action.goToLocation',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('label.generic', \"Go To Any Symbol\"),\r\n alias: 'Go To Any Symbol',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyExpr.and(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__.PeekContext.notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n });\r\n this._references = _references;\r\n this._gotoMultipleBehaviour = _gotoMultipleBehaviour;\r\n }\r\n _getLocationModel(_model, _position, _token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(this._references, _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('generic.title', 'Locations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('generic.noResult', \"No results for '{0}'\", info.word) || '';\r\n }\r\n _getGoToPreference(editor) {\r\n var _a;\r\n return (_a = this._gotoMultipleBehaviour) !== null && _a !== void 0 ? _a : editor.getOption(45 /* gotoLocation */).multipleReferences;\r\n }\r\n _getAlternativeCommand() { return ''; }\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommand({\r\n id: 'editor.action.goToLocations',\r\n description: {\r\n description: 'Go to locations from a position in a file',\r\n args: [\r\n { name: 'uri', description: 'The text document in which to start', constraint: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__.URI },\r\n { name: 'position', description: 'The position at which to start', constraint: _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.isIPosition },\r\n { name: 'locations', description: 'An array of locations.', constraint: Array },\r\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' },\r\n { name: 'noResultsMessage', description: 'Human readable message that shows when locations is empty.' },\r\n ]\r\n },\r\n handler: (accessor, resource, position, references, multiple, noResultsMessage, openInPeek) => __awaiter(void 0, void 0, void 0, function* () {\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__.URI.isUri(resource));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.isIPosition(position));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(Array.isArray(references));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(typeof multiple === 'undefined' || typeof multiple === 'string');\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(typeof openInPeek === 'undefined' || typeof openInPeek === 'boolean');\r\n const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__.ICodeEditorService);\r\n const editor = yield editorService.openCodeEditor({ resource }, editorService.getFocusedCodeEditor());\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__.isCodeEditor)(editor)) {\r\n editor.setPosition(position);\r\n editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */);\r\n return editor.invokeWithinContext(accessor => {\r\n const command = new class extends GenericGoToLocationAction {\r\n _getNoResultFoundMessage(info) {\r\n return noResultsMessage || super._getNoResultFoundMessage(info);\r\n }\r\n }({\r\n muteMessage: !Boolean(noResultsMessage),\r\n openInPeek: Boolean(openInPeek),\r\n openToSide: false\r\n }, references, multiple);\r\n accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_26__.IInstantiationService).invokeFunction(command.run.bind(command), editor);\r\n });\r\n }\r\n })\r\n});\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommand({\r\n id: 'editor.action.peekLocations',\r\n description: {\r\n description: 'Peek locations from a position in a file',\r\n args: [\r\n { name: 'uri', description: 'The text document in which to start', constraint: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__.URI },\r\n { name: 'position', description: 'The position at which to start', constraint: _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.isIPosition },\r\n { name: 'locations', description: 'An array of locations.', constraint: Array },\r\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' },\r\n ]\r\n },\r\n handler: (accessor, resource, position, references, multiple) => __awaiter(void 0, void 0, void 0, function* () {\r\n accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.ICommandService).executeCommand('editor.action.goToLocations', resource, position, references, multiple, undefined, true);\r\n })\r\n});\r\n//#endregion\r\n//#region --- REFERENCE search special commands\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommand({\r\n id: 'editor.action.findReferences',\r\n handler: (accessor, resource, position) => {\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__.URI.isUri(resource));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.isIPosition(position));\r\n const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__.ICodeEditorService);\r\n return codeEditorService.openCodeEditor({ resource }, codeEditorService.getFocusedCodeEditor()).then(control => {\r\n if (!(0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__.isCodeEditor)(control) || !control.hasModel()) {\r\n return undefined;\r\n }\r\n const controller = _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__.ReferencesController.get(control);\r\n if (!controller) {\r\n return undefined;\r\n }\r\n const references = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.createCancelablePromise)(token => (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__.getReferencesAtPosition)(control.getModel(), _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__.Position.lift(position), false, token).then(references => new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__.ReferencesModel(references, _nls_js__WEBPACK_IMPORTED_MODULE_15__.localize('ref.title', 'References'))));\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n return Promise.resolve(controller.toggleWidget(range, references, false));\r\n });\r\n }\r\n});\r\n// use NEW command\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__.CommandsRegistry.registerCommandAlias('editor.action.showReferences', 'editor.action.peekLocations');\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getDefinitionsAtPosition\": () => (/* binding */ getDefinitionsAtPosition),\n/* harmony export */ \"getDeclarationsAtPosition\": () => (/* binding */ getDeclarationsAtPosition),\n/* harmony export */ \"getImplementationsAtPosition\": () => (/* binding */ getImplementationsAtPosition),\n/* harmony export */ \"getTypeDefinitionsAtPosition\": () => (/* binding */ getTypeDefinitionsAtPosition),\n/* harmony export */ \"getReferencesAtPosition\": () => (/* binding */ getReferencesAtPosition)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\nfunction getLocationLinks(model, position, registry, provide) {\r\n const provider = registry.ordered(model);\r\n // get results\r\n const promises = provider.map((provider) => {\r\n return Promise.resolve(provide(provider, model, position)).then(undefined, err => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError)(err);\r\n return undefined;\r\n });\r\n });\r\n return Promise.all(promises).then(values => {\r\n const result = [];\r\n for (let value of values) {\r\n if (Array.isArray(value)) {\r\n result.push(...value);\r\n }\r\n else if (value) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n });\r\n}\r\nfunction getDefinitionsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DefinitionProviderRegistry, (provider, model, position) => {\r\n return provider.provideDefinition(model, position, token);\r\n });\r\n}\r\nfunction getDeclarationsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DeclarationProviderRegistry, (provider, model, position) => {\r\n return provider.provideDeclaration(model, position, token);\r\n });\r\n}\r\nfunction getImplementationsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.ImplementationProviderRegistry, (provider, model, position) => {\r\n return provider.provideImplementation(model, position, token);\r\n });\r\n}\r\nfunction getTypeDefinitionsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TypeDefinitionProviderRegistry, (provider, model, position) => {\r\n return provider.provideTypeDefinition(model, position, token);\r\n });\r\n}\r\nfunction getReferencesAtPosition(model, position, compact, token) {\r\n return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.ReferenceProviderRegistry, (provider, model, position) => __awaiter(this, void 0, void 0, function* () {\r\n const result = yield provider.provideReferences(model, position, { includeDeclaration: true }, token);\r\n if (!compact || !result || result.length !== 2) {\r\n return result;\r\n }\r\n const resultWithoutDeclaration = yield provider.provideReferences(model, position, { includeDeclaration: false }, token);\r\n if (resultWithoutDeclaration && resultWithoutDeclaration.length === 1) {\r\n return resultWithoutDeclaration;\r\n }\r\n return result;\r\n }));\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelAndPositionCommand)('_executeDefinitionProvider', (model, position) => getDefinitionsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelAndPositionCommand)('_executeDeclarationProvider', (model, position) => getDeclarationsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelAndPositionCommand)('_executeImplementationProvider', (model, position) => getImplementationsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelAndPositionCommand)('_executeTypeDefinitionProvider', (model, position) => getTypeDefinitionsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelAndPositionCommand)('_executeReferenceProvider', (model, position) => getReferencesAtPosition(model, position, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClickLinkMouseEvent\": () => (/* binding */ ClickLinkMouseEvent),\n/* harmony export */ \"ClickLinkKeyboardEvent\": () => (/* binding */ ClickLinkKeyboardEvent),\n/* harmony export */ \"ClickLinkOptions\": () => (/* binding */ ClickLinkOptions),\n/* harmony export */ \"ClickLinkGesture\": () => (/* binding */ ClickLinkGesture)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nfunction hasModifier(e, modifier) {\r\n return !!e[modifier];\r\n}\r\n/**\r\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\r\n */\r\nclass ClickLinkMouseEvent {\r\n constructor(source, opts) {\r\n this.target = source.target;\r\n this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\r\n this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\r\n this.isNoneOrSingleMouseDown = (source.event.detail <= 1);\r\n }\r\n}\r\n/**\r\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\r\n */\r\nclass ClickLinkKeyboardEvent {\r\n constructor(source, opts) {\r\n this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\r\n this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\r\n this.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\r\n }\r\n}\r\nclass ClickLinkOptions {\r\n constructor(triggerKey, triggerModifier, triggerSideBySideKey, triggerSideBySideModifier) {\r\n this.triggerKey = triggerKey;\r\n this.triggerModifier = triggerModifier;\r\n this.triggerSideBySideKey = triggerSideBySideKey;\r\n this.triggerSideBySideModifier = triggerSideBySideModifier;\r\n }\r\n equals(other) {\r\n return (this.triggerKey === other.triggerKey\r\n && this.triggerModifier === other.triggerModifier\r\n && this.triggerSideBySideKey === other.triggerSideBySideKey\r\n && this.triggerSideBySideModifier === other.triggerSideBySideModifier);\r\n }\r\n}\r\nfunction createOptions(multiCursorModifier) {\r\n if (multiCursorModifier === 'altKey') {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n return new ClickLinkOptions(57 /* Meta */, 'metaKey', 6 /* Alt */, 'altKey');\r\n }\r\n return new ClickLinkOptions(5 /* Ctrl */, 'ctrlKey', 6 /* Alt */, 'altKey');\r\n }\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh) {\r\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 57 /* Meta */, 'metaKey');\r\n }\r\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 5 /* Ctrl */, 'ctrlKey');\r\n}\r\nclass ClickLinkGesture extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this._onMouseMoveOrRelevantKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown.event;\r\n this._onExecute = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onExecute = this._onExecute.event;\r\n this._onCancel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onCancel = this._onCancel.event;\r\n this._editor = editor;\r\n this._opts = createOptions(this._editor.getOption(64 /* multiCursorModifier */));\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._lineNumberOnMouseDown = 0;\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(64 /* multiCursorModifier */)) {\r\n const newOpts = createOptions(this._editor.getOption(64 /* multiCursorModifier */));\r\n if (this._opts.equals(newOpts)) {\r\n return;\r\n }\r\n this._opts = newOpts;\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._lineNumberOnMouseDown = 0;\r\n this._onCancel.fire();\r\n }\r\n }));\r\n this._register(this._editor.onMouseMove((e) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onKeyDown((e) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\r\n this._register(this._editor.onKeyUp((e) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\r\n this._register(this._editor.onMouseDrag(() => this._resetHandler()));\r\n this._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\r\n this._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\r\n this._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\r\n this._register(this._editor.onDidScrollChange((e) => {\r\n if (e.scrollTopChanged || e.scrollLeftChanged) {\r\n this._resetHandler();\r\n }\r\n }));\r\n }\r\n _onDidChangeCursorSelection(e) {\r\n if (e.selection && e.selection.startColumn !== e.selection.endColumn) {\r\n this._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\r\n }\r\n }\r\n _onEditorMouseMove(mouseEvent) {\r\n this._lastMouseMoveEvent = mouseEvent;\r\n this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n // We need to record if we had the trigger key on mouse down because someone might select something in the editor\r\n // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\r\n // release the mouse button without wanting to do the navigation.\r\n // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\r\n this._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\r\n this._lineNumberOnMouseDown = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0;\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n const currentLineNumber = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0;\r\n if (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) {\r\n this._onExecute.fire(mouseEvent);\r\n }\r\n }\r\n _onEditorKeyDown(e) {\r\n if (this._lastMouseMoveEvent\r\n && (e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\r\n || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\r\n )) {\r\n this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\r\n }\r\n else if (e.hasTriggerModifier) {\r\n this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\r\n }\r\n }\r\n _onEditorKeyUp(e) {\r\n if (e.keyCodeIsTriggerKey) {\r\n this._onCancel.fire();\r\n }\r\n }\r\n _resetHandler() {\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._onCancel.fire();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js":
|
||
/*!******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js ***!
|
||
\******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"GotoDefinitionAtPositionEditorContribution\": () => (/* binding */ GotoDefinitionAtPositionEditorContribution)\n/* harmony export */ });\n/* harmony import */ var _goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./goToDefinitionAtPosition.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _goToSymbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../goToSymbol.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _goToCommands_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../goToCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js\");\n/* harmony import */ var _clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./clickLinkGesture.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../peekView/peekView.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet GotoDefinitionAtPositionEditorContribution = class GotoDefinitionAtPositionEditorContribution {\r\n constructor(editor, textModelResolverService, modeService) {\r\n this.textModelResolverService = textModelResolverService;\r\n this.modeService = modeService;\r\n this.toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__.DisposableStore();\r\n this.toUnhookForKeyboard = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__.DisposableStore();\r\n this.linkDecorations = [];\r\n this.currentWordAtPosition = null;\r\n this.previousPromise = null;\r\n this.editor = editor;\r\n let linkGesture = new _clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_16__.ClickLinkGesture(editor);\r\n this.toUnhook.add(linkGesture);\r\n this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {\r\n this.startFindDefinitionFromMouse(mouseEvent, (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__.withNullAsUndefined)(keyboardEvent));\r\n }));\r\n this.toUnhook.add(linkGesture.onExecute((mouseEvent) => {\r\n if (this.isEnabled(mouseEvent)) {\r\n this.gotoDefinition(mouseEvent.target.position, mouseEvent.hasSideBySideModifier).then(() => {\r\n this.removeLinkDecorations();\r\n }, (error) => {\r\n this.removeLinkDecorations();\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedError)(error);\r\n });\r\n }\r\n }));\r\n this.toUnhook.add(linkGesture.onCancel(() => {\r\n this.removeLinkDecorations();\r\n this.currentWordAtPosition = null;\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(GotoDefinitionAtPositionEditorContribution.ID);\r\n }\r\n startFindDefinitionFromCursor(position) {\r\n // For issue: https://github.com/microsoft/vscode/issues/46257\r\n // equivalent to mouse move with meta/ctrl key\r\n // First find the definition and add decorations\r\n // to the editor to be shown with the content hover widget\r\n return this.startFindDefinition(position).then(() => {\r\n // Add listeners for editor cursor move and key down events\r\n // Dismiss the \"extended\" editor decorations when the user hides\r\n // the hover widget. There is no event for the widget itself so these\r\n // serve as a best effort. After removing the link decorations, the hover\r\n // widget is clean and will only show declarations per next request.\r\n this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n this.toUnhookForKeyboard.clear();\r\n }));\r\n this.toUnhookForKeyboard.add(this.editor.onKeyDown((e) => {\r\n if (e) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n this.toUnhookForKeyboard.clear();\r\n }\r\n }));\r\n });\r\n }\r\n startFindDefinitionFromMouse(mouseEvent, withKey) {\r\n // check if we are active and on a content widget\r\n if (mouseEvent.target.type === 9 /* CONTENT_WIDGET */ && this.linkDecorations.length > 0) {\r\n return;\r\n }\r\n if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n return;\r\n }\r\n const position = mouseEvent.target.position;\r\n this.startFindDefinition(position);\r\n }\r\n startFindDefinition(position) {\r\n var _a;\r\n // Dispose listeners for updating decorations when using keyboard to show definition hover\r\n this.toUnhookForKeyboard.clear();\r\n // Find word at mouse position\r\n const word = position ? (_a = this.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getWordAtPosition(position) : null;\r\n if (!word) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n return Promise.resolve(0);\r\n }\r\n // Return early if word at position is still the same\r\n if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) {\r\n return Promise.resolve(0);\r\n }\r\n this.currentWordAtPosition = word;\r\n // Find definition and decorate word if found\r\n let state = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_14__.EditorState(this.editor, 4 /* Position */ | 1 /* Value */ | 2 /* Selection */ | 8 /* Scroll */);\r\n if (this.previousPromise) {\r\n this.previousPromise.cancel();\r\n this.previousPromise = null;\r\n }\r\n this.previousPromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.createCancelablePromise)(token => this.findDefinition(position, token));\r\n return this.previousPromise.then(results => {\r\n if (!results || !results.length || !state.validate(this.editor)) {\r\n this.removeLinkDecorations();\r\n return;\r\n }\r\n // Multiple results\r\n if (results.length > 1) {\r\n this.addDecoration(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__.MarkdownString().appendText(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('multipleResults', \"Click to show {0} definitions.\", results.length)));\r\n }\r\n // Single result\r\n else {\r\n let result = results[0];\r\n if (!result.uri) {\r\n return;\r\n }\r\n this.textModelResolverService.createModelReference(result.uri).then(ref => {\r\n if (!ref.object || !ref.object.textEditorModel) {\r\n ref.dispose();\r\n return;\r\n }\r\n const { object: { textEditorModel } } = ref;\r\n const { startLineNumber } = result.range;\r\n if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) {\r\n // invalid range\r\n ref.dispose();\r\n return;\r\n }\r\n const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result);\r\n let wordRange;\r\n if (result.originSelectionRange) {\r\n wordRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.lift(result.originSelectionRange);\r\n }\r\n else {\r\n wordRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\r\n }\r\n const modeId = this.modeService.getModeIdByFilepathOrFirstLine(textEditorModel.uri);\r\n this.addDecoration(wordRange, new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__.MarkdownString().appendCodeblock(modeId ? modeId : '', previewValue));\r\n ref.dispose();\r\n });\r\n }\r\n }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__.onUnexpectedError);\r\n }\r\n getPreviewValue(textEditorModel, startLineNumber, result) {\r\n let rangeToUse = result.targetSelectionRange ? result.range : this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber);\r\n const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber;\r\n if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) {\r\n rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);\r\n }\r\n const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);\r\n return previewValue;\r\n }\r\n stripIndentationFromPreviewRange(textEditorModel, startLineNumber, previewRange) {\r\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\r\n let minIndent = startIndent;\r\n for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) {\r\n const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\r\n minIndent = Math.min(minIndent, endIndent);\r\n }\r\n const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\\\s{${minIndent - 1}}`, 'gm'), '').trim();\r\n return previewValue;\r\n }\r\n getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber) {\r\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\r\n const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES);\r\n let endLineNumber = startLineNumber + 1;\r\n for (; endLineNumber < maxLineNumber; endLineNumber++) {\r\n let endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\r\n if (startIndent === endIndent) {\r\n break;\r\n }\r\n }\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, 1, endLineNumber + 1, 1);\r\n }\r\n getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber) {\r\n const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES);\r\n const brackets = [];\r\n let ignoreFirstEmpty = true;\r\n let currentBracket = textEditorModel.findNextBracket(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__.Position(startLineNumber, 1));\r\n while (currentBracket !== null) {\r\n if (brackets.length === 0) {\r\n brackets.push(currentBracket);\r\n }\r\n else {\r\n const lastBracket = brackets[brackets.length - 1];\r\n if (lastBracket.open[0] === currentBracket.open[0] && lastBracket.isOpen && !currentBracket.isOpen) {\r\n brackets.pop();\r\n }\r\n else {\r\n brackets.push(currentBracket);\r\n }\r\n if (brackets.length === 0) {\r\n if (ignoreFirstEmpty) {\r\n ignoreFirstEmpty = false;\r\n }\r\n else {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, 1, currentBracket.range.endLineNumber + 1, 1);\r\n }\r\n }\r\n }\r\n const maxColumn = textEditorModel.getLineMaxColumn(startLineNumber);\r\n let nextLineNumber = currentBracket.range.endLineNumber;\r\n let nextColumn = currentBracket.range.endColumn;\r\n if (maxColumn === currentBracket.range.endColumn) {\r\n nextLineNumber++;\r\n nextColumn = 1;\r\n }\r\n if (nextLineNumber > maxLineNumber) {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, 1, maxLineNumber + 1, 1);\r\n }\r\n currentBracket = textEditorModel.findNextBracket(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__.Position(nextLineNumber, nextColumn));\r\n }\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, 1, maxLineNumber + 1, 1);\r\n }\r\n addDecoration(range, hoverMessage) {\r\n const newDecorations = {\r\n range: range,\r\n options: {\r\n inlineClassName: 'goto-definition-link',\r\n hoverMessage\r\n }\r\n };\r\n this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [newDecorations]);\r\n }\r\n removeLinkDecorations() {\r\n if (this.linkDecorations.length > 0) {\r\n this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, []);\r\n }\r\n }\r\n isEnabled(mouseEvent, withKey) {\r\n return this.editor.hasModel() &&\r\n mouseEvent.isNoneOrSingleMouseDown &&\r\n (mouseEvent.target.type === 6 /* CONTENT_TEXT */) &&\r\n (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false)) &&\r\n _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.DefinitionProviderRegistry.has(this.editor.getModel());\r\n }\r\n findDefinition(position, token) {\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return Promise.resolve(null);\r\n }\r\n return (0,_goToSymbol_js__WEBPACK_IMPORTED_MODULE_9__.getDefinitionsAtPosition)(model, position, token);\r\n }\r\n gotoDefinition(position, openToSide) {\r\n this.editor.setPosition(position);\r\n return this.editor.invokeWithinContext((accessor) => {\r\n const canPeek = !openToSide && this.editor.getOption(72 /* definitionLinkOpensInPeek */) && !this.isInPeekEditor(accessor);\r\n const action = new _goToCommands_js__WEBPACK_IMPORTED_MODULE_15__.DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { alias: '', label: '', id: '', precondition: undefined });\r\n return action.run(accessor, this.editor);\r\n });\r\n }\r\n isInPeekEditor(accessor) {\r\n const contextKeyService = accessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_20__.IContextKeyService);\r\n return _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_19__.PeekContext.inPeekEditor.getValue(contextKeyService);\r\n }\r\n dispose() {\r\n this.toUnhook.dispose();\r\n }\r\n};\r\nGotoDefinitionAtPositionEditorContribution.ID = 'editor.contrib.gotodefinitionatposition';\r\nGotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES = 8;\r\nGotoDefinitionAtPositionEditorContribution = __decorate([\r\n __param(1, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__.ITextModelService),\r\n __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__.IModeService)\r\n], GotoDefinitionAtPositionEditorContribution);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__.registerEditorContribution)(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__.registerThemingParticipant)((theme, collector) => {\r\n const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .goto-definition-link { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ctxReferenceSearchVisible\": () => (/* binding */ ctxReferenceSearchVisible),\n/* harmony export */ \"ReferencesController\": () => (/* binding */ ReferencesController)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../referencesModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js\");\n/* harmony import */ var _referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./referencesWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../peekView/peekView.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js\");\n/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/list/browser/listService.js */ \"./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ctxReferenceSearchVisible = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.RawContextKey('referenceSearchVisible', false);\r\nlet ReferencesController = class ReferencesController {\r\n constructor(_defaultTreeKeyboardSupport, _editor, contextKeyService, _editorService, _notificationService, _instantiationService, _storageService, _configurationService) {\r\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\r\n this._editor = _editor;\r\n this._editorService = _editorService;\r\n this._notificationService = _notificationService;\r\n this._instantiationService = _instantiationService;\r\n this._storageService = _storageService;\r\n this._configurationService = _configurationService;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._requestIdPool = 0;\r\n this._ignoreModelChangeEvent = false;\r\n this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ReferencesController.ID);\r\n }\r\n dispose() {\r\n var _a, _b;\r\n this._referenceSearchVisible.reset();\r\n this._disposables.dispose();\r\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n }\r\n toggleWidget(range, modelPromise, peekMode) {\r\n // close current widget and return early is position didn't change\r\n let widgetPosition;\r\n if (this._widget) {\r\n widgetPosition = this._widget.position;\r\n }\r\n this.closeWidget();\r\n if (!!widgetPosition && range.containsPosition(widgetPosition)) {\r\n return;\r\n }\r\n this._peekMode = peekMode;\r\n this._referenceSearchVisible.set(true);\r\n // close the widget on model/mode changes\r\n this._disposables.add(this._editor.onDidChangeModelLanguage(() => { this.closeWidget(); }));\r\n this._disposables.add(this._editor.onDidChangeModel(() => {\r\n if (!this._ignoreModelChangeEvent) {\r\n this.closeWidget();\r\n }\r\n }));\r\n const storageKey = 'peekViewLayout';\r\n const data = _referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__.LayoutData.fromJSON(this._storageService.get(storageKey, 0 /* GLOBAL */, '{}'));\r\n this._widget = this._instantiationService.createInstance(_referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__.ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, data);\r\n this._widget.setTitle(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('labelLoading', \"Loading...\"));\r\n this._widget.show(range);\r\n this._disposables.add(this._widget.onDidClose(() => {\r\n modelPromise.cancel();\r\n if (this._widget) {\r\n this._storageService.store(storageKey, JSON.stringify(this._widget.layoutData), 0 /* GLOBAL */, 1 /* MACHINE */);\r\n this._widget = undefined;\r\n }\r\n this.closeWidget();\r\n }));\r\n this._disposables.add(this._widget.onDidSelectReference(event => {\r\n let { element, kind } = event;\r\n if (!element) {\r\n return;\r\n }\r\n switch (kind) {\r\n case 'open':\r\n if (event.source !== 'editor' || !this._configurationService.getValue('editor.stablePeek')) {\r\n // when stable peek is configured we don't close\r\n // the peek window on selecting the editor\r\n this.openReference(element, false, false);\r\n }\r\n break;\r\n case 'side':\r\n this.openReference(element, true, false);\r\n break;\r\n case 'goto':\r\n if (peekMode) {\r\n this._gotoReference(element);\r\n }\r\n else {\r\n this.openReference(element, false, true);\r\n }\r\n break;\r\n }\r\n }));\r\n const requestId = ++this._requestIdPool;\r\n modelPromise.then(model => {\r\n var _a;\r\n // still current request? widget still open?\r\n if (requestId !== this._requestIdPool || !this._widget) {\r\n model.dispose();\r\n return undefined;\r\n }\r\n (_a = this._model) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._model = model;\r\n // show widget\r\n return this._widget.setModel(this._model).then(() => {\r\n if (this._widget && this._model && this._editor.hasModel()) { // might have been closed\r\n // set title\r\n if (!this._model.isEmpty) {\r\n this._widget.setMetaTitle(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('metaTitle.N', \"{0} ({1})\", this._model.title, this._model.references.length));\r\n }\r\n else {\r\n this._widget.setMetaTitle('');\r\n }\r\n // set 'best' selection\r\n let uri = this._editor.getModel().uri;\r\n let pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__.Position(range.startLineNumber, range.startColumn);\r\n let selection = this._model.nearestReference(uri, pos);\r\n if (selection) {\r\n return this._widget.setSelection(selection).then(() => {\r\n if (this._widget && this._editor.getOption(71 /* peekWidgetDefaultFocus */) === 'editor') {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n });\r\n }\r\n }\r\n return undefined;\r\n });\r\n }, error => {\r\n this._notificationService.error(error);\r\n });\r\n }\r\n changeFocusBetweenPreviewAndReferences() {\r\n if (!this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n if (this._widget.isPreviewEditorFocused()) {\r\n this._widget.focusOnReferenceTree();\r\n }\r\n else {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n }\r\n goToNextOrPreviousReference(fwd) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._model || !this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n const currentPosition = this._widget.position;\r\n if (!currentPosition) {\r\n return;\r\n }\r\n const source = this._model.nearestReference(this._editor.getModel().uri, currentPosition);\r\n if (!source) {\r\n return;\r\n }\r\n const target = this._model.nextOrPreviousReference(source, fwd);\r\n const editorFocus = this._editor.hasTextFocus();\r\n const previewEditorFocus = this._widget.isPreviewEditorFocused();\r\n yield this._widget.setSelection(target);\r\n yield this._gotoReference(target);\r\n if (editorFocus) {\r\n this._editor.focus();\r\n }\r\n else if (this._widget && previewEditorFocus) {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n });\r\n }\r\n revealReference(reference) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._model || !this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n yield this._widget.revealReference(reference);\r\n });\r\n }\r\n closeWidget(focusEditor = true) {\r\n var _a, _b;\r\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._referenceSearchVisible.reset();\r\n this._disposables.clear();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n if (focusEditor) {\r\n this._editor.focus();\r\n }\r\n this._requestIdPool += 1; // Cancel pending requests\r\n }\r\n _gotoReference(ref) {\r\n if (this._widget) {\r\n this._widget.hide();\r\n }\r\n this._ignoreModelChangeEvent = true;\r\n const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.lift(ref.range).collapseToStart();\r\n return this._editorService.openCodeEditor({\r\n resource: ref.uri,\r\n options: { selection: range }\r\n }, this._editor).then(openedEditor => {\r\n var _a;\r\n this._ignoreModelChangeEvent = false;\r\n if (!openedEditor || !this._widget) {\r\n // something went wrong...\r\n this.closeWidget();\r\n return;\r\n }\r\n if (this._editor === openedEditor) {\r\n //\r\n this._widget.show(range);\r\n this._widget.focusOnReferenceTree();\r\n }\r\n else {\r\n // we opened a different editor instance which means a different controller instance.\r\n // therefore we stop with this controller and continue with the other\r\n const other = ReferencesController.get(openedEditor);\r\n const model = this._model.clone();\r\n this.closeWidget();\r\n openedEditor.focus();\r\n other.toggleWidget(range, (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_13__.createCancelablePromise)(_ => Promise.resolve(model)), (_a = this._peekMode) !== null && _a !== void 0 ? _a : false);\r\n }\r\n }, (err) => {\r\n this._ignoreModelChangeEvent = false;\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(err);\r\n });\r\n }\r\n openReference(ref, sideBySide, pinned) {\r\n // clear stage\r\n if (!sideBySide) {\r\n this.closeWidget();\r\n }\r\n const { uri, range } = ref;\r\n this._editorService.openCodeEditor({\r\n resource: uri,\r\n options: { selection: range, pinned }\r\n }, this._editor, sideBySide);\r\n }\r\n};\r\nReferencesController.ID = 'editor.contrib.referencesController';\r\nReferencesController = __decorate([\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.IContextKeyService),\r\n __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__.ICodeEditorService),\r\n __param(4, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_12__.INotificationService),\r\n __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__.IInstantiationService),\r\n __param(6, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__.IStorageService),\r\n __param(7, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService)\r\n], ReferencesController);\r\n\r\nfunction withController(accessor, fn) {\r\n const outerEditor = (0,_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__.getOuterEditor)(accessor);\r\n if (!outerEditor) {\r\n return;\r\n }\r\n let controller = ReferencesController.get(outerEditor);\r\n if (controller) {\r\n fn(controller);\r\n }\r\n}\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'togglePeekWidgetFocus',\r\n weight: 100 /* EditorContrib */,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_17__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 60 /* F2 */),\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__.PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.changeFocusBetweenPreviewAndReferences();\r\n });\r\n }\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'goToNextReference',\r\n weight: 100 /* EditorContrib */ - 10,\r\n primary: 62 /* F4 */,\r\n secondary: [70 /* F12 */],\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__.PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.goToNextOrPreviousReference(true);\r\n });\r\n }\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'goToPreviousReference',\r\n weight: 100 /* EditorContrib */ - 10,\r\n primary: 1024 /* Shift */ | 62 /* F4 */,\r\n secondary: [1024 /* Shift */ | 70 /* F12 */],\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__.PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.goToNextOrPreviousReference(false);\r\n });\r\n }\r\n});\r\n// commands that aren't needed anymore because there is now ContextKeyExpr.OR\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference');\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference');\r\n// close\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch');\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommand('closeReferenceSearch', accessor => withController(accessor, controller => controller.closeWidget()));\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerKeybindingRule({\r\n id: 'closeReferenceSearch',\r\n weight: 100 /* EditorContrib */ - 101,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */],\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.and(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__.PeekContext.inPeekEditor, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.not('config.editor.stablePeek'))\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerKeybindingRule({\r\n id: 'closeReferenceSearch',\r\n weight: 200 /* WorkbenchContrib */ + 50,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */],\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.and(ctxReferenceSearchVisible, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.not('config.editor.stablePeek'))\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'revealReference',\r\n weight: 200 /* WorkbenchContrib */,\r\n primary: 3 /* Enter */,\r\n mac: {\r\n primary: 3 /* Enter */,\r\n secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */]\r\n },\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.and(ctxReferenceSearchVisible, _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.WorkbenchListFocusContextKey),\r\n handler(accessor) {\r\n var _a;\r\n const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__.OneReference) {\r\n withController(accessor, controller => controller.revealReference(focus[0]));\r\n }\r\n }\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'openReferenceToSide',\r\n weight: 100 /* EditorContrib */,\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 3 /* Enter */\r\n },\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.ContextKeyExpr.and(ctxReferenceSearchVisible, _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.WorkbenchListFocusContextKey),\r\n handler(accessor) {\r\n var _a;\r\n const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__.OneReference) {\r\n withController(accessor, controller => controller.openReference(focus[0], true, true));\r\n }\r\n }\r\n});\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__.CommandsRegistry.registerCommand('openReference', (accessor) => {\r\n var _a;\r\n const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__.OneReference) {\r\n withController(accessor, controller => controller.openReference(focus[0], false, true));\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DataSource\": () => (/* binding */ DataSource),\n/* harmony export */ \"Delegate\": () => (/* binding */ Delegate),\n/* harmony export */ \"StringRepresentationProvider\": () => (/* binding */ StringRepresentationProvider),\n/* harmony export */ \"IdentityProvider\": () => (/* binding */ IdentityProvider),\n/* harmony export */ \"FileReferencesRenderer\": () => (/* binding */ FileReferencesRenderer),\n/* harmony export */ \"OneReferenceRenderer\": () => (/* binding */ OneReferenceRenderer),\n/* harmony export */ \"AccessibilityProvider\": () => (/* binding */ AccessibilityProvider)\n/* harmony export */ });\n/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../referencesModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/ui/iconLabel/iconLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js\");\n/* harmony import */ var _base_browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/ui/countBadge/countBadge.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js\");\n/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/label/common/label.js */ \"./node_modules/monaco-editor/esm/vs/platform/label/common/label.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/theme/common/styler.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../base/common/labels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/labels.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../base/common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _base_browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../base/browser/ui/highlightedlabel/highlightedLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet DataSource = class DataSource {\r\n constructor(_resolverService) {\r\n this._resolverService = _resolverService;\r\n }\r\n hasChildren(element) {\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.ReferencesModel) {\r\n return true;\r\n }\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.FileReferences) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n getChildren(element) {\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.ReferencesModel) {\r\n return element.groups;\r\n }\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.FileReferences) {\r\n return element.resolve(this._resolverService).then(val => {\r\n // if (element.failure) {\r\n // \t// refresh the element on failure so that\r\n // \t// we can update its rendering\r\n // \treturn tree.refresh(element).then(() => val.children);\r\n // }\r\n return val.children;\r\n });\r\n }\r\n throw new Error('bad tree');\r\n }\r\n};\r\nDataSource = __decorate([\r\n __param(0, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_1__.ITextModelService)\r\n], DataSource);\r\n\r\n//#endregion\r\nclass Delegate {\r\n getHeight() {\r\n return 23;\r\n }\r\n getTemplateId(element) {\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.FileReferences) {\r\n return FileReferencesRenderer.id;\r\n }\r\n else {\r\n return OneReferenceRenderer.id;\r\n }\r\n }\r\n}\r\nlet StringRepresentationProvider = class StringRepresentationProvider {\r\n constructor(_keybindingService) {\r\n this._keybindingService = _keybindingService;\r\n }\r\n getKeyboardNavigationLabel(element) {\r\n var _a;\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.OneReference) {\r\n const parts = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\r\n if (parts) {\r\n return parts.value;\r\n }\r\n }\r\n // FileReferences or unresolved OneReference\r\n return (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__.basename)(element.uri);\r\n }\r\n};\r\nStringRepresentationProvider = __decorate([\r\n __param(0, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__.IKeybindingService)\r\n], StringRepresentationProvider);\r\n\r\nclass IdentityProvider {\r\n getId(element) {\r\n return element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__.OneReference ? element.id : element.uri;\r\n }\r\n}\r\n//#region render: File\r\nlet FileReferencesTemplate = class FileReferencesTemplate extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_11__.Disposable {\r\n constructor(container, _uriLabel, themeService) {\r\n super();\r\n this._uriLabel = _uriLabel;\r\n const parent = document.createElement('div');\r\n parent.classList.add('reference-file');\r\n this.file = this._register(new _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_2__.IconLabel(parent, { supportHighlights: true }));\r\n this.badge = new _base_browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_3__.CountBadge(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__.append(parent, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__.$('.count')));\r\n this._register((0,_platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_6__.attachBadgeStyler)(this.badge, themeService));\r\n container.appendChild(parent);\r\n }\r\n set(element, matches) {\r\n let parent = (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__.dirname)(element.uri);\r\n this.file.setLabel((0,_base_common_labels_js__WEBPACK_IMPORTED_MODULE_9__.getBaseLabel)(element.uri), this._uriLabel.getUriLabel(parent, { relative: true }), { title: this._uriLabel.getUriLabel(element.uri), matches });\r\n const len = element.children.length;\r\n this.badge.setCount(len);\r\n if (len > 1) {\r\n this.badge.setTitleFormat((0,_nls_js__WEBPACK_IMPORTED_MODULE_8__.localize)('referencesCount', \"{0} references\", len));\r\n }\r\n else {\r\n this.badge.setTitleFormat((0,_nls_js__WEBPACK_IMPORTED_MODULE_8__.localize)('referenceCount', \"{0} reference\", len));\r\n }\r\n }\r\n};\r\nFileReferencesTemplate = __decorate([\r\n __param(1, _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_4__.ILabelService),\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__.IThemeService)\r\n], FileReferencesTemplate);\r\nlet FileReferencesRenderer = class FileReferencesRenderer {\r\n constructor(_instantiationService) {\r\n this._instantiationService = _instantiationService;\r\n this.templateId = FileReferencesRenderer.id;\r\n }\r\n renderTemplate(container) {\r\n return this._instantiationService.createInstance(FileReferencesTemplate, container);\r\n }\r\n renderElement(node, index, template) {\r\n template.set(node.element, (0,_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__.createMatches)(node.filterData));\r\n }\r\n disposeTemplate(templateData) {\r\n templateData.dispose();\r\n }\r\n};\r\nFileReferencesRenderer.id = 'FileReferencesRenderer';\r\nFileReferencesRenderer = __decorate([\r\n __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__.IInstantiationService)\r\n], FileReferencesRenderer);\r\n\r\n//#endregion\r\n//#region render: Reference\r\nclass OneReferenceTemplate {\r\n constructor(container) {\r\n this.label = new _base_browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_15__.HighlightedLabel(container, false);\r\n }\r\n set(element, score) {\r\n var _a;\r\n const preview = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\r\n if (!preview || !preview.value) {\r\n // this means we FAILED to resolve the document or the value is the empty string\r\n this.label.set(`${(0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__.basename)(element.uri)}:${element.range.startLineNumber + 1}:${element.range.startColumn + 1}`);\r\n }\r\n else {\r\n // render search match as highlight unless\r\n // we have score, then render the score\r\n const { value, highlight } = preview;\r\n if (score && !_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__.FuzzyScore.isDefault(score)) {\r\n this.label.element.classList.toggle('referenceMatch', false);\r\n this.label.set(value, (0,_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__.createMatches)(score));\r\n }\r\n else {\r\n this.label.element.classList.toggle('referenceMatch', true);\r\n this.label.set(value, [highlight]);\r\n }\r\n }\r\n }\r\n}\r\nclass OneReferenceRenderer {\r\n constructor() {\r\n this.templateId = OneReferenceRenderer.id;\r\n }\r\n renderTemplate(container) {\r\n return new OneReferenceTemplate(container);\r\n }\r\n renderElement(node, index, templateData) {\r\n templateData.set(node.element, node.filterData);\r\n }\r\n disposeTemplate() {\r\n }\r\n}\r\nOneReferenceRenderer.id = 'OneReferenceRenderer';\r\n//#endregion\r\nclass AccessibilityProvider {\r\n getWidgetAriaLabel() {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_8__.localize)('treeAriaLabel', \"References\");\r\n }\r\n getAriaLabel(element) {\r\n return element.ariaMessage;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LayoutData\": () => (/* binding */ LayoutData),\n/* harmony export */ \"ReferenceWidget\": () => (/* binding */ ReferenceWidget)\n/* harmony export */ });\n/* harmony import */ var _referencesWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./referencesWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/widget/embeddedCodeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./referencesTree.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/label/common/label.js */ \"./node_modules/monaco-editor/esm/vs/platform/label/common/label.js\");\n/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/list/browser/listService.js */ \"./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../peekView/peekView.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js\");\n/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../referencesModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js\");\n/* harmony import */ var _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../base/browser/ui/splitview/splitview.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js\");\n/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../../platform/undoRedo/common/undoRedo.js */ \"./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass DecorationsManager {\r\n constructor(_editor, _model) {\r\n this._editor = _editor;\r\n this._model = _model;\r\n this._decorations = new Map();\r\n this._decorationIgnoreSet = new Set();\r\n this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this._callOnModelChange = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this._callOnDispose.add(this._editor.onDidChangeModel(() => this._onModelChanged()));\r\n this._onModelChanged();\r\n }\r\n dispose() {\r\n this._callOnModelChange.dispose();\r\n this._callOnDispose.dispose();\r\n this.removeDecorations();\r\n }\r\n _onModelChanged() {\r\n this._callOnModelChange.clear();\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (let ref of this._model.references) {\r\n if (ref.uri.toString() === model.uri.toString()) {\r\n this._addDecorations(ref.parent);\r\n return;\r\n }\r\n }\r\n }\r\n _addDecorations(reference) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(() => this._onDecorationChanged()));\r\n const newDecorations = [];\r\n const newDecorationsActualIndex = [];\r\n for (let i = 0, len = reference.children.length; i < len; i++) {\r\n let oneReference = reference.children[i];\r\n if (this._decorationIgnoreSet.has(oneReference.id)) {\r\n continue;\r\n }\r\n if (oneReference.uri.toString() !== this._editor.getModel().uri.toString()) {\r\n continue;\r\n }\r\n newDecorations.push({\r\n range: oneReference.range,\r\n options: DecorationsManager.DecorationOptions\r\n });\r\n newDecorationsActualIndex.push(i);\r\n }\r\n const decorations = this._editor.deltaDecorations([], newDecorations);\r\n for (let i = 0; i < decorations.length; i++) {\r\n this._decorations.set(decorations[i], reference.children[newDecorationsActualIndex[i]]);\r\n }\r\n }\r\n _onDecorationChanged() {\r\n const toRemove = [];\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (let [decorationId, reference] of this._decorations) {\r\n const newRange = model.getDecorationRange(decorationId);\r\n if (!newRange) {\r\n continue;\r\n }\r\n let ignore = false;\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.equalsRange(newRange, reference.range)) {\r\n continue;\r\n }\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.spansMultipleLines(newRange)) {\r\n ignore = true;\r\n }\r\n else {\r\n const lineLength = reference.range.endColumn - reference.range.startColumn;\r\n const newLineLength = newRange.endColumn - newRange.startColumn;\r\n if (lineLength !== newLineLength) {\r\n ignore = true;\r\n }\r\n }\r\n if (ignore) {\r\n this._decorationIgnoreSet.add(reference.id);\r\n toRemove.push(decorationId);\r\n }\r\n else {\r\n reference.range = newRange;\r\n }\r\n }\r\n for (let i = 0, len = toRemove.length; i < len; i++) {\r\n this._decorations.delete(toRemove[i]);\r\n }\r\n this._editor.deltaDecorations(toRemove, []);\r\n }\r\n removeDecorations() {\r\n this._editor.deltaDecorations([...this._decorations.keys()], []);\r\n this._decorations.clear();\r\n }\r\n}\r\nDecorationsManager.DecorationOptions = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'reference-decoration'\r\n});\r\nclass LayoutData {\r\n constructor() {\r\n this.ratio = 0.7;\r\n this.heightInLines = 18;\r\n }\r\n static fromJSON(raw) {\r\n let ratio;\r\n let heightInLines;\r\n try {\r\n const data = JSON.parse(raw);\r\n ratio = data.ratio;\r\n heightInLines = data.heightInLines;\r\n }\r\n catch (_a) {\r\n //\r\n }\r\n return {\r\n ratio: ratio || 0.7,\r\n heightInLines: heightInLines || 18\r\n };\r\n }\r\n}\r\nclass ReferencesTree extends _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__.WorkbenchAsyncDataTree {\r\n}\r\n/**\r\n * ZoneWidget that is shown inside the editor\r\n */\r\nlet ReferenceWidget = class ReferenceWidget extends _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.PeekViewWidget {\r\n constructor(editor, _defaultTreeKeyboardSupport, layoutData, themeService, _textModelResolverService, _instantiationService, _peekViewService, _uriLabel, _undoRedoService, _keybindingService) {\r\n super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService);\r\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\r\n this.layoutData = layoutData;\r\n this._textModelResolverService = _textModelResolverService;\r\n this._instantiationService = _instantiationService;\r\n this._peekViewService = _peekViewService;\r\n this._uriLabel = _uriLabel;\r\n this._undoRedoService = _undoRedoService;\r\n this._keybindingService = _keybindingService;\r\n this._disposeOnNewModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this._onDidSelectReference = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidSelectReference = this._onDidSelectReference.event;\r\n this._dim = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dimension(0, 0);\r\n this._applyTheme(themeService.getColorTheme());\r\n this._callOnDispose.add(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this._peekViewService.addExclusiveWidget(editor, this);\r\n this.create();\r\n }\r\n dispose() {\r\n this.setModel(undefined);\r\n this._callOnDispose.dispose();\r\n this._disposeOnNewModel.dispose();\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this._preview);\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this._previewNotAvailableMessage);\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this._tree);\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this._previewModelReference);\r\n this._splitView.dispose();\r\n super.dispose();\r\n }\r\n _applyTheme(theme) {\r\n const borderColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewBorder) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.transparent;\r\n this.style({\r\n arrowColor: borderColor,\r\n frameColor: borderColor,\r\n headerBackgroundColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewTitleBackground) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.transparent,\r\n primaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewTitleForeground),\r\n secondaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewTitleInfoForeground)\r\n });\r\n }\r\n show(where) {\r\n this.editor.revealRangeInCenterIfOutsideViewport(where, 0 /* Smooth */);\r\n super.show(where, this.layoutData.heightInLines || 18);\r\n }\r\n focusOnReferenceTree() {\r\n this._tree.domFocus();\r\n }\r\n focusOnPreviewEditor() {\r\n this._preview.focus();\r\n }\r\n isPreviewEditorFocused() {\r\n return this._preview.hasTextFocus();\r\n }\r\n _onTitleClick(e) {\r\n if (this._preview && this._preview.getModel()) {\r\n this._onDidSelectReference.fire({\r\n element: this._getFocusedReference(),\r\n kind: e.ctrlKey || e.metaKey || e.altKey ? 'side' : 'open',\r\n source: 'title'\r\n });\r\n }\r\n }\r\n _fillBody(containerElement) {\r\n this.setCssClass('reference-zone-widget');\r\n // message pane\r\n this._messageContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('div.messages'));\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this._messageContainer);\r\n this._splitView = new _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__.SplitView(containerElement, { orientation: 1 /* HORIZONTAL */ });\r\n // editor\r\n this._previewContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('div.preview.inline'));\r\n let options = {\r\n scrollBeyondLastLine: false,\r\n scrollbar: {\r\n verticalScrollbarSize: 14,\r\n horizontal: 'auto',\r\n useShadows: true,\r\n verticalHasArrows: false,\r\n horizontalHasArrows: false,\r\n alwaysConsumeMouseWheel: false\r\n },\r\n overviewRulerLanes: 2,\r\n fixedOverflowWidgets: true,\r\n minimap: {\r\n enabled: false\r\n }\r\n };\r\n this._preview = this._instantiationService.createInstance(_browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_7__.EmbeddedCodeEditorWidget, this._previewContainer, options, this.editor);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this._previewContainer);\r\n this._previewNotAvailableMessage = new _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.TextModel(_nls_js__WEBPACK_IMPORTED_MODULE_12__.localize('missingPreviewMessage', \"no preview available\"), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.TextModel.DEFAULT_CREATION_OPTIONS, null, null, this._undoRedoService);\r\n // tree\r\n this._treeContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('div.ref-tree.inline'));\r\n const treeOptions = {\r\n keyboardSupport: this._defaultTreeKeyboardSupport,\r\n accessibilityProvider: new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.AccessibilityProvider(),\r\n keyboardNavigationLabelProvider: this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.StringRepresentationProvider),\r\n identityProvider: new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.IdentityProvider(),\r\n openOnSingleClick: true,\r\n openOnFocus: true,\r\n overrideStyles: {\r\n listBackground: _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsBackground\r\n }\r\n };\r\n if (this._defaultTreeKeyboardSupport) {\r\n // the tree will consume `Escape` and prevent the widget from closing\r\n this._callOnDispose.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._treeContainer, 'keydown', (e) => {\r\n if (e.equals(9 /* Escape */)) {\r\n this._keybindingService.dispatchEvent(e, e.target);\r\n e.stopPropagation();\r\n }\r\n }, true));\r\n }\r\n this._tree = this._instantiationService.createInstance(ReferencesTree, 'ReferencesWidget', this._treeContainer, new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.Delegate(), [\r\n this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.FileReferencesRenderer),\r\n this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.OneReferenceRenderer),\r\n ], this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__.DataSource), treeOptions);\r\n // split stuff\r\n this._splitView.addView({\r\n onDidChange: _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.None,\r\n element: this._previewContainer,\r\n minimumSize: 200,\r\n maximumSize: Number.MAX_VALUE,\r\n layout: (width) => {\r\n this._preview.layout({ height: this._dim.height, width });\r\n }\r\n }, _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__.Sizing.Distribute);\r\n this._splitView.addView({\r\n onDidChange: _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.None,\r\n element: this._treeContainer,\r\n minimumSize: 100,\r\n maximumSize: Number.MAX_VALUE,\r\n layout: (width) => {\r\n this._treeContainer.style.height = `${this._dim.height}px`;\r\n this._treeContainer.style.width = `${width}px`;\r\n this._tree.layout(this._dim.height, width);\r\n }\r\n }, _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__.Sizing.Distribute);\r\n this._disposables.add(this._splitView.onDidSashChange(() => {\r\n if (this._dim.width) {\r\n this.layoutData.ratio = this._splitView.getViewSize(0) / this._dim.width;\r\n }\r\n }, undefined));\r\n // listen on selection and focus\r\n let onEvent = (element, kind) => {\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__.OneReference) {\r\n if (kind === 'show') {\r\n this._revealReference(element, false);\r\n }\r\n this._onDidSelectReference.fire({ element, kind, source: 'tree' });\r\n }\r\n };\r\n this._tree.onDidOpen(e => {\r\n if (e.sideBySide) {\r\n onEvent(e.element, 'side');\r\n }\r\n else if (e.editorOptions.pinned) {\r\n onEvent(e.element, 'goto');\r\n }\r\n else {\r\n onEvent(e.element, 'show');\r\n }\r\n });\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this._treeContainer);\r\n }\r\n _onWidth(width) {\r\n if (this._dim) {\r\n this._doLayoutBody(this._dim.height, width);\r\n }\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n super._doLayoutBody(heightInPixel, widthInPixel);\r\n this._dim = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dimension(widthInPixel, heightInPixel);\r\n this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines;\r\n this._splitView.layout(widthInPixel);\r\n this._splitView.resizeView(0, widthInPixel * this.layoutData.ratio);\r\n }\r\n setSelection(selection) {\r\n return this._revealReference(selection, true).then(() => {\r\n if (!this._model) {\r\n // disposed\r\n return;\r\n }\r\n // show in tree\r\n this._tree.setSelection([selection]);\r\n this._tree.setFocus([selection]);\r\n });\r\n }\r\n setModel(newModel) {\r\n // clean up\r\n this._disposeOnNewModel.clear();\r\n this._model = newModel;\r\n if (this._model) {\r\n return this._onNewModel();\r\n }\r\n return Promise.resolve();\r\n }\r\n _onNewModel() {\r\n if (!this._model) {\r\n return Promise.resolve(undefined);\r\n }\r\n if (this._model.isEmpty) {\r\n this.setTitle('');\r\n this._messageContainer.innerText = _nls_js__WEBPACK_IMPORTED_MODULE_12__.localize('noResults', \"No results\");\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.show(this._messageContainer);\r\n return Promise.resolve(undefined);\r\n }\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this._messageContainer);\r\n this._decorationsManager = new DecorationsManager(this._preview, this._model);\r\n this._disposeOnNewModel.add(this._decorationsManager);\r\n // listen on model changes\r\n this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(reference => this._tree.rerender(reference)));\r\n // listen on editor\r\n this._disposeOnNewModel.add(this._preview.onMouseDown(e => {\r\n const { event, target } = e;\r\n if (event.detail !== 2) {\r\n return;\r\n }\r\n const element = this._getFocusedReference();\r\n if (!element) {\r\n return;\r\n }\r\n this._onDidSelectReference.fire({\r\n element: { uri: element.uri, range: target.range },\r\n kind: (event.ctrlKey || event.metaKey || event.altKey) ? 'side' : 'open',\r\n source: 'editor'\r\n });\r\n }));\r\n // make sure things are rendered\r\n this.container.classList.add('results-loaded');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.show(this._treeContainer);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.show(this._previewContainer);\r\n this._splitView.layout(this._dim.width);\r\n this.focusOnReferenceTree();\r\n // pick input and a reference to begin with\r\n return this._tree.setInput(this._model.groups.length === 1 ? this._model.groups[0] : this._model);\r\n }\r\n _getFocusedReference() {\r\n const [element] = this._tree.getFocus();\r\n if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__.OneReference) {\r\n return element;\r\n }\r\n else if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__.FileReferences) {\r\n if (element.children.length > 0) {\r\n return element.children[0];\r\n }\r\n }\r\n return undefined;\r\n }\r\n revealReference(reference) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this._revealReference(reference, false);\r\n this._onDidSelectReference.fire({ element: reference, kind: 'goto', source: 'tree' });\r\n });\r\n }\r\n _revealReference(reference, revealParent) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // check if there is anything to do...\r\n if (this._revealedReference === reference) {\r\n return;\r\n }\r\n this._revealedReference = reference;\r\n // Update widget header\r\n if (reference.uri.scheme !== _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__.Schemas.inMemory) {\r\n this.setTitle((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__.basenameOrAuthority)(reference.uri), this._uriLabel.getUriLabel((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__.dirname)(reference.uri)));\r\n }\r\n else {\r\n this.setTitle(_nls_js__WEBPACK_IMPORTED_MODULE_12__.localize('peekView.alternateTitle', \"References\"));\r\n }\r\n const promise = this._textModelResolverService.createModelReference(reference.uri);\r\n if (this._tree.getInput() === reference.parent) {\r\n this._tree.reveal(reference);\r\n }\r\n else {\r\n if (revealParent) {\r\n this._tree.reveal(reference.parent);\r\n }\r\n yield this._tree.expand(reference.parent);\r\n this._tree.reveal(reference);\r\n }\r\n const ref = yield promise;\r\n if (!this._model) {\r\n // disposed\r\n ref.dispose();\r\n return;\r\n }\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this._previewModelReference);\r\n // show in editor\r\n const model = ref.object;\r\n if (model) {\r\n const scrollType = this._preview.getModel() === model.textEditorModel ? 0 /* Smooth */ : 1 /* Immediate */;\r\n const sel = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(reference.range).collapseToStart();\r\n this._previewModelReference = ref;\r\n this._preview.setModel(model.textEditorModel);\r\n this._preview.setSelection(sel);\r\n this._preview.revealRangeInCenter(sel, scrollType);\r\n }\r\n else {\r\n this._preview.setModel(this._previewNotAvailableMessage);\r\n ref.dispose();\r\n }\r\n });\r\n }\r\n};\r\nReferenceWidget = __decorate([\r\n __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__.IThemeService),\r\n __param(4, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_10__.ITextModelService),\r\n __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__.IInstantiationService),\r\n __param(6, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.IPeekViewService),\r\n __param(7, _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__.ILabelService),\r\n __param(8, _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_21__.IUndoRedoService),\r\n __param(9, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_22__.IKeybindingService)\r\n], ReferenceWidget);\r\n\r\n// theming\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__.registerThemingParticipant)((theme, collector) => {\r\n const findMatchHighlightColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsMatchHighlight);\r\n if (findMatchHighlightColor) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${findMatchHighlightColor}; }`);\r\n }\r\n const referenceHighlightColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewEditorMatchHighlight);\r\n if (referenceHighlightColor) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`);\r\n }\r\n const referenceHighlightBorder = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewEditorMatchHighlightBorder);\r\n if (referenceHighlightBorder) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${referenceHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const hcOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__.activeContrastBorder);\r\n if (hcOutline) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`);\r\n }\r\n const resultsBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsBackground);\r\n if (resultsBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`);\r\n }\r\n const resultsMatchForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsMatchForeground);\r\n if (resultsMatchForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`);\r\n }\r\n const resultsFileForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsFileForeground);\r\n if (resultsFileForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`);\r\n }\r\n const resultsSelectedBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsSelectionBackground);\r\n if (resultsSelectedBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`);\r\n }\r\n const resultsSelectedForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewResultsSelectionForeground);\r\n if (resultsSelectedForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`);\r\n }\r\n const editorBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewEditorBackground);\r\n if (editorBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,` +\r\n `.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {` +\r\n `\tbackground-color: ${editorBackground};` +\r\n `}`);\r\n }\r\n const editorGutterBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__.peekViewEditorGutterBackground);\r\n if (editorGutterBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {` +\r\n `\tbackground-color: ${editorGutterBackground};` +\r\n `}`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OneReference\": () => (/* binding */ OneReference),\n/* harmony export */ \"FilePreview\": () => (/* binding */ FilePreview),\n/* harmony export */ \"FileReferences\": () => (/* binding */ FileReferences),\n/* harmony export */ \"ReferencesModel\": () => (/* binding */ ReferencesModel)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/idGenerator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass OneReference {\r\n constructor(isProviderFirst, parent, uri, _range, _rangeCallback) {\r\n this.isProviderFirst = isProviderFirst;\r\n this.parent = parent;\r\n this.uri = uri;\r\n this._range = _range;\r\n this._rangeCallback = _rangeCallback;\r\n this.id = _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_5__.defaultGenerator.nextId();\r\n }\r\n get range() {\r\n return this._range;\r\n }\r\n set range(value) {\r\n this._range = value;\r\n this._rangeCallback(this);\r\n }\r\n get ariaMessage() {\r\n var _a;\r\n const preview = (_a = this.parent.getPreview(this)) === null || _a === void 0 ? void 0 : _a.preview(this.range);\r\n if (!preview) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.oneReference', \"symbol in {0} on line {1} at column {2}\", (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.basename)(this.uri), this.range.startLineNumber, this.range.startColumn);\r\n }\r\n else {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)({ key: 'aria.oneReference.preview', comment: ['Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code'] }, \"symbol in {0} on line {1} at column {2}, {3}\", (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.basename)(this.uri), this.range.startLineNumber, this.range.startColumn, preview.value);\r\n }\r\n }\r\n}\r\nclass FilePreview {\r\n constructor(_modelReference) {\r\n this._modelReference = _modelReference;\r\n }\r\n dispose() {\r\n this._modelReference.dispose();\r\n }\r\n preview(range, n = 8) {\r\n const model = this._modelReference.object.textEditorModel;\r\n if (!model) {\r\n return undefined;\r\n }\r\n const { startLineNumber, startColumn, endLineNumber, endColumn } = range;\r\n const word = model.getWordUntilPosition({ lineNumber: startLineNumber, column: startColumn - n });\r\n const beforeRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, word.startColumn, startLineNumber, startColumn);\r\n const afterRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(endLineNumber, endColumn, endLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n const before = model.getValueInRange(beforeRange).replace(/^\\s+/, '');\r\n const inside = model.getValueInRange(range);\r\n const after = model.getValueInRange(afterRange).replace(/\\s+$/, '');\r\n return {\r\n value: before + inside + after,\r\n highlight: { start: before.length, end: before.length + inside.length }\r\n };\r\n }\r\n}\r\nclass FileReferences {\r\n constructor(parent, uri) {\r\n this.parent = parent;\r\n this.uri = uri;\r\n this.children = [];\r\n this._previews = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_7__.ResourceMap();\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)(this._previews.values());\r\n this._previews.clear();\r\n }\r\n getPreview(child) {\r\n return this._previews.get(child.uri);\r\n }\r\n get ariaMessage() {\r\n const len = this.children.length;\r\n if (len === 1) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.fileReferences.1', \"1 symbol in {0}, full path {1}\", (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.basename)(this.uri), this.uri.fsPath);\r\n }\r\n else {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.fileReferences.N', \"{0} symbols in {1}, full path {2}\", len, (0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.basename)(this.uri), this.uri.fsPath);\r\n }\r\n }\r\n resolve(textModelResolverService) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._previews.size !== 0) {\r\n return this;\r\n }\r\n for (let child of this.children) {\r\n if (this._previews.has(child.uri)) {\r\n continue;\r\n }\r\n try {\r\n const ref = yield textModelResolverService.createModelReference(child.uri);\r\n this._previews.set(child.uri, new FilePreview(ref));\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError)(err);\r\n }\r\n }\r\n return this;\r\n });\r\n }\r\n}\r\nclass ReferencesModel {\r\n constructor(links, title) {\r\n this.groups = [];\r\n this.references = [];\r\n this._onDidChangeReferenceRange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event;\r\n this._links = links;\r\n this._title = title;\r\n // grouping and sorting\r\n const [providersFirst] = links;\r\n links.sort(ReferencesModel._compareReferences);\r\n let current;\r\n for (let link of links) {\r\n if (!current || !_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.extUri.isEqual(current.uri, link.uri, true)) {\r\n // new group\r\n current = new FileReferences(this, link.uri);\r\n this.groups.push(current);\r\n }\r\n // append, check for equality first!\r\n if (current.children.length === 0 || ReferencesModel._compareReferences(link, current.children[current.children.length - 1]) !== 0) {\r\n const oneRef = new OneReference(providersFirst === link, current, link.uri, link.targetSelectionRange || link.range, ref => this._onDidChangeReferenceRange.fire(ref));\r\n this.references.push(oneRef);\r\n current.children.push(oneRef);\r\n }\r\n }\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)(this.groups);\r\n this._onDidChangeReferenceRange.dispose();\r\n this.groups.length = 0;\r\n }\r\n clone() {\r\n return new ReferencesModel(this._links, this._title);\r\n }\r\n get title() {\r\n return this._title;\r\n }\r\n get isEmpty() {\r\n return this.groups.length === 0;\r\n }\r\n get ariaMessage() {\r\n if (this.isEmpty) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.result.0', \"No results found\");\r\n }\r\n else if (this.references.length === 1) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.result.1', \"Found 1 symbol in {0}\", this.references[0].uri.fsPath);\r\n }\r\n else if (this.groups.length === 1) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.result.n1', \"Found {0} symbols in {1}\", this.references.length, this.groups[0].uri.fsPath);\r\n }\r\n else {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('aria.result.nm', \"Found {0} symbols in {1} files\", this.references.length, this.groups.length);\r\n }\r\n }\r\n nextOrPreviousReference(reference, next) {\r\n let { parent } = reference;\r\n let idx = parent.children.indexOf(reference);\r\n let childCount = parent.children.length;\r\n let groupCount = parent.parent.groups.length;\r\n if (groupCount === 1 || next && idx + 1 < childCount || !next && idx > 0) {\r\n // cycling within one file\r\n if (next) {\r\n idx = (idx + 1) % childCount;\r\n }\r\n else {\r\n idx = (idx + childCount - 1) % childCount;\r\n }\r\n return parent.children[idx];\r\n }\r\n idx = parent.parent.groups.indexOf(parent);\r\n if (next) {\r\n idx = (idx + 1) % groupCount;\r\n return parent.parent.groups[idx].children[0];\r\n }\r\n else {\r\n idx = (idx + groupCount - 1) % groupCount;\r\n return parent.parent.groups[idx].children[parent.parent.groups[idx].children.length - 1];\r\n }\r\n }\r\n nearestReference(resource, position) {\r\n const nearest = this.references.map((ref, idx) => {\r\n return {\r\n idx,\r\n prefixLen: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__.commonPrefixLength(ref.uri.toString(), resource.toString()),\r\n offsetDist: Math.abs(ref.range.startLineNumber - position.lineNumber) * 100 + Math.abs(ref.range.startColumn - position.column)\r\n };\r\n }).sort((a, b) => {\r\n if (a.prefixLen > b.prefixLen) {\r\n return -1;\r\n }\r\n else if (a.prefixLen < b.prefixLen) {\r\n return 1;\r\n }\r\n else if (a.offsetDist < b.offsetDist) {\r\n return -1;\r\n }\r\n else if (a.offsetDist > b.offsetDist) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n })[0];\r\n if (nearest) {\r\n return this.references[nearest.idx];\r\n }\r\n return undefined;\r\n }\r\n referenceAt(resource, position) {\r\n for (const ref of this.references) {\r\n if (ref.uri.toString() === resource.toString()) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.containsPosition(ref.range, position)) {\r\n return ref;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n firstReference() {\r\n for (const ref of this.references) {\r\n if (ref.isProviderFirst) {\r\n return ref;\r\n }\r\n }\r\n return this.references[0];\r\n }\r\n static _compareReferences(a, b) {\r\n return _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.extUri.compare(a.uri, b.uri) || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts(a.range, b.range);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ctxHasSymbols\": () => (/* binding */ ctxHasSymbols),\n/* harmony export */ \"ISymbolNavigationService\": () => (/* binding */ ISymbolNavigationService)\n/* harmony export */ });\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ctxHasSymbols = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.RawContextKey('hasSymbols', false);\r\nconst ISymbolNavigationService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.createDecorator)('ISymbolNavigationService');\r\nlet SymbolNavigationService = class SymbolNavigationService {\r\n constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {\r\n this._editorService = _editorService;\r\n this._notificationService = _notificationService;\r\n this._keybindingService = _keybindingService;\r\n this._currentModel = undefined;\r\n this._currentIdx = -1;\r\n this._ignoreEditorChange = false;\r\n this._ctxHasSymbols = ctxHasSymbols.bindTo(contextKeyService);\r\n }\r\n reset() {\r\n var _a, _b;\r\n this._ctxHasSymbols.reset();\r\n (_a = this._currentState) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._currentMessage) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._currentModel = undefined;\r\n this._currentIdx = -1;\r\n }\r\n put(anchor) {\r\n const refModel = anchor.parent.parent;\r\n if (refModel.references.length <= 1) {\r\n this.reset();\r\n return;\r\n }\r\n this._currentModel = refModel;\r\n this._currentIdx = refModel.references.indexOf(anchor);\r\n this._ctxHasSymbols.set(true);\r\n this._showMessage();\r\n const editorState = new EditorState(this._editorService);\r\n const listener = editorState.onDidChange(_ => {\r\n if (this._ignoreEditorChange) {\r\n return;\r\n }\r\n const editor = this._editorService.getActiveCodeEditor();\r\n if (!editor) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const position = editor.getPosition();\r\n if (!model || !position) {\r\n return;\r\n }\r\n let seenUri = false;\r\n let seenPosition = false;\r\n for (const reference of refModel.references) {\r\n if ((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_12__.isEqual)(reference.uri, model.uri)) {\r\n seenUri = true;\r\n seenPosition = seenPosition || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.containsPosition(reference.range, position);\r\n }\r\n else if (seenUri) {\r\n break;\r\n }\r\n }\r\n if (!seenUri || !seenPosition) {\r\n this.reset();\r\n }\r\n });\r\n this._currentState = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.combinedDisposable)(editorState, listener);\r\n }\r\n revealNext(source) {\r\n if (!this._currentModel) {\r\n return Promise.resolve();\r\n }\r\n // get next result and advance\r\n this._currentIdx += 1;\r\n this._currentIdx %= this._currentModel.references.length;\r\n const reference = this._currentModel.references[this._currentIdx];\r\n // status\r\n this._showMessage();\r\n // open editor, ignore events while that happens\r\n this._ignoreEditorChange = true;\r\n return this._editorService.openCodeEditor({\r\n resource: reference.uri,\r\n options: {\r\n selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.collapseToStart(reference.range),\r\n selectionRevealType: 3 /* NearTopIfOutsideViewport */\r\n }\r\n }, source).finally(() => {\r\n this._ignoreEditorChange = false;\r\n });\r\n }\r\n _showMessage() {\r\n var _a;\r\n (_a = this._currentMessage) === null || _a === void 0 ? void 0 : _a.dispose();\r\n const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');\r\n const message = kb\r\n ? (0,_nls_js__WEBPACK_IMPORTED_MODULE_9__.localize)('location.kb', \"Symbol {0} of {1}, {2} for next\", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())\r\n : (0,_nls_js__WEBPACK_IMPORTED_MODULE_9__.localize)('location', \"Symbol {0} of {1}\", this._currentIdx + 1, this._currentModel.references.length);\r\n this._currentMessage = this._notificationService.status(message);\r\n }\r\n};\r\nSymbolNavigationService = __decorate([\r\n __param(0, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService),\r\n __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService),\r\n __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__.INotificationService),\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService)\r\n], SymbolNavigationService);\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_2__.registerSingleton)(ISymbolNavigationService, SymbolNavigationService, true);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new class extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorCommand {\r\n constructor() {\r\n super({\r\n id: 'editor.gotoNextSymbolFromResult',\r\n precondition: ctxHasSymbols,\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */,\r\n primary: 70 /* F12 */\r\n }\r\n });\r\n }\r\n runEditorCommand(accessor, editor) {\r\n return accessor.get(ISymbolNavigationService).revealNext(editor);\r\n }\r\n});\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_3__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'editor.gotoNextSymbolFromResult.cancel',\r\n weight: 100 /* EditorContrib */,\r\n when: ctxHasSymbols,\r\n primary: 9 /* Escape */,\r\n handler(accessor) {\r\n accessor.get(ISymbolNavigationService).reset();\r\n }\r\n});\r\n//\r\nlet EditorState = class EditorState {\r\n constructor(editorService) {\r\n this._listener = new Map();\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore();\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._disposables.add(editorService.onCodeEditorRemove(this._onDidRemoveEditor, this));\r\n this._disposables.add(editorService.onCodeEditorAdd(this._onDidAddEditor, this));\r\n editorService.listCodeEditors().forEach(this._onDidAddEditor, this);\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._onDidChange.dispose();\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.dispose)(this._listener.values());\r\n }\r\n _onDidAddEditor(editor) {\r\n this._listener.set(editor, (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.combinedDisposable)(editor.onDidChangeCursorPosition(_ => this._onDidChange.fire({ editor })), editor.onDidChangeModelContent(_ => this._onDidChange.fire({ editor }))));\r\n }\r\n _onDidRemoveEditor(editor) {\r\n var _a;\r\n (_a = this._listener.get(editor)) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._listener.delete(editor);\r\n }\r\n};\r\nEditorState = __decorate([\r\n __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService)\r\n], EditorState);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getHover\": () => (/* binding */ getHover)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nfunction getHover(model, position, token) {\r\n const supports = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.HoverProviderRegistry.ordered(model);\r\n const promises = supports.map(support => {\r\n return Promise.resolve(support.provideHover(model, position, token)).then(hover => {\r\n return hover && isValid(hover) ? hover : undefined;\r\n }, err => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedExternalError)(err);\r\n return undefined;\r\n });\r\n });\r\n return Promise.all(promises).then(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.coalesce);\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerModelAndPositionCommand)('_executeHoverProvider', (model, position) => getHover(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None));\r\nfunction isValid(result) {\r\n const hasRange = (typeof result.range !== 'undefined');\r\n const hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0;\r\n return hasRange && hasHtmlContent;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModesHoverController\": () => (/* binding */ ModesHoverController)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modesContentHover.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js\");\n/* harmony import */ var _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modesGlyphHover.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../gotoSymbol/link/goToDefinitionAtPosition.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet ModesHoverController = class ModesHoverController {\r\n constructor(_editor, _instantiationService, _openerService, _modeService, _themeService, _contextKeyService) {\r\n this._editor = _editor;\r\n this._instantiationService = _instantiationService;\r\n this._openerService = _openerService;\r\n this._modeService = _modeService;\r\n this._themeService = _themeService;\r\n this._toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._isMouseDown = false;\r\n this._hoverClicked = false;\r\n this._contentWidget = null;\r\n this._glyphWidget = null;\r\n this._hookEvents();\r\n this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(48 /* hover */)) {\r\n this._unhookEvents();\r\n this._hookEvents();\r\n }\r\n });\r\n this._hoverVisibleKey = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.hoverVisible.bindTo(_contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ModesHoverController.ID);\r\n }\r\n _hookEvents() {\r\n const hideWidgetsEventHandler = () => this._hideWidgets();\r\n const hoverOpts = this._editor.getOption(48 /* hover */);\r\n this._isHoverEnabled = hoverOpts.enabled;\r\n this._isHoverSticky = hoverOpts.sticky;\r\n if (this._isHoverEnabled) {\r\n this._toUnhook.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n this._toUnhook.add(this._editor.onMouseUp((e) => this._onEditorMouseUp(e)));\r\n this._toUnhook.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e)));\r\n this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e)));\r\n this._toUnhook.add(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\r\n }\r\n else {\r\n this._toUnhook.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e)));\r\n this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e)));\r\n }\r\n this._toUnhook.add(this._editor.onMouseLeave(hideWidgetsEventHandler));\r\n this._toUnhook.add(this._editor.onDidChangeModel(hideWidgetsEventHandler));\r\n this._toUnhook.add(this._editor.onDidScrollChange((e) => this._onEditorScrollChanged(e)));\r\n }\r\n _unhookEvents() {\r\n this._toUnhook.clear();\r\n }\r\n _onModelDecorationsChanged() {\r\n var _a, _b;\r\n (_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.onModelDecorationsChanged();\r\n (_b = this._glyphWidget) === null || _b === void 0 ? void 0 : _b.onModelDecorationsChanged();\r\n }\r\n _onEditorScrollChanged(e) {\r\n if (e.scrollTopChanged || e.scrollLeftChanged) {\r\n this._hideWidgets();\r\n }\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n this._isMouseDown = true;\r\n const targetType = mouseEvent.target.type;\r\n if (targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__.ModesContentHoverWidget.ID) {\r\n this._hoverClicked = true;\r\n // mouse down on top of content hover widget\r\n return;\r\n }\r\n if (targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__.ModesGlyphHoverWidget.ID) {\r\n // mouse down on top of overlay hover widget\r\n return;\r\n }\r\n if (targetType !== 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail !== _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__.ModesGlyphHoverWidget.ID) {\r\n this._hoverClicked = false;\r\n }\r\n this._hideWidgets();\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n this._isMouseDown = false;\r\n }\r\n _onEditorMouseMove(mouseEvent) {\r\n var _a, _b, _c, _d, _e, _f;\r\n let targetType = mouseEvent.target.type;\r\n if (this._isMouseDown && this._hoverClicked) {\r\n return;\r\n }\r\n if (this._isHoverSticky && targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__.ModesContentHoverWidget.ID) {\r\n // mouse moved on top of content hover widget\r\n return;\r\n }\r\n if (this._isHoverSticky && !((_b = (_a = mouseEvent.event.browserEvent.view) === null || _a === void 0 ? void 0 : _a.getSelection()) === null || _b === void 0 ? void 0 : _b.isCollapsed)) {\r\n // selected text within content hover widget\r\n return;\r\n }\r\n if (!this._isHoverSticky && targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__.ModesContentHoverWidget.ID\r\n && ((_c = this._contentWidget) === null || _c === void 0 ? void 0 : _c.isColorPickerVisible())) {\r\n // though the hover is not sticky, the color picker needs to.\r\n return;\r\n }\r\n if (this._isHoverSticky && targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__.ModesGlyphHoverWidget.ID) {\r\n // mouse moved on top of overlay hover widget\r\n return;\r\n }\r\n if (targetType === 7 /* CONTENT_EMPTY */) {\r\n const epsilon = this._editor.getOption(38 /* fontInfo */).typicalHalfwidthCharacterWidth / 2;\r\n const data = mouseEvent.target.detail;\r\n if (data && !data.isAfterLines && typeof data.horizontalDistanceToText === 'number' && data.horizontalDistanceToText < epsilon) {\r\n // Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\r\n targetType = 6 /* CONTENT_TEXT */;\r\n }\r\n }\r\n if (targetType === 6 /* CONTENT_TEXT */) {\r\n (_d = this._glyphWidget) === null || _d === void 0 ? void 0 : _d.hide();\r\n if (this._isHoverEnabled && mouseEvent.target.range) {\r\n // TODO@rebornix. This should be removed if we move Color Picker out of Hover component.\r\n // Check if mouse is hovering on color decorator\r\n const hoverOnColorDecorator = [...((_e = mouseEvent.target.element) === null || _e === void 0 ? void 0 : _e.classList.values()) || []].find(className => className.startsWith('ced-colorBox'))\r\n && mouseEvent.target.range.endColumn - mouseEvent.target.range.startColumn === 1;\r\n const showAtRange = (hoverOnColorDecorator // shift the mouse focus by one as color decorator is a `before` decoration of next character.\r\n ? new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(mouseEvent.target.range.startLineNumber, mouseEvent.target.range.startColumn + 1, mouseEvent.target.range.endLineNumber, mouseEvent.target.range.endColumn + 1)\r\n : mouseEvent.target.range);\r\n if (!this._contentWidget) {\r\n this._contentWidget = new _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__.ModesContentHoverWidget(this._editor, this._hoverVisibleKey, this._instantiationService, this._themeService);\r\n }\r\n this._contentWidget.startShowingAt(showAtRange, 0 /* Delayed */, false);\r\n }\r\n }\r\n else if (targetType === 2 /* GUTTER_GLYPH_MARGIN */) {\r\n (_f = this._contentWidget) === null || _f === void 0 ? void 0 : _f.hide();\r\n if (this._isHoverEnabled && mouseEvent.target.position) {\r\n if (!this._glyphWidget) {\r\n this._glyphWidget = new _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__.ModesGlyphHoverWidget(this._editor, this._modeService, this._openerService);\r\n }\r\n this._glyphWidget.startShowingAt(mouseEvent.target.position.lineNumber);\r\n }\r\n }\r\n else {\r\n this._hideWidgets();\r\n }\r\n }\r\n _onKeyDown(e) {\r\n if (e.keyCode !== 5 /* Ctrl */ && e.keyCode !== 6 /* Alt */ && e.keyCode !== 57 /* Meta */ && e.keyCode !== 4 /* Shift */) {\r\n // Do not hide hover when a modifier key is pressed\r\n this._hideWidgets();\r\n }\r\n }\r\n _hideWidgets() {\r\n var _a, _b, _c;\r\n if ((this._isMouseDown && this._hoverClicked && ((_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.isColorPickerVisible()))) {\r\n return;\r\n }\r\n this._hoverClicked = false;\r\n (_b = this._glyphWidget) === null || _b === void 0 ? void 0 : _b.hide();\r\n (_c = this._contentWidget) === null || _c === void 0 ? void 0 : _c.hide();\r\n }\r\n isColorPickerVisible() {\r\n var _a;\r\n return ((_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.isColorPickerVisible()) || false;\r\n }\r\n showContentHover(range, mode, focus) {\r\n if (!this._contentWidget) {\r\n this._contentWidget = new _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__.ModesContentHoverWidget(this._editor, this._hoverVisibleKey, this._instantiationService, this._themeService);\r\n }\r\n this._contentWidget.startShowingAt(range, mode, focus);\r\n }\r\n dispose() {\r\n var _a, _b;\r\n this._unhookEvents();\r\n this._toUnhook.dispose();\r\n this._didChangeConfigurationHandler.dispose();\r\n (_a = this._glyphWidget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._contentWidget) === null || _b === void 0 ? void 0 : _b.dispose();\r\n }\r\n};\r\nModesHoverController.ID = 'editor.contrib.hover';\r\nModesHoverController = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__.IInstantiationService),\r\n __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__.IOpenerService),\r\n __param(3, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_6__.IModeService),\r\n __param(4, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__.IThemeService),\r\n __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.IContextKeyService)\r\n], ModesHoverController);\r\n\r\nclass ShowHoverAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showHover',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'showHover',\r\n comment: [\r\n 'Label for action that will trigger the showing of a hover in the editor.',\r\n 'This allows for users to show the hover without using the mouse.'\r\n ]\r\n }, \"Show Hover\"),\r\n alias: 'Show Hover',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 39 /* KEY_I */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let controller = ModesHoverController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n const position = editor.getPosition();\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n const focus = editor.getOption(2 /* accessibilitySupport */) === 2 /* Enabled */;\r\n controller.showContentHover(range, 1 /* Immediate */, focus);\r\n }\r\n}\r\nclass ShowDefinitionPreviewHoverAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showDefinitionPreviewHover',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({\r\n key: 'showDefinitionPreviewHover',\r\n comment: [\r\n 'Label for action that will trigger the showing of definition preview hover in the editor.',\r\n 'This allows for users to show the definition preview hover without using the mouse.'\r\n ]\r\n }, \"Show Definition Preview Hover\"),\r\n alias: 'Show Definition Preview Hover',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = ModesHoverController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n const position = editor.getPosition();\r\n if (!position) {\r\n return;\r\n }\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n const goto = _gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_12__.GotoDefinitionAtPositionEditorContribution.get(editor);\r\n const promise = goto.startFindDefinitionFromCursor(position);\r\n if (promise) {\r\n promise.then(() => {\r\n controller.showContentHover(range, 1 /* Immediate */, true);\r\n });\r\n }\r\n else {\r\n controller.showContentHover(range, 1 /* Immediate */, true);\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorContribution)(ModesHoverController.ID, ModesHoverController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(ShowHoverAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(ShowDefinitionPreviewHoverAction);\r\n// theming\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__.registerThemingParticipant)((theme, collector) => {\r\n const editorHoverHighlightColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.editorHoverHighlight);\r\n if (editorHoverHighlightColor) {\r\n collector.addRule(`.monaco-editor .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`);\r\n }\r\n const hoverBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.editorHoverBackground);\r\n if (hoverBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover { background-color: ${hoverBackground}; }`);\r\n }\r\n const hoverBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.editorHoverBorder);\r\n if (hoverBorder) {\r\n collector.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${hoverBorder}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${hoverBorder.transparent(0.5)}; }`);\r\n }\r\n const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .monaco-hover a { color: ${link}; }`);\r\n }\r\n const hoverForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.editorHoverForeground);\r\n if (hoverForeground) {\r\n collector.addRule(`.monaco-editor .monaco-hover { color: ${hoverForeground}; }`);\r\n }\r\n const actionsBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.editorHoverStatusBarBackground);\r\n if (actionsBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${actionsBackground}; }`);\r\n }\r\n const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__.textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HoverOperation\": () => (/* binding */ HoverOperation)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass HoverOperation {\r\n constructor(computer, success, error, progress, hoverTime) {\r\n this._computer = computer;\r\n this._state = 0 /* IDLE */;\r\n this._hoverTime = hoverTime;\r\n this._firstWaitScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._triggerAsyncComputation(), 0);\r\n this._secondWaitScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._triggerSyncComputation(), 0);\r\n this._loadingMessageScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._showLoadingMessage(), 0);\r\n this._asyncComputationPromise = null;\r\n this._asyncComputationPromiseDone = false;\r\n this._completeCallback = success;\r\n this._errorCallback = error;\r\n this._progressCallback = progress;\r\n }\r\n setHoverTime(hoverTime) {\r\n this._hoverTime = hoverTime;\r\n }\r\n _firstWaitTime() {\r\n return this._hoverTime / 2;\r\n }\r\n _secondWaitTime() {\r\n return this._hoverTime / 2;\r\n }\r\n _loadingMessageTime() {\r\n return 3 * this._hoverTime;\r\n }\r\n _triggerAsyncComputation() {\r\n this._state = 2 /* SECOND_WAIT */;\r\n this._secondWaitScheduler.schedule(this._secondWaitTime());\r\n if (this._computer.computeAsync) {\r\n this._asyncComputationPromiseDone = false;\r\n this._asyncComputationPromise = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => this._computer.computeAsync(token));\r\n this._asyncComputationPromise.then((asyncResult) => {\r\n this._asyncComputationPromiseDone = true;\r\n this._withAsyncResult(asyncResult);\r\n }, (e) => this._onError(e));\r\n }\r\n else {\r\n this._asyncComputationPromiseDone = true;\r\n }\r\n }\r\n _triggerSyncComputation() {\r\n if (this._computer.computeSync) {\r\n this._computer.onResult(this._computer.computeSync(), true);\r\n }\r\n if (this._asyncComputationPromiseDone) {\r\n this._state = 0 /* IDLE */;\r\n this._onComplete(this._computer.getResult());\r\n }\r\n else {\r\n this._state = 3 /* WAITING_FOR_ASYNC_COMPUTATION */;\r\n this._onProgress(this._computer.getResult());\r\n }\r\n }\r\n _showLoadingMessage() {\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n this._onProgress(this._computer.getResultWithLoadingMessage());\r\n }\r\n }\r\n _withAsyncResult(asyncResult) {\r\n if (asyncResult) {\r\n this._computer.onResult(asyncResult, false);\r\n }\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n this._state = 0 /* IDLE */;\r\n this._onComplete(this._computer.getResult());\r\n }\r\n }\r\n _onComplete(value) {\r\n this._completeCallback(value);\r\n }\r\n _onError(error) {\r\n if (this._errorCallback) {\r\n this._errorCallback(error);\r\n }\r\n else {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(error);\r\n }\r\n }\r\n _onProgress(value) {\r\n this._progressCallback(value);\r\n }\r\n start(mode) {\r\n if (mode === 0 /* Delayed */) {\r\n if (this._state === 0 /* IDLE */) {\r\n this._state = 1 /* FIRST_WAIT */;\r\n this._firstWaitScheduler.schedule(this._firstWaitTime());\r\n this._loadingMessageScheduler.schedule(this._loadingMessageTime());\r\n }\r\n }\r\n else {\r\n switch (this._state) {\r\n case 0 /* IDLE */:\r\n this._triggerAsyncComputation();\r\n this._secondWaitScheduler.cancel();\r\n this._triggerSyncComputation();\r\n break;\r\n case 2 /* SECOND_WAIT */:\r\n this._secondWaitScheduler.cancel();\r\n this._triggerSyncComputation();\r\n break;\r\n }\r\n }\r\n }\r\n cancel() {\r\n this._loadingMessageScheduler.cancel();\r\n if (this._state === 1 /* FIRST_WAIT */) {\r\n this._firstWaitScheduler.cancel();\r\n }\r\n if (this._state === 2 /* SECOND_WAIT */) {\r\n this._secondWaitScheduler.cancel();\r\n if (this._asyncComputationPromise) {\r\n this._asyncComputationPromise.cancel();\r\n this._asyncComputationPromise = null;\r\n }\r\n }\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n if (this._asyncComputationPromise) {\r\n this._asyncComputationPromise.cancel();\r\n this._asyncComputationPromise = null;\r\n }\r\n }\r\n this._state = 0 /* IDLE */;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"GlyphHoverWidget\": () => (/* binding */ GlyphHoverWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass GlyphHoverWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_0__.Widget {\r\n constructor(id, editor) {\r\n super();\r\n this._id = id;\r\n this._editor = editor;\r\n this._isVisible = false;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'monaco-hover hidden';\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._domNode.setAttribute('role', 'tooltip');\r\n this._showAtLineNumber = -1;\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this.updateFont();\r\n }\r\n }));\r\n this._editor.addOverlayWidget(this);\r\n }\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n set isVisible(value) {\r\n this._isVisible = value;\r\n this._domNode.classList.toggle('hidden', !this._isVisible);\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n showAt(lineNumber) {\r\n this._showAtLineNumber = lineNumber;\r\n if (!this.isVisible) {\r\n this.isVisible = true;\r\n }\r\n const editorLayout = this._editor.getLayoutInfo();\r\n const topForLineNumber = this._editor.getTopForLineNumber(this._showAtLineNumber);\r\n const editorScrollTop = this._editor.getScrollTop();\r\n const lineHeight = this._editor.getOption(53 /* lineHeight */);\r\n const nodeHeight = this._domNode.clientHeight;\r\n const top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\r\n this._domNode.style.left = `${editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth}px`;\r\n this._domNode.style.top = `${Math.max(Math.round(top), 0)}px`;\r\n }\r\n hide() {\r\n if (!this.isVisible) {\r\n return;\r\n }\r\n this.isVisible = false;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n updateFont() {\r\n const codeTags = Array.prototype.slice.call(this._domNode.getElementsByTagName('code'));\r\n const codeClasses = Array.prototype.slice.call(this._domNode.getElementsByClassName('code'));\r\n [...codeTags, ...codeClasses].forEach(node => this._editor.applyFontInfo(node));\r\n }\r\n updateContents(node) {\r\n this._domNode.textContent = '';\r\n this._domNode.appendChild(node);\r\n this.updateFont();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markdownHoverParticipant.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markdownHoverParticipant.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkdownHover\": () => (/* binding */ MarkdownHover),\n/* harmony export */ \"MarkdownHoverParticipant\": () => (/* binding */ MarkdownHoverParticipant)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/markdownRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _getHover_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getHover.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$;\r\nclass MarkdownHover {\r\n constructor(range, contents) {\r\n this.range = range;\r\n this.contents = contents;\r\n }\r\n equals(other) {\r\n if (other instanceof MarkdownHover) {\r\n return (0,_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__.markedStringsEquals)(this.contents, other.contents);\r\n }\r\n return false;\r\n }\r\n}\r\nlet MarkdownHoverParticipant = class MarkdownHoverParticipant {\r\n constructor(_editor, _hover, _modeService, _openerService) {\r\n this._editor = _editor;\r\n this._hover = _hover;\r\n this._modeService = _modeService;\r\n this._openerService = _openerService;\r\n }\r\n createLoadingMessage(range) {\r\n return new MarkdownHover(range, [new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__.MarkdownString().appendText(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('modesContentHover.loading', \"Loading...\"))]);\r\n }\r\n computeSync(hoverRange, lineDecorations) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const lineNumber = hoverRange.startLineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const result = [];\r\n for (const d of lineDecorations) {\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n const hoverMessage = d.options.hoverMessage;\r\n if (!hoverMessage || (0,_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__.isEmptyMarkdownString)(hoverMessage)) {\r\n continue;\r\n }\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(hoverRange.startLineNumber, startColumn, hoverRange.startLineNumber, endColumn);\r\n result.push(new MarkdownHover(range, (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__.asArray)(hoverMessage)));\r\n }\r\n return result;\r\n }\r\n computeAsync(range, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !range) {\r\n return Promise.resolve([]);\r\n }\r\n const model = this._editor.getModel();\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_9__.HoverProviderRegistry.has(model)) {\r\n return Promise.resolve([]);\r\n }\r\n const hovers = yield (0,_getHover_js__WEBPACK_IMPORTED_MODULE_10__.getHover)(model, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__.Position(range.startLineNumber, range.startColumn), token);\r\n const result = [];\r\n for (const hover of hovers) {\r\n if ((0,_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__.isEmptyMarkdownString)(hover.contents)) {\r\n continue;\r\n }\r\n const rng = hover.range ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.lift(hover.range) : range;\r\n result.push(new MarkdownHover(rng, hover.contents));\r\n }\r\n return result;\r\n });\r\n }\r\n renderHoverParts(hoverParts, fragment) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n for (const hoverPart of hoverParts) {\r\n for (const contents of hoverPart.contents) {\r\n if ((0,_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_2__.isEmptyMarkdownString)(contents)) {\r\n continue;\r\n }\r\n const markdownHoverElement = $('div.hover-row.markdown-hover');\r\n const hoverContentsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(markdownHoverElement, $('div.hover-contents'));\r\n const renderer = disposables.add(new _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__.MarkdownRenderer({ editor: this._editor }, this._modeService, this._openerService));\r\n disposables.add(renderer.onDidRenderAsync(() => {\r\n hoverContentsElement.className = 'hover-contents code-hover-contents';\r\n this._hover.onContentsChanged();\r\n }));\r\n const renderedContents = disposables.add(renderer.render(contents));\r\n hoverContentsElement.appendChild(renderedContents.element);\r\n fragment.appendChild(markdownHoverElement);\r\n }\r\n }\r\n return disposables;\r\n }\r\n};\r\nMarkdownHoverParticipant = __decorate([\r\n __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__.IModeService),\r\n __param(3, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_7__.IOpenerService)\r\n], MarkdownHoverParticipant);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markdownHoverParticipant.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markerHoverParticipant.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markerHoverParticipant.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerHover\": () => (/* binding */ MarkerHover),\n/* harmony export */ \"MarkerHoverParticipant\": () => (/* binding */ MarkerHoverParticipant)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/services/markersDecorationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../gotoError/gotoError.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _codeAction_codeAction_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../codeAction/codeAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js\");\n/* harmony import */ var _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../codeAction/codeActionCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js\");\n/* harmony import */ var _codeAction_types_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../codeAction/types.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/hover/hoverWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$;\r\nclass MarkerHover {\r\n constructor(range, marker) {\r\n this.range = range;\r\n this.marker = marker;\r\n }\r\n equals(other) {\r\n if (other instanceof MarkerHover) {\r\n return _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.IMarkerData.makeKey(this.marker) === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.IMarkerData.makeKey(other.marker);\r\n }\r\n return false;\r\n }\r\n}\r\nconst markerCodeActionTrigger = {\r\n type: 2 /* Manual */,\r\n filter: { include: _codeAction_types_js__WEBPACK_IMPORTED_MODULE_15__.CodeActionKind.QuickFix }\r\n};\r\nlet MarkerHoverParticipant = class MarkerHoverParticipant {\r\n constructor(_editor, _hover, _markerDecorationsService, _keybindingService, _openerService) {\r\n this._editor = _editor;\r\n this._hover = _hover;\r\n this._markerDecorationsService = _markerDecorationsService;\r\n this._keybindingService = _keybindingService;\r\n this._openerService = _openerService;\r\n this.recentMarkerCodeActionsInfo = undefined;\r\n }\r\n computeSync(hoverRange, lineDecorations) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const lineNumber = hoverRange.startLineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const result = [];\r\n for (const d of lineDecorations) {\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n const marker = this._markerDecorationsService.getMarker(model.uri, d);\r\n if (!marker) {\r\n continue;\r\n }\r\n const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(hoverRange.startLineNumber, startColumn, hoverRange.startLineNumber, endColumn);\r\n result.push(new MarkerHover(range, marker));\r\n }\r\n return result;\r\n }\r\n renderHoverParts(hoverParts, fragment) {\r\n if (!hoverParts.length) {\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable.None;\r\n }\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n hoverParts.forEach(msg => fragment.appendChild(this.renderMarkerHover(msg, disposables)));\r\n const markerHoverForStatusbar = hoverParts.length === 1 ? hoverParts[0] : hoverParts.sort((a, b) => _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.MarkerSeverity.compare(a.marker.severity, b.marker.severity))[0];\r\n fragment.appendChild(this.renderMarkerStatusbar(markerHoverForStatusbar, disposables));\r\n return disposables;\r\n }\r\n renderMarkerHover(markerHover, disposables) {\r\n const hoverElement = $('div.hover-row');\r\n const markerElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(hoverElement, $('div.marker.hover-contents'));\r\n const { source, message, code, relatedInformation } = markerHover.marker;\r\n this._editor.applyFontInfo(markerElement);\r\n const messageElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(markerElement, $('span'));\r\n messageElement.style.whiteSpace = 'pre-wrap';\r\n messageElement.innerText = message;\r\n if (source || code) {\r\n // Code has link\r\n if (code && typeof code !== 'string') {\r\n const sourceAndCodeElement = $('span');\r\n if (source) {\r\n const sourceElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(sourceAndCodeElement, $('span'));\r\n sourceElement.innerText = source;\r\n }\r\n const codeLink = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(sourceAndCodeElement, $('a.code-link'));\r\n codeLink.setAttribute('href', code.target.toString());\r\n disposables.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(codeLink, 'click', (e) => {\r\n this._openerService.open(code.target);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }));\r\n const codeElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(codeLink, $('span'));\r\n codeElement.innerText = code.value;\r\n const detailsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(markerElement, sourceAndCodeElement);\r\n detailsElement.style.opacity = '0.6';\r\n detailsElement.style.paddingLeft = '6px';\r\n }\r\n else {\r\n const detailsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(markerElement, $('span'));\r\n detailsElement.style.opacity = '0.6';\r\n detailsElement.style.paddingLeft = '6px';\r\n detailsElement.innerText = source && code ? `${source}(${code})` : source ? source : `(${code})`;\r\n }\r\n }\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__.isNonEmptyArray)(relatedInformation)) {\r\n for (const { message, resource, startLineNumber, startColumn } of relatedInformation) {\r\n const relatedInfoContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(markerElement, $('div'));\r\n relatedInfoContainer.style.marginTop = '8px';\r\n const a = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(relatedInfoContainer, $('a'));\r\n a.innerText = `${(0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__.basename)(resource)}(${startLineNumber}, ${startColumn}): `;\r\n a.style.cursor = 'pointer';\r\n disposables.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(a, 'click', (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (this._openerService) {\r\n this._openerService.open(resource, {\r\n fromUserGesture: true,\r\n editorOptions: { selection: { startLineNumber, startColumn } }\r\n }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__.onUnexpectedError);\r\n }\r\n }));\r\n const messageElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(relatedInfoContainer, $('span'));\r\n messageElement.innerText = message;\r\n this._editor.applyFontInfo(messageElement);\r\n }\r\n }\r\n return hoverElement;\r\n }\r\n renderMarkerStatusbar(markerHover, disposables) {\r\n const hoverElement = $('div.hover-row.status-bar');\r\n const actionsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(hoverElement, $('div.actions'));\r\n if (markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.MarkerSeverity.Error || markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.MarkerSeverity.Warning || markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.MarkerSeverity.Info) {\r\n disposables.add(this.renderAction(actionsElement, {\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('view problem', \"View Problem\"),\r\n commandId: _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_10__.NextMarkerAction.ID,\r\n run: () => {\r\n this._hover.hide();\r\n _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_10__.MarkerController.get(this._editor).showAtMarker(markerHover.marker);\r\n this._editor.focus();\r\n }\r\n }));\r\n }\r\n if (!this._editor.getOption(75 /* readOnly */)) {\r\n const quickfixPlaceholderElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(actionsElement, $('div'));\r\n if (this.recentMarkerCodeActionsInfo) {\r\n if (_platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_5__.IMarkerData.makeKey(markerHover.marker)) {\r\n if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\r\n quickfixPlaceholderElement.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('noQuickFixes', \"No quick fixes available\");\r\n }\r\n }\r\n else {\r\n this.recentMarkerCodeActionsInfo = undefined;\r\n }\r\n }\r\n const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable.None : disposables.add((0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_12__.disposableTimeout)(() => quickfixPlaceholderElement.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('checkingForQuickFixes', \"Checking for quick fixes...\"), 200));\r\n if (!quickfixPlaceholderElement.textContent) {\r\n // Have some content in here to avoid flickering\r\n quickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); // \r\n }\r\n const codeActionsPromise = this.getCodeActions(markerHover.marker);\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => codeActionsPromise.cancel()));\r\n codeActionsPromise.then(actions => {\r\n updatePlaceholderDisposable.dispose();\r\n this.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };\r\n if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\r\n actions.dispose();\r\n quickfixPlaceholderElement.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('noQuickFixes', \"No quick fixes available\");\r\n return;\r\n }\r\n quickfixPlaceholderElement.style.display = 'none';\r\n let showing = false;\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => {\r\n if (!showing) {\r\n actions.dispose();\r\n }\r\n }));\r\n disposables.add(this.renderAction(actionsElement, {\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quick fixes', \"Quick Fix...\"),\r\n commandId: _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_14__.QuickFixAction.Id,\r\n run: (target) => {\r\n showing = true;\r\n const controller = _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_14__.QuickFixController.get(this._editor);\r\n const elementPosition = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getDomNodePagePosition(target);\r\n // Hide the hover pre-emptively, otherwise the editor can close the code actions\r\n // context menu as well when using keyboard navigation\r\n this._hover.hide();\r\n controller.showCodeActions(markerCodeActionTrigger, actions, {\r\n x: elementPosition.left + 6,\r\n y: elementPosition.top + elementPosition.height + 6\r\n });\r\n }\r\n }));\r\n });\r\n }\r\n return hoverElement;\r\n }\r\n renderAction(parent, actionOptions) {\r\n const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId);\r\n const keybindingLabel = keybinding ? keybinding.getLabel() : null;\r\n return (0,_base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_17__.renderHoverAction)(parent, actionOptions, keybindingLabel);\r\n }\r\n getCodeActions(marker) {\r\n return (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_12__.createCancelablePromise)(cancellationToken => {\r\n return (0,_codeAction_codeAction_js__WEBPACK_IMPORTED_MODULE_13__.getCodeActions)(this._editor.getModel(), new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn), markerCodeActionTrigger, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_16__.Progress.None, cancellationToken);\r\n });\r\n }\r\n};\r\nMarkerHoverParticipant = __decorate([\r\n __param(2, _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_7__.IMarkerDecorationsService),\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_11__.IKeybindingService),\r\n __param(4, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__.IOpenerService)\r\n], MarkerHoverParticipant);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markerHoverParticipant.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModesContentHoverWidget\": () => (/* binding */ ModesContentHoverWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _colorPicker_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../colorPicker/color.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js\");\n/* harmony import */ var _colorPicker_colorDetector_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../colorPicker/colorDetector.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js\");\n/* harmony import */ var _colorPicker_colorPickerModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../colorPicker/colorPickerModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js\");\n/* harmony import */ var _colorPicker_colorPickerWidget_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../colorPicker/colorPickerWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js\");\n/* harmony import */ var _hoverOperation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./hoverOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/hover/hoverWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js\");\n/* harmony import */ var _markerHoverParticipant_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./markerHoverParticipant.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markerHoverParticipant.js\");\n/* harmony import */ var _markdownHoverParticipant_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./markdownHoverParticipant.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/markdownHoverParticipant.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ColorHover {\r\n constructor(range, color, provider) {\r\n this.range = range;\r\n this.color = color;\r\n this.provider = provider;\r\n }\r\n equals(other) {\r\n return false;\r\n }\r\n}\r\nclass HoverPartInfo {\r\n constructor(owner, data) {\r\n this.owner = owner;\r\n this.data = data;\r\n }\r\n}\r\nclass ModesContentComputer {\r\n constructor(editor, _markerHoverParticipant, _markdownHoverParticipant) {\r\n this._markerHoverParticipant = _markerHoverParticipant;\r\n this._markdownHoverParticipant = _markdownHoverParticipant;\r\n this._editor = editor;\r\n this._result = [];\r\n this._range = null;\r\n }\r\n setRange(range) {\r\n this._range = range;\r\n this._result = [];\r\n }\r\n clearResult() {\r\n this._result = [];\r\n }\r\n computeAsync(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._range) {\r\n return Promise.resolve([]);\r\n }\r\n const markdownHovers = yield this._markdownHoverParticipant.computeAsync(this._range, token);\r\n return markdownHovers.map(h => new HoverPartInfo(this._markdownHoverParticipant, h));\r\n });\r\n }\r\n computeSync() {\r\n if (!this._editor.hasModel() || !this._range) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const hoverRange = this._range;\r\n const lineNumber = hoverRange.startLineNumber;\r\n if (lineNumber > this._editor.getModel().getLineCount()) {\r\n // Illegal line number => no results\r\n return [];\r\n }\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const lineDecorations = this._editor.getLineDecorations(lineNumber).filter((d) => {\r\n if (d.options.isWholeLine) {\r\n return true;\r\n }\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n if (startColumn > hoverRange.startColumn || hoverRange.endColumn > endColumn) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n let result = [];\r\n const colorDetector = _colorPicker_colorDetector_js__WEBPACK_IMPORTED_MODULE_9__.ColorDetector.get(this._editor);\r\n for (const d of lineDecorations) {\r\n const colorData = colorDetector.getColorData(d.range.getStartPosition());\r\n if (colorData) {\r\n const { color, range } = colorData.colorInfo;\r\n result.push(new HoverPartInfo(null, new ColorHover(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(range), color, colorData.provider)));\r\n break;\r\n }\r\n }\r\n const markdownHovers = this._markdownHoverParticipant.computeSync(this._range, lineDecorations);\r\n result = result.concat(markdownHovers.map(h => new HoverPartInfo(this._markdownHoverParticipant, h)));\r\n const markerHovers = this._markerHoverParticipant.computeSync(this._range, lineDecorations);\r\n result = result.concat(markerHovers.map(h => new HoverPartInfo(this._markerHoverParticipant, h)));\r\n return (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_14__.coalesce)(result);\r\n }\r\n onResult(result, isFromSynchronousComputation) {\r\n // Always put synchronous messages before asynchronous ones\r\n if (isFromSynchronousComputation) {\r\n this._result = result.concat(this._result);\r\n }\r\n else {\r\n this._result = this._result.concat(result);\r\n }\r\n }\r\n getResult() {\r\n return this._result.slice(0);\r\n }\r\n getResultWithLoadingMessage() {\r\n if (this._range) {\r\n const loadingMessage = new HoverPartInfo(this._markdownHoverParticipant, this._markdownHoverParticipant.createLoadingMessage(this._range));\r\n return this._result.slice(0).concat([loadingMessage]);\r\n }\r\n return this._result.slice(0);\r\n }\r\n}\r\nclass ModesContentHoverWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_16__.Widget {\r\n constructor(editor, _hoverVisibleKey, instantiationService, _themeService) {\r\n super();\r\n this._hoverVisibleKey = _hoverVisibleKey;\r\n this._themeService = _themeService;\r\n // IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this._markerHoverParticipant = instantiationService.createInstance(_markerHoverParticipant_js__WEBPACK_IMPORTED_MODULE_18__.MarkerHoverParticipant, editor, this);\r\n this._markdownHoverParticipant = instantiationService.createInstance(_markdownHoverParticipant_js__WEBPACK_IMPORTED_MODULE_19__.MarkdownHoverParticipant, editor, this);\r\n this._hover = this._register(new _base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_17__.HoverWidget());\r\n this._id = ModesContentHoverWidget.ID;\r\n this._editor = editor;\r\n this._isVisible = false;\r\n this._stoleFocus = false;\r\n this._renderDisposable = null;\r\n this.onkeydown(this._hover.containerDomNode, (e) => {\r\n if (e.equals(9 /* Escape */)) {\r\n this.hide();\r\n }\r\n });\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateFont();\r\n }\r\n }));\r\n this._editor.onDidLayoutChange(() => this.layout());\r\n this.layout();\r\n this._editor.addContentWidget(this);\r\n this._showAtPosition = null;\r\n this._showAtRange = null;\r\n this._stoleFocus = false;\r\n this._messages = [];\r\n this._lastRange = null;\r\n this._computer = new ModesContentComputer(this._editor, this._markerHoverParticipant, this._markdownHoverParticipant);\r\n this._highlightDecorations = [];\r\n this._isChangingDecorations = false;\r\n this._shouldFocus = false;\r\n this._colorPicker = null;\r\n this._hoverOperation = new _hoverOperation_js__WEBPACK_IMPORTED_MODULE_12__.HoverOperation(this._computer, result => this._withResult(result, true), null, result => this._withResult(result, false), this._editor.getOption(48 /* hover */).delay);\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addStandardDisposableListener(this.getDomNode(), _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.FOCUS, () => {\r\n if (this._colorPicker) {\r\n this.getDomNode().classList.add('colorpicker-hover');\r\n }\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.addStandardDisposableListener(this.getDomNode(), _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.EventType.BLUR, () => {\r\n this.getDomNode().classList.remove('colorpicker-hover');\r\n }));\r\n this._register(editor.onDidChangeConfiguration(() => {\r\n this._hoverOperation.setHoverTime(this._editor.getOption(48 /* hover */).delay);\r\n }));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_7__.TokenizationRegistry.onDidChange(() => {\r\n if (this._isVisible && this._lastRange && this._messages.length > 0) {\r\n this._messages = this._messages.map(msg => {\r\n var _a, _b;\r\n // If a color hover is visible, we need to update the message that\r\n // created it so that the color matches the last chosen color\r\n if (msg.data instanceof ColorHover && !!((_a = this._lastRange) === null || _a === void 0 ? void 0 : _a.intersectRanges(msg.data.range)) && ((_b = this._colorPicker) === null || _b === void 0 ? void 0 : _b.model.color)) {\r\n const color = this._colorPicker.model.color;\r\n const newColor = {\r\n red: color.rgba.r / 255,\r\n green: color.rgba.g / 255,\r\n blue: color.rgba.b / 255,\r\n alpha: color.rgba.a\r\n };\r\n return new HoverPartInfo(msg.owner, new ColorHover(msg.data.range, newColor, msg.data.provider));\r\n }\r\n else {\r\n return msg;\r\n }\r\n });\r\n this._hover.contentsDomNode.textContent = '';\r\n this._renderMessages(this._lastRange, this._messages);\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._hoverOperation.cancel();\r\n this._editor.removeContentWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._hover.containerDomNode;\r\n }\r\n showAt(position, range, focus) {\r\n // Position has changed\r\n this._showAtPosition = position;\r\n this._showAtRange = range;\r\n this._hoverVisibleKey.set(true);\r\n this._isVisible = true;\r\n this._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\r\n this._editor.layoutContentWidget(this);\r\n // Simply force a synchronous render on the editor\r\n // such that the widget does not really render with left = '0px'\r\n this._editor.render();\r\n this._stoleFocus = focus;\r\n if (focus) {\r\n this._hover.containerDomNode.focus();\r\n }\r\n }\r\n getPosition() {\r\n if (this._isVisible) {\r\n return {\r\n position: this._showAtPosition,\r\n range: this._showAtRange,\r\n preference: [\r\n 1 /* ABOVE */,\r\n 2 /* BELOW */\r\n ]\r\n };\r\n }\r\n return null;\r\n }\r\n _updateFont() {\r\n const codeClasses = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\r\n codeClasses.forEach(node => this._editor.applyFontInfo(node));\r\n }\r\n _updateContents(node) {\r\n this._hover.contentsDomNode.textContent = '';\r\n this._hover.contentsDomNode.appendChild(node);\r\n this._updateFont();\r\n this._editor.layoutContentWidget(this);\r\n this._hover.onContentsChanged();\r\n }\r\n layout() {\r\n const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);\r\n const { fontSize, lineHeight } = this._editor.getOption(38 /* fontInfo */);\r\n this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;\r\n this._hover.contentsDomNode.style.lineHeight = `${lineHeight}px`;\r\n this._hover.contentsDomNode.style.maxHeight = `${height}px`;\r\n this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`;\r\n }\r\n onModelDecorationsChanged() {\r\n if (this._isChangingDecorations) {\r\n return;\r\n }\r\n if (this._isVisible) {\r\n // The decorations have changed and the hover is visible,\r\n // we need to recompute the displayed text\r\n this._hoverOperation.cancel();\r\n this._computer.clearResult();\r\n if (!this._colorPicker) { // TODO@Michel ensure that displayed text for other decorations is computed even if color picker is in place\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n }\r\n }\r\n startShowingAt(range, mode, focus) {\r\n if (this._lastRange && this._lastRange.equalsRange(range)) {\r\n // We have to show the widget at the exact same range as before, so no work is needed\r\n return;\r\n }\r\n this._hoverOperation.cancel();\r\n if (this._isVisible) {\r\n // The range might have changed, but the hover is visible\r\n // Instead of hiding it completely, filter out messages that are still in the new range and\r\n // kick off a new computation\r\n if (!this._showAtPosition || this._showAtPosition.lineNumber !== range.startLineNumber) {\r\n this.hide();\r\n }\r\n else {\r\n let filteredMessages = [];\r\n for (let i = 0, len = this._messages.length; i < len; i++) {\r\n const msg = this._messages[i];\r\n const rng = msg.data.range;\r\n if (rng && rng.startColumn <= range.startColumn && rng.endColumn >= range.endColumn) {\r\n filteredMessages.push(msg);\r\n }\r\n }\r\n if (filteredMessages.length > 0) {\r\n if (hoverContentsEquals(filteredMessages, this._messages)) {\r\n return;\r\n }\r\n this._renderMessages(range, filteredMessages);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }\r\n }\r\n this._lastRange = range;\r\n this._computer.setRange(range);\r\n this._shouldFocus = focus;\r\n this._hoverOperation.start(mode);\r\n }\r\n hide() {\r\n this._lastRange = null;\r\n this._hoverOperation.cancel();\r\n if (this._isVisible) {\r\n setTimeout(() => {\r\n // Give commands a chance to see the key\r\n if (!this._isVisible) {\r\n this._hoverVisibleKey.set(false);\r\n }\r\n }, 0);\r\n this._isVisible = false;\r\n this._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\r\n this._editor.layoutContentWidget(this);\r\n if (this._stoleFocus) {\r\n this._editor.focus();\r\n }\r\n }\r\n this._isChangingDecorations = true;\r\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []);\r\n this._isChangingDecorations = false;\r\n if (this._renderDisposable) {\r\n this._renderDisposable.dispose();\r\n this._renderDisposable = null;\r\n }\r\n this._colorPicker = null;\r\n }\r\n isColorPickerVisible() {\r\n return !!this._colorPicker;\r\n }\r\n onContentsChanged() {\r\n this._hover.onContentsChanged();\r\n }\r\n _withResult(result, complete) {\r\n this._messages = result;\r\n if (this._lastRange && this._messages.length > 0) {\r\n this._renderMessages(this._lastRange, this._messages);\r\n }\r\n else if (complete) {\r\n this.hide();\r\n }\r\n }\r\n _renderMessages(renderRange, messages) {\r\n if (this._renderDisposable) {\r\n this._renderDisposable.dispose();\r\n this._renderDisposable = null;\r\n }\r\n this._colorPicker = null;\r\n // update column from which to show\r\n let renderColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let highlightRange = messages[0].data.range ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(messages[0].data.range) : null;\r\n let fragment = document.createDocumentFragment();\r\n let containColorPicker = false;\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n const markerMessages = [];\r\n const markdownParts = [];\r\n messages.forEach((_msg) => {\r\n const msg = _msg.data;\r\n if (!msg.range) {\r\n return;\r\n }\r\n renderColumn = Math.min(renderColumn, msg.range.startColumn);\r\n highlightRange = highlightRange ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.plusRange(highlightRange, msg.range) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.lift(msg.range);\r\n if (msg instanceof ColorHover) {\r\n containColorPicker = true;\r\n const { red, green, blue, alpha } = msg.color;\r\n const rgba = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\r\n const color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color(rgba);\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const editorModel = this._editor.getModel();\r\n let range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(msg.range.startLineNumber, msg.range.startColumn, msg.range.endLineNumber, msg.range.endColumn);\r\n let colorInfo = { range: msg.range, color: msg.color };\r\n // create blank olor picker model and widget first to ensure it's positioned correctly.\r\n const model = new _colorPicker_colorPickerModel_js__WEBPACK_IMPORTED_MODULE_10__.ColorPickerModel(color, [], 0);\r\n const widget = new _colorPicker_colorPickerWidget_js__WEBPACK_IMPORTED_MODULE_11__.ColorPickerWidget(fragment, model, this._editor.getOption(122 /* pixelRatio */), this._themeService);\r\n (0,_colorPicker_color_js__WEBPACK_IMPORTED_MODULE_8__.getColorPresentations)(editorModel, colorInfo, msg.provider, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None).then(colorPresentations => {\r\n model.colorPresentations = colorPresentations || [];\r\n if (!this._editor.hasModel()) {\r\n // gone...\r\n return;\r\n }\r\n const originalText = this._editor.getModel().getValueInRange(msg.range);\r\n model.guessColorPresentation(color, originalText);\r\n const updateEditorModel = () => {\r\n let textEdits;\r\n let newRange;\r\n if (model.presentation.textEdit) {\r\n textEdits = [model.presentation.textEdit];\r\n newRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(model.presentation.textEdit.range.startLineNumber, model.presentation.textEdit.range.startColumn, model.presentation.textEdit.range.endLineNumber, model.presentation.textEdit.range.endColumn);\r\n const trackedRange = this._editor.getModel()._setTrackedRange(null, newRange, 3 /* GrowsOnlyWhenTypingAfter */);\r\n this._editor.pushUndoStop();\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n newRange = this._editor.getModel()._getTrackedRange(trackedRange) || newRange;\r\n }\r\n else {\r\n textEdits = [{ identifier: null, range, text: model.presentation.label, forceMoveMarkers: false }];\r\n newRange = range.setEndPosition(range.endLineNumber, range.startColumn + model.presentation.label.length);\r\n this._editor.pushUndoStop();\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n }\r\n if (model.presentation.additionalTextEdits) {\r\n textEdits = [...model.presentation.additionalTextEdits];\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n this.hide();\r\n }\r\n this._editor.pushUndoStop();\r\n range = newRange;\r\n };\r\n const updateColorPresentations = (color) => {\r\n return (0,_colorPicker_color_js__WEBPACK_IMPORTED_MODULE_8__.getColorPresentations)(editorModel, {\r\n range: range,\r\n color: {\r\n red: color.rgba.r / 255,\r\n green: color.rgba.g / 255,\r\n blue: color.rgba.b / 255,\r\n alpha: color.rgba.a\r\n }\r\n }, msg.provider, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None).then((colorPresentations) => {\r\n model.colorPresentations = colorPresentations || [];\r\n });\r\n };\r\n const colorListener = model.onColorFlushed((color) => {\r\n updateColorPresentations(color).then(updateEditorModel);\r\n });\r\n const colorChangeListener = model.onDidChangeColor(updateColorPresentations);\r\n this._colorPicker = widget;\r\n this.showAt(range.getStartPosition(), range, this._shouldFocus);\r\n this._updateContents(fragment);\r\n this._colorPicker.layout();\r\n this._renderDisposable = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.combinedDisposable)(colorListener, colorChangeListener, widget, disposables);\r\n });\r\n }\r\n else {\r\n if (msg instanceof _markerHoverParticipant_js__WEBPACK_IMPORTED_MODULE_18__.MarkerHover) {\r\n markerMessages.push(msg);\r\n }\r\n else {\r\n if (msg instanceof _markdownHoverParticipant_js__WEBPACK_IMPORTED_MODULE_19__.MarkdownHover) {\r\n markdownParts.push(msg);\r\n }\r\n }\r\n }\r\n });\r\n if (markdownParts.length > 0) {\r\n disposables.add(this._markdownHoverParticipant.renderHoverParts(markdownParts, fragment));\r\n }\r\n if (markerMessages.length) {\r\n disposables.add(this._markerHoverParticipant.renderHoverParts(markerMessages, fragment));\r\n }\r\n this._renderDisposable = disposables;\r\n // show\r\n if (!containColorPicker && fragment.hasChildNodes()) {\r\n this.showAt(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position(renderRange.startLineNumber, renderColumn), highlightRange, this._shouldFocus);\r\n this._updateContents(fragment);\r\n }\r\n this._isChangingDecorations = true;\r\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, highlightRange ? [{\r\n range: highlightRange,\r\n options: ModesContentHoverWidget._DECORATION_OPTIONS\r\n }] : []);\r\n this._isChangingDecorations = false;\r\n }\r\n}\r\nModesContentHoverWidget.ID = 'editor.contrib.modesContentHoverWidget';\r\nModesContentHoverWidget._DECORATION_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_6__.ModelDecorationOptions.register({\r\n className: 'hoverHighlight'\r\n});\r\nfunction hoverContentsEquals(first, second) {\r\n if (first.length !== second.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < first.length; i++) {\r\n if (!first[i].data.equals(second[i].data)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.registerThemingParticipant)((theme, collector) => {\r\n const linkFg = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.textLinkForeground);\r\n if (linkFg) {\r\n collector.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${linkFg}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModesGlyphHoverWidget\": () => (/* binding */ ModesGlyphHoverWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _hoverOperation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hoverOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js\");\n/* harmony import */ var _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hoverWidgets.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js\");\n/* harmony import */ var _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/markdownRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass MarginComputer {\r\n constructor(editor) {\r\n this._editor = editor;\r\n this._lineNumber = -1;\r\n this._result = [];\r\n }\r\n setLineNumber(lineNumber) {\r\n this._lineNumber = lineNumber;\r\n this._result = [];\r\n }\r\n clearResult() {\r\n this._result = [];\r\n }\r\n computeSync() {\r\n const toHoverMessage = (contents) => {\r\n return {\r\n value: contents\r\n };\r\n };\r\n const lineDecorations = this._editor.getLineDecorations(this._lineNumber);\r\n const result = [];\r\n if (!lineDecorations) {\r\n return result;\r\n }\r\n for (const d of lineDecorations) {\r\n if (!d.options.glyphMarginClassName) {\r\n continue;\r\n }\r\n const hoverMessage = d.options.glyphMarginHoverMessage;\r\n if (!hoverMessage || (0,_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_1__.isEmptyMarkdownString)(hoverMessage)) {\r\n continue;\r\n }\r\n result.push(...(0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__.asArray)(hoverMessage).map(toHoverMessage));\r\n }\r\n return result;\r\n }\r\n onResult(result, isFromSynchronousComputation) {\r\n this._result = this._result.concat(result);\r\n }\r\n getResult() {\r\n return this._result;\r\n }\r\n getResultWithLoadingMessage() {\r\n return this.getResult();\r\n }\r\n}\r\nclass ModesGlyphHoverWidget extends _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_4__.GlyphHoverWidget {\r\n constructor(editor, modeService, openerService = _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_6__.NullOpenerService) {\r\n super(ModesGlyphHoverWidget.ID, editor);\r\n this._renderDisposeables = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore());\r\n this._messages = [];\r\n this._lastLineNumber = -1;\r\n this._markdownRenderer = this._register(new _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__.MarkdownRenderer({ editor: this._editor }, modeService, openerService));\r\n this._computer = new MarginComputer(this._editor);\r\n this._hoverOperation = new _hoverOperation_js__WEBPACK_IMPORTED_MODULE_3__.HoverOperation(this._computer, (result) => this._withResult(result), undefined, (result) => this._withResult(result), 300);\r\n }\r\n dispose() {\r\n this._hoverOperation.cancel();\r\n super.dispose();\r\n }\r\n onModelDecorationsChanged() {\r\n if (this.isVisible) {\r\n // The decorations have changed and the hover is visible,\r\n // we need to recompute the displayed text\r\n this._hoverOperation.cancel();\r\n this._computer.clearResult();\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n }\r\n startShowingAt(lineNumber) {\r\n if (this._lastLineNumber === lineNumber) {\r\n // We have to show the widget at the exact same line number as before, so no work is needed\r\n return;\r\n }\r\n this._hoverOperation.cancel();\r\n this.hide();\r\n this._lastLineNumber = lineNumber;\r\n this._computer.setLineNumber(lineNumber);\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n hide() {\r\n this._lastLineNumber = -1;\r\n this._hoverOperation.cancel();\r\n super.hide();\r\n }\r\n _withResult(result) {\r\n this._messages = result;\r\n if (this._messages.length > 0) {\r\n this._renderMessages(this._lastLineNumber, this._messages);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }\r\n _renderMessages(lineNumber, messages) {\r\n this._renderDisposeables.clear();\r\n const fragment = document.createDocumentFragment();\r\n for (const msg of messages) {\r\n const renderedContents = this._markdownRenderer.render(msg.value);\r\n this._renderDisposeables.add(renderedContents);\r\n fragment.appendChild((0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.$)('div.hover-row', undefined, renderedContents.element));\r\n }\r\n this.updateContents(fragment);\r\n this.showAt(lineNumber);\r\n }\r\n}\r\nModesGlyphHoverWidget.ID = 'editor.contrib.modesGlyphHoverWidget';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _inPlaceReplaceCommand_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./inPlaceReplaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet InPlaceReplaceController = class InPlaceReplaceController {\r\n constructor(editor, editorWorkerService) {\r\n this.decorationIds = [];\r\n this.editor = editor;\r\n this.editorWorkerService = editorWorkerService;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(InPlaceReplaceController.ID);\r\n }\r\n dispose() {\r\n }\r\n run(source, up) {\r\n // cancel any pending request\r\n if (this.currentRequest) {\r\n this.currentRequest.cancel();\r\n }\r\n const editorSelection = this.editor.getSelection();\r\n const model = this.editor.getModel();\r\n if (!model || !editorSelection) {\r\n return undefined;\r\n }\r\n let selection = editorSelection;\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n // Can't accept multiline selection\r\n return undefined;\r\n }\r\n const state = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_7__.EditorState(this.editor, 1 /* Value */ | 4 /* Position */);\r\n const modelURI = model.uri;\r\n if (!this.editorWorkerService.canNavigateValueSet(modelURI)) {\r\n return Promise.resolve(undefined);\r\n }\r\n this.currentRequest = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_11__.createCancelablePromise)(token => this.editorWorkerService.navigateValueSet(modelURI, selection, up));\r\n return this.currentRequest.then(result => {\r\n if (!result || !result.range || !result.value) {\r\n // No proper result\r\n return;\r\n }\r\n if (!state.validate(this.editor)) {\r\n // state has changed\r\n return;\r\n }\r\n // Selection\r\n let editRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.lift(result.range);\r\n let highlightRange = result.range;\r\n let diff = result.value.length - (selection.endColumn - selection.startColumn);\r\n // highlight\r\n highlightRange = {\r\n startLineNumber: highlightRange.startLineNumber,\r\n startColumn: highlightRange.startColumn,\r\n endLineNumber: highlightRange.endLineNumber,\r\n endColumn: highlightRange.startColumn + result.value.length\r\n };\r\n if (diff > 1) {\r\n selection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_2__.Selection(selection.startLineNumber, selection.startColumn, selection.endLineNumber, selection.endColumn + diff - 1);\r\n }\r\n // Insert new text\r\n const command = new _inPlaceReplaceCommand_js__WEBPACK_IMPORTED_MODULE_6__.InPlaceReplaceCommand(editRange, selection, result.value);\r\n this.editor.pushUndoStop();\r\n this.editor.executeCommand(source, command);\r\n this.editor.pushUndoStop();\r\n // add decoration\r\n this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [{\r\n range: highlightRange,\r\n options: InPlaceReplaceController.DECORATION\r\n }]);\r\n // remove decoration after delay\r\n if (this.decorationRemover) {\r\n this.decorationRemover.cancel();\r\n }\r\n this.decorationRemover = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_11__.timeout)(350);\r\n this.decorationRemover.then(() => this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [])).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__.onUnexpectedError);\r\n }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__.onUnexpectedError);\r\n }\r\n};\r\nInPlaceReplaceController.ID = 'editor.contrib.inPlaceReplaceController';\r\nInPlaceReplaceController.DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n className: 'valueSetReplacement'\r\n});\r\nInPlaceReplaceController = __decorate([\r\n __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_5__.IEditorWorkerService)\r\n], InPlaceReplaceController);\r\nclass InPlaceReplaceUp extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inPlaceReplace.up',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('InPlaceReplaceAction.previous.label', \"Replace with Previous Value\"),\r\n alias: 'Replace with Previous Value',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 82 /* US_COMMA */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = InPlaceReplaceController.get(editor);\r\n if (!controller) {\r\n return Promise.resolve(undefined);\r\n }\r\n return controller.run(this.id, true);\r\n }\r\n}\r\nclass InPlaceReplaceDown extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inPlaceReplace.down',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('InPlaceReplaceAction.next.label', \"Replace with Next Value\"),\r\n alias: 'Replace with Next Value',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 84 /* US_DOT */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = InPlaceReplaceController.get(editor);\r\n if (!controller) {\r\n return Promise.resolve(undefined);\r\n }\r\n return controller.run(this.id, false);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(InPlaceReplaceController.ID, InPlaceReplaceController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InPlaceReplaceUp);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InPlaceReplaceDown);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__.registerThemingParticipant)((theme, collector) => {\r\n const border = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorBracketMatchBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${border}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InPlaceReplaceCommand\": () => (/* binding */ InPlaceReplaceCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass InPlaceReplaceCommand {\r\n constructor(editRange, originalSelection, text) {\r\n this._editRange = editRange;\r\n this._originalSelection = originalSelection;\r\n this._text = text;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._editRange, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n const inverseEditOperations = helper.getInverseEditOperations();\r\n const srcRange = inverseEditOperations[0].range;\r\n if (!this._originalSelection.isEmpty()) {\r\n // Preserve selection and extends to typed text\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.endLineNumber, srcRange.endColumn - this._text.length, srcRange.endLineNumber, srcRange.endColumn);\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__.Selection(srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn), srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getSpaceCnt\": () => (/* binding */ getSpaceCnt),\n/* harmony export */ \"generateIndent\": () => (/* binding */ generateIndent)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction getSpaceCnt(str, tabSize) {\r\n let spacesCnt = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n if (str.charAt(i) === '\\t') {\r\n spacesCnt += tabSize;\r\n }\r\n else {\r\n spacesCnt++;\r\n }\r\n }\r\n return spacesCnt;\r\n}\r\nfunction generateIndent(spacesCnt, tabSize, insertSpaces) {\r\n spacesCnt = spacesCnt < 0 ? 0 : spacesCnt;\r\n let result = '';\r\n if (!insertSpaces) {\r\n let tabsCnt = Math.floor(spacesCnt / tabSize);\r\n spacesCnt = spacesCnt % tabSize;\r\n for (let i = 0; i < tabsCnt; i++) {\r\n result += '\\t';\r\n }\r\n }\r\n for (let i = 0; i < spacesCnt; i++) {\r\n result += ' ';\r\n }\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getReindentEditOperations\": () => (/* binding */ getReindentEditOperations),\n/* harmony export */ \"IndentationToSpacesAction\": () => (/* binding */ IndentationToSpacesAction),\n/* harmony export */ \"IndentationToTabsAction\": () => (/* binding */ IndentationToTabsAction),\n/* harmony export */ \"ChangeIndentationSizeAction\": () => (/* binding */ ChangeIndentationSizeAction),\n/* harmony export */ \"IndentUsingTabs\": () => (/* binding */ IndentUsingTabs),\n/* harmony export */ \"IndentUsingSpaces\": () => (/* binding */ IndentUsingSpaces),\n/* harmony export */ \"DetectIndentation\": () => (/* binding */ DetectIndentation),\n/* harmony export */ \"ReindentLinesAction\": () => (/* binding */ ReindentLinesAction),\n/* harmony export */ \"ReindentSelectedLinesAction\": () => (/* binding */ ReindentSelectedLinesAction),\n/* harmony export */ \"AutoIndentOnPasteCommand\": () => (/* binding */ AutoIndentOnPasteCommand),\n/* harmony export */ \"AutoIndentOnPaste\": () => (/* binding */ AutoIndentOnPaste),\n/* harmony export */ \"IndentationToSpacesCommand\": () => (/* binding */ IndentationToSpacesCommand),\n/* harmony export */ \"IndentationToTabsCommand\": () => (/* binding */ IndentationToTabsCommand)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/commands/shiftCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./indentUtils.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction getReindentEditOperations(model, startLineNumber, endLineNumber, inheritedIndent) {\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return [];\r\n }\r\n let indentationRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getIndentationRules(model.getLanguageIdentifier().id);\r\n if (!indentationRules) {\r\n return [];\r\n }\r\n endLineNumber = Math.min(endLineNumber, model.getLineCount());\r\n // Skip `unIndentedLinePattern` lines\r\n while (startLineNumber <= endLineNumber) {\r\n if (!indentationRules.unIndentedLinePattern) {\r\n break;\r\n }\r\n let text = model.getLineContent(startLineNumber);\r\n if (!indentationRules.unIndentedLinePattern.test(text)) {\r\n break;\r\n }\r\n startLineNumber++;\r\n }\r\n if (startLineNumber > endLineNumber - 1) {\r\n return [];\r\n }\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n const shiftIndent = (indentation, count) => {\r\n count = count || 1;\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__.ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\r\n };\r\n const unshiftIndent = (indentation, count) => {\r\n count = count || 1;\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__.ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\r\n };\r\n let indentEdits = [];\r\n // indentation being passed to lines below\r\n let globalIndent;\r\n // Calculate indentation for the first line\r\n // If there is no passed-in indentation, we use the indentation of the first line as base.\r\n let currentLineText = model.getLineContent(startLineNumber);\r\n let adjustedLineContent = currentLineText;\r\n if (inheritedIndent !== undefined && inheritedIndent !== null) {\r\n globalIndent = inheritedIndent;\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(currentLineText);\r\n adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length);\r\n if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) {\r\n globalIndent = unshiftIndent(globalIndent);\r\n adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length);\r\n }\r\n if (currentLineText !== adjustedLineContent) {\r\n indentEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__.EditOperation.replaceMove(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(startLineNumber, 1, startLineNumber, oldIndentation.length + 1), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.TextModel.normalizeIndentation(globalIndent, indentSize, insertSpaces)));\r\n }\r\n }\r\n else {\r\n globalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(currentLineText);\r\n }\r\n // idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\r\n let idealIndentForNextLine = globalIndent;\r\n if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n globalIndent = shiftIndent(globalIndent);\r\n }\r\n else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n }\r\n startLineNumber++;\r\n // Calculate indentation adjustment for all following lines\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n let text = model.getLineContent(lineNumber);\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(text);\r\n let adjustedLineContent = idealIndentForNextLine + text.substring(oldIndentation.length);\r\n if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\r\n globalIndent = unshiftIndent(globalIndent);\r\n }\r\n if (oldIndentation !== idealIndentForNextLine) {\r\n indentEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__.EditOperation.replaceMove(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.TextModel.normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\r\n }\r\n // calculate idealIndentForNextLine\r\n if (indentationRules.unIndentedLinePattern && indentationRules.unIndentedLinePattern.test(text)) {\r\n // In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\r\n // but don't change globalIndent and idealIndentForNextLine.\r\n continue;\r\n }\r\n else if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) {\r\n globalIndent = shiftIndent(globalIndent);\r\n idealIndentForNextLine = globalIndent;\r\n }\r\n else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n }\r\n else {\r\n idealIndentForNextLine = globalIndent;\r\n }\r\n }\r\n return indentEdits;\r\n}\r\nclass IndentationToSpacesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: IndentationToSpacesAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('indentationToSpaces', \"Convert Indentation to Spaces\"),\r\n alias: 'Convert Indentation to Spaces',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let modelOpts = model.getOptions();\r\n let selection = editor.getSelection();\r\n if (!selection) {\r\n return;\r\n }\r\n const command = new IndentationToSpacesCommand(selection, modelOpts.tabSize);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n model.updateOptions({\r\n insertSpaces: true\r\n });\r\n }\r\n}\r\nIndentationToSpacesAction.ID = 'editor.action.indentationToSpaces';\r\nclass IndentationToTabsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: IndentationToTabsAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('indentationToTabs', \"Convert Indentation to Tabs\"),\r\n alias: 'Convert Indentation to Tabs',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let modelOpts = model.getOptions();\r\n let selection = editor.getSelection();\r\n if (!selection) {\r\n return;\r\n }\r\n const command = new IndentationToTabsCommand(selection, modelOpts.tabSize);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n model.updateOptions({\r\n insertSpaces: false\r\n });\r\n }\r\n}\r\nIndentationToTabsAction.ID = 'editor.action.indentationToTabs';\r\nclass ChangeIndentationSizeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor(insertSpaces, opts) {\r\n super(opts);\r\n this.insertSpaces = insertSpaces;\r\n }\r\n run(accessor, editor) {\r\n const quickInputService = accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__.IQuickInputService);\r\n const modelService = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__.IModelService);\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget);\r\n const picks = [1, 2, 3, 4, 5, 6, 7, 8].map(n => ({\r\n id: n.toString(),\r\n label: n.toString(),\r\n // add description for tabSize value set in the configuration\r\n description: n === creationOpts.tabSize ? _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('configuredTabSize', \"Configured Tab Size\") : undefined\r\n }));\r\n // auto focus the tabSize set for the current editor\r\n const autoFocusIndex = Math.min(model.getOptions().tabSize - 1, 7);\r\n setTimeout(() => {\r\n quickInputService.pick(picks, { placeHolder: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'selectTabWidth', comment: ['Tab corresponds to the tab key'] }, \"Select Tab Size for Current File\"), activeItem: picks[autoFocusIndex] }).then(pick => {\r\n if (pick) {\r\n if (model && !model.isDisposed()) {\r\n model.updateOptions({\r\n tabSize: parseInt(pick.label, 10),\r\n insertSpaces: this.insertSpaces\r\n });\r\n }\r\n }\r\n });\r\n }, 50 /* quick input is sensitive to being opened so soon after another */);\r\n }\r\n}\r\nclass IndentUsingTabs extends ChangeIndentationSizeAction {\r\n constructor() {\r\n super(false, {\r\n id: IndentUsingTabs.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('indentUsingTabs', \"Indent Using Tabs\"),\r\n alias: 'Indent Using Tabs',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nIndentUsingTabs.ID = 'editor.action.indentUsingTabs';\r\nclass IndentUsingSpaces extends ChangeIndentationSizeAction {\r\n constructor() {\r\n super(true, {\r\n id: IndentUsingSpaces.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('indentUsingSpaces', \"Indent Using Spaces\"),\r\n alias: 'Indent Using Spaces',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nIndentUsingSpaces.ID = 'editor.action.indentUsingSpaces';\r\nclass DetectIndentation extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: DetectIndentation.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('detectIndentation', \"Detect Indentation from Content\"),\r\n alias: 'Detect Indentation from Content',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n const modelService = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__.IModelService);\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget);\r\n model.detectIndentation(creationOpts.insertSpaces, creationOpts.tabSize);\r\n }\r\n}\r\nDetectIndentation.ID = 'editor.action.detectIndentation';\r\nclass ReindentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.reindentlines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.reindentlines', \"Reindent Lines\"),\r\n alias: 'Reindent Lines',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let edits = getReindentEditOperations(model, 1, model.getLineCount());\r\n if (edits.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\nclass ReindentSelectedLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.reindentselectedlines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.reindentselectedlines', \"Reindent Selected Lines\"),\r\n alias: 'Reindent Selected Lines',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let edits = [];\r\n for (let selection of selections) {\r\n let startLineNumber = selection.startLineNumber;\r\n let endLineNumber = selection.endLineNumber;\r\n if (startLineNumber !== endLineNumber && selection.endColumn === 1) {\r\n endLineNumber--;\r\n }\r\n if (startLineNumber === 1) {\r\n if (startLineNumber === endLineNumber) {\r\n continue;\r\n }\r\n }\r\n else {\r\n startLineNumber--;\r\n }\r\n let editOperations = getReindentEditOperations(model, startLineNumber, endLineNumber);\r\n edits.push(...editOperations);\r\n }\r\n if (edits.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\nclass AutoIndentOnPasteCommand {\r\n constructor(edits, initialSelection) {\r\n this._initialSelection = initialSelection;\r\n this._edits = [];\r\n this._selectionId = null;\r\n for (let edit of edits) {\r\n if (edit.range && typeof edit.text === 'string') {\r\n this._edits.push(edit);\r\n }\r\n }\r\n }\r\n getEditOperations(model, builder) {\r\n for (let edit of this._edits) {\r\n builder.addEditOperation(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.lift(edit.range), edit.text);\r\n }\r\n let selectionIsSet = false;\r\n if (Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty()) {\r\n if (this._edits[0].range.startColumn === this._initialSelection.endColumn &&\r\n this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber) {\r\n selectionIsSet = true;\r\n this._selectionId = builder.trackSelection(this._initialSelection, true);\r\n }\r\n else if (this._edits[0].range.endColumn === this._initialSelection.startColumn &&\r\n this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber) {\r\n selectionIsSet = true;\r\n this._selectionId = builder.trackSelection(this._initialSelection, false);\r\n }\r\n }\r\n if (!selectionIsSet) {\r\n this._selectionId = builder.trackSelection(this._initialSelection);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._selectionId);\r\n }\r\n}\r\nclass AutoIndentOnPaste {\r\n constructor(editor) {\r\n this.callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.editor = editor;\r\n this.callOnDispose.add(editor.onDidChangeConfiguration(() => this.update()));\r\n this.callOnDispose.add(editor.onDidChangeModel(() => this.update()));\r\n this.callOnDispose.add(editor.onDidChangeModelLanguage(() => this.update()));\r\n }\r\n update() {\r\n // clean up\r\n this.callOnModel.clear();\r\n // we are disabled\r\n if (this.editor.getOption(8 /* autoIndent */) < 4 /* Full */ || this.editor.getOption(42 /* formatOnPaste */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n this.callOnModel.add(this.editor.onDidPaste(({ range }) => {\r\n this.trigger(range);\r\n }));\r\n }\r\n trigger(range) {\r\n let selections = this.editor.getSelections();\r\n if (selections === null || selections.length > 1) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (!model.isCheapToTokenize(range.getStartPosition().lineNumber)) {\r\n return;\r\n }\r\n const autoIndent = this.editor.getOption(8 /* autoIndent */);\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n let textEdits = [];\r\n let indentConverter = {\r\n shiftIndent: (indentation) => {\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__.ShiftCommand.shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n },\r\n unshiftIndent: (indentation) => {\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__.ShiftCommand.unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n };\r\n let startLineNumber = range.startLineNumber;\r\n while (startLineNumber <= range.endLineNumber) {\r\n if (this.shouldIgnoreLine(model, startLineNumber)) {\r\n startLineNumber++;\r\n continue;\r\n }\r\n break;\r\n }\r\n if (startLineNumber > range.endLineNumber) {\r\n return;\r\n }\r\n let firstLineText = model.getLineContent(startLineNumber);\r\n if (!/\\S/.test(firstLineText.substring(0, range.startColumn - 1))) {\r\n let indentOfFirstLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getGoodIndentForLine(autoIndent, model, model.getLanguageIdentifier().id, startLineNumber, indentConverter);\r\n if (indentOfFirstLine !== null) {\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(firstLineText);\r\n let newSpaceCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.getSpaceCnt(indentOfFirstLine, tabSize);\r\n let oldSpaceCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let newIndent = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n textEdits.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(startLineNumber, 1, startLineNumber, oldIndentation.length + 1),\r\n text: newIndent\r\n });\r\n firstLineText = newIndent + firstLineText.substr(oldIndentation.length);\r\n }\r\n else {\r\n let indentMetadata = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getIndentMetadata(model, startLineNumber);\r\n if (indentMetadata === 0 || indentMetadata === 8 /* UNINDENT_MASK */) {\r\n // we paste content into a line where only contains whitespaces\r\n // after pasting, the indentation of the first line is already correct\r\n // the first line doesn't match any indentation rule\r\n // then no-op.\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n const firstLineNumber = startLineNumber;\r\n // ignore empty or ignored lines\r\n while (startLineNumber < range.endLineNumber) {\r\n if (!/\\S/.test(model.getLineContent(startLineNumber + 1))) {\r\n startLineNumber++;\r\n continue;\r\n }\r\n break;\r\n }\r\n if (startLineNumber !== range.endLineNumber) {\r\n let virtualModel = {\r\n getLineTokens: (lineNumber) => {\r\n return model.getLineTokens(lineNumber);\r\n },\r\n getLanguageIdentifier: () => {\r\n return model.getLanguageIdentifier();\r\n },\r\n getLanguageIdAtPosition: (lineNumber, column) => {\r\n return model.getLanguageIdAtPosition(lineNumber, column);\r\n },\r\n getLineContent: (lineNumber) => {\r\n if (lineNumber === firstLineNumber) {\r\n return firstLineText;\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n }\r\n };\r\n let indentOfSecondLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__.LanguageConfigurationRegistry.getGoodIndentForLine(autoIndent, virtualModel, model.getLanguageIdentifier().id, startLineNumber + 1, indentConverter);\r\n if (indentOfSecondLine !== null) {\r\n let newSpaceCntOfSecondLine = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.getSpaceCnt(indentOfSecondLine, tabSize);\r\n let oldSpaceCntOfSecondLine = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.getSpaceCnt(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(model.getLineContent(startLineNumber + 1)), tabSize);\r\n if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) {\r\n let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine;\r\n for (let i = startLineNumber + 1; i <= range.endLineNumber; i++) {\r\n let lineContent = model.getLineContent(i);\r\n let originalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace(lineContent);\r\n let originalSpacesCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.getSpaceCnt(originalIndent, tabSize);\r\n let newSpacesCnt = originalSpacesCnt + spaceCntOffset;\r\n let newIndent = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__.generateIndent(newSpacesCnt, tabSize, insertSpaces);\r\n if (newIndent !== originalIndent) {\r\n textEdits.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(i, 1, i, originalIndent.length + 1),\r\n text: newIndent\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (textEdits.length > 0) {\r\n this.editor.pushUndoStop();\r\n let cmd = new AutoIndentOnPasteCommand(textEdits, this.editor.getSelection());\r\n this.editor.executeCommand('autoIndentOnPaste', cmd);\r\n this.editor.pushUndoStop();\r\n }\r\n }\r\n shouldIgnoreLine(model, lineNumber) {\r\n model.forceTokenization(lineNumber);\r\n let nonWhitespaceColumn = model.getLineFirstNonWhitespaceColumn(lineNumber);\r\n if (nonWhitespaceColumn === 0) {\r\n return true;\r\n }\r\n let tokens = model.getLineTokens(lineNumber);\r\n if (tokens.getCount() > 0) {\r\n let firstNonWhitespaceTokenIndex = tokens.findTokenIndexAtOffset(nonWhitespaceColumn);\r\n if (firstNonWhitespaceTokenIndex >= 0 && tokens.getStandardTokenType(firstNonWhitespaceTokenIndex) === 1 /* Comment */) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n dispose() {\r\n this.callOnDispose.dispose();\r\n this.callOnModel.dispose();\r\n }\r\n}\r\nAutoIndentOnPaste.ID = 'editor.contrib.autoIndentOnPaste';\r\nfunction getIndentationEditOperations(model, builder, tabSize, tabsToSpaces) {\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return;\r\n }\r\n let spaces = '';\r\n for (let i = 0; i < tabSize; i++) {\r\n spaces += ' ';\r\n }\r\n let spacesRegExp = new RegExp(spaces, 'gi');\r\n for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {\r\n let lastIndentationColumn = model.getLineFirstNonWhitespaceColumn(lineNumber);\r\n if (lastIndentationColumn === 0) {\r\n lastIndentationColumn = model.getLineMaxColumn(lineNumber);\r\n }\r\n if (lastIndentationColumn === 1) {\r\n continue;\r\n }\r\n const originalIndentationRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(lineNumber, 1, lineNumber, lastIndentationColumn);\r\n const originalIndentation = model.getValueInRange(originalIndentationRange);\r\n const newIndentation = (tabsToSpaces\r\n ? originalIndentation.replace(/\\t/ig, spaces)\r\n : originalIndentation.replace(spacesRegExp, '\\t'));\r\n builder.addEditOperation(originalIndentationRange, newIndentation);\r\n }\r\n}\r\nclass IndentationToSpacesCommand {\r\n constructor(selection, tabSize) {\r\n this.selection = selection;\r\n this.tabSize = tabSize;\r\n this.selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n this.selectionId = builder.trackSelection(this.selection);\r\n getIndentationEditOperations(model, builder, this.tabSize, true);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n}\r\nclass IndentationToTabsCommand {\r\n constructor(selection, tabSize) {\r\n this.selection = selection;\r\n this.tabSize = tabSize;\r\n this.selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n this.selectionId = builder.trackSelection(this.selection);\r\n getIndentationEditOperations(model, builder, this.tabSize, false);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorContribution)(AutoIndentOnPaste.ID, AutoIndentOnPaste);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(IndentationToSpacesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(IndentationToTabsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(IndentUsingTabs);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(IndentUsingSpaces);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(DetectIndentation);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(ReindentLinesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(ReindentSelectedLinesAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/inlineHints/inlineHintsController.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/inlineHints/inlineHintsController.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getInlineHints\": () => (/* binding */ getInlineHints),\n/* harmony export */ \"InlineHintsController\": () => (/* binding */ InlineHintsController)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/hash.js */ \"./node_modules/monaco-editor/esm/vs/base/common/hash.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/modes/languageFeatureRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst MAX_DECORATORS = 500;\r\nfunction getInlineHints(model, ranges, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const datas = [];\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintsProviderRegistry.ordered(model).reverse();\r\n const promises = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__.flatten)(providers.map(provider => ranges.map(range => Promise.resolve(provider.provideInlineHints(model, range, token)).then(result => {\r\n if (result) {\r\n datas.push({ list: result, provider });\r\n }\r\n }, err => {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError)(err);\r\n }))));\r\n yield Promise.all(promises);\r\n return datas;\r\n });\r\n}\r\nlet InlineHintsController = class InlineHintsController {\r\n constructor(_editor, _codeEditorService, _themeService) {\r\n this._editor = _editor;\r\n this._codeEditorService = _codeEditorService;\r\n this._themeService = _themeService;\r\n // static get(editor: ICodeEditor): InlineHintsController {\r\n // \treturn editor.getContribution<InlineHintsController>(this.ID);\r\n // }\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._sessionDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._getInlineHintsDelays = new _common_modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_12__.LanguageFeatureRequestDelays(_common_modes_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintsProviderRegistry, 250, 2500);\r\n this._decorationsTypeIds = [];\r\n this._decorationIds = [];\r\n this._disposables.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintsProviderRegistry.onDidChange(() => this._update()));\r\n this._disposables.add(_themeService.onDidColorThemeChange(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeModel(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeModelLanguage(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(120 /* inlineHints */)) {\r\n this._update();\r\n }\r\n }));\r\n this._update();\r\n }\r\n dispose() {\r\n this._sessionDisposables.dispose();\r\n this._removeAllDecorations();\r\n this._disposables.dispose();\r\n }\r\n _update() {\r\n this._sessionDisposables.clear();\r\n if (!this._editor.getOption(120 /* inlineHints */).enabled) {\r\n this._removeAllDecorations();\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model || !_common_modes_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintsProviderRegistry.has(model)) {\r\n this._removeAllDecorations();\r\n return;\r\n }\r\n const scheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => __awaiter(this, void 0, void 0, function* () {\r\n const t1 = Date.now();\r\n const cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__.CancellationTokenSource();\r\n this._sessionDisposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.toDisposable)(() => cts.dispose(true)));\r\n const visibleRanges = this._editor.getVisibleRangesPlusViewportAboveBelow();\r\n const result = yield getInlineHints(model, visibleRanges, cts.token);\r\n // update moving average\r\n const newDelay = this._getInlineHintsDelays.update(model, Date.now() - t1);\r\n scheduler.delay = newDelay;\r\n // render hints\r\n this._updateHintsDecorators(result);\r\n }), this._getInlineHintsDelays.get(model));\r\n this._sessionDisposables.add(scheduler);\r\n // update inline hints when content or scroll position changes\r\n this._sessionDisposables.add(this._editor.onDidChangeModelContent(() => scheduler.schedule()));\r\n this._disposables.add(this._editor.onDidScrollChange(() => scheduler.schedule()));\r\n scheduler.schedule();\r\n // update inline hints when any any provider fires an event\r\n const providerListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._sessionDisposables.add(providerListener);\r\n for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintsProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChangeInlineHints === 'function') {\r\n providerListener.add(provider.onDidChangeInlineHints(() => scheduler.schedule()));\r\n }\r\n }\r\n }\r\n _updateHintsDecorators(hintsData) {\r\n const { fontSize, fontFamily } = this._getLayoutInfo();\r\n const backgroundColor = this._themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__.editorInlineHintBackground);\r\n const fontColor = this._themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__.editorInlineHintForeground);\r\n const newDecorationsTypeIds = [];\r\n const newDecorationsData = [];\r\n for (const { list: hints } of hintsData) {\r\n for (let j = 0; j < hints.length && newDecorationsData.length < MAX_DECORATORS; j++) {\r\n const { text, range, description: hoverMessage, whitespaceBefore, whitespaceAfter } = hints[j];\r\n const marginBefore = whitespaceBefore ? (fontSize / 3) | 0 : 0;\r\n const marginAfter = whitespaceAfter ? (fontSize / 3) | 0 : 0;\r\n const before = {\r\n contentText: text,\r\n backgroundColor: `${backgroundColor}`,\r\n color: `${fontColor}`,\r\n margin: `0px ${marginAfter}px 0px ${marginBefore}px`,\r\n fontSize: `${fontSize}px`,\r\n fontFamily: fontFamily,\r\n padding: `0px ${(fontSize / 4) | 0}px`,\r\n borderRadius: `${(fontSize / 4) | 0}px`,\r\n };\r\n const key = 'inlineHints-' + (0,_base_common_hash_js__WEBPACK_IMPORTED_MODULE_2__.hash)(before).toString(16);\r\n this._codeEditorService.registerDecorationType(key, { before }, undefined, this._editor);\r\n // decoration types are ref-counted which means we only need to\r\n // call register und remove equally often\r\n newDecorationsTypeIds.push(key);\r\n const options = this._codeEditorService.resolveDecorationOptions(key, true);\r\n if (typeof hoverMessage === 'string') {\r\n options.hoverMessage = new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_13__.MarkdownString().appendText(hoverMessage);\r\n }\r\n else if (hoverMessage) {\r\n options.hoverMessage = hoverMessage;\r\n }\r\n newDecorationsData.push({\r\n range,\r\n options\r\n });\r\n }\r\n }\r\n this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, this._codeEditorService);\r\n this._decorationsTypeIds = newDecorationsTypeIds;\r\n this._decorationIds = this._editor.deltaDecorations(this._decorationIds, newDecorationsData);\r\n }\r\n _getLayoutInfo() {\r\n const options = this._editor.getOption(120 /* inlineHints */);\r\n const editorFontSize = this._editor.getOption(40 /* fontSize */);\r\n let fontSize = options.fontSize;\r\n if (!fontSize || fontSize < 5 || fontSize > editorFontSize) {\r\n fontSize = (editorFontSize * .9) | 0;\r\n }\r\n const fontFamily = options.fontFamily;\r\n return { fontSize, fontFamily };\r\n }\r\n _removeAllDecorations() {\r\n this._decorationIds = this._editor.deltaDecorations(this._decorationIds, []);\r\n this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, this._codeEditorService);\r\n this._decorationsTypeIds = [];\r\n }\r\n};\r\nInlineHintsController.ID = 'editor.contrib.InlineHints';\r\nInlineHintsController = __decorate([\r\n __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService),\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.IThemeService)\r\n], InlineHintsController);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(InlineHintsController.ID, InlineHintsController);\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__.CommandsRegistry.registerCommand('_executeInlineHintProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, range] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_16__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__.URI.isUri(uri));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_16__.assertType)(_common_core_range_js__WEBPACK_IMPORTED_MODULE_11__.Range.isIRange(range));\r\n const ref = yield accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_17__.ITextModelService).createModelReference(uri);\r\n try {\r\n const data = yield getInlineHints(ref.object.textEditorModel, [_common_core_range_js__WEBPACK_IMPORTED_MODULE_11__.Range.lift(range)], _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__.CancellationToken.None);\r\n return (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__.flatten)(data.map(item => item.list)).sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_11__.Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/inlineHints/inlineHintsController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CopyLinesCommand\": () => (/* binding */ CopyLinesCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass CopyLinesCommand {\r\n constructor(selection, isCopyingDown, noop) {\r\n this._selection = selection;\r\n this._isCopyingDown = isCopyingDown;\r\n this._noop = noop || false;\r\n this._selectionDirection = 0 /* LTR */;\r\n this._selectionId = null;\r\n this._startLineNumberDelta = 0;\r\n this._endLineNumberDelta = 0;\r\n }\r\n getEditOperations(model, builder) {\r\n let s = this._selection;\r\n this._startLineNumberDelta = 0;\r\n this._endLineNumberDelta = 0;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._endLineNumberDelta = 1;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n let sourceLines = [];\r\n for (let i = s.startLineNumber; i <= s.endLineNumber; i++) {\r\n sourceLines.push(model.getLineContent(i));\r\n }\r\n const sourceText = sourceLines.join('\\n');\r\n if (sourceText === '') {\r\n // Duplicating empty line\r\n if (this._isCopyingDown) {\r\n this._startLineNumberDelta++;\r\n this._endLineNumberDelta++;\r\n }\r\n }\r\n if (this._noop) {\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber + 1, 1), s.endLineNumber === model.getLineCount() ? '' : '\\n');\r\n }\r\n else {\r\n if (!this._isCopyingDown) {\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + sourceText);\r\n }\r\n else {\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(s.startLineNumber, 1, s.startLineNumber, 1), sourceText + '\\n');\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n this._selectionDirection = this._selection.getDirection();\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._startLineNumberDelta !== 0 || this._endLineNumberDelta !== 0) {\r\n let startLineNumber = result.startLineNumber;\r\n let startColumn = result.startColumn;\r\n let endLineNumber = result.endLineNumber;\r\n let endColumn = result.endColumn;\r\n if (this._startLineNumberDelta !== 0) {\r\n startLineNumber = startLineNumber + this._startLineNumberDelta;\r\n startColumn = 1;\r\n }\r\n if (this._endLineNumberDelta !== 0) {\r\n endLineNumber = endLineNumber + this._endLineNumberDelta;\r\n endColumn = 1;\r\n }\r\n result = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__.Selection.createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, this._selectionDirection);\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DuplicateSelectionAction\": () => (/* binding */ DuplicateSelectionAction),\n/* harmony export */ \"AbstractSortLinesAction\": () => (/* binding */ AbstractSortLinesAction),\n/* harmony export */ \"SortLinesAscendingAction\": () => (/* binding */ SortLinesAscendingAction),\n/* harmony export */ \"SortLinesDescendingAction\": () => (/* binding */ SortLinesDescendingAction),\n/* harmony export */ \"TrimTrailingWhitespaceAction\": () => (/* binding */ TrimTrailingWhitespaceAction),\n/* harmony export */ \"DeleteLinesAction\": () => (/* binding */ DeleteLinesAction),\n/* harmony export */ \"IndentLinesAction\": () => (/* binding */ IndentLinesAction),\n/* harmony export */ \"InsertLineBeforeAction\": () => (/* binding */ InsertLineBeforeAction),\n/* harmony export */ \"InsertLineAfterAction\": () => (/* binding */ InsertLineAfterAction),\n/* harmony export */ \"AbstractDeleteAllToBoundaryAction\": () => (/* binding */ AbstractDeleteAllToBoundaryAction),\n/* harmony export */ \"DeleteAllLeftAction\": () => (/* binding */ DeleteAllLeftAction),\n/* harmony export */ \"DeleteAllRightAction\": () => (/* binding */ DeleteAllRightAction),\n/* harmony export */ \"JoinLinesAction\": () => (/* binding */ JoinLinesAction),\n/* harmony export */ \"TransposeAction\": () => (/* binding */ TransposeAction),\n/* harmony export */ \"AbstractCaseAction\": () => (/* binding */ AbstractCaseAction),\n/* harmony export */ \"UpperCaseAction\": () => (/* binding */ UpperCaseAction),\n/* harmony export */ \"LowerCaseAction\": () => (/* binding */ LowerCaseAction),\n/* harmony export */ \"TitleCaseAction\": () => (/* binding */ TitleCaseAction),\n/* harmony export */ \"SnakeCaseAction\": () => (/* binding */ SnakeCaseAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/controller/coreCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _common_commands_trimTrailingWhitespaceCommand_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/commands/trimTrailingWhitespaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js\");\n/* harmony import */ var _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/controller/cursorTypeOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./copyLinesCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js\");\n/* harmony import */ var _moveLinesCommand_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./moveLinesCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js\");\n/* harmony import */ var _sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sortLinesCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// copy lines\r\nclass AbstractCopyLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor(down, opts) {\r\n super(opts);\r\n this.down = down;\r\n }\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections().map((selection, index) => ({ selection, index, ignore: false }));\r\n selections.sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.compareRangesUsingStarts(a.selection, b.selection));\r\n // Remove selections that would result in copying the same line\r\n let prev = selections[0];\r\n for (let i = 1; i < selections.length; i++) {\r\n const curr = selections[i];\r\n if (prev.selection.endLineNumber === curr.selection.startLineNumber) {\r\n // these two selections would copy the same line\r\n if (prev.index < curr.index) {\r\n // prev wins\r\n curr.ignore = true;\r\n }\r\n else {\r\n // curr wins\r\n prev.ignore = true;\r\n prev = curr;\r\n }\r\n }\r\n }\r\n const commands = [];\r\n for (const selection of selections) {\r\n commands.push(new _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__.CopyLinesCommand(selection.selection, this.down, selection.ignore));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass CopyLinesUpAction extends AbstractCopyLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.copyLinesUpAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.copyUp', \"Copy Line Up\"),\r\n alias: 'Copy Line Up',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__.MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miCopyLinesUp', comment: ['&& denotes a mnemonic'] }, \"&&Copy Line Up\"),\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass CopyLinesDownAction extends AbstractCopyLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.copyLinesDownAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.copyDown', \"Copy Line Down\"),\r\n alias: 'Copy Line Down',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__.MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miCopyLinesDown', comment: ['&& denotes a mnemonic'] }, \"Co&&py Line Down\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\nclass DuplicateSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.duplicateSelection',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('duplicateSelection', \"Duplicate Selection\"),\r\n alias: 'Duplicate Selection',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__.MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miDuplicateSelection', comment: ['&& denotes a mnemonic'] }, \"&&Duplicate Selection\"),\r\n order: 5\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const commands = [];\r\n const selections = editor.getSelections();\r\n const model = editor.getModel();\r\n for (const selection of selections) {\r\n if (selection.isEmpty()) {\r\n commands.push(new _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__.CopyLinesCommand(selection, true));\r\n }\r\n else {\r\n const insertSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn);\r\n commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__.ReplaceCommandThatSelectsText(insertSelection, model.getValueInRange(selection)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\n// move lines\r\nclass AbstractMoveLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor(down, opts) {\r\n super(opts);\r\n this.down = down;\r\n }\r\n run(_accessor, editor) {\r\n let commands = [];\r\n let selections = editor.getSelections() || [];\r\n const autoIndent = editor.getOption(8 /* autoIndent */);\r\n for (const selection of selections) {\r\n commands.push(new _moveLinesCommand_js__WEBPACK_IMPORTED_MODULE_13__.MoveLinesCommand(selection, this.down, autoIndent));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass MoveLinesUpAction extends AbstractMoveLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.moveLinesUpAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.moveUp', \"Move Line Up\"),\r\n alias: 'Move Line Up',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 16 /* UpArrow */,\r\n linux: { primary: 512 /* Alt */ | 16 /* UpArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__.MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miMoveLinesUp', comment: ['&& denotes a mnemonic'] }, \"Mo&&ve Line Up\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n}\r\nclass MoveLinesDownAction extends AbstractMoveLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.moveLinesDownAction',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.moveDown', \"Move Line Down\"),\r\n alias: 'Move Line Down',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 18 /* DownArrow */,\r\n linux: { primary: 512 /* Alt */ | 18 /* DownArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__.MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miMoveLinesDown', comment: ['&& denotes a mnemonic'] }, \"Move &&Line Down\"),\r\n order: 4\r\n }\r\n });\r\n }\r\n}\r\nclass AbstractSortLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor(descending, opts) {\r\n super(opts);\r\n this.descending = descending;\r\n }\r\n run(_accessor, editor) {\r\n const selections = editor.getSelections() || [];\r\n for (const selection of selections) {\r\n if (!_sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__.SortLinesCommand.canRun(editor.getModel(), selection, this.descending)) {\r\n return;\r\n }\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new _sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__.SortLinesCommand(selections[i], this.descending);\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass SortLinesAscendingAction extends AbstractSortLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.sortLinesAscending',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.sortAscending', \"Sort Lines Ascending\"),\r\n alias: 'Sort Lines Ascending',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass SortLinesDescendingAction extends AbstractSortLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.sortLinesDescending',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.sortDescending', \"Sort Lines Descending\"),\r\n alias: 'Sort Lines Descending',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass TrimTrailingWhitespaceAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: TrimTrailingWhitespaceAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.trimTrailingWhitespace', \"Trim Trailing Whitespace\"),\r\n alias: 'Trim Trailing Whitespace',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 54 /* KEY_X */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor, args) {\r\n let cursors = [];\r\n if (args.reason === 'auto-save') {\r\n // See https://github.com/editorconfig/editorconfig-vscode/issues/47\r\n // It is very convenient for the editor config extension to invoke this action.\r\n // So, if we get a reason:'auto-save' passed in, let's preserve cursor positions.\r\n cursors = (editor.getSelections() || []).map(s => new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position(s.positionLineNumber, s.positionColumn));\r\n }\r\n let selection = editor.getSelection();\r\n if (selection === null) {\r\n return;\r\n }\r\n let command = new _common_commands_trimTrailingWhitespaceCommand_js__WEBPACK_IMPORTED_MODULE_5__.TrimTrailingWhitespaceCommand(selection, cursors);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nTrimTrailingWhitespaceAction.ID = 'editor.action.trimTrailingWhitespace';\r\nclass DeleteLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.deleteLines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.delete', \"Delete Line\"),\r\n alias: 'Delete Line',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 41 /* KEY_K */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let ops = this._getLinesToRemove(editor);\r\n let model = editor.getModel();\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return;\r\n }\r\n let linesDeleted = 0;\r\n let edits = [];\r\n let cursorState = [];\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n const op = ops[i];\r\n let startLineNumber = op.startLineNumber;\r\n let endLineNumber = op.endLineNumber;\r\n let startColumn = 1;\r\n let endColumn = model.getLineMaxColumn(endLineNumber);\r\n if (endLineNumber < model.getLineCount()) {\r\n endLineNumber += 1;\r\n endColumn = 1;\r\n }\r\n else if (startLineNumber > 1) {\r\n startLineNumber -= 1;\r\n startColumn = model.getLineMaxColumn(startLineNumber);\r\n }\r\n edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(startLineNumber, startColumn, endLineNumber, endColumn), ''));\r\n cursorState.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(startLineNumber - linesDeleted, op.positionColumn, startLineNumber - linesDeleted, op.positionColumn));\r\n linesDeleted += (op.endLineNumber - op.startLineNumber + 1);\r\n }\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, cursorState);\r\n editor.pushUndoStop();\r\n }\r\n _getLinesToRemove(editor) {\r\n // Construct delete operations\r\n let operations = editor.getSelections().map((s) => {\r\n let endLineNumber = s.endLineNumber;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n endLineNumber -= 1;\r\n }\r\n return {\r\n startLineNumber: s.startLineNumber,\r\n selectionStartColumn: s.selectionStartColumn,\r\n endLineNumber: endLineNumber,\r\n positionColumn: s.positionColumn\r\n };\r\n });\r\n // Sort delete operations\r\n operations.sort((a, b) => {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n });\r\n // Merge delete operations which are adjacent or overlapping\r\n let mergedOperations = [];\r\n let previousOperation = operations[0];\r\n for (let i = 1; i < operations.length; i++) {\r\n if (previousOperation.endLineNumber + 1 >= operations[i].startLineNumber) {\r\n // Merge current operations into the previous one\r\n previousOperation.endLineNumber = operations[i].endLineNumber;\r\n }\r\n else {\r\n // Push previous operation\r\n mergedOperations.push(previousOperation);\r\n previousOperation = operations[i];\r\n }\r\n }\r\n // Push the last operation\r\n mergedOperations.push(previousOperation);\r\n return mergedOperations;\r\n }\r\n}\r\nclass IndentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.indentLines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.indent', \"Indent Line\"),\r\n alias: 'Indent Line',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__.TypeOperations.indent(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass OutdentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.outdentLines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.outdent', \"Outdent Line\"),\r\n alias: 'Outdent Line',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_2__.CoreEditingCommands.Outdent.runEditorCommand(_accessor, editor, null);\r\n }\r\n}\r\nclass InsertLineBeforeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertLineBefore',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.insertBefore', \"Insert Line Above\"),\r\n alias: 'Insert Line Above',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__.TypeOperations.lineInsertBefore(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n }\r\n}\r\nclass InsertLineAfterAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertLineAfter',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.insertAfter', \"Insert Line Below\"),\r\n alias: 'Insert Line Below',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__.TypeOperations.lineInsertAfter(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n }\r\n}\r\nclass AbstractDeleteAllToBoundaryAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const primaryCursor = editor.getSelection();\r\n let rangesToDelete = this._getRangesToDelete(editor);\r\n // merge overlapping selections\r\n let effectiveRanges = [];\r\n for (let i = 0, count = rangesToDelete.length - 1; i < count; i++) {\r\n let range = rangesToDelete[i];\r\n let nextRange = rangesToDelete[i + 1];\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.intersectRanges(range, nextRange) === null) {\r\n effectiveRanges.push(range);\r\n }\r\n else {\r\n rangesToDelete[i + 1] = _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.plusRange(range, nextRange);\r\n }\r\n }\r\n effectiveRanges.push(rangesToDelete[rangesToDelete.length - 1]);\r\n let endCursorState = this._getEndCursorState(primaryCursor, effectiveRanges);\r\n let edits = effectiveRanges.map(range => {\r\n return _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(range, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, endCursorState);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {\r\n constructor() {\r\n super({\r\n id: 'deleteAllLeft',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.deleteAllLeft', \"Delete All Left\"),\r\n alias: 'Delete All Left',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _getEndCursorState(primaryCursor, rangesToDelete) {\r\n let endPrimaryCursor = null;\r\n let endCursorState = [];\r\n let deletedLines = 0;\r\n rangesToDelete.forEach(range => {\r\n let endCursor;\r\n if (range.endColumn === 1 && deletedLines > 0) {\r\n let newStartLine = range.startLineNumber - deletedLines;\r\n endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(newStartLine, range.startColumn, newStartLine, range.startColumn);\r\n }\r\n else {\r\n endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\r\n }\r\n deletedLines += range.endLineNumber - range.startLineNumber;\r\n if (range.intersectRanges(primaryCursor)) {\r\n endPrimaryCursor = endCursor;\r\n }\r\n else {\r\n endCursorState.push(endCursor);\r\n }\r\n });\r\n if (endPrimaryCursor) {\r\n endCursorState.unshift(endPrimaryCursor);\r\n }\r\n return endCursorState;\r\n }\r\n _getRangesToDelete(editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return [];\r\n }\r\n let rangesToDelete = selections;\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return [];\r\n }\r\n rangesToDelete.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.compareRangesUsingStarts);\r\n rangesToDelete = rangesToDelete.map(selection => {\r\n if (selection.isEmpty()) {\r\n if (selection.startColumn === 1) {\r\n let deleteFromLine = Math.max(1, selection.startLineNumber - 1);\r\n let deleteFromColumn = selection.startLineNumber === 1 ? 1 : model.getLineContent(deleteFromLine).length + 1;\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(deleteFromLine, deleteFromColumn, selection.startLineNumber, 1);\r\n }\r\n else {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(selection.startLineNumber, 1, selection.startLineNumber, selection.startColumn);\r\n }\r\n }\r\n else {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(selection.startLineNumber, 1, selection.endLineNumber, selection.endColumn);\r\n }\r\n });\r\n return rangesToDelete;\r\n }\r\n}\r\nclass DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {\r\n constructor() {\r\n super({\r\n id: 'deleteAllRight',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.deleteAllRight', \"Delete All Right\"),\r\n alias: 'Delete All Right',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 41 /* KEY_K */, secondary: [2048 /* CtrlCmd */ | 20 /* Delete */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _getEndCursorState(primaryCursor, rangesToDelete) {\r\n let endPrimaryCursor = null;\r\n let endCursorState = [];\r\n for (let i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) {\r\n let range = rangesToDelete[i];\r\n let endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn);\r\n if (range.intersectRanges(primaryCursor)) {\r\n endPrimaryCursor = endCursor;\r\n }\r\n else {\r\n endCursorState.push(endCursor);\r\n }\r\n }\r\n if (endPrimaryCursor) {\r\n endCursorState.unshift(endPrimaryCursor);\r\n }\r\n return endCursorState;\r\n }\r\n _getRangesToDelete(editor) {\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return [];\r\n }\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return [];\r\n }\r\n let rangesToDelete = selections.map((sel) => {\r\n if (sel.isEmpty()) {\r\n const maxColumn = model.getLineMaxColumn(sel.startLineNumber);\r\n if (sel.startColumn === maxColumn) {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber + 1, 1);\r\n }\r\n else {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber, maxColumn);\r\n }\r\n }\r\n return sel;\r\n });\r\n rangesToDelete.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.compareRangesUsingStarts);\r\n return rangesToDelete;\r\n }\r\n}\r\nclass JoinLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.joinLines',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('lines.joinLines', \"Join Lines\"),\r\n alias: 'Join Lines',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 40 /* KEY_J */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let primaryCursor = editor.getSelection();\r\n if (primaryCursor === null) {\r\n return;\r\n }\r\n selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.compareRangesUsingStarts);\r\n let reducedSelections = [];\r\n let lastSelection = selections.reduce((previousValue, currentValue) => {\r\n if (previousValue.isEmpty()) {\r\n if (previousValue.endLineNumber === currentValue.startLineNumber) {\r\n if (primaryCursor.equalsSelection(previousValue)) {\r\n primaryCursor = currentValue;\r\n }\r\n return currentValue;\r\n }\r\n if (currentValue.startLineNumber > previousValue.endLineNumber + 1) {\r\n reducedSelections.push(previousValue);\r\n return currentValue;\r\n }\r\n else {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\r\n }\r\n }\r\n else {\r\n if (currentValue.startLineNumber > previousValue.endLineNumber) {\r\n reducedSelections.push(previousValue);\r\n return currentValue;\r\n }\r\n else {\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\r\n }\r\n }\r\n });\r\n reducedSelections.push(lastSelection);\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n let edits = [];\r\n let endCursorState = [];\r\n let endPrimaryCursor = primaryCursor;\r\n let lineOffset = 0;\r\n for (let i = 0, len = reducedSelections.length; i < len; i++) {\r\n let selection = reducedSelections[i];\r\n let startLineNumber = selection.startLineNumber;\r\n let startColumn = 1;\r\n let columnDeltaOffset = 0;\r\n let endLineNumber, endColumn;\r\n let selectionEndPositionOffset = model.getLineContent(selection.endLineNumber).length - selection.endColumn;\r\n if (selection.isEmpty() || selection.startLineNumber === selection.endLineNumber) {\r\n let position = selection.getStartPosition();\r\n if (position.lineNumber < model.getLineCount()) {\r\n endLineNumber = startLineNumber + 1;\r\n endColumn = model.getLineMaxColumn(endLineNumber);\r\n }\r\n else {\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n }\r\n else {\r\n endLineNumber = selection.endLineNumber;\r\n endColumn = model.getLineMaxColumn(endLineNumber);\r\n }\r\n let trimmedLinesContent = model.getLineContent(startLineNumber);\r\n for (let i = startLineNumber + 1; i <= endLineNumber; i++) {\r\n let lineText = model.getLineContent(i);\r\n let firstNonWhitespaceIdx = model.getLineFirstNonWhitespaceColumn(i);\r\n if (firstNonWhitespaceIdx >= 1) {\r\n let insertSpace = true;\r\n if (trimmedLinesContent === '') {\r\n insertSpace = false;\r\n }\r\n if (insertSpace && (trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === ' ' ||\r\n trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === '\\t')) {\r\n insertSpace = false;\r\n trimmedLinesContent = trimmedLinesContent.replace(/[\\s\\uFEFF\\xA0]+$/g, ' ');\r\n }\r\n let lineTextWithoutIndent = lineText.substr(firstNonWhitespaceIdx - 1);\r\n trimmedLinesContent += (insertSpace ? ' ' : '') + lineTextWithoutIndent;\r\n if (insertSpace) {\r\n columnDeltaOffset = lineTextWithoutIndent.length + 1;\r\n }\r\n else {\r\n columnDeltaOffset = lineTextWithoutIndent.length;\r\n }\r\n }\r\n else {\r\n columnDeltaOffset = 0;\r\n }\r\n }\r\n let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n if (!deleteSelection.isEmpty()) {\r\n let resultSelection;\r\n if (selection.isEmpty()) {\r\n edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(deleteSelection.startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1, startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1);\r\n }\r\n else {\r\n if (selection.startLineNumber === selection.endLineNumber) {\r\n edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.endLineNumber - lineOffset, selection.endColumn);\r\n }\r\n else {\r\n edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.startLineNumber - lineOffset, trimmedLinesContent.length - selectionEndPositionOffset);\r\n }\r\n }\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range.intersectRanges(deleteSelection, primaryCursor) !== null) {\r\n endPrimaryCursor = resultSelection;\r\n }\r\n else {\r\n endCursorState.push(resultSelection);\r\n }\r\n }\r\n lineOffset += deleteSelection.endLineNumber - deleteSelection.startLineNumber;\r\n }\r\n endCursorState.unshift(endPrimaryCursor);\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, endCursorState);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass TransposeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transpose',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.transpose', \"Transpose characters around the cursor\"),\r\n alias: 'Transpose characters around the cursor',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n run(_accessor, editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n if (!selection.isEmpty()) {\r\n continue;\r\n }\r\n let cursor = selection.getStartPosition();\r\n let maxColumn = model.getLineMaxColumn(cursor.lineNumber);\r\n if (cursor.column >= maxColumn) {\r\n if (cursor.lineNumber === model.getLineCount()) {\r\n continue;\r\n }\r\n // The cursor is at the end of current line and current line is not empty\r\n // then we transpose the character before the cursor and the line break if there is any following line.\r\n let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1);\r\n let chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\r\n commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__.ReplaceCommand(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1), chars));\r\n }\r\n else {\r\n let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber, cursor.column + 1);\r\n let chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\r\n commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__.ReplaceCommandThatPreservesSelection(deleteSelection, chars, new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__.Selection(cursor.lineNumber, cursor.column + 1, cursor.lineNumber, cursor.column + 1)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass AbstractCaseAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.EditorAction {\r\n run(_accessor, editor) {\r\n const selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n const wordSeparators = editor.getOption(110 /* wordSeparators */);\r\n const textEdits = [];\r\n for (const selection of selections) {\r\n if (selection.isEmpty()) {\r\n const cursor = selection.getStartPosition();\r\n const word = editor.getConfiguredWordAtPosition(cursor);\r\n if (!word) {\r\n continue;\r\n }\r\n const wordRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__.Range(cursor.lineNumber, word.startColumn, cursor.lineNumber, word.endColumn);\r\n const text = model.getValueInRange(wordRange);\r\n textEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(wordRange, this._modifyText(text, wordSeparators)));\r\n }\r\n else {\r\n const text = model.getValueInRange(selection);\r\n textEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(selection, this._modifyText(text, wordSeparators)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, textEdits);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass UpperCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToUppercase',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.transformToUppercase', \"Transform to Uppercase\"),\r\n alias: 'Transform to Uppercase',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return text.toLocaleUpperCase();\r\n }\r\n}\r\nclass LowerCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToLowercase',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.transformToLowercase', \"Transform to Lowercase\"),\r\n alias: 'Transform to Lowercase',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return text.toLocaleLowerCase();\r\n }\r\n}\r\nclass TitleCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToTitlecase',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.transformToTitlecase', \"Transform to Title Case\"),\r\n alias: 'Transform to Title Case',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n const separators = '\\r\\n\\t ' + wordSeparators;\r\n const excludedChars = separators.split('');\r\n let title = '';\r\n let startUpperCase = true;\r\n for (let i = 0; i < text.length; i++) {\r\n let currentChar = text[i];\r\n if (excludedChars.indexOf(currentChar) >= 0) {\r\n startUpperCase = true;\r\n title += currentChar;\r\n }\r\n else if (startUpperCase) {\r\n startUpperCase = false;\r\n title += currentChar.toLocaleUpperCase();\r\n }\r\n else {\r\n title += currentChar.toLocaleLowerCase();\r\n }\r\n }\r\n return title;\r\n }\r\n}\r\nclass SnakeCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToSnakecase',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editor.transformToSnakecase', \"Transform to Snake Case\"),\r\n alias: 'Transform to Snake Case',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return (text\r\n .replace(/(\\p{Ll})(\\p{Lu})/gmu, '$1_$2')\r\n .replace(/([^\\b_])(\\p{Lu})(\\p{Ll})/gmu, '$1_$2$3')\r\n .toLocaleLowerCase());\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(CopyLinesUpAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(CopyLinesDownAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(DuplicateSelectionAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(MoveLinesUpAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(MoveLinesDownAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(SortLinesAscendingAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(SortLinesDescendingAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(TrimTrailingWhitespaceAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(DeleteLinesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(IndentLinesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(OutdentLinesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(InsertLineBeforeAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(InsertLineAfterAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(DeleteAllLeftAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(DeleteAllRightAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(JoinLinesAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(TransposeAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(UpperCaseAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(LowerCaseAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(TitleCaseAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__.registerEditorAction)(SnakeCaseAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MoveLinesCommand\": () => (/* binding */ MoveLinesCommand)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/commands/shiftCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfiguration.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../indentation/indentUtils.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass MoveLinesCommand {\r\n constructor(selection, isMovingDown, autoIndent) {\r\n this._selection = selection;\r\n this._isMovingDown = isMovingDown;\r\n this._autoIndent = autoIndent;\r\n this._selectionId = null;\r\n this._moveEndLineSelectionShrink = false;\r\n }\r\n getEditOperations(model, builder) {\r\n let modelLineCount = model.getLineCount();\r\n if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) {\r\n this._selectionId = builder.trackSelection(this._selection);\r\n return;\r\n }\r\n if (!this._isMovingDown && this._selection.startLineNumber === 1) {\r\n this._selectionId = builder.trackSelection(this._selection);\r\n return;\r\n }\r\n this._moveEndPositionDown = false;\r\n let s = this._selection;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._moveEndPositionDown = true;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n let indentConverter = this.buildIndentConverter(tabSize, indentSize, insertSpaces);\r\n let virtualModel = {\r\n getLineTokens: (lineNumber) => {\r\n return model.getLineTokens(lineNumber);\r\n },\r\n getLanguageIdentifier: () => {\r\n return model.getLanguageIdentifier();\r\n },\r\n getLanguageIdAtPosition: (lineNumber, column) => {\r\n return model.getLanguageIdAtPosition(lineNumber, column);\r\n },\r\n getLineContent: null,\r\n };\r\n if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) {\r\n // Current line is empty\r\n let lineNumber = s.startLineNumber;\r\n let otherLineNumber = (this._isMovingDown ? lineNumber + 1 : lineNumber - 1);\r\n if (model.getLineMaxColumn(otherLineNumber) === 1) {\r\n // Other line number is empty too, so no editing is needed\r\n // Add a no-op to force running by the model\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(1, 1, 1, 1), null);\r\n }\r\n else {\r\n // Type content from other line number on line number\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineNumber, 1, lineNumber, 1), model.getLineContent(otherLineNumber));\r\n // Remove content from other line number\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(otherLineNumber, 1, otherLineNumber, model.getLineMaxColumn(otherLineNumber)), null);\r\n }\r\n // Track selection at the other line number\r\n s = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection(otherLineNumber, 1, otherLineNumber, 1);\r\n }\r\n else {\r\n let movingLineNumber;\r\n let movingLineText;\r\n if (this._isMovingDown) {\r\n movingLineNumber = s.endLineNumber + 1;\r\n movingLineText = model.getLineContent(movingLineNumber);\r\n // Delete line that needs to be moved\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(movingLineNumber - 1, model.getLineMaxColumn(movingLineNumber - 1), movingLineNumber, model.getLineMaxColumn(movingLineNumber)), null);\r\n let insertingText = movingLineText;\r\n if (this.shouldAutoIndent(model, s)) {\r\n let movingLineMatchResult = this.matchEnterRule(model, indentConverter, tabSize, movingLineNumber, s.startLineNumber - 1);\r\n // if s.startLineNumber - 1 matches onEnter rule, we still honor that.\r\n if (movingLineMatchResult !== null) {\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(model.getLineContent(movingLineNumber));\r\n let newSpaceCnt = movingLineMatchResult + _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(oldIndentation, tabSize);\r\n let newIndentation = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n insertingText = newIndentation + this.trimLeft(movingLineText);\r\n }\r\n else {\r\n // no enter rule matches, let's check indentatin rules then.\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === s.startLineNumber) {\r\n return model.getLineContent(movingLineNumber);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let indentOfMovingLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber, indentConverter);\r\n if (indentOfMovingLine !== null) {\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(model.getLineContent(movingLineNumber));\r\n let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(indentOfMovingLine, tabSize);\r\n let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let newIndentation = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n insertingText = newIndentation + this.trimLeft(movingLineText);\r\n }\r\n }\r\n }\r\n // add edit operations for moving line first to make sure it's executed after we make indentation change\r\n // to s.startLineNumber\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\\n');\r\n let ret = this.matchEnterRuleMovingDown(model, indentConverter, tabSize, s.startLineNumber, movingLineNumber, insertingText);\r\n // check if the line being moved before matches onEnter rules, if so let's adjust the indentation by onEnter rules.\r\n if (ret !== null) {\r\n if (ret !== 0) {\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\r\n }\r\n }\r\n else {\r\n // it doesn't match onEnter rules, let's check indentation rules then.\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === s.startLineNumber) {\r\n return insertingText;\r\n }\r\n else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {\r\n return model.getLineContent(lineNumber - 1);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let newIndentatOfMovingBlock = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber + 1, indentConverter);\r\n if (newIndentatOfMovingBlock !== null) {\r\n const oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\r\n const newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(newIndentatOfMovingBlock, tabSize);\r\n const oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n const spaceCntOffset = newSpaceCnt - oldSpaceCnt;\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // Insert line that needs to be moved before\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\\n');\r\n }\r\n }\r\n else {\r\n movingLineNumber = s.startLineNumber - 1;\r\n movingLineText = model.getLineContent(movingLineNumber);\r\n // Delete line that needs to be moved\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(movingLineNumber, 1, movingLineNumber + 1, 1), null);\r\n // Insert line that needs to be moved after\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + movingLineText);\r\n if (this.shouldAutoIndent(model, s)) {\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === movingLineNumber) {\r\n return model.getLineContent(s.startLineNumber);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2);\r\n // check if s.startLineNumber - 2 matches onEnter rules, if so adjust the moving block by onEnter rules.\r\n if (ret !== null) {\r\n if (ret !== 0) {\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\r\n }\r\n }\r\n else {\r\n // it doesn't match any onEnter rule, let's check indentation rules then.\r\n let indentOfFirstLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter);\r\n if (indentOfFirstLine !== null) {\r\n // adjust the indentation of the moving block\r\n let oldIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\r\n let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(indentOfFirstLine, tabSize);\r\n let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(oldIndent, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let spaceCntOffset = newSpaceCnt - oldSpaceCnt;\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n }\r\n buildIndentConverter(tabSize, indentSize, insertSpaces) {\r\n return {\r\n shiftIndent: (indentation) => {\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__.ShiftCommand.shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n },\r\n unshiftIndent: (indentation) => {\r\n return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__.ShiftCommand.unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n };\r\n }\r\n parseEnterResult(model, indentConverter, tabSize, line, enter) {\r\n if (enter) {\r\n let enterPrefix = enter.indentation;\r\n if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.None) {\r\n enterPrefix = enter.indentation + enter.appendText;\r\n }\r\n else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Indent) {\r\n enterPrefix = enter.indentation + enter.appendText;\r\n }\r\n else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.IndentOutdent) {\r\n enterPrefix = enter.indentation;\r\n }\r\n else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__.IndentAction.Outdent) {\r\n enterPrefix = indentConverter.unshiftIndent(enter.indentation) + enter.appendText;\r\n }\r\n let movingLineText = model.getLineContent(line);\r\n if (this.trimLeft(movingLineText).indexOf(this.trimLeft(enterPrefix)) >= 0) {\r\n let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(model.getLineContent(line));\r\n let newIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(enterPrefix);\r\n let indentMetadataOfMovelingLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getIndentMetadata(model, line);\r\n if (indentMetadataOfMovelingLine !== null && indentMetadataOfMovelingLine & 2 /* DECREASE_MASK */) {\r\n newIndentation = indentConverter.unshiftIndent(newIndentation);\r\n }\r\n let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(newIndentation, tabSize);\r\n let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(oldIndentation, tabSize);\r\n return newSpaceCnt - oldSpaceCnt;\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n *\r\n * @param model\r\n * @param indentConverter\r\n * @param tabSize\r\n * @param line the line moving down\r\n * @param futureAboveLineNumber the line which will be at the `line` position\r\n * @param futureAboveLineText\r\n */\r\n matchEnterRuleMovingDown(model, indentConverter, tabSize, line, futureAboveLineNumber, futureAboveLineText) {\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(futureAboveLineText) >= 0) {\r\n // break\r\n let maxColumn = model.getLineMaxColumn(futureAboveLineNumber);\r\n let enter = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(futureAboveLineNumber, maxColumn, futureAboveLineNumber, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n else {\r\n // go upwards, starting from `line - 1`\r\n let validPrecedingLine = line - 1;\r\n while (validPrecedingLine >= 1) {\r\n let lineContent = model.getLineContent(validPrecedingLine);\r\n let nonWhitespaceIdx = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(lineContent);\r\n if (nonWhitespaceIdx >= 0) {\r\n break;\r\n }\r\n validPrecedingLine--;\r\n }\r\n if (validPrecedingLine < 1 || line > model.getLineCount()) {\r\n return null;\r\n }\r\n let maxColumn = model.getLineMaxColumn(validPrecedingLine);\r\n let enter = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(validPrecedingLine, maxColumn, validPrecedingLine, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n }\r\n matchEnterRule(model, indentConverter, tabSize, line, oneLineAbove, previousLineText) {\r\n let validPrecedingLine = oneLineAbove;\r\n while (validPrecedingLine >= 1) {\r\n // ship empty lines as empty lines just inherit indentation\r\n let lineContent;\r\n if (validPrecedingLine === oneLineAbove && previousLineText !== undefined) {\r\n lineContent = previousLineText;\r\n }\r\n else {\r\n lineContent = model.getLineContent(validPrecedingLine);\r\n }\r\n let nonWhitespaceIdx = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.lastNonWhitespaceIndex(lineContent);\r\n if (nonWhitespaceIdx >= 0) {\r\n break;\r\n }\r\n validPrecedingLine--;\r\n }\r\n if (validPrecedingLine < 1 || line > model.getLineCount()) {\r\n return null;\r\n }\r\n let maxColumn = model.getLineMaxColumn(validPrecedingLine);\r\n let enter = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(validPrecedingLine, maxColumn, validPrecedingLine, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n trimLeft(str) {\r\n return str.replace(/^\\s+/, '');\r\n }\r\n shouldAutoIndent(model, selection) {\r\n if (this._autoIndent < 4 /* Full */) {\r\n return false;\r\n }\r\n // if it's not easy to tokenize, we stop auto indent.\r\n if (!model.isCheapToTokenize(selection.startLineNumber)) {\r\n return false;\r\n }\r\n let languageAtSelectionStart = model.getLanguageIdAtPosition(selection.startLineNumber, 1);\r\n let languageAtSelectionEnd = model.getLanguageIdAtPosition(selection.endLineNumber, 1);\r\n if (languageAtSelectionStart !== languageAtSelectionEnd) {\r\n return false;\r\n }\r\n if (_common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.LanguageConfigurationRegistry.getIndentRulesSupport(languageAtSelectionStart) === null) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, offset) {\r\n for (let i = s.startLineNumber; i <= s.endLineNumber; i++) {\r\n let lineContent = model.getLineContent(i);\r\n let originalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.getLeadingWhitespace(lineContent);\r\n let originalSpacesCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.getSpaceCnt(originalIndent, tabSize);\r\n let newSpacesCnt = originalSpacesCnt + offset;\r\n let newIndent = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__.generateIndent(newSpacesCnt, tabSize, insertSpaces);\r\n if (newIndent !== originalIndent) {\r\n builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(i, 1, i, originalIndent.length + 1), newIndent);\r\n if (i === s.endLineNumber && s.endColumn <= originalIndent.length + 1 && newIndent === '') {\r\n // as users select part of the original indent white spaces\r\n // when we adjust the indentation of endLine, we should adjust the cursor position as well.\r\n this._moveEndLineSelectionShrink = true;\r\n }\r\n }\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._moveEndPositionDown) {\r\n result = result.setEndPosition(result.endLineNumber + 1, 1);\r\n }\r\n if (this._moveEndLineSelectionShrink && result.startLineNumber < result.endLineNumber) {\r\n result = result.setEndPosition(result.endLineNumber, 2);\r\n }\r\n return result;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SortLinesCommand\": () => (/* binding */ SortLinesCommand)\n/* harmony export */ });\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass SortLinesCommand {\r\n constructor(selection, descending) {\r\n this.selection = selection;\r\n this.descending = descending;\r\n this.selectionId = null;\r\n }\r\n static getCollator() {\r\n if (!SortLinesCommand._COLLATOR) {\r\n SortLinesCommand._COLLATOR = new Intl.Collator();\r\n }\r\n return SortLinesCommand._COLLATOR;\r\n }\r\n getEditOperations(model, builder) {\r\n let op = sortLines(model, this.selection, this.descending);\r\n if (op) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n this.selectionId = builder.trackSelection(this.selection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n static canRun(model, selection, descending) {\r\n if (model === null) {\r\n return false;\r\n }\r\n let data = getSortData(model, selection, descending);\r\n if (!data) {\r\n return false;\r\n }\r\n for (let i = 0, len = data.before.length; i < len; i++) {\r\n if (data.before[i] !== data.after[i]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nSortLinesCommand._COLLATOR = null;\r\nfunction getSortData(model, selection, descending) {\r\n let startLineNumber = selection.startLineNumber;\r\n let endLineNumber = selection.endLineNumber;\r\n if (selection.endColumn === 1) {\r\n endLineNumber--;\r\n }\r\n // Nothing to sort if user didn't select anything.\r\n if (startLineNumber >= endLineNumber) {\r\n return null;\r\n }\r\n let linesToSort = [];\r\n // Get the contents of the selection to be sorted.\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n linesToSort.push(model.getLineContent(lineNumber));\r\n }\r\n let sorted = linesToSort.slice(0);\r\n sorted.sort(SortLinesCommand.getCollator().compare);\r\n // If descending, reverse the order.\r\n if (descending === true) {\r\n sorted = sorted.reverse();\r\n }\r\n return {\r\n startLineNumber: startLineNumber,\r\n endLineNumber: endLineNumber,\r\n before: linesToSort,\r\n after: sorted\r\n };\r\n}\r\n/**\r\n * Generate commands for sorting lines on a model.\r\n */\r\nfunction sortLines(model, selection, descending) {\r\n let data = getSortData(model, selection, descending);\r\n if (!data) {\r\n return null;\r\n }\r\n return _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__.EditOperation.replace(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(data.startLineNumber, 1, data.endLineNumber, model.getLineMaxColumn(data.endLineNumber)), data.after.join('\\n'));\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/linkedEditing.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/linkedEditing.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE\": () => (/* binding */ CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE),\n/* harmony export */ \"LinkedEditingContribution\": () => (/* binding */ LinkedEditingContribution),\n/* harmony export */ \"LinkedEditingAction\": () => (/* binding */ LinkedEditingAction),\n/* harmony export */ \"editorLinkedEditingBackground\": () => (/* binding */ editorLinkedEditingBackground)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.RawContextKey('LinkedEditingInputVisible', false);\r\nconst DECORATION_CLASS_NAME = 'linked-editing-decoration';\r\nlet LinkedEditingContribution = class LinkedEditingContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this._debounceDuration = 200;\r\n this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore());\r\n this._editor = editor;\r\n this._enabled = false;\r\n this._visibleContextKey = CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\r\n this._currentDecorations = [];\r\n this._languageWordPattern = null;\r\n this._currentWordPattern = null;\r\n this._ignoreChangeEvent = false;\r\n this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore());\r\n this._rangeUpdateTriggerPromise = null;\r\n this._rangeSyncTriggerPromise = null;\r\n this._currentRequest = null;\r\n this._currentRequestPosition = null;\r\n this._currentRequestModelVersion = null;\r\n this._register(this._editor.onDidChangeModel(() => this.reinitialize()));\r\n this._register(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(56 /* linkedEditing */) || e.hasChanged(76 /* renameOnType */)) {\r\n this.reinitialize();\r\n }\r\n }));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_7__.LinkedEditingRangeProviderRegistry.onDidChange(() => this.reinitialize()));\r\n this._register(this._editor.onDidChangeModelLanguage(() => this.reinitialize()));\r\n this.reinitialize();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(LinkedEditingContribution.ID);\r\n }\r\n reinitialize() {\r\n const model = this._editor.getModel();\r\n const isEnabled = model !== null && (this._editor.getOption(56 /* linkedEditing */) || this._editor.getOption(76 /* renameOnType */)) && _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.LinkedEditingRangeProviderRegistry.has(model);\r\n if (isEnabled === this._enabled) {\r\n return;\r\n }\r\n this._enabled = isEnabled;\r\n this.clearRanges();\r\n this._localToDispose.clear();\r\n if (!isEnabled || model === null) {\r\n return;\r\n }\r\n this._languageWordPattern = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_19__.LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n this._localToDispose.add(model.onDidChangeLanguageConfiguration(() => {\r\n this._languageWordPattern = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_19__.LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n }));\r\n const rangeUpdateScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_8__.Delayer(this._debounceDuration);\r\n const triggerRangeUpdate = () => {\r\n this._rangeUpdateTriggerPromise = rangeUpdateScheduler.trigger(() => this.updateRanges(), this._debounceDuration);\r\n };\r\n const rangeSyncScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_8__.Delayer(0);\r\n const triggerRangeSync = (decorations) => {\r\n this._rangeSyncTriggerPromise = rangeSyncScheduler.trigger(() => this._syncRanges(decorations));\r\n };\r\n this._localToDispose.add(this._editor.onDidChangeCursorPosition(() => {\r\n triggerRangeUpdate();\r\n }));\r\n this._localToDispose.add(this._editor.onDidChangeModelContent((e) => {\r\n if (!this._ignoreChangeEvent) {\r\n if (this._currentDecorations.length > 0) {\r\n const referenceRange = model.getDecorationRange(this._currentDecorations[0]);\r\n if (referenceRange && e.changes.every(c => referenceRange.intersectRanges(c.range))) {\r\n triggerRangeSync(this._currentDecorations);\r\n return;\r\n }\r\n }\r\n }\r\n triggerRangeUpdate();\r\n }));\r\n this._localToDispose.add({\r\n dispose: () => {\r\n rangeUpdateScheduler.cancel();\r\n rangeSyncScheduler.cancel();\r\n }\r\n });\r\n this.updateRanges();\r\n }\r\n _syncRanges(decorations) {\r\n // dalayed invocation, make sure we're still on\r\n if (!this._editor.hasModel() || decorations !== this._currentDecorations || decorations.length === 0) {\r\n // nothing to do\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const referenceRange = model.getDecorationRange(decorations[0]);\r\n if (!referenceRange || referenceRange.startLineNumber !== referenceRange.endLineNumber) {\r\n return this.clearRanges();\r\n }\r\n const referenceValue = model.getValueInRange(referenceRange);\r\n if (this._currentWordPattern) {\r\n const match = referenceValue.match(this._currentWordPattern);\r\n const matchLength = match ? match[0].length : 0;\r\n if (matchLength !== referenceValue.length) {\r\n return this.clearRanges();\r\n }\r\n }\r\n let edits = [];\r\n for (let i = 1, len = decorations.length; i < len; i++) {\r\n const mirrorRange = model.getDecorationRange(decorations[i]);\r\n if (!mirrorRange) {\r\n continue;\r\n }\r\n if (mirrorRange.startLineNumber !== mirrorRange.endLineNumber) {\r\n edits.push({\r\n range: mirrorRange,\r\n text: referenceValue\r\n });\r\n }\r\n else {\r\n let oldValue = model.getValueInRange(mirrorRange);\r\n let newValue = referenceValue;\r\n let rangeStartColumn = mirrorRange.startColumn;\r\n let rangeEndColumn = mirrorRange.endColumn;\r\n const commonPrefixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_15__.commonPrefixLength(oldValue, newValue);\r\n rangeStartColumn += commonPrefixLength;\r\n oldValue = oldValue.substr(commonPrefixLength);\r\n newValue = newValue.substr(commonPrefixLength);\r\n const commonSuffixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_15__.commonSuffixLength(oldValue, newValue);\r\n rangeEndColumn -= commonSuffixLength;\r\n oldValue = oldValue.substr(0, oldValue.length - commonSuffixLength);\r\n newValue = newValue.substr(0, newValue.length - commonSuffixLength);\r\n if (rangeStartColumn !== rangeEndColumn || newValue.length !== 0) {\r\n edits.push({\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range(mirrorRange.startLineNumber, rangeStartColumn, mirrorRange.endLineNumber, rangeEndColumn),\r\n text: newValue\r\n });\r\n }\r\n }\r\n }\r\n if (edits.length === 0) {\r\n return;\r\n }\r\n try {\r\n this._editor.popUndoStop();\r\n this._ignoreChangeEvent = true;\r\n const prevEditOperationType = this._editor._getViewModel().getPrevEditOperationType();\r\n this._editor.executeEdits('linkedEditing', edits);\r\n this._editor._getViewModel().setPrevEditOperationType(prevEditOperationType);\r\n }\r\n finally {\r\n this._ignoreChangeEvent = false;\r\n }\r\n }\r\n dispose() {\r\n this.clearRanges();\r\n super.dispose();\r\n }\r\n clearRanges() {\r\n this._visibleContextKey.set(false);\r\n this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, []);\r\n if (this._currentRequest) {\r\n this._currentRequest.cancel();\r\n this._currentRequest = null;\r\n this._currentRequestPosition = null;\r\n }\r\n }\r\n updateRanges(force = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel()) {\r\n this.clearRanges();\r\n return;\r\n }\r\n const position = this._editor.getPosition();\r\n if (!this._enabled && !force || this._editor.getSelections().length > 1) {\r\n // disabled or multicursor\r\n this.clearRanges();\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const modelVersionId = model.getVersionId();\r\n if (this._currentRequestPosition && this._currentRequestModelVersion === modelVersionId) {\r\n if (position.equals(this._currentRequestPosition)) {\r\n return; // same position\r\n }\r\n if (this._currentDecorations && this._currentDecorations.length > 0) {\r\n const range = model.getDecorationRange(this._currentDecorations[0]);\r\n if (range && range.containsPosition(position)) {\r\n return; // just moving inside the existing primary range\r\n }\r\n }\r\n }\r\n this._currentRequestPosition = position;\r\n this._currentRequestModelVersion = modelVersionId;\r\n const request = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_8__.createCancelablePromise)((token) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n const response = yield getLinkedEditingRanges(model, position, token);\r\n if (request !== this._currentRequest) {\r\n return;\r\n }\r\n this._currentRequest = null;\r\n if (modelVersionId !== model.getVersionId()) {\r\n return;\r\n }\r\n let ranges = [];\r\n if (response === null || response === void 0 ? void 0 : response.ranges) {\r\n ranges = response.ranges;\r\n }\r\n this._currentWordPattern = (response === null || response === void 0 ? void 0 : response.wordPattern) || this._languageWordPattern;\r\n let foundReferenceRange = false;\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.containsPosition(ranges[i], position)) {\r\n foundReferenceRange = true;\r\n if (i !== 0) {\r\n const referenceRange = ranges[i];\r\n ranges.splice(i, 1);\r\n ranges.unshift(referenceRange);\r\n }\r\n break;\r\n }\r\n }\r\n if (!foundReferenceRange) {\r\n // Cannot do linked editing if the ranges are not where the cursor is...\r\n this.clearRanges();\r\n return;\r\n }\r\n const decorations = ranges.map(range => ({ range: range, options: LinkedEditingContribution.DECORATION }));\r\n this._visibleContextKey.set(true);\r\n this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, decorations);\r\n }\r\n catch (err) {\r\n if (!(0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__.isPromiseCanceledError)(err)) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__.onUnexpectedError)(err);\r\n }\r\n if (this._currentRequest === request || !this._currentRequest) {\r\n // stop if we are still the latest request\r\n this.clearRanges();\r\n }\r\n }\r\n }));\r\n this._currentRequest = request;\r\n return request;\r\n });\r\n }\r\n};\r\nLinkedEditingContribution.ID = 'editor.contrib.linkedEditing';\r\nLinkedEditingContribution.DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.ModelDecorationOptions.register({\r\n stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */,\r\n className: DECORATION_CLASS_NAME\r\n});\r\nLinkedEditingContribution = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.IContextKeyService)\r\n], LinkedEditingContribution);\r\n\r\nclass LinkedEditingAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.linkedEditing',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('linkedEditing.label', \"Start Linked Editing\"),\r\n alias: 'Start Linked Editing',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.hasRenameProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n runCommand(accessor, args) {\r\n const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_13__.ICodeEditorService);\r\n const [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_12__.URI.isUri(uri) && _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__.Position.isIPosition(pos)) {\r\n return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\r\n if (!editor) {\r\n return;\r\n }\r\n editor.setPosition(pos);\r\n editor.invokeWithinContext(accessor => {\r\n this.reportTelemetry(accessor, editor);\r\n return this.run(accessor, editor);\r\n });\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__.onUnexpectedError);\r\n }\r\n return super.runCommand(accessor, args);\r\n }\r\n run(_accessor, editor) {\r\n const controller = LinkedEditingContribution.get(editor);\r\n if (controller) {\r\n return Promise.resolve(controller.updateRanges(true));\r\n }\r\n return Promise.resolve();\r\n }\r\n}\r\nconst LinkedEditingCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorCommand.bindToContribution(LinkedEditingContribution.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new LinkedEditingCommand({\r\n id: 'cancelLinkedEditingInput',\r\n precondition: CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,\r\n handler: x => x.clearRanges(),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.editorTextFocus,\r\n weight: 100 /* EditorContrib */ + 99,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nfunction getLinkedEditingRanges(model, position, token) {\r\n const orderedByScore = _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.LinkedEditingRangeProviderRegistry.ordered(model);\r\n // in order of score ask the linked editing range provider\r\n // until someone response with a good result\r\n // (good = not null)\r\n return (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_8__.first)(orderedByScore.map(provider => () => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n return yield provider.provideLinkedEditingRanges(model, position, token);\r\n }\r\n catch (e) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__.onUnexpectedExternalError)(e);\r\n return undefined;\r\n }\r\n })), result => !!result && _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__.isNonEmptyArray(result === null || result === void 0 ? void 0 : result.ranges));\r\n}\r\nconst editorLinkedEditingBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__.registerColor)('editor.linkedEditingBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_18__.Color.fromHex('#f00').transparent(0.3), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_18__.Color.fromHex('#f00').transparent(0.3), hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_18__.Color.fromHex('#f00').transparent(0.3) }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('editorLinkedEditingBackground', 'Background color when the editor auto renames on type.'));\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__.registerThemingParticipant)((theme, collector) => {\r\n const editorLinkedEditingBackgroundColor = theme.getColor(editorLinkedEditingBackground);\r\n if (editorLinkedEditingBackgroundColor) {\r\n collector.addRule(`.monaco-editor .${DECORATION_CLASS_NAME} { background: ${editorLinkedEditingBackgroundColor}; border-left-color: ${editorLinkedEditingBackgroundColor}; }`);\r\n }\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerModelAndPositionCommand)('_executeLinkedEditingProvider', (model, position) => getLinkedEditingRanges(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__.CancellationToken.None));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorContribution)(LinkedEditingContribution.ID, LinkedEditingContribution);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(LinkedEditingAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/linkedEditing.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Link\": () => (/* binding */ Link),\n/* harmony export */ \"LinksList\": () => (/* binding */ LinksList),\n/* harmony export */ \"getLinks\": () => (/* binding */ getLinks)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass Link {\r\n constructor(link, provider) {\r\n this._link = link;\r\n this._provider = provider;\r\n }\r\n toJSON() {\r\n return {\r\n range: this.range,\r\n url: this.url,\r\n tooltip: this.tooltip\r\n };\r\n }\r\n get range() {\r\n return this._link.range;\r\n }\r\n get url() {\r\n return this._link.url;\r\n }\r\n get tooltip() {\r\n return this._link.tooltip;\r\n }\r\n resolve(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._link.url) {\r\n return this._link.url;\r\n }\r\n if (typeof this._provider.resolveLink === 'function') {\r\n return Promise.resolve(this._provider.resolveLink(this._link, token)).then(value => {\r\n this._link = value || this._link;\r\n if (this._link.url) {\r\n // recurse\r\n return this.resolve(token);\r\n }\r\n return Promise.reject(new Error('missing'));\r\n });\r\n }\r\n return Promise.reject(new Error('missing'));\r\n });\r\n }\r\n}\r\nclass LinksList {\r\n constructor(tuples) {\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore();\r\n let links = [];\r\n for (const [list, provider] of tuples) {\r\n // merge all links\r\n const newLinks = list.links.map(link => new Link(link, provider));\r\n links = LinksList._union(links, newLinks);\r\n // register disposables\r\n if ((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.isDisposable)(list)) {\r\n this._disposables.add(list);\r\n }\r\n }\r\n this.links = links;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this.links.length = 0;\r\n }\r\n static _union(oldLinks, newLinks) {\r\n // reunite oldLinks with newLinks and remove duplicates\r\n let result = [];\r\n let oldIndex;\r\n let oldLen;\r\n let newIndex;\r\n let newLen;\r\n for (oldIndex = 0, newIndex = 0, oldLen = oldLinks.length, newLen = newLinks.length; oldIndex < oldLen && newIndex < newLen;) {\r\n const oldLink = oldLinks[oldIndex];\r\n const newLink = newLinks[newIndex];\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.areIntersectingOrTouching(oldLink.range, newLink.range)) {\r\n // Remove the oldLink\r\n oldIndex++;\r\n continue;\r\n }\r\n const comparisonResult = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.compareRangesUsingStarts(oldLink.range, newLink.range);\r\n if (comparisonResult < 0) {\r\n // oldLink is before\r\n result.push(oldLink);\r\n oldIndex++;\r\n }\r\n else {\r\n // newLink is before\r\n result.push(newLink);\r\n newIndex++;\r\n }\r\n }\r\n for (; oldIndex < oldLen; oldIndex++) {\r\n result.push(oldLinks[oldIndex]);\r\n }\r\n for (; newIndex < newLen; newIndex++) {\r\n result.push(newLinks[newIndex]);\r\n }\r\n return result;\r\n }\r\n}\r\nfunction getLinks(model, token) {\r\n const lists = [];\r\n // ask all providers for links in parallel\r\n const promises = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__.LinkProviderRegistry.ordered(model).reverse().map((provider, i) => {\r\n return Promise.resolve(provider.provideLinks(model, token)).then(result => {\r\n if (result) {\r\n lists[i] = [result, provider];\r\n }\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedExternalError);\r\n });\r\n return Promise.all(promises).then(() => {\r\n const result = new LinksList((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__.coalesce)(lists));\r\n if (!token.isCancellationRequested) {\r\n return result;\r\n }\r\n result.dispose();\r\n return new LinksList([]);\r\n });\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__.CommandsRegistry.registerCommand('_executeLinkProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n let [uri, resolveCount] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_9__.assertType)(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI);\r\n if (typeof resolveCount !== 'number') {\r\n resolveCount = 0;\r\n }\r\n const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__.IModelService).getModel(uri);\r\n if (!model) {\r\n return [];\r\n }\r\n const list = yield getLinks(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None);\r\n if (!list) {\r\n return [];\r\n }\r\n // resolve links\r\n for (let i = 0; i < Math.min(resolveCount, list.links.length); i++) {\r\n yield list.links[i].resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationToken.None);\r\n }\r\n const result = list.links.slice(0);\r\n list.dispose();\r\n return result;\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LinkDetector\": () => (/* binding */ LinkDetector)\n/* harmony export */ });\n/* harmony import */ var _links_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./links.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _gotoSymbol_link_clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../gotoSymbol/link/clickLinkGesture.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js\");\n/* harmony import */ var _getLinks_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./getLinks.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction getHoverMessage(link, useMetaKey) {\r\n const executeCmd = link.url && /^command:/i.test(link.url.toString());\r\n const label = link.tooltip\r\n ? link.tooltip\r\n : executeCmd\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.executeCmd', 'Execute command')\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.follow', 'Follow link');\r\n const kb = useMetaKey\r\n ? _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__.isMacintosh\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.kb.meta.mac', \"cmd + click\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.kb.meta', \"ctrl + click\")\r\n : _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__.isMacintosh\r\n ? _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.kb.alt.mac', \"option + click\")\r\n : _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('links.navigate.kb.alt', \"alt + click\");\r\n if (link.url) {\r\n let nativeLabel = '';\r\n if (/^command:/i.test(link.url.toString())) {\r\n // Don't show complete command arguments in the native tooltip\r\n const match = link.url.toString().match(/^command:([^?#]+)/);\r\n if (match) {\r\n const commandId = match[1];\r\n const nativeLabelText = _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('tooltip.explanation', \"Execute command {0}\", commandId);\r\n nativeLabel = ` \"${nativeLabelText}\"`;\r\n }\r\n }\r\n const hoverMessage = new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__.MarkdownString('', true).appendMarkdown(`[${label}](${link.url.toString(true)}${nativeLabel}) (${kb})`);\r\n return hoverMessage;\r\n }\r\n else {\r\n return new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__.MarkdownString().appendText(`${label} (${kb})`);\r\n }\r\n}\r\nconst decoration = {\r\n general: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n collapseOnReplaceEdit: true,\r\n inlineClassName: 'detected-link'\r\n }),\r\n active: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n collapseOnReplaceEdit: true,\r\n inlineClassName: 'detected-link-active'\r\n })\r\n};\r\nclass LinkOccurrence {\r\n constructor(link, decorationId) {\r\n this.link = link;\r\n this.decorationId = decorationId;\r\n }\r\n static decoration(link, useMetaKey) {\r\n return {\r\n range: link.range,\r\n options: LinkOccurrence._getOptions(link, useMetaKey, false)\r\n };\r\n }\r\n static _getOptions(link, useMetaKey, isActive) {\r\n const options = Object.assign({}, (isActive ? decoration.active : decoration.general));\r\n options.hoverMessage = getHoverMessage(link, useMetaKey);\r\n return options;\r\n }\r\n activate(changeAccessor, useMetaKey) {\r\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, true));\r\n }\r\n deactivate(changeAccessor, useMetaKey) {\r\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, false));\r\n }\r\n}\r\nlet LinkDetector = class LinkDetector {\r\n constructor(editor, openerService, notificationService) {\r\n this.listenersToRemove = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.DisposableStore();\r\n this.editor = editor;\r\n this.openerService = openerService;\r\n this.notificationService = notificationService;\r\n let clickLinkGesture = new _gotoSymbol_link_clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_11__.ClickLinkGesture(editor);\r\n this.listenersToRemove.add(clickLinkGesture);\r\n this.listenersToRemove.add(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {\r\n this._onEditorMouseMove(mouseEvent, keyboardEvent);\r\n }));\r\n this.listenersToRemove.add(clickLinkGesture.onExecute((e) => {\r\n this.onEditorMouseUp(e);\r\n }));\r\n this.listenersToRemove.add(clickLinkGesture.onCancel((e) => {\r\n this.cleanUpActiveLinkDecoration();\r\n }));\r\n this.enabled = editor.getOption(57 /* links */);\r\n this.listenersToRemove.add(editor.onDidChangeConfiguration((e) => {\r\n const enabled = editor.getOption(57 /* links */);\r\n if (this.enabled === enabled) {\r\n // No change in our configuration option\r\n return;\r\n }\r\n this.enabled = enabled;\r\n // Remove any links (for the getting disabled case)\r\n this.updateDecorations([]);\r\n // Stop any computation (for the getting disabled case)\r\n this.stop();\r\n // Start computing (for the getting enabled case)\r\n this.beginCompute();\r\n }));\r\n this.listenersToRemove.add(editor.onDidChangeModelContent((e) => this.onChange()));\r\n this.listenersToRemove.add(editor.onDidChangeModel((e) => this.onModelChanged()));\r\n this.listenersToRemove.add(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged()));\r\n this.listenersToRemove.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_10__.LinkProviderRegistry.onDidChange((e) => this.onModelModeChanged()));\r\n this.timeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.TimeoutTimer();\r\n this.computePromise = null;\r\n this.activeLinksList = null;\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n this.beginCompute();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(LinkDetector.ID);\r\n }\r\n onModelChanged() {\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n this.stop();\r\n this.beginCompute();\r\n }\r\n onModelModeChanged() {\r\n this.stop();\r\n this.beginCompute();\r\n }\r\n onChange() {\r\n this.timeout.setIfNotSet(() => this.beginCompute(), LinkDetector.RECOMPUTE_TIME);\r\n }\r\n beginCompute() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.editor.hasModel() || !this.enabled) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_10__.LinkProviderRegistry.has(model)) {\r\n return;\r\n }\r\n if (this.activeLinksList) {\r\n this.activeLinksList.dispose();\r\n this.activeLinksList = null;\r\n }\r\n this.computePromise = _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.createCancelablePromise(token => (0,_getLinks_js__WEBPACK_IMPORTED_MODULE_12__.getLinks)(model, token));\r\n try {\r\n this.activeLinksList = yield this.computePromise;\r\n this.updateDecorations(this.activeLinksList.links);\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError)(err);\r\n }\r\n finally {\r\n this.computePromise = null;\r\n }\r\n });\r\n }\r\n updateDecorations(links) {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n let oldDecorations = [];\r\n let keys = Object.keys(this.currentOccurrences);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n let decorationId = keys[i];\r\n let occurance = this.currentOccurrences[decorationId];\r\n oldDecorations.push(occurance.decorationId);\r\n }\r\n let newDecorations = [];\r\n if (links) {\r\n // Not sure why this is sometimes null\r\n for (const link of links) {\r\n newDecorations.push(LinkOccurrence.decoration(link, useMetaKey));\r\n }\r\n }\r\n let decorations = this.editor.deltaDecorations(oldDecorations, newDecorations);\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n let occurance = new LinkOccurrence(links[i], decorations[i]);\r\n this.currentOccurrences[occurance.decorationId] = occurance;\r\n }\r\n }\r\n _onEditorMouseMove(mouseEvent, withKey) {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n if (this.isEnabled(mouseEvent, withKey)) {\r\n this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one\r\n const occurrence = this.getLinkOccurrence(mouseEvent.target.position);\r\n if (occurrence) {\r\n this.editor.changeDecorations((changeAccessor) => {\r\n occurrence.activate(changeAccessor, useMetaKey);\r\n this.activeLinkDecorationId = occurrence.decorationId;\r\n });\r\n }\r\n }\r\n else {\r\n this.cleanUpActiveLinkDecoration();\r\n }\r\n }\r\n cleanUpActiveLinkDecoration() {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n if (this.activeLinkDecorationId) {\r\n const occurrence = this.currentOccurrences[this.activeLinkDecorationId];\r\n if (occurrence) {\r\n this.editor.changeDecorations((changeAccessor) => {\r\n occurrence.deactivate(changeAccessor, useMetaKey);\r\n });\r\n }\r\n this.activeLinkDecorationId = null;\r\n }\r\n }\r\n onEditorMouseUp(mouseEvent) {\r\n if (!this.isEnabled(mouseEvent)) {\r\n return;\r\n }\r\n const occurrence = this.getLinkOccurrence(mouseEvent.target.position);\r\n if (!occurrence) {\r\n return;\r\n }\r\n this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier, true /* from user gesture */);\r\n }\r\n openLinkOccurrence(occurrence, openToSide, fromUserGesture = false) {\r\n if (!this.openerService) {\r\n return;\r\n }\r\n const { link } = occurrence;\r\n link.resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__.CancellationToken.None).then(uri => {\r\n // Support for relative file URIs of the shape file://./relativeFile.txt or file:///./relativeFile.txt\r\n if (typeof uri === 'string' && this.editor.hasModel()) {\r\n const modelUri = this.editor.getModel().uri;\r\n if (modelUri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__.Schemas.file && uri.startsWith(`${_base_common_network_js__WEBPACK_IMPORTED_MODULE_18__.Schemas.file}:`)) {\r\n const parsedUri = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_17__.URI.parse(uri);\r\n if (parsedUri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__.Schemas.file) {\r\n const fsPath = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__.originalFSPath(parsedUri);\r\n let relativePath = null;\r\n if (fsPath.startsWith('/./')) {\r\n relativePath = `.${fsPath.substr(1)}`;\r\n }\r\n else if (fsPath.startsWith('//./')) {\r\n relativePath = `.${fsPath.substr(2)}`;\r\n }\r\n if (relativePath) {\r\n uri = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__.joinPath(modelUri, relativePath);\r\n }\r\n }\r\n }\r\n }\r\n return this.openerService.open(uri, { openToSide, fromUserGesture, allowContributedOpeners: true });\r\n }, err => {\r\n const messageOrError = err instanceof Error ? err.message : err;\r\n // different error cases\r\n if (messageOrError === 'invalid') {\r\n this.notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('invalid.url', 'Failed to open this link because it is not well-formed: {0}', link.url.toString()));\r\n }\r\n else if (messageOrError === 'missing') {\r\n this.notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('missing.url', 'Failed to open this link because its target is missing.'));\r\n }\r\n else {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError)(err);\r\n }\r\n });\r\n }\r\n getLinkOccurrence(position) {\r\n if (!this.editor.hasModel() || !position) {\r\n return null;\r\n }\r\n const decorations = this.editor.getModel().getDecorationsInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn: position.column,\r\n endLineNumber: position.lineNumber,\r\n endColumn: position.column\r\n }, 0, true);\r\n for (const decoration of decorations) {\r\n const currentOccurrence = this.currentOccurrences[decoration.id];\r\n if (currentOccurrence) {\r\n return currentOccurrence;\r\n }\r\n }\r\n return null;\r\n }\r\n isEnabled(mouseEvent, withKey) {\r\n return Boolean((mouseEvent.target.type === 6 /* CONTENT_TEXT */)\r\n && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)));\r\n }\r\n stop() {\r\n var _a;\r\n this.timeout.cancel();\r\n if (this.activeLinksList) {\r\n (_a = this.activeLinksList) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.activeLinksList = null;\r\n }\r\n if (this.computePromise) {\r\n this.computePromise.cancel();\r\n this.computePromise = null;\r\n }\r\n }\r\n dispose() {\r\n this.listenersToRemove.dispose();\r\n this.stop();\r\n this.timeout.dispose();\r\n }\r\n};\r\nLinkDetector.ID = 'editor.linkDetector';\r\nLinkDetector.RECOMPUTE_TIME = 1000; // ms\r\nLinkDetector = __decorate([\r\n __param(1, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_14__.IOpenerService),\r\n __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__.INotificationService)\r\n], LinkDetector);\r\n\r\nclass OpenLinkAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.openLink',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('label', \"Open Link\"),\r\n alias: 'Open Link',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let linkDetector = LinkDetector.get(editor);\r\n if (!linkDetector) {\r\n return;\r\n }\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let selections = editor.getSelections();\r\n for (let sel of selections) {\r\n let link = linkDetector.getLinkOccurrence(sel.getEndPosition());\r\n if (link) {\r\n linkDetector.openLinkOccurrence(link, false);\r\n }\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__.registerEditorContribution)(LinkDetector.ID, LinkDetector);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__.registerEditorAction)(OpenLinkAction);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__.registerThemingParticipant)((theme, collector) => {\r\n const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .detected-link-active { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MessageController\": () => (/* binding */ MessageController)\n/* harmony export */ });\n/* harmony import */ var _messageController_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./messageController.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/theme/common/theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet MessageController = class MessageController {\r\n constructor(editor, contextKeyService) {\r\n this._messageWidget = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.MutableDisposable();\r\n this._messageListeners = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._editor = editor;\r\n this._visible = MessageController.MESSAGE_VISIBLE.bindTo(contextKeyService);\r\n this._editorListener = this._editor.onDidAttemptReadOnlyEdit(() => this._onDidAttemptReadOnlyEdit());\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MessageController.ID);\r\n }\r\n dispose() {\r\n this._editorListener.dispose();\r\n this._messageListeners.dispose();\r\n this._messageWidget.dispose();\r\n this._visible.reset();\r\n }\r\n showMessage(message, position) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.alert)(message);\r\n this._visible.set(true);\r\n this._messageWidget.clear();\r\n this._messageListeners.clear();\r\n this._messageWidget.value = new MessageWidget(this._editor, position, message);\r\n // close on blur, cursor, model change, dispose\r\n this._messageListeners.add(this._editor.onDidBlurEditorText(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidChangeCursorPosition(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidDispose(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidChangeModel(() => this.closeMessage()));\r\n // 3sec\r\n this._messageListeners.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.TimeoutTimer(() => this.closeMessage(), 3000));\r\n // close on mouse move\r\n let bounds;\r\n this._messageListeners.add(this._editor.onMouseMove(e => {\r\n // outside the text area\r\n if (!e.target.position) {\r\n return;\r\n }\r\n if (!bounds) {\r\n // define bounding box around position and first mouse occurance\r\n bounds = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1);\r\n }\r\n else if (!bounds.containsPosition(e.target.position)) {\r\n // check if position is still in bounds\r\n this.closeMessage();\r\n }\r\n }));\r\n }\r\n closeMessage() {\r\n this._visible.reset();\r\n this._messageListeners.clear();\r\n if (this._messageWidget.value) {\r\n this._messageListeners.add(MessageWidget.fadeOut(this._messageWidget.value));\r\n }\r\n }\r\n _onDidAttemptReadOnlyEdit() {\r\n if (this._editor.hasModel()) {\r\n this.showMessage(_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('editor.readonly', \"Cannot edit in read-only editor\"), this._editor.getPosition());\r\n }\r\n }\r\n};\r\nMessageController.ID = 'editor.contrib.messageController';\r\nMessageController.MESSAGE_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.RawContextKey('messageVisible', false, _nls_js__WEBPACK_IMPORTED_MODULE_1__.localize('messageVisible', 'Whether the editor is currently showing an inline message'));\r\nMessageController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.IContextKeyService)\r\n], MessageController);\r\n\r\nconst MessageCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorCommand.bindToContribution(MessageController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new MessageCommand({\r\n id: 'leaveEditorMessage',\r\n precondition: MessageController.MESSAGE_VISIBLE,\r\n handler: c => c.closeMessage(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n primary: 9 /* Escape */\r\n }\r\n}));\r\nclass MessageWidget {\r\n constructor(editor, { lineNumber, column }, text) {\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this.suppressMouseDown = false;\r\n this._editor = editor;\r\n this._editor.revealLinesInCenterIfOutsideViewport(lineNumber, lineNumber, 0 /* Smooth */);\r\n this._position = { lineNumber, column: column - 1 };\r\n this._domNode = document.createElement('div');\r\n this._domNode.classList.add('monaco-editor-overlaymessage');\r\n const anchorTop = document.createElement('div');\r\n anchorTop.classList.add('anchor', 'top');\r\n this._domNode.appendChild(anchorTop);\r\n const message = document.createElement('div');\r\n message.classList.add('message');\r\n message.textContent = text;\r\n this._domNode.appendChild(message);\r\n const anchorBottom = document.createElement('div');\r\n anchorBottom.classList.add('anchor', 'below');\r\n this._domNode.appendChild(anchorBottom);\r\n this._editor.addContentWidget(this);\r\n this._domNode.classList.add('fadeIn');\r\n }\r\n static fadeOut(messageWidget) {\r\n let handle;\r\n const dispose = () => {\r\n messageWidget.dispose();\r\n clearTimeout(handle);\r\n messageWidget.getDomNode().removeEventListener('animationend', dispose);\r\n };\r\n handle = setTimeout(dispose, 110);\r\n messageWidget.getDomNode().addEventListener('animationend', dispose);\r\n messageWidget.getDomNode().classList.add('fadeOut');\r\n return { dispose };\r\n }\r\n dispose() {\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return 'messageoverlay';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return { position: this._position, preference: [1 /* ABOVE */, 2 /* BELOW */] };\r\n }\r\n afterRender(position) {\r\n this._domNode.classList.toggle('below', position === 2 /* BELOW */);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorContribution)(MessageController.ID, MessageController);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__.registerThemingParticipant)((theme, collector) => {\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.inputValidationInfoBorder);\r\n if (border) {\r\n let borderWidth = theme.type === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__.ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${border}; }`);\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${border}; }`);\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${borderWidth}px solid ${border}; }`);\r\n }\r\n const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.inputValidationInfoBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`);\r\n }\r\n const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.inputValidationInfoForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${foreground}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InsertCursorAbove\": () => (/* binding */ InsertCursorAbove),\n/* harmony export */ \"InsertCursorBelow\": () => (/* binding */ InsertCursorBelow),\n/* harmony export */ \"MultiCursorSessionResult\": () => (/* binding */ MultiCursorSessionResult),\n/* harmony export */ \"MultiCursorSession\": () => (/* binding */ MultiCursorSession),\n/* harmony export */ \"MultiCursorSelectionController\": () => (/* binding */ MultiCursorSelectionController),\n/* harmony export */ \"MultiCursorSelectionControllerAction\": () => (/* binding */ MultiCursorSelectionControllerAction),\n/* harmony export */ \"AddSelectionToNextFindMatchAction\": () => (/* binding */ AddSelectionToNextFindMatchAction),\n/* harmony export */ \"AddSelectionToPreviousFindMatchAction\": () => (/* binding */ AddSelectionToPreviousFindMatchAction),\n/* harmony export */ \"MoveSelectionToNextFindMatchAction\": () => (/* binding */ MoveSelectionToNextFindMatchAction),\n/* harmony export */ \"MoveSelectionToPreviousFindMatchAction\": () => (/* binding */ MoveSelectionToPreviousFindMatchAction),\n/* harmony export */ \"SelectHighlightsAction\": () => (/* binding */ SelectHighlightsAction),\n/* harmony export */ \"CompatChangeAll\": () => (/* binding */ CompatChangeAll),\n/* harmony export */ \"SelectionHighlighter\": () => (/* binding */ SelectionHighlighter)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorMoveCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _find_findController_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../find/findController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass InsertCursorAbove extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorAbove',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mutlicursor.insertAbove', \"Add Cursor Above\"),\r\n alias: 'Add Cursor Above',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 16 /* UpArrow */,\r\n linux: {\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */]\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, \"&&Add Cursor Above\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const useLogicalLine = (args && args.logicalLine === true);\r\n const viewModel = editor._getViewModel();\r\n if (viewModel.cursorConfig.readOnly) {\r\n return;\r\n }\r\n viewModel.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__.CursorMoveCommands.addCursorUp(viewModel, viewModel.getCursorStates(), useLogicalLine));\r\n viewModel.revealTopMostCursor(args.source);\r\n }\r\n}\r\nclass InsertCursorBelow extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorBelow',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mutlicursor.insertBelow', \"Add Cursor Below\"),\r\n alias: 'Add Cursor Below',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 18 /* DownArrow */,\r\n linux: {\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */]\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, \"A&&dd Cursor Below\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const useLogicalLine = (args && args.logicalLine === true);\r\n const viewModel = editor._getViewModel();\r\n if (viewModel.cursorConfig.readOnly) {\r\n return;\r\n }\r\n viewModel.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__.CursorMoveCommands.addCursorDown(viewModel, viewModel.getCursorStates(), useLogicalLine));\r\n viewModel.revealBottomMostCursor(args.source);\r\n }\r\n}\r\nclass InsertCursorAtEndOfEachLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorAtEndOfEachLineSelected',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mutlicursor.insertAtEndOfEachLineSelected', \"Add Cursors to Line Ends\"),\r\n alias: 'Add Cursors to Line Ends',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 39 /* KEY_I */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, \"Add C&&ursors to Line Ends\"),\r\n order: 4\r\n }\r\n });\r\n }\r\n getCursorsForSelection(selection, model, result) {\r\n if (selection.isEmpty()) {\r\n return;\r\n }\r\n for (let i = selection.startLineNumber; i < selection.endLineNumber; i++) {\r\n let currentLineMaxColumn = model.getLineMaxColumn(i);\r\n result.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(i, currentLineMaxColumn, i, currentLineMaxColumn));\r\n }\r\n if (selection.endColumn > 1) {\r\n result.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn));\r\n }\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n let newSelections = [];\r\n selections.forEach((sel) => this.getCursorsForSelection(sel, model, newSelections));\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nclass InsertCursorAtEndOfLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addCursorsToBottom',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mutlicursor.addCursorsToBottom', \"Add Cursors To Bottom\"),\r\n alias: 'Add Cursors To Bottom',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n const lineCount = editor.getModel().getLineCount();\r\n let newSelections = [];\r\n for (let i = selections[0].startLineNumber; i <= lineCount; i++) {\r\n newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(i, selections[0].startColumn, i, selections[0].endColumn));\r\n }\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nclass InsertCursorAtTopOfLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addCursorsToTop',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('mutlicursor.addCursorsToTop', \"Add Cursors To Top\"),\r\n alias: 'Add Cursors To Top',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n let newSelections = [];\r\n for (let i = selections[0].startLineNumber; i >= 1; i--) {\r\n newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(i, selections[0].startColumn, i, selections[0].endColumn));\r\n }\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nclass MultiCursorSessionResult {\r\n constructor(selections, revealRange, revealScrollType) {\r\n this.selections = selections;\r\n this.revealRange = revealRange;\r\n this.revealScrollType = revealScrollType;\r\n }\r\n}\r\nclass MultiCursorSession {\r\n constructor(_editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch) {\r\n this._editor = _editor;\r\n this.findController = findController;\r\n this.isDisconnectedFromFindController = isDisconnectedFromFindController;\r\n this.searchText = searchText;\r\n this.wholeWord = wholeWord;\r\n this.matchCase = matchCase;\r\n this.currentMatch = currentMatch;\r\n }\r\n static create(editor, findController) {\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const findState = findController.getState();\r\n // Find widget owns entirely what we search for if:\r\n // - focus is not in the editor (i.e. it is in the find widget)\r\n // - and the search widget is visible\r\n // - and the search string is non-empty\r\n if (!editor.hasTextFocus() && findState.isRevealed && findState.searchString.length > 0) {\r\n // Find widget owns what is searched for\r\n return new MultiCursorSession(editor, findController, false, findState.searchString, findState.wholeWord, findState.matchCase, null);\r\n }\r\n // Otherwise, the selection gives the search text, and the find widget gives the search settings\r\n // The exception is the find state disassociation case: when beginning with a single, collapsed selection\r\n let isDisconnectedFromFindController = false;\r\n let wholeWord;\r\n let matchCase;\r\n const selections = editor.getSelections();\r\n if (selections.length === 1 && selections[0].isEmpty()) {\r\n isDisconnectedFromFindController = true;\r\n wholeWord = true;\r\n matchCase = true;\r\n }\r\n else {\r\n wholeWord = findState.wholeWord;\r\n matchCase = findState.matchCase;\r\n }\r\n // Selection owns what is searched for\r\n const s = editor.getSelection();\r\n let searchText;\r\n let currentMatch = null;\r\n if (s.isEmpty()) {\r\n // selection is empty => expand to current word\r\n const word = editor.getConfiguredWordAtPosition(s.getStartPosition());\r\n if (!word) {\r\n return null;\r\n }\r\n searchText = word.word;\r\n currentMatch = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(s.startLineNumber, word.startColumn, s.startLineNumber, word.endColumn);\r\n }\r\n else {\r\n searchText = editor.getModel().getValueInRange(s).replace(/\\r\\n/g, '\\n');\r\n }\r\n return new MultiCursorSession(editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch);\r\n }\r\n addSelectionToNextFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const nextMatch = this._getNextMatch();\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.concat(nextMatch), nextMatch, 0 /* Smooth */);\r\n }\r\n moveSelectionToNextFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const nextMatch = this._getNextMatch();\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(nextMatch), nextMatch, 0 /* Smooth */);\r\n }\r\n _getNextMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n if (this.currentMatch) {\r\n const result = this.currentMatch;\r\n this.currentMatch = null;\r\n return result;\r\n }\r\n this.findController.highlightFindOptions();\r\n const allSelections = this._editor.getSelections();\r\n const lastAddedSelection = allSelections[allSelections.length - 1];\r\n const nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(nextMatch.range.startLineNumber, nextMatch.range.startColumn, nextMatch.range.endLineNumber, nextMatch.range.endColumn);\r\n }\r\n addSelectionToPreviousFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const previousMatch = this._getPreviousMatch();\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.concat(previousMatch), previousMatch, 0 /* Smooth */);\r\n }\r\n moveSelectionToPreviousFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const previousMatch = this._getPreviousMatch();\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(previousMatch), previousMatch, 0 /* Smooth */);\r\n }\r\n _getPreviousMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n if (this.currentMatch) {\r\n const result = this.currentMatch;\r\n this.currentMatch = null;\r\n return result;\r\n }\r\n this.findController.highlightFindOptions();\r\n const allSelections = this._editor.getSelections();\r\n const lastAddedSelection = allSelections[allSelections.length - 1];\r\n const previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(previousMatch.range.startLineNumber, previousMatch.range.startColumn, previousMatch.range.endLineNumber, previousMatch.range.endColumn);\r\n }\r\n selectAll() {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n this.findController.highlightFindOptions();\r\n return this._editor.getModel().findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n }\r\n}\r\nclass MultiCursorSelectionController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this._sessionDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore());\r\n this._editor = editor;\r\n this._ignoreSelectionChange = false;\r\n this._session = null;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MultiCursorSelectionController.ID);\r\n }\r\n dispose() {\r\n this._endSession();\r\n super.dispose();\r\n }\r\n _beginSessionIfNeeded(findController) {\r\n if (!this._session) {\r\n // Create a new session\r\n const session = MultiCursorSession.create(this._editor, findController);\r\n if (!session) {\r\n return;\r\n }\r\n this._session = session;\r\n const newState = { searchString: this._session.searchText };\r\n if (this._session.isDisconnectedFromFindController) {\r\n newState.wholeWordOverride = 1 /* True */;\r\n newState.matchCaseOverride = 1 /* True */;\r\n newState.isRegexOverride = 2 /* False */;\r\n }\r\n findController.getState().change(newState, false);\r\n this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e) => {\r\n if (this._ignoreSelectionChange) {\r\n return;\r\n }\r\n this._endSession();\r\n }));\r\n this._sessionDispose.add(this._editor.onDidBlurEditorText(() => {\r\n this._endSession();\r\n }));\r\n this._sessionDispose.add(findController.getState().onFindReplaceStateChange((e) => {\r\n if (e.matchCase || e.wholeWord) {\r\n this._endSession();\r\n }\r\n }));\r\n }\r\n }\r\n _endSession() {\r\n this._sessionDispose.clear();\r\n if (this._session && this._session.isDisconnectedFromFindController) {\r\n const newState = {\r\n wholeWordOverride: 0 /* NotSet */,\r\n matchCaseOverride: 0 /* NotSet */,\r\n isRegexOverride: 0 /* NotSet */,\r\n };\r\n this._session.findController.getState().change(newState, false);\r\n }\r\n this._session = null;\r\n }\r\n _setSelections(selections) {\r\n this._ignoreSelectionChange = true;\r\n this._editor.setSelections(selections);\r\n this._ignoreSelectionChange = false;\r\n }\r\n _expandEmptyToWord(model, selection) {\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const word = this._editor.getConfiguredWordAtPosition(selection.getStartPosition());\r\n if (!word) {\r\n return selection;\r\n }\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn);\r\n }\r\n _applySessionResult(result) {\r\n if (!result) {\r\n return;\r\n }\r\n this._setSelections(result.selections);\r\n if (result.revealRange) {\r\n this._editor.revealRangeInCenterIfOutsideViewport(result.revealRange, result.revealScrollType);\r\n }\r\n }\r\n getSession(findController) {\r\n return this._session;\r\n }\r\n addSelectionToNextFindMatch(findController) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._session) {\r\n // If there are multiple cursors, handle the case where they do not all select the same text.\r\n const allSelections = this._editor.getSelections();\r\n if (allSelections.length > 1) {\r\n const findState = findController.getState();\r\n const matchCase = findState.matchCase;\r\n const selectionsContainSameText = modelRangesContainSameText(this._editor.getModel(), allSelections, matchCase);\r\n if (!selectionsContainSameText) {\r\n const model = this._editor.getModel();\r\n let resultingSelections = [];\r\n for (let i = 0, len = allSelections.length; i < len; i++) {\r\n resultingSelections[i] = this._expandEmptyToWord(model, allSelections[i]);\r\n }\r\n this._editor.setSelections(resultingSelections);\r\n return;\r\n }\r\n }\r\n }\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.addSelectionToNextFindMatch());\r\n }\r\n }\r\n addSelectionToPreviousFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.addSelectionToPreviousFindMatch());\r\n }\r\n }\r\n moveSelectionToNextFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.moveSelectionToNextFindMatch());\r\n }\r\n }\r\n moveSelectionToPreviousFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.moveSelectionToPreviousFindMatch());\r\n }\r\n }\r\n selectAll(findController) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let matches = null;\r\n const findState = findController.getState();\r\n // Special case: find widget owns entirely what we search for if:\r\n // - focus is not in the editor (i.e. it is in the find widget)\r\n // - and the search widget is visible\r\n // - and the search string is non-empty\r\n // - and we're searching for a regex\r\n if (findState.isRevealed && findState.searchString.length > 0 && findState.isRegex) {\r\n matches = this._editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n }\r\n else {\r\n this._beginSessionIfNeeded(findController);\r\n if (!this._session) {\r\n return;\r\n }\r\n matches = this._session.selectAll();\r\n }\r\n if (findState.searchScope) {\r\n const states = findState.searchScope;\r\n let inSelection = [];\r\n matches.forEach((match) => {\r\n states.forEach((state) => {\r\n if (match.range.endLineNumber <= state.endLineNumber && match.range.startLineNumber >= state.startLineNumber) {\r\n inSelection.push(match);\r\n }\r\n });\r\n });\r\n matches = inSelection;\r\n }\r\n if (matches.length > 0) {\r\n const editorSelection = this._editor.getSelection();\r\n // Have the primary cursor remain the one where the action was invoked\r\n for (let i = 0, len = matches.length; i < len; i++) {\r\n const match = matches[i];\r\n const intersection = match.range.intersectRanges(editorSelection);\r\n if (intersection) {\r\n // bingo!\r\n matches[i] = matches[0];\r\n matches[0] = match;\r\n break;\r\n }\r\n }\r\n this._setSelections(matches.map(m => new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__.Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn)));\r\n }\r\n }\r\n}\r\nMultiCursorSelectionController.ID = 'editor.contrib.multiCursorController';\r\nclass MultiCursorSelectionControllerAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n run(accessor, editor) {\r\n const multiCursorController = MultiCursorSelectionController.get(editor);\r\n if (!multiCursorController) {\r\n return;\r\n }\r\n const findController = _find_findController_js__WEBPACK_IMPORTED_MODULE_12__.CommonFindController.get(editor);\r\n if (!findController) {\r\n return;\r\n }\r\n this._run(multiCursorController, findController);\r\n }\r\n}\r\nclass AddSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addSelectionToNextFindMatch',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('addSelectionToNextFindMatch', \"Add Selection To Next Find Match\"),\r\n alias: 'Add Selection To Next Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 34 /* KEY_D */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miAddSelectionToNextFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add &&Next Occurrence\"),\r\n order: 5\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.addSelectionToNextFindMatch(findController);\r\n }\r\n}\r\nclass AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addSelectionToPreviousFindMatch',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('addSelectionToPreviousFindMatch', \"Add Selection To Previous Find Match\"),\r\n alias: 'Add Selection To Previous Find Match',\r\n precondition: undefined,\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miAddSelectionToPreviousFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add P&&revious Occurrence\"),\r\n order: 6\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.addSelectionToPreviousFindMatch(findController);\r\n }\r\n}\r\nclass MoveSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.moveSelectionToNextFindMatch',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('moveSelectionToNextFindMatch', \"Move Last Selection To Next Find Match\"),\r\n alias: 'Move Last Selection To Next Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.focus,\r\n primary: (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.KeyChord)(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 34 /* KEY_D */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.moveSelectionToNextFindMatch(findController);\r\n }\r\n}\r\nclass MoveSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.moveSelectionToPreviousFindMatch',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('moveSelectionToPreviousFindMatch', \"Move Last Selection To Previous Find Match\"),\r\n alias: 'Move Last Selection To Previous Find Match',\r\n precondition: undefined\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.moveSelectionToPreviousFindMatch(findController);\r\n }\r\n}\r\nclass SelectHighlightsAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectHighlights',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('selectAllOccurrencesOfFindMatch', \"Select All Occurrences of Find Match\"),\r\n alias: 'Select All Occurrences of Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 42 /* KEY_L */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__.MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'miSelectHighlights', comment: ['&& denotes a mnemonic'] }, \"Select All &&Occurrences\"),\r\n order: 7\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.selectAll(findController);\r\n }\r\n}\r\nclass CompatChangeAll extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.changeAll',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('changeAll.label', \"Change All Occurrences\"),\r\n alias: 'Change All Occurrences',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_16__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.2\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.selectAll(findController);\r\n }\r\n}\r\nclass SelectionHighlighterState {\r\n constructor(searchText, matchCase, wordSeparators, modelVersionId) {\r\n this.searchText = searchText;\r\n this.matchCase = matchCase;\r\n this.wordSeparators = wordSeparators;\r\n this.modelVersionId = modelVersionId;\r\n }\r\n /**\r\n * Everything equals except for `lastWordUnderCursor`\r\n */\r\n static softEquals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n return (a.searchText === b.searchText\r\n && a.matchCase === b.matchCase\r\n && a.wordSeparators === b.wordSeparators\r\n && a.modelVersionId === b.modelVersionId);\r\n }\r\n}\r\nclass SelectionHighlighter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this._isEnabled = editor.getOption(92 /* selectionHighlight */);\r\n this.decorations = [];\r\n this.updateSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.RunOnceScheduler(() => this._update(), 300));\r\n this.state = null;\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n this._isEnabled = editor.getOption(92 /* selectionHighlight */);\r\n }));\r\n this._register(editor.onDidChangeCursorSelection((e) => {\r\n if (!this._isEnabled) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n if (e.selection.isEmpty()) {\r\n if (e.reason === 3 /* Explicit */) {\r\n if (this.state) {\r\n // no longer valid\r\n this._setState(null);\r\n }\r\n this.updateSoon.schedule();\r\n }\r\n else {\r\n this._setState(null);\r\n }\r\n }\r\n else {\r\n this._update();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._setState(null);\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n if (this._isEnabled) {\r\n this.updateSoon.schedule();\r\n }\r\n }));\r\n this._register(_find_findController_js__WEBPACK_IMPORTED_MODULE_12__.CommonFindController.get(editor).getState().onFindReplaceStateChange((e) => {\r\n this._update();\r\n }));\r\n }\r\n _update() {\r\n this._setState(SelectionHighlighter._createState(this._isEnabled, this.editor));\r\n }\r\n static _createState(isEnabled, editor) {\r\n if (!isEnabled) {\r\n return null;\r\n }\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const s = editor.getSelection();\r\n if (s.startLineNumber !== s.endLineNumber) {\r\n // multiline forbidden for perf reasons\r\n return null;\r\n }\r\n const multiCursorController = MultiCursorSelectionController.get(editor);\r\n if (!multiCursorController) {\r\n return null;\r\n }\r\n const findController = _find_findController_js__WEBPACK_IMPORTED_MODULE_12__.CommonFindController.get(editor);\r\n if (!findController) {\r\n return null;\r\n }\r\n let r = multiCursorController.getSession(findController);\r\n if (!r) {\r\n const allSelections = editor.getSelections();\r\n if (allSelections.length > 1) {\r\n const findState = findController.getState();\r\n const matchCase = findState.matchCase;\r\n const selectionsContainSameText = modelRangesContainSameText(editor.getModel(), allSelections, matchCase);\r\n if (!selectionsContainSameText) {\r\n return null;\r\n }\r\n }\r\n r = MultiCursorSession.create(editor, findController);\r\n }\r\n if (!r) {\r\n return null;\r\n }\r\n if (r.currentMatch) {\r\n // This is an empty selection\r\n // Do not interfere with semantic word highlighting in the no selection case\r\n return null;\r\n }\r\n if (/^[ \\t]+$/.test(r.searchText)) {\r\n // whitespace only selection\r\n return null;\r\n }\r\n if (r.searchText.length > 200) {\r\n // very long selection\r\n return null;\r\n }\r\n // TODO: better handling of this case\r\n const findState = findController.getState();\r\n const caseSensitive = findState.matchCase;\r\n // Return early if the find widget shows the exact same matches\r\n if (findState.isRevealed) {\r\n let findStateSearchString = findState.searchString;\r\n if (!caseSensitive) {\r\n findStateSearchString = findStateSearchString.toLowerCase();\r\n }\r\n let mySearchString = r.searchText;\r\n if (!caseSensitive) {\r\n mySearchString = mySearchString.toLowerCase();\r\n }\r\n if (findStateSearchString === mySearchString && r.matchCase === findState.matchCase && r.wholeWord === findState.wholeWord && !findState.isRegex) {\r\n return null;\r\n }\r\n }\r\n return new SelectionHighlighterState(r.searchText, r.matchCase, r.wholeWord ? editor.getOption(110 /* wordSeparators */) : null, editor.getModel().getVersionId());\r\n }\r\n _setState(state) {\r\n if (SelectionHighlighterState.softEquals(this.state, state)) {\r\n this.state = state;\r\n return;\r\n }\r\n this.state = state;\r\n if (!this.state) {\r\n this.decorations = this.editor.deltaDecorations(this.decorations, []);\r\n return;\r\n }\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (model.isTooLargeForTokenization()) {\r\n // the file is too large, so searching word under cursor in the whole document takes is blocking the UI.\r\n return;\r\n }\r\n const hasFindOccurrences = _common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightProviderRegistry.has(model) && this.editor.getOption(66 /* occurrencesHighlight */);\r\n let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range);\r\n allMatches.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts);\r\n let selections = this.editor.getSelections();\r\n selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts);\r\n // do not overlap with selection (issue #64 and #512)\r\n let matches = [];\r\n for (let i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) {\r\n const match = allMatches[i];\r\n if (j >= lenJ) {\r\n // finished all editor selections\r\n matches.push(match);\r\n i++;\r\n }\r\n else {\r\n const cmp = _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.compareRangesUsingStarts(match, selections[j]);\r\n if (cmp < 0) {\r\n // match is before sel\r\n if (selections[j].isEmpty() || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__.Range.areIntersecting(match, selections[j])) {\r\n matches.push(match);\r\n }\r\n i++;\r\n }\r\n else if (cmp > 0) {\r\n // sel is before match\r\n j++;\r\n }\r\n else {\r\n // sel is equal to match\r\n i++;\r\n j++;\r\n }\r\n }\r\n }\r\n const decorations = matches.map(r => {\r\n return {\r\n range: r,\r\n // Show in overviewRuler only if model has no semantic highlighting\r\n options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW)\r\n };\r\n });\r\n this.decorations = this.editor.deltaDecorations(this.decorations, decorations);\r\n }\r\n dispose() {\r\n this._setState(null);\r\n super.dispose();\r\n }\r\n}\r\nSelectionHighlighter.ID = 'editor.contrib.selectionHighlighter';\r\nSelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.overviewRulerSelectionHighlightForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center\r\n }\r\n});\r\nSelectionHighlighter._SELECTION_HIGHLIGHT = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n});\r\nfunction modelRangesContainSameText(model, ranges, matchCase) {\r\n const selectedText = getValueInRange(model, ranges[0], !matchCase);\r\n for (let i = 1, len = ranges.length; i < len; i++) {\r\n const range = ranges[i];\r\n if (range.isEmpty()) {\r\n return false;\r\n }\r\n const thisSelectedText = getValueInRange(model, range, !matchCase);\r\n if (selectedText !== thisSelectedText) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction getValueInRange(model, range, toLowerCase) {\r\n const text = model.getValueInRange(range);\r\n return (toLowerCase ? text.toLowerCase() : text);\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(MultiCursorSelectionController.ID, MultiCursorSelectionController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(SelectionHighlighter.ID, SelectionHighlighter);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InsertCursorAbove);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InsertCursorBelow);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InsertCursorAtEndOfEachLineSelected);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(AddSelectionToNextFindMatchAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(AddSelectionToPreviousFindMatchAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(MoveSelectionToNextFindMatchAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(MoveSelectionToPreviousFindMatchAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(SelectHighlightsAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(CompatChangeAll);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InsertCursorAtEndOfLineSelected);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InsertCursorAtTopOfLineSelected);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TriggerParameterHintsAction\": () => (/* binding */ TriggerParameterHintsAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _parameterHintsWidget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parameterHintsWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js\");\n/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./provideSignatureHelp.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet ParameterHintsController = class ParameterHintsController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(editor, instantiationService) {\r\n super();\r\n this.editor = editor;\r\n this.widget = this._register(instantiationService.createInstance(_parameterHintsWidget_js__WEBPACK_IMPORTED_MODULE_6__.ParameterHintsWidget, this.editor));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ParameterHintsController.ID);\r\n }\r\n cancel() {\r\n this.widget.cancel();\r\n }\r\n previous() {\r\n this.widget.previous();\r\n }\r\n next() {\r\n this.widget.next();\r\n }\r\n trigger(context) {\r\n this.widget.trigger(context);\r\n }\r\n};\r\nParameterHintsController.ID = 'editor.controller.parameterHints';\r\nParameterHintsController = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__.IInstantiationService)\r\n], ParameterHintsController);\r\nclass TriggerParameterHintsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.triggerParameterHints',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('parameterHints.trigger.label', \"Trigger Parameter Hints\"),\r\n alias: 'Trigger Parameter Hints',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.hasSignatureHelpProvider,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 10 /* Space */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = ParameterHintsController.get(editor);\r\n if (controller) {\r\n controller.trigger({\r\n triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_8__.SignatureHelpTriggerKind.Invoke\r\n });\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorContribution)(ParameterHintsController.ID, ParameterHintsController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorAction)(TriggerParameterHintsAction);\r\nconst weight = 100 /* EditorContrib */ + 75;\r\nconst ParameterHintsCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.EditorCommand.bindToContribution(ParameterHintsController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorCommand)(new ParameterHintsCommand({\r\n id: 'closeParameterHints',\r\n precondition: _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__.Context.Visible,\r\n handler: x => x.cancel(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorCommand)(new ParameterHintsCommand({\r\n id: 'showPrevParameterHint',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.ContextKeyExpr.and(_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__.Context.Visible, _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__.Context.MultipleSignatures),\r\n handler: x => x.previous(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.focus,\r\n primary: 16 /* UpArrow */,\r\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\r\n mac: { primary: 16 /* UpArrow */, secondary: [512 /* Alt */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__.registerEditorCommand)(new ParameterHintsCommand({\r\n id: 'showNextParameterHint',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.ContextKeyExpr.and(_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__.Context.Visible, _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__.Context.MultipleSignatures),\r\n handler: x => x.next(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.focus,\r\n primary: 18 /* DownArrow */,\r\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\r\n mac: { primary: 18 /* DownArrow */, secondary: [512 /* Alt */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParameterHintsModel\": () => (/* binding */ ParameterHintsModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./provideSignatureHelp.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar ParameterHintState;\r\n(function (ParameterHintState) {\r\n ParameterHintState.Default = { type: 0 /* Default */ };\r\n class Pending {\r\n constructor(request, previouslyActiveHints) {\r\n this.request = request;\r\n this.previouslyActiveHints = previouslyActiveHints;\r\n this.type = 2 /* Pending */;\r\n }\r\n }\r\n ParameterHintState.Pending = Pending;\r\n class Active {\r\n constructor(hints) {\r\n this.hints = hints;\r\n this.type = 1 /* Active */;\r\n }\r\n }\r\n ParameterHintState.Active = Active;\r\n})(ParameterHintState || (ParameterHintState = {}));\r\nclass ParameterHintsModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor, delay = ParameterHintsModel.DEFAULT_DELAY) {\r\n super();\r\n this._onChangedHints = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onChangedHints = this._onChangedHints.event;\r\n this.triggerOnType = false;\r\n this._state = ParameterHintState.Default;\r\n this._pendingTriggers = [];\r\n this._lastSignatureHelpResult = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.MutableDisposable());\r\n this.triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__.CharacterSet();\r\n this.retriggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__.CharacterSet();\r\n this.triggerId = 0;\r\n this.editor = editor;\r\n this.throttledDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.Delayer(delay);\r\n this._register(this.editor.onDidChangeConfiguration(() => this.onEditorConfigurationChange()));\r\n this._register(this.editor.onDidChangeModel(e => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeModelLanguage(_ => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeCursorSelection(e => this.onCursorChange(e)));\r\n this._register(this.editor.onDidChangeModelContent(e => this.onModelContentChange()));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged, this));\r\n this._register(this.editor.onDidType(text => this.onDidType(text)));\r\n this.onEditorConfigurationChange();\r\n this.onModelChanged();\r\n }\r\n get state() { return this._state; }\r\n set state(value) {\r\n if (this._state.type === 2 /* Pending */) {\r\n this._state.request.cancel();\r\n }\r\n this._state = value;\r\n }\r\n cancel(silent = false) {\r\n this.state = ParameterHintState.Default;\r\n this.throttledDelayer.cancel();\r\n if (!silent) {\r\n this._onChangedHints.fire(undefined);\r\n }\r\n }\r\n trigger(context, delay) {\r\n const model = this.editor.getModel();\r\n if (!model || !_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpProviderRegistry.has(model)) {\r\n return;\r\n }\r\n const triggerId = ++this.triggerId;\r\n this._pendingTriggers.push(context);\r\n this.throttledDelayer.trigger(() => {\r\n return this.doTrigger(triggerId);\r\n }, delay)\r\n .catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError);\r\n }\r\n next() {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n const length = this.state.hints.signatures.length;\r\n const activeSignature = this.state.hints.activeSignature;\r\n const last = (activeSignature % length) === (length - 1);\r\n const cycle = this.editor.getOption(70 /* parameterHints */).cycle;\r\n // If there is only one signature, or we're on last signature of list\r\n if ((length < 2 || last) && !cycle) {\r\n this.cancel();\r\n return;\r\n }\r\n this.updateActiveSignature(last && cycle ? 0 : activeSignature + 1);\r\n }\r\n previous() {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n const length = this.state.hints.signatures.length;\r\n const activeSignature = this.state.hints.activeSignature;\r\n const first = activeSignature === 0;\r\n const cycle = this.editor.getOption(70 /* parameterHints */).cycle;\r\n // If there is only one signature, or we're on first signature of list\r\n if ((length < 2 || first) && !cycle) {\r\n this.cancel();\r\n return;\r\n }\r\n this.updateActiveSignature(first && cycle ? length - 1 : activeSignature - 1);\r\n }\r\n updateActiveSignature(activeSignature) {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n this.state = new ParameterHintState.Active(Object.assign(Object.assign({}, this.state.hints), { activeSignature }));\r\n this._onChangedHints.fire(this.state.hints);\r\n }\r\n doTrigger(triggerId) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const isRetrigger = this.state.type === 1 /* Active */ || this.state.type === 2 /* Pending */;\r\n const activeSignatureHelp = this.getLastActiveHints();\r\n this.cancel(true);\r\n if (this._pendingTriggers.length === 0) {\r\n return false;\r\n }\r\n const context = this._pendingTriggers.reduce(mergeTriggerContexts);\r\n this._pendingTriggers = [];\r\n const triggerContext = {\r\n triggerKind: context.triggerKind,\r\n triggerCharacter: context.triggerCharacter,\r\n isRetrigger: isRetrigger,\r\n activeSignatureHelp: activeSignatureHelp\r\n };\r\n if (!this.editor.hasModel()) {\r\n return false;\r\n }\r\n const model = this.editor.getModel();\r\n const position = this.editor.getPosition();\r\n this.state = new ParameterHintState.Pending((0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => (0,_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_6__.provideSignatureHelp)(model, position, triggerContext, token)), activeSignatureHelp);\r\n try {\r\n const result = yield this.state.request;\r\n // Check that we are still resolving the correct signature help\r\n if (triggerId !== this.triggerId) {\r\n result === null || result === void 0 ? void 0 : result.dispose();\r\n return false;\r\n }\r\n if (!result || !result.value.signatures || result.value.signatures.length === 0) {\r\n result === null || result === void 0 ? void 0 : result.dispose();\r\n this._lastSignatureHelpResult.clear();\r\n this.cancel();\r\n return false;\r\n }\r\n else {\r\n this.state = new ParameterHintState.Active(result.value);\r\n this._lastSignatureHelpResult.value = result;\r\n this._onChangedHints.fire(this.state.hints);\r\n return true;\r\n }\r\n }\r\n catch (error) {\r\n if (triggerId === this.triggerId) {\r\n this.state = ParameterHintState.Default;\r\n }\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError)(error);\r\n return false;\r\n }\r\n });\r\n }\r\n getLastActiveHints() {\r\n switch (this.state.type) {\r\n case 1 /* Active */: return this.state.hints;\r\n case 2 /* Pending */: return this.state.previouslyActiveHints;\r\n default: return undefined;\r\n }\r\n }\r\n get isTriggered() {\r\n return this.state.type === 1 /* Active */\r\n || this.state.type === 2 /* Pending */\r\n || this.throttledDelayer.isTriggered();\r\n }\r\n onModelChanged() {\r\n this.cancel();\r\n // Update trigger characters\r\n this.triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__.CharacterSet();\r\n this.retriggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__.CharacterSet();\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (const support of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpProviderRegistry.ordered(model)) {\r\n for (const ch of support.signatureHelpTriggerCharacters || []) {\r\n this.triggerChars.add(ch.charCodeAt(0));\r\n // All trigger characters are also considered retrigger characters\r\n this.retriggerChars.add(ch.charCodeAt(0));\r\n }\r\n for (const ch of support.signatureHelpRetriggerCharacters || []) {\r\n this.retriggerChars.add(ch.charCodeAt(0));\r\n }\r\n }\r\n }\r\n onDidType(text) {\r\n if (!this.triggerOnType) {\r\n return;\r\n }\r\n const lastCharIndex = text.length - 1;\r\n const triggerCharCode = text.charCodeAt(lastCharIndex);\r\n if (this.triggerChars.has(triggerCharCode) || this.isTriggered && this.retriggerChars.has(triggerCharCode)) {\r\n this.trigger({\r\n triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.TriggerCharacter,\r\n triggerCharacter: text.charAt(lastCharIndex),\r\n });\r\n }\r\n }\r\n onCursorChange(e) {\r\n if (e.source === 'mouse') {\r\n this.cancel();\r\n }\r\n else if (this.isTriggered) {\r\n this.trigger({ triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.ContentChange });\r\n }\r\n }\r\n onModelContentChange() {\r\n if (this.isTriggered) {\r\n this.trigger({ triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.ContentChange });\r\n }\r\n }\r\n onEditorConfigurationChange() {\r\n this.triggerOnType = this.editor.getOption(70 /* parameterHints */).enabled;\r\n if (!this.triggerOnType) {\r\n this.cancel();\r\n }\r\n }\r\n dispose() {\r\n this.cancel(true);\r\n super.dispose();\r\n }\r\n}\r\nParameterHintsModel.DEFAULT_DELAY = 120; // ms\r\nfunction mergeTriggerContexts(previous, current) {\r\n switch (current.triggerKind) {\r\n case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.Invoke:\r\n // Invoke overrides previous triggers.\r\n return current;\r\n case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.ContentChange:\r\n // Ignore content changes triggers\r\n return previous;\r\n case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SignatureHelpTriggerKind.TriggerCharacter:\r\n default:\r\n return current;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ParameterHintsWidget\": () => (/* binding */ ParameterHintsWidget)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _parameterHints_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parameterHints.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/core/markdownRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js\");\n/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./provideSignatureHelp.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _parameterHintsModel_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./parameterHintsModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.$;\r\nconst parameterHintsNextIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_20__.registerIcon)('parameter-hints-next', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.chevronDown, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\r\nconst parameterHintsPreviousIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_20__.registerIcon)('parameter-hints-previous', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__.Codicon.chevronUp, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\r\nlet ParameterHintsWidget = class ParameterHintsWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.Disposable {\r\n constructor(editor, contextKeyService, openerService, modeService) {\r\n super();\r\n this.editor = editor;\r\n this.renderDisposeables = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.DisposableStore());\r\n this.visible = false;\r\n this.announcedLabel = null;\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this.markdownRenderer = this._register(new _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_8__.MarkdownRenderer({ editor }, modeService, openerService));\r\n this.model = this._register(new _parameterHintsModel_js__WEBPACK_IMPORTED_MODULE_15__.ParameterHintsModel(editor));\r\n this.keyVisible = _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__.Context.Visible.bindTo(contextKeyService);\r\n this.keyMultipleSignatures = _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__.Context.MultipleSignatures.bindTo(contextKeyService);\r\n this._register(this.model.onChangedHints(newParameterHints => {\r\n if (newParameterHints) {\r\n this.show();\r\n this.render(newParameterHints);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }));\r\n }\r\n createParamaterHintDOMNodes() {\r\n const element = $('.editor-widget.parameter-hints-widget');\r\n const wrapper = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(element, $('.phwrapper'));\r\n wrapper.tabIndex = -1;\r\n const controls = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(wrapper, $('.controls'));\r\n const previous = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(controls, $('.button' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\r\n const overloads = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(controls, $('.overloads'));\r\n const next = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(controls, $('.button' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\r\n const onPreviousClick = (0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__.stop)((0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(previous, 'click'));\r\n this._register(onPreviousClick(this.previous, this));\r\n const onNextClick = (0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__.stop)((0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__.domEvent)(next, 'click'));\r\n this._register(onNextClick(this.next, this));\r\n const body = $('.body');\r\n const scrollbar = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__.DomScrollableElement(body, {});\r\n this._register(scrollbar);\r\n wrapper.appendChild(scrollbar.getDomNode());\r\n const signature = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(body, $('.signature'));\r\n const docs = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(body, $('.docs'));\r\n element.style.userSelect = 'text';\r\n this.domNodes = {\r\n element,\r\n signature,\r\n overloads,\r\n docs,\r\n scrollbar,\r\n };\r\n this.editor.addContentWidget(this);\r\n this.hide();\r\n this._register(this.editor.onDidChangeCursorSelection(e => {\r\n if (this.visible) {\r\n this.editor.layoutContentWidget(this);\r\n }\r\n }));\r\n const updateFont = () => {\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n this.domNodes.element.style.fontSize = `${fontInfo.fontSize}px`;\r\n };\r\n updateFont();\r\n this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_4__.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor))\r\n .filter(e => e.hasChanged(38 /* fontInfo */))\r\n .on(updateFont, null));\r\n this._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\r\n this.updateMaxHeight();\r\n }\r\n show() {\r\n if (this.visible) {\r\n return;\r\n }\r\n if (!this.domNodes) {\r\n this.createParamaterHintDOMNodes();\r\n }\r\n this.keyVisible.set(true);\r\n this.visible = true;\r\n setTimeout(() => {\r\n if (this.domNodes) {\r\n this.domNodes.element.classList.add('visible');\r\n }\r\n }, 100);\r\n this.editor.layoutContentWidget(this);\r\n }\r\n hide() {\r\n this.renderDisposeables.clear();\r\n if (!this.visible) {\r\n return;\r\n }\r\n this.keyVisible.reset();\r\n this.visible = false;\r\n this.announcedLabel = null;\r\n if (this.domNodes) {\r\n this.domNodes.element.classList.remove('visible');\r\n }\r\n this.editor.layoutContentWidget(this);\r\n }\r\n getPosition() {\r\n if (this.visible) {\r\n return {\r\n position: this.editor.getPosition(),\r\n preference: [1 /* ABOVE */, 2 /* BELOW */]\r\n };\r\n }\r\n return null;\r\n }\r\n render(hints) {\r\n var _a;\r\n this.renderDisposeables.clear();\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const multiple = hints.signatures.length > 1;\r\n this.domNodes.element.classList.toggle('multiple', multiple);\r\n this.keyMultipleSignatures.set(multiple);\r\n this.domNodes.signature.innerText = '';\r\n this.domNodes.docs.innerText = '';\r\n const signature = hints.signatures[hints.activeSignature];\r\n if (!signature) {\r\n return;\r\n }\r\n const code = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(this.domNodes.signature, $('.code'));\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n code.style.fontSize = `${fontInfo.fontSize}px`;\r\n code.style.fontFamily = fontInfo.fontFamily;\r\n const hasParameters = signature.parameters.length > 0;\r\n const activeParameterIndex = (_a = signature.activeParameter) !== null && _a !== void 0 ? _a : hints.activeParameter;\r\n if (!hasParameters) {\r\n const label = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(code, $('span'));\r\n label.textContent = signature.label;\r\n }\r\n else {\r\n this.renderParameters(code, signature, activeParameterIndex);\r\n }\r\n const activeParameter = signature.parameters[activeParameterIndex];\r\n if (activeParameter === null || activeParameter === void 0 ? void 0 : activeParameter.documentation) {\r\n const documentation = $('span.documentation');\r\n if (typeof activeParameter.documentation === 'string') {\r\n documentation.textContent = activeParameter.documentation;\r\n }\r\n else {\r\n const renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\r\n documentation.appendChild(renderedContents.element);\r\n }\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(this.domNodes.docs, $('p', {}, documentation));\r\n }\r\n if (signature.documentation === undefined) {\r\n /** no op */\r\n }\r\n else if (typeof signature.documentation === 'string') {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(this.domNodes.docs, $('p', {}, signature.documentation));\r\n }\r\n else {\r\n const renderedContents = this.renderMarkdownDocs(signature.documentation);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(this.domNodes.docs, renderedContents.element);\r\n }\r\n const hasDocs = this.hasDocs(signature, activeParameter);\r\n this.domNodes.signature.classList.toggle('has-docs', hasDocs);\r\n this.domNodes.docs.classList.toggle('empty', !hasDocs);\r\n this.domNodes.overloads.textContent =\r\n String(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\r\n if (activeParameter) {\r\n const labelToAnnounce = this.getParameterLabel(signature, activeParameterIndex);\r\n // Select method gets called on every user type while parameter hints are visible.\r\n // We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\r\n if (this.announcedLabel !== labelToAnnounce) {\r\n _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_2__.alert(_nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('hint', \"{0}, hint\", labelToAnnounce));\r\n this.announcedLabel = labelToAnnounce;\r\n }\r\n }\r\n this.editor.layoutContentWidget(this);\r\n this.domNodes.scrollbar.scanDomNode();\r\n }\r\n renderMarkdownDocs(markdown) {\r\n const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {\r\n asyncRenderCallback: () => {\r\n var _a;\r\n (_a = this.domNodes) === null || _a === void 0 ? void 0 : _a.scrollbar.scanDomNode();\r\n }\r\n }));\r\n renderedContents.element.classList.add('markdown-docs');\r\n return renderedContents;\r\n }\r\n hasDocs(signature, activeParameter) {\r\n if (activeParameter && typeof activeParameter.documentation === 'string' && (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__.assertIsDefined)(activeParameter.documentation).length > 0) {\r\n return true;\r\n }\r\n if (activeParameter && typeof activeParameter.documentation === 'object' && (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__.assertIsDefined)(activeParameter.documentation).value.length > 0) {\r\n return true;\r\n }\r\n if (signature.documentation && typeof signature.documentation === 'string' && (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__.assertIsDefined)(signature.documentation).length > 0) {\r\n return true;\r\n }\r\n if (signature.documentation && typeof signature.documentation === 'object' && (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__.assertIsDefined)(signature.documentation.value).length > 0) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n renderParameters(parent, signature, activeParameterIndex) {\r\n const [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\r\n const beforeSpan = document.createElement('span');\r\n beforeSpan.textContent = signature.label.substring(0, start);\r\n const paramSpan = document.createElement('span');\r\n paramSpan.textContent = signature.label.substring(start, end);\r\n paramSpan.className = 'parameter active';\r\n const afterSpan = document.createElement('span');\r\n afterSpan.textContent = signature.label.substring(end);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(parent, beforeSpan, paramSpan, afterSpan);\r\n }\r\n getParameterLabel(signature, paramIdx) {\r\n const param = signature.parameters[paramIdx];\r\n if (Array.isArray(param.label)) {\r\n return signature.label.substring(param.label[0], param.label[1]);\r\n }\r\n else {\r\n return param.label;\r\n }\r\n }\r\n getParameterLabelOffsets(signature, paramIdx) {\r\n const param = signature.parameters[paramIdx];\r\n if (!param) {\r\n return [0, 0];\r\n }\r\n else if (Array.isArray(param.label)) {\r\n return param.label;\r\n }\r\n else if (!param.label.length) {\r\n return [0, 0];\r\n }\r\n else {\r\n const regex = new RegExp(`(\\\\W|^)${(0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__.escapeRegExpCharacters)(param.label)}(?=\\\\W|$)`, 'g');\r\n regex.test(signature.label);\r\n const idx = regex.lastIndex - param.label.length;\r\n return idx >= 0\r\n ? [idx, regex.lastIndex]\r\n : [0, 0];\r\n }\r\n }\r\n next() {\r\n this.editor.focus();\r\n this.model.next();\r\n }\r\n previous() {\r\n this.editor.focus();\r\n this.model.previous();\r\n }\r\n cancel() {\r\n this.model.cancel();\r\n }\r\n getDomNode() {\r\n if (!this.domNodes) {\r\n this.createParamaterHintDOMNodes();\r\n }\r\n return this.domNodes.element;\r\n }\r\n getId() {\r\n return ParameterHintsWidget.ID;\r\n }\r\n trigger(context) {\r\n this.model.trigger(context, 0);\r\n }\r\n updateMaxHeight() {\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\r\n const maxHeight = `${height}px`;\r\n this.domNodes.element.style.maxHeight = maxHeight;\r\n const wrapper = this.domNodes.element.getElementsByClassName('phwrapper');\r\n if (wrapper.length) {\r\n wrapper[0].style.maxHeight = maxHeight;\r\n }\r\n }\r\n};\r\nParameterHintsWidget.ID = 'editor.widget.parameterHintsWidget';\r\nParameterHintsWidget = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.IContextKeyService),\r\n __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_12__.IOpenerService),\r\n __param(3, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__.IModeService)\r\n], ParameterHintsWidget);\r\n\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.registerThemingParticipant)((theme, collector) => {\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorHoverBorder);\r\n if (border) {\r\n const borderWidth = theme.type === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_19__.ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { border: ${borderWidth}px solid ${border}; }`);\r\n collector.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${border.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${border.transparent(0.5)}; }`);\r\n }\r\n const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorHoverBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${background}; }`);\r\n }\r\n const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget a { color: ${link}; }`);\r\n }\r\n const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorHoverForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { color: ${foreground}; }`);\r\n }\r\n const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Context\": () => (/* binding */ Context),\n/* harmony export */ \"provideSignatureHelp\": () => (/* binding */ provideSignatureHelp)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst Context = {\r\n Visible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('parameterHintsVisible', false),\r\n MultipleSignatures: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('parameterHintsMultipleSignatures', false),\r\n};\r\nfunction provideSignatureHelp(model, position, context, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const supports = _common_modes_js__WEBPACK_IMPORTED_MODULE_2__.SignatureHelpProviderRegistry.ordered(model);\r\n for (const support of supports) {\r\n try {\r\n const result = yield support.provideSignatureHelp(model, position, token, context);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedExternalError)(err);\r\n }\r\n }\r\n return undefined;\r\n });\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_executeSignatureHelpProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, position, triggerCharacter] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_7__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_6__.URI.isUri(uri));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_7__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position.isIPosition(position));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_7__.assertType)(typeof triggerCharacter === 'string' || !triggerCharacter);\r\n const ref = yield accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_8__.ITextModelService).createModelReference(uri);\r\n try {\r\n const result = yield provideSignatureHelp(ref.object.textEditorModel, _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__.Position.lift(position), {\r\n triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_2__.SignatureHelpTriggerKind.Invoke,\r\n isRetrigger: false,\r\n triggerCharacter,\r\n }, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__.CancellationToken.None);\r\n if (!result) {\r\n return undefined;\r\n }\r\n setTimeout(() => result.dispose(), 0);\r\n return result.value;\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IPeekViewService\": () => (/* binding */ IPeekViewService),\n/* harmony export */ \"PeekContext\": () => (/* binding */ PeekContext),\n/* harmony export */ \"getOuterEditor\": () => (/* binding */ getOuterEditor),\n/* harmony export */ \"PeekViewWidget\": () => (/* binding */ PeekViewWidget),\n/* harmony export */ \"peekViewTitleBackground\": () => (/* binding */ peekViewTitleBackground),\n/* harmony export */ \"peekViewTitleForeground\": () => (/* binding */ peekViewTitleForeground),\n/* harmony export */ \"peekViewTitleInfoForeground\": () => (/* binding */ peekViewTitleInfoForeground),\n/* harmony export */ \"peekViewBorder\": () => (/* binding */ peekViewBorder),\n/* harmony export */ \"peekViewResultsBackground\": () => (/* binding */ peekViewResultsBackground),\n/* harmony export */ \"peekViewResultsMatchForeground\": () => (/* binding */ peekViewResultsMatchForeground),\n/* harmony export */ \"peekViewResultsFileForeground\": () => (/* binding */ peekViewResultsFileForeground),\n/* harmony export */ \"peekViewResultsSelectionBackground\": () => (/* binding */ peekViewResultsSelectionBackground),\n/* harmony export */ \"peekViewResultsSelectionForeground\": () => (/* binding */ peekViewResultsSelectionForeground),\n/* harmony export */ \"peekViewEditorBackground\": () => (/* binding */ peekViewEditorBackground),\n/* harmony export */ \"peekViewEditorGutterBackground\": () => (/* binding */ peekViewEditorGutterBackground),\n/* harmony export */ \"peekViewResultsMatchHighlight\": () => (/* binding */ peekViewResultsMatchHighlight),\n/* harmony export */ \"peekViewEditorMatchHighlight\": () => (/* binding */ peekViewEditorMatchHighlight),\n/* harmony export */ \"peekViewEditorMatchHighlightBorder\": () => (/* binding */ peekViewEditorMatchHighlightBorder)\n/* harmony export */ });\n/* harmony import */ var _media_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/peekViewWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/widget/embeddedCodeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js\");\n/* harmony import */ var _zoneWidget_zoneWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../zoneWidget/zoneWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/actions/browser/menuEntryActionViewItem.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst IPeekViewService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__.createDecorator)('IPeekViewService');\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_13__.registerSingleton)(IPeekViewService, class {\r\n constructor() {\r\n this._widgets = new Map();\r\n }\r\n addExclusiveWidget(editor, widget) {\r\n const existing = this._widgets.get(editor);\r\n if (existing) {\r\n existing.listener.dispose();\r\n existing.widget.dispose();\r\n }\r\n const remove = () => {\r\n const data = this._widgets.get(editor);\r\n if (data && data.widget === widget) {\r\n data.listener.dispose();\r\n this._widgets.delete(editor);\r\n }\r\n };\r\n this._widgets.set(editor, { widget, listener: widget.onDidClose(remove) });\r\n }\r\n});\r\nvar PeekContext;\r\n(function (PeekContext) {\r\n PeekContext.inPeekEditor = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.RawContextKey('inReferenceSearchEditor', true);\r\n PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated();\r\n})(PeekContext || (PeekContext = {}));\r\nlet PeekContextController = class PeekContextController {\r\n constructor(editor, contextKeyService) {\r\n if (editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__.EmbeddedCodeEditorWidget) {\r\n PeekContext.inPeekEditor.bindTo(contextKeyService);\r\n }\r\n }\r\n dispose() { }\r\n};\r\nPeekContextController.ID = 'editor.contrib.referenceController';\r\nPeekContextController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.IContextKeyService)\r\n], PeekContextController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_14__.registerEditorContribution)(PeekContextController.ID, PeekContextController);\r\nfunction getOuterEditor(accessor) {\r\n let editor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_7__.ICodeEditorService).getFocusedCodeEditor();\r\n if (editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__.EmbeddedCodeEditorWidget) {\r\n return editor.getParentEditor();\r\n }\r\n return editor;\r\n}\r\nconst defaultOptions = {\r\n headerBackgroundColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white,\r\n primaryHeadingColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.fromHex('#333333'),\r\n secondaryHeadingColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.fromHex('#6c6c6cb3')\r\n};\r\nlet PeekViewWidget = class PeekViewWidget extends _zoneWidget_zoneWidget_js__WEBPACK_IMPORTED_MODULE_9__.ZoneWidget {\r\n constructor(editor, options, instantiationService) {\r\n super(editor, options);\r\n this.instantiationService = instantiationService;\r\n this._onDidClose = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onDidClose = this._onDidClose.event;\r\n _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__.mixin(this.options, defaultOptions, false);\r\n }\r\n dispose() {\r\n if (!this.disposed) {\r\n this.disposed = true; // prevent consumers who dispose on onDidClose from looping\r\n super.dispose();\r\n this._onDidClose.fire(this);\r\n }\r\n }\r\n style(styles) {\r\n let options = this.options;\r\n if (styles.headerBackgroundColor) {\r\n options.headerBackgroundColor = styles.headerBackgroundColor;\r\n }\r\n if (styles.primaryHeadingColor) {\r\n options.primaryHeadingColor = styles.primaryHeadingColor;\r\n }\r\n if (styles.secondaryHeadingColor) {\r\n options.secondaryHeadingColor = styles.secondaryHeadingColor;\r\n }\r\n super.style(styles);\r\n }\r\n _applyStyles() {\r\n super._applyStyles();\r\n let options = this.options;\r\n if (this._headElement && options.headerBackgroundColor) {\r\n this._headElement.style.backgroundColor = options.headerBackgroundColor.toString();\r\n }\r\n if (this._primaryHeading && options.primaryHeadingColor) {\r\n this._primaryHeading.style.color = options.primaryHeadingColor.toString();\r\n }\r\n if (this._secondaryHeading && options.secondaryHeadingColor) {\r\n this._secondaryHeading.style.color = options.secondaryHeadingColor.toString();\r\n }\r\n if (this._bodyElement && options.frameColor) {\r\n this._bodyElement.style.borderColor = options.frameColor.toString();\r\n }\r\n }\r\n _fillContainer(container) {\r\n this.setCssClass('peekview-widget');\r\n this._headElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.head');\r\n this._bodyElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.body');\r\n this._fillHead(this._headElement);\r\n this._fillBody(this._bodyElement);\r\n container.appendChild(this._headElement);\r\n container.appendChild(this._bodyElement);\r\n }\r\n _fillHead(container, noCloseAction) {\r\n const titleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.peekview-title');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this._headElement, titleElement);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(titleElement, 'click', event => this._onTitleClick(event));\r\n this._fillTitleIcon(titleElement);\r\n this._primaryHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.filename');\r\n this._secondaryHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.dirname');\r\n this._metaHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('span.meta');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading);\r\n const actionsContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$('.peekview-actions');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append(this._headElement, actionsContainer);\r\n const actionBarOptions = this._getActionBarOptions();\r\n this._actionbarWidget = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_2__.ActionBar(actionsContainer, actionBarOptions);\r\n this._disposables.add(this._actionbarWidget);\r\n if (!noCloseAction) {\r\n this._actionbarWidget.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__.Action('peekview.close', _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('label.close', \"Close\"), _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_16__.Codicon.close.classNames, true, () => {\r\n this.dispose();\r\n return Promise.resolve();\r\n }), { label: false, icon: true });\r\n }\r\n }\r\n _fillTitleIcon(container) {\r\n }\r\n _getActionBarOptions() {\r\n return {\r\n actionViewItemProvider: _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_17__.createActionViewItem.bind(undefined, this.instantiationService),\r\n orientation: 0 /* HORIZONTAL */\r\n };\r\n }\r\n _onTitleClick(event) {\r\n // implement me\r\n }\r\n setTitle(primaryHeading, secondaryHeading) {\r\n if (this._primaryHeading && this._secondaryHeading) {\r\n this._primaryHeading.innerText = primaryHeading;\r\n this._primaryHeading.setAttribute('aria-label', primaryHeading);\r\n if (secondaryHeading) {\r\n this._secondaryHeading.innerText = secondaryHeading;\r\n }\r\n else {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.clearNode(this._secondaryHeading);\r\n }\r\n }\r\n }\r\n setMetaTitle(value) {\r\n if (this._metaHeading) {\r\n if (value) {\r\n this._metaHeading.innerText = value;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.show(this._metaHeading);\r\n }\r\n else {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.hide(this._metaHeading);\r\n }\r\n }\r\n }\r\n _doLayout(heightInPixel, widthInPixel) {\r\n if (!this._isShowing && heightInPixel < 0) {\r\n // Looks like the view zone got folded away!\r\n this.dispose();\r\n return;\r\n }\r\n const headHeight = Math.ceil(this.editor.getOption(53 /* lineHeight */) * 1.2);\r\n const bodyHeight = Math.round(heightInPixel - (headHeight + 2 /* the border-top/bottom width*/));\r\n this._doLayoutHead(headHeight, widthInPixel);\r\n this._doLayoutBody(bodyHeight, widthInPixel);\r\n }\r\n _doLayoutHead(heightInPixel, widthInPixel) {\r\n if (this._headElement) {\r\n this._headElement.style.height = `${heightInPixel}px`;\r\n this._headElement.style.lineHeight = this._headElement.style.height;\r\n }\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n if (this._bodyElement) {\r\n this._bodyElement.style.height = `${heightInPixel}px`;\r\n }\r\n }\r\n};\r\nPeekViewWidget = __decorate([\r\n __param(2, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__.IInstantiationService)\r\n], PeekViewWidget);\r\n\r\nconst peekViewTitleBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewTitleBackground', 'Background color of the peek view title area.'));\r\nconst peekViewTitleForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewTitleForeground', 'Color of the peek view title.'));\r\nconst peekViewTitleInfoForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161e6', hc: '#FFFFFF99' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.'));\r\nconst peekViewBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekView.border', { dark: '#007acc', light: '#007acc', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewBorder', 'Color of the peek view borders and arrow.'));\r\nconst peekViewResultsBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsBackground', 'Background color of the peek view result list.'));\r\nconst peekViewResultsMatchForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.'));\r\nconst peekViewResultsFileForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.fileForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white, light: '#1E1E1E', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.'));\r\nconst peekViewResultsSelectionBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.'));\r\nconst peekViewResultsSelectionForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.selectionForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white, light: '#6C6C6C', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.'));\r\nconst peekViewEditorBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewEditorBackground', 'Background color of the peek view editor.'));\r\nconst peekViewEditorGutterBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.'));\r\nconst peekViewResultsMatchHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.'));\r\nconst peekViewEditorMatchHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.'));\r\nconst peekViewEditorMatchHighlightBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.registerColor)('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_10__.localize('peekViewEditorMatchHighlightBorder', 'Match highlight border in the peek view editor.'));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractEditorCommandsQuickAccessProvider\": () => (/* binding */ AbstractEditorCommandsQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _platform_quickinput_browser_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/quickinput/browser/commandsQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js\");\n/* harmony import */ var _base_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/iconLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iconLabels.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass AbstractEditorCommandsQuickAccessProvider extends _platform_quickinput_browser_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__.AbstractCommandsQuickAccessProvider {\r\n constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) {\r\n super(options, instantiationService, keybindingService, commandService, telemetryService, notificationService);\r\n }\r\n getCodeEditorCommandPicks() {\r\n const activeTextEditorControl = this.activeTextEditorControl;\r\n if (!activeTextEditorControl) {\r\n return [];\r\n }\r\n const editorCommandPicks = [];\r\n for (const editorAction of activeTextEditorControl.getSupportedActions()) {\r\n editorCommandPicks.push({\r\n commandId: editorAction.id,\r\n commandAlias: editorAction.alias,\r\n label: (0,_base_common_iconLabels_js__WEBPACK_IMPORTED_MODULE_1__.stripIcons)(editorAction.label) || editorAction.id,\r\n });\r\n }\r\n return editorCommandPicks;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js":
|
||
/*!*****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js ***!
|
||
\*****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractEditorNavigationQuickAccessProvider\": () => (/* binding */ AbstractEditorNavigationQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * A reusable quick access provider for the editor with support\r\n * for adding decorations for navigating in the currently active file\r\n * (for example \"Go to line\", \"Go to symbol\").\r\n */\r\nclass AbstractEditorNavigationQuickAccessProvider {\r\n constructor(options) {\r\n this.options = options;\r\n //#endregion\r\n //#region Decorations Utils\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n //#region Provider methods\r\n provide(picker, token) {\r\n var _a;\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n // Apply options if any\r\n picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground);\r\n // Disable filtering & sorting, we control the results\r\n picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false;\r\n // Provide based on current active editor\r\n const pickerDisposable = disposables.add(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.MutableDisposable());\r\n pickerDisposable.value = this.doProvide(picker, token);\r\n // Re-create whenever the active editor changes\r\n disposables.add(this.onDidActiveTextEditorControlChange(() => {\r\n // Clear old\r\n pickerDisposable.value = undefined;\r\n // Add new\r\n pickerDisposable.value = this.doProvide(picker, token);\r\n }));\r\n return disposables;\r\n }\r\n doProvide(picker, token) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n // With text control\r\n const editor = this.activeTextEditorControl;\r\n if (editor && this.canProvideWithTextEditor(editor)) {\r\n const context = { editor };\r\n // Restore any view state if this picker was closed\r\n // without actually going to a line\r\n const codeEditor = (0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__.getCodeEditor)(editor);\r\n if (codeEditor) {\r\n // Remember view state and update it when the cursor position\r\n // changes even later because it could be that the user has\r\n // configured quick access to remain open when focus is lost and\r\n // we always want to restore the current location.\r\n let lastKnownEditorViewState = (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__.withNullAsUndefined)(editor.saveViewState());\r\n disposables.add(codeEditor.onDidChangeCursorPosition(() => {\r\n lastKnownEditorViewState = (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__.withNullAsUndefined)(editor.saveViewState());\r\n }));\r\n context.restoreViewState = () => {\r\n if (lastKnownEditorViewState && editor === this.activeTextEditorControl) {\r\n editor.restoreViewState(lastKnownEditorViewState);\r\n }\r\n };\r\n disposables.add((0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__.once)(token.onCancellationRequested)(() => { var _a; return (_a = context.restoreViewState) === null || _a === void 0 ? void 0 : _a.call(context); }));\r\n }\r\n // Clean up decorations on dispose\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.toDisposable)(() => this.clearDecorations(editor)));\r\n // Ask subclass for entries\r\n disposables.add(this.provideWithTextEditor(context, picker, token));\r\n }\r\n // Without text control\r\n else {\r\n disposables.add(this.provideWithoutTextEditor(picker, token));\r\n }\r\n return disposables;\r\n }\r\n /**\r\n * Subclasses to implement if they can operate on the text editor.\r\n */\r\n canProvideWithTextEditor(editor) {\r\n return true;\r\n }\r\n gotoLocation({ editor }, options) {\r\n editor.setSelection(options.range);\r\n editor.revealRangeInCenter(options.range, 0 /* Smooth */);\r\n if (!options.preserveFocus) {\r\n editor.focus();\r\n }\r\n }\r\n getModel(editor) {\r\n var _a;\r\n return (0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__.isDiffEditor)(editor) ?\r\n (_a = editor.getModel()) === null || _a === void 0 ? void 0 : _a.modified :\r\n editor.getModel();\r\n }\r\n addDecorations(editor, range) {\r\n editor.changeDecorations(changeAccessor => {\r\n // Reset old decorations if any\r\n const deleteDecorations = [];\r\n if (this.rangeHighlightDecorationId) {\r\n deleteDecorations.push(this.rangeHighlightDecorationId.overviewRulerDecorationId);\r\n deleteDecorations.push(this.rangeHighlightDecorationId.rangeHighlightId);\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n // Add new decorations for the range\r\n const newDecorations = [\r\n // highlight the entire line on the range\r\n {\r\n range,\r\n options: {\r\n className: 'rangeHighlight',\r\n isWholeLine: true\r\n }\r\n },\r\n // also add overview ruler highlight\r\n {\r\n range,\r\n options: {\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__.themeColorFromId)(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.overviewRulerRangeHighlight),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_0__.OverviewRulerLane.Full\r\n }\r\n }\r\n }\r\n ];\r\n const [rangeHighlightId, overviewRulerDecorationId] = changeAccessor.deltaDecorations(deleteDecorations, newDecorations);\r\n this.rangeHighlightDecorationId = { rangeHighlightId, overviewRulerDecorationId };\r\n });\r\n }\r\n clearDecorations(editor) {\r\n const rangeHighlightDecorationId = this.rangeHighlightDecorationId;\r\n if (rangeHighlightDecorationId) {\r\n editor.changeDecorations(changeAccessor => {\r\n changeAccessor.deltaDecorations([\r\n rangeHighlightDecorationId.overviewRulerDecorationId,\r\n rangeHighlightDecorationId.rangeHighlightId\r\n ], []);\r\n });\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractGotoLineQuickAccessProvider\": () => (/* binding */ AbstractGotoLineQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editorNavigationQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js\");\n/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass AbstractGotoLineQuickAccessProvider extends _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractEditorNavigationQuickAccessProvider {\r\n constructor() {\r\n super({ canAcceptInBackground: true });\r\n }\r\n provideWithoutTextEditor(picker) {\r\n const label = (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('cannotRunGotoLine', \"Open a text editor first to go to a line.\");\r\n picker.items = [{ label }];\r\n picker.ariaLabel = label;\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n provideWithTextEditor(context, picker, token) {\r\n const editor = context.editor;\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n // Goto line once picked\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (item) {\r\n if (!this.isValidLineNumber(editor, item.lineNumber)) {\r\n return;\r\n }\r\n this.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\r\n if (!event.inBackground) {\r\n picker.hide();\r\n }\r\n }\r\n }));\r\n // React to picker changes\r\n const updatePickerAndEditor = () => {\r\n const position = this.parsePosition(editor, picker.value.trim().substr(AbstractGotoLineQuickAccessProvider.PREFIX.length));\r\n const label = this.getPickLabel(editor, position.lineNumber, position.column);\r\n // Picker\r\n picker.items = [{\r\n lineNumber: position.lineNumber,\r\n column: position.column,\r\n label\r\n }];\r\n // ARIA Label\r\n picker.ariaLabel = label;\r\n // Clear decorations for invalid range\r\n if (!this.isValidLineNumber(editor, position.lineNumber)) {\r\n this.clearDecorations(editor);\r\n return;\r\n }\r\n // Reveal\r\n const range = this.toRange(position.lineNumber, position.column);\r\n editor.revealRangeInCenter(range, 0 /* Smooth */);\r\n // Decorate\r\n this.addDecorations(editor, range);\r\n };\r\n updatePickerAndEditor();\r\n disposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\r\n // Adjust line number visibility as needed\r\n const codeEditor = (0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_3__.getCodeEditor)(editor);\r\n if (codeEditor) {\r\n const options = codeEditor.getOptions();\r\n const lineNumbers = options.get(54 /* lineNumbers */);\r\n if (lineNumbers.renderType === 2 /* Relative */) {\r\n codeEditor.updateOptions({ lineNumbers: 'on' });\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\r\n }\r\n }\r\n return disposables;\r\n }\r\n toRange(lineNumber = 1, column = 1) {\r\n return {\r\n startLineNumber: lineNumber,\r\n startColumn: column,\r\n endLineNumber: lineNumber,\r\n endColumn: column\r\n };\r\n }\r\n parsePosition(editor, value) {\r\n // Support line-col formats of `line,col`, `line:col`, `line#col`\r\n const numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part));\r\n const endLine = this.lineCount(editor) + 1;\r\n return {\r\n lineNumber: numbers[0] > 0 ? numbers[0] : endLine + numbers[0],\r\n column: numbers[1]\r\n };\r\n }\r\n getPickLabel(editor, lineNumber, column) {\r\n // Location valid: indicate this as picker label\r\n if (this.isValidLineNumber(editor, lineNumber)) {\r\n if (this.isValidColumn(editor, lineNumber, column)) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('gotoLineColumnLabel', \"Go to line {0} and column {1}.\", lineNumber, column);\r\n }\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('gotoLineLabel', \"Go to line {0}.\", lineNumber);\r\n }\r\n // Location invalid: show generic label\r\n const position = editor.getPosition() || { lineNumber: 1, column: 1 };\r\n const lineCount = this.lineCount(editor);\r\n if (lineCount > 1) {\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('gotoLineLabelEmptyWithLimit', \"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.\", position.lineNumber, position.column, lineCount);\r\n }\r\n return (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('gotoLineLabelEmpty', \"Current Line: {0}, Character: {1}. Type a line number to navigate to.\", position.lineNumber, position.column);\r\n }\r\n isValidLineNumber(editor, lineNumber) {\r\n if (!lineNumber || typeof lineNumber !== 'number') {\r\n return false;\r\n }\r\n return lineNumber > 0 && lineNumber <= this.lineCount(editor);\r\n }\r\n isValidColumn(editor, lineNumber, column) {\r\n if (!column || typeof column !== 'number') {\r\n return false;\r\n }\r\n const model = this.getModel(editor);\r\n if (!model) {\r\n return false;\r\n }\r\n const positionCandidate = { lineNumber, column };\r\n return model.validatePosition(positionCandidate).equals(positionCandidate);\r\n }\r\n lineCount(editor) {\r\n var _a, _b;\r\n return (_b = (_a = this.getModel(editor)) === null || _a === void 0 ? void 0 : _a.getLineCount()) !== null && _b !== void 0 ? _b : 0;\r\n }\r\n}\r\nAbstractGotoLineQuickAccessProvider.PREFIX = ':';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractGotoSymbolQuickAccessProvider\": () => (/* binding */ AbstractGotoSymbolQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editorNavigationQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../documentSymbols/outlineModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/fuzzyScorer.js */ \"./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass AbstractGotoSymbolQuickAccessProvider extends _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__.AbstractEditorNavigationQuickAccessProvider {\r\n constructor(options = Object.create(null)) {\r\n super(options);\r\n this.options = options;\r\n options.canAcceptInBackground = true;\r\n }\r\n provideWithoutTextEditor(picker) {\r\n this.provideLabelPick(picker, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('cannotRunGotoSymbolWithoutEditor', \"To go to a symbol, first open a text editor with symbol information.\"));\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable.None;\r\n }\r\n provideWithTextEditor(context, picker, token) {\r\n const editor = context.editor;\r\n const model = this.getModel(editor);\r\n if (!model) {\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable.None;\r\n }\r\n // Provide symbols from model if available in registry\r\n if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.has(model)) {\r\n return this.doProvideWithEditorSymbols(context, model, picker, token);\r\n }\r\n // Otherwise show an entry for a model without registry\r\n // But give a chance to resolve the symbols at a later\r\n // point if possible\r\n return this.doProvideWithoutEditorSymbols(context, model, picker, token);\r\n }\r\n doProvideWithoutEditorSymbols(context, model, picker, token) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n // Generic pick for not having any symbol information\r\n this.provideLabelPick(picker, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('cannotRunGotoSymbolWithoutSymbolProvider', \"The active text editor does not provide symbol information.\"));\r\n // Wait for changes to the registry and see if eventually\r\n // we do get symbols. This can happen if the picker is opened\r\n // very early after the model has loaded but before the\r\n // language registry is ready.\r\n // https://github.com/microsoft/vscode/issues/70607\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n const result = yield this.waitForLanguageSymbolRegistry(model, disposables);\r\n if (!result || token.isCancellationRequested) {\r\n return;\r\n }\r\n disposables.add(this.doProvideWithEditorSymbols(context, model, picker, token));\r\n }))();\r\n return disposables;\r\n }\r\n provideLabelPick(picker, label) {\r\n picker.items = [{ label, index: 0, kind: 14 /* String */ }];\r\n picker.ariaLabel = label;\r\n }\r\n waitForLanguageSymbolRegistry(model, disposables) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.has(model)) {\r\n return true;\r\n }\r\n let symbolProviderRegistryPromiseResolve;\r\n const symbolProviderRegistryPromise = new Promise(resolve => symbolProviderRegistryPromiseResolve = resolve);\r\n // Resolve promise when registry knows model\r\n const symbolProviderListener = disposables.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.onDidChange(() => {\r\n if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.DocumentSymbolProviderRegistry.has(model)) {\r\n symbolProviderListener.dispose();\r\n symbolProviderRegistryPromiseResolve(true);\r\n }\r\n }));\r\n // Resolve promise when we get disposed too\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => symbolProviderRegistryPromiseResolve(false)));\r\n return symbolProviderRegistryPromise;\r\n });\r\n }\r\n doProvideWithEditorSymbols(context, model, picker, token) {\r\n const editor = context.editor;\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n // Goto symbol once picked\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (item && item.range) {\r\n this.gotoLocation(context, { range: item.range.selection, keyMods: picker.keyMods, preserveFocus: event.inBackground });\r\n if (!event.inBackground) {\r\n picker.hide();\r\n }\r\n }\r\n }));\r\n // Goto symbol side by side if enabled\r\n disposables.add(picker.onDidTriggerItemButton(({ item }) => {\r\n if (item && item.range) {\r\n this.gotoLocation(context, { range: item.range.selection, keyMods: picker.keyMods, forceSideBySide: true });\r\n picker.hide();\r\n }\r\n }));\r\n // Resolve symbols from document once and reuse this\r\n // request for all filtering and typing then on\r\n const symbolsPromise = this.getDocumentSymbols(model, token);\r\n // Set initial picks and update on type\r\n let picksCts = undefined;\r\n const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () {\r\n // Cancel any previous ask for picks and busy\r\n picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true);\r\n picker.busy = false;\r\n // Create new cancellation source for this run\r\n picksCts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationTokenSource(token);\r\n // Collect symbol picks\r\n picker.busy = true;\r\n try {\r\n const query = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.prepareQuery)(picker.value.substr(AbstractGotoSymbolQuickAccessProvider.PREFIX.length).trim());\r\n const items = yield this.doGetSymbolPicks(symbolsPromise, query, undefined, picksCts.token);\r\n if (token.isCancellationRequested) {\r\n return;\r\n }\r\n if (items.length > 0) {\r\n picker.items = items;\r\n }\r\n else {\r\n if (query.original.length > 0) {\r\n this.provideLabelPick(picker, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('noMatchingSymbolResults', \"No matching editor symbols\"));\r\n }\r\n else {\r\n this.provideLabelPick(picker, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('noSymbolResults', \"No editor symbols\"));\r\n }\r\n }\r\n }\r\n finally {\r\n if (!token.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n }\r\n });\r\n disposables.add(picker.onDidChangeValue(() => updatePickerItems()));\r\n updatePickerItems();\r\n // Reveal and decorate when active item changes\r\n // However, ignore the very first event so that\r\n // opening the picker is not immediately revealing\r\n // and decorating the first entry.\r\n let ignoreFirstActiveEvent = true;\r\n disposables.add(picker.onDidChangeActive(() => {\r\n const [item] = picker.activeItems;\r\n if (item && item.range) {\r\n if (ignoreFirstActiveEvent) {\r\n ignoreFirstActiveEvent = false;\r\n return;\r\n }\r\n // Reveal\r\n editor.revealRangeInCenter(item.range.selection, 0 /* Smooth */);\r\n // Decorate\r\n this.addDecorations(editor, item.range.decoration);\r\n }\r\n }));\r\n return disposables;\r\n }\r\n doGetSymbolPicks(symbolsPromise, query, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const symbols = yield symbolsPromise;\r\n if (token.isCancellationRequested) {\r\n return [];\r\n }\r\n const filterBySymbolKind = query.original.indexOf(AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX) === 0;\r\n const filterPos = filterBySymbolKind ? 1 : 0;\r\n // Split between symbol and container query\r\n let symbolQuery;\r\n let containerQuery;\r\n if (query.values && query.values.length > 1) {\r\n symbolQuery = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.pieceToQuery)(query.values[0]); // symbol: only match on first part\r\n containerQuery = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.pieceToQuery)(query.values.slice(1)); // container: match on all but first parts\r\n }\r\n else {\r\n symbolQuery = query;\r\n }\r\n // Convert to symbol picks and apply filtering\r\n const filteredSymbolPicks = [];\r\n for (let index = 0; index < symbols.length; index++) {\r\n const symbol = symbols[index];\r\n const symbolLabel = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__.trim)(symbol.name);\r\n const symbolLabelWithIcon = `$(symbol-${_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.SymbolKinds.toString(symbol.kind) || 'property'}) ${symbolLabel}`;\r\n const symbolLabelIconOffset = symbolLabelWithIcon.length - symbolLabel.length;\r\n let containerLabel = symbol.containerName;\r\n if (options === null || options === void 0 ? void 0 : options.extraContainerLabel) {\r\n if (containerLabel) {\r\n containerLabel = `${options.extraContainerLabel} • ${containerLabel}`;\r\n }\r\n else {\r\n containerLabel = options.extraContainerLabel;\r\n }\r\n }\r\n let symbolScore = undefined;\r\n let symbolMatches = undefined;\r\n let containerScore = undefined;\r\n let containerMatches = undefined;\r\n if (query.original.length > filterPos) {\r\n // First: try to score on the entire query, it is possible that\r\n // the symbol matches perfectly (e.g. searching for \"change log\"\r\n // can be a match on a markdown symbol \"change log\"). In that\r\n // case we want to skip the container query altogether.\r\n let skipContainerQuery = false;\r\n if (symbolQuery !== query) {\r\n [symbolScore, symbolMatches] = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.scoreFuzzy2)(symbolLabelWithIcon, Object.assign(Object.assign({}, query), { values: undefined /* disable multi-query support */ }), filterPos, symbolLabelIconOffset);\r\n if (typeof symbolScore === 'number') {\r\n skipContainerQuery = true; // since we consumed the query, skip any container matching\r\n }\r\n }\r\n // Otherwise: score on the symbol query and match on the container later\r\n if (typeof symbolScore !== 'number') {\r\n [symbolScore, symbolMatches] = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.scoreFuzzy2)(symbolLabelWithIcon, symbolQuery, filterPos, symbolLabelIconOffset);\r\n if (typeof symbolScore !== 'number') {\r\n continue;\r\n }\r\n }\r\n // Score by container if specified\r\n if (!skipContainerQuery && containerQuery) {\r\n if (containerLabel && containerQuery.original.length > 0) {\r\n [containerScore, containerMatches] = (0,_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__.scoreFuzzy2)(containerLabel, containerQuery);\r\n }\r\n if (typeof containerScore !== 'number') {\r\n continue;\r\n }\r\n if (typeof symbolScore === 'number') {\r\n symbolScore += containerScore; // boost symbolScore by containerScore\r\n }\r\n }\r\n }\r\n const deprecated = symbol.tags && symbol.tags.indexOf(1 /* Deprecated */) >= 0;\r\n filteredSymbolPicks.push({\r\n index,\r\n kind: symbol.kind,\r\n score: symbolScore,\r\n label: symbolLabelWithIcon,\r\n ariaLabel: symbolLabel,\r\n description: containerLabel,\r\n highlights: deprecated ? undefined : {\r\n label: symbolMatches,\r\n description: containerMatches\r\n },\r\n range: {\r\n selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__.Range.collapseToStart(symbol.selectionRange),\r\n decoration: symbol.range\r\n },\r\n strikethrough: deprecated,\r\n buttons: (() => {\r\n var _a, _b;\r\n const openSideBySideDirection = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.openSideBySideDirection) ? (_b = this.options) === null || _b === void 0 ? void 0 : _b.openSideBySideDirection() : undefined;\r\n if (!openSideBySideDirection) {\r\n return undefined;\r\n }\r\n return [\r\n {\r\n iconClass: openSideBySideDirection === 'right' ? _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_9__.Codicon.splitHorizontal.classNames : _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_9__.Codicon.splitVertical.classNames,\r\n tooltip: openSideBySideDirection === 'right' ? (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('openToSide', \"Open to the Side\") : (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('openToBottom', \"Open to the Bottom\")\r\n }\r\n ];\r\n })()\r\n });\r\n }\r\n // Sort by score\r\n const sortedFilteredSymbolPicks = filteredSymbolPicks.sort((symbolA, symbolB) => filterBySymbolKind ?\r\n this.compareByKindAndScore(symbolA, symbolB) :\r\n this.compareByScore(symbolA, symbolB));\r\n // Add separator for types\r\n // - @ only total number of symbols\r\n // - @: grouped by symbol kind\r\n let symbolPicks = [];\r\n if (filterBySymbolKind) {\r\n let lastSymbolKind = undefined;\r\n let lastSeparator = undefined;\r\n let lastSymbolKindCounter = 0;\r\n function updateLastSeparatorLabel() {\r\n if (lastSeparator && typeof lastSymbolKind === 'number' && lastSymbolKindCounter > 0) {\r\n lastSeparator.label = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__.format)(NLS_SYMBOL_KIND_CACHE[lastSymbolKind] || FALLBACK_NLS_SYMBOL_KIND, lastSymbolKindCounter);\r\n }\r\n }\r\n for (const symbolPick of sortedFilteredSymbolPicks) {\r\n // Found new kind\r\n if (lastSymbolKind !== symbolPick.kind) {\r\n // Update last separator with number of symbols we found for kind\r\n updateLastSeparatorLabel();\r\n lastSymbolKind = symbolPick.kind;\r\n lastSymbolKindCounter = 1;\r\n // Add new separator for new kind\r\n lastSeparator = { type: 'separator' };\r\n symbolPicks.push(lastSeparator);\r\n }\r\n // Existing kind, keep counting\r\n else {\r\n lastSymbolKindCounter++;\r\n }\r\n // Add to final result\r\n symbolPicks.push(symbolPick);\r\n }\r\n // Update last separator with number of symbols we found for kind\r\n updateLastSeparatorLabel();\r\n }\r\n else if (sortedFilteredSymbolPicks.length > 0) {\r\n symbolPicks = [\r\n { label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbols', \"symbols ({0})\", filteredSymbolPicks.length), type: 'separator' },\r\n ...sortedFilteredSymbolPicks\r\n ];\r\n }\r\n return symbolPicks;\r\n });\r\n }\r\n compareByScore(symbolA, symbolB) {\r\n if (typeof symbolA.score !== 'number' && typeof symbolB.score === 'number') {\r\n return 1;\r\n }\r\n else if (typeof symbolA.score === 'number' && typeof symbolB.score !== 'number') {\r\n return -1;\r\n }\r\n if (typeof symbolA.score === 'number' && typeof symbolB.score === 'number') {\r\n if (symbolA.score > symbolB.score) {\r\n return -1;\r\n }\r\n else if (symbolA.score < symbolB.score) {\r\n return 1;\r\n }\r\n }\r\n if (symbolA.index < symbolB.index) {\r\n return -1;\r\n }\r\n else if (symbolA.index > symbolB.index) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n compareByKindAndScore(symbolA, symbolB) {\r\n const kindA = NLS_SYMBOL_KIND_CACHE[symbolA.kind] || FALLBACK_NLS_SYMBOL_KIND;\r\n const kindB = NLS_SYMBOL_KIND_CACHE[symbolB.kind] || FALLBACK_NLS_SYMBOL_KIND;\r\n // Sort by type first if scoped search\r\n const result = kindA.localeCompare(kindB);\r\n if (result === 0) {\r\n return this.compareByScore(symbolA, symbolB);\r\n }\r\n return result;\r\n }\r\n getDocumentSymbols(document, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = yield _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_6__.OutlineModel.create(document, token);\r\n return token.isCancellationRequested ? [] : model.asListOfDocumentSymbols();\r\n });\r\n }\r\n}\r\nAbstractGotoSymbolQuickAccessProvider.PREFIX = '@';\r\nAbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX = ':';\r\nAbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${AbstractGotoSymbolQuickAccessProvider.PREFIX}${AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX}`;\r\n// #region NLS Helpers\r\nconst FALLBACK_NLS_SYMBOL_KIND = (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('property', \"properties ({0})\");\r\nconst NLS_SYMBOL_KIND_CACHE = {\r\n [5 /* Method */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('method', \"methods ({0})\"),\r\n [11 /* Function */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('function', \"functions ({0})\"),\r\n [8 /* Constructor */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('_constructor', \"constructors ({0})\"),\r\n [12 /* Variable */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('variable', \"variables ({0})\"),\r\n [4 /* Class */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('class', \"classes ({0})\"),\r\n [22 /* Struct */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('struct', \"structs ({0})\"),\r\n [23 /* Event */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('event', \"events ({0})\"),\r\n [24 /* Operator */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('operator', \"operators ({0})\"),\r\n [10 /* Interface */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('interface', \"interfaces ({0})\"),\r\n [2 /* Namespace */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('namespace', \"namespaces ({0})\"),\r\n [3 /* Package */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('package', \"packages ({0})\"),\r\n [25 /* TypeParameter */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('typeParameter', \"type parameters ({0})\"),\r\n [1 /* Module */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('modules', \"modules ({0})\"),\r\n [6 /* Property */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('property', \"properties ({0})\"),\r\n [9 /* Enum */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('enum', \"enumerations ({0})\"),\r\n [21 /* EnumMember */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('enumMember', \"enumeration members ({0})\"),\r\n [14 /* String */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('string', \"strings ({0})\"),\r\n [0 /* File */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('file', \"files ({0})\"),\r\n [17 /* Array */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('array', \"arrays ({0})\"),\r\n [15 /* Number */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('number', \"numbers ({0})\"),\r\n [16 /* Boolean */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('boolean', \"booleans ({0})\"),\r\n [18 /* Object */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('object', \"objects ({0})\"),\r\n [19 /* Key */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('key', \"keys ({0})\"),\r\n [7 /* Field */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('field', \"fields ({0})\"),\r\n [13 /* Constant */]: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('constant', \"constants ({0})\")\r\n};\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"rename\": () => (/* binding */ rename),\n/* harmony export */ \"RenameAction\": () => (/* binding */ RenameAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./renameInputField.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../message/messageController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n/* harmony import */ var _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../common/services/textResourceConfigurationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass RenameSkeleton {\r\n constructor(model, position) {\r\n this.model = model;\r\n this.position = position;\r\n this._providerRenameIdx = 0;\r\n this._providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.RenameProviderRegistry.ordered(model);\r\n }\r\n hasProvider() {\r\n return this._providers.length > 0;\r\n }\r\n resolveRenameLocation(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const rejects = [];\r\n for (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) {\r\n const provider = this._providers[this._providerRenameIdx];\r\n if (!provider.resolveRenameLocation) {\r\n break;\r\n }\r\n let res = yield provider.resolveRenameLocation(this.model, this.position, token);\r\n if (!res) {\r\n continue;\r\n }\r\n if (res.rejectReason) {\r\n rejects.push(res.rejectReason);\r\n continue;\r\n }\r\n return res;\r\n }\r\n const word = this.model.getWordAtPosition(this.position);\r\n if (!word) {\r\n return {\r\n range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.fromPositions(this.position),\r\n text: '',\r\n rejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\r\n };\r\n }\r\n return {\r\n range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range(this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn),\r\n text: word.word,\r\n rejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\r\n };\r\n });\r\n }\r\n provideRenameEdits(newName, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this._provideRenameEdits(newName, this._providerRenameIdx, [], token);\r\n });\r\n }\r\n _provideRenameEdits(newName, i, rejects, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const provider = this._providers[i];\r\n if (!provider) {\r\n return {\r\n edits: [],\r\n rejectReason: rejects.join('\\n')\r\n };\r\n }\r\n const result = yield provider.provideRenameEdits(this.model, this.position, newName, token);\r\n if (!result) {\r\n return this._provideRenameEdits(newName, i + 1, rejects.concat(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('no result', \"No result.\")), token);\r\n }\r\n else if (result.rejectReason) {\r\n return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);\r\n }\r\n return result;\r\n });\r\n }\r\n}\r\nfunction rename(model, position, newName) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const skeleton = new RenameSkeleton(model, position);\r\n const loc = yield skeleton.resolveRenameLocation(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__.CancellationToken.None);\r\n if (loc === null || loc === void 0 ? void 0 : loc.rejectReason) {\r\n return { edits: [], rejectReason: loc.rejectReason };\r\n }\r\n return skeleton.provideRenameEdits(newName, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__.CancellationToken.None);\r\n });\r\n}\r\n// --- register actions and commands\r\nlet RenameController = class RenameController {\r\n constructor(editor, _instaService, _notificationService, _bulkEditService, _progressService, _logService, _configService) {\r\n this.editor = editor;\r\n this._instaService = _instaService;\r\n this._notificationService = _notificationService;\r\n this._bulkEditService = _bulkEditService;\r\n this._progressService = _progressService;\r\n this._logService = _logService;\r\n this._configService = _configService;\r\n this._dispoableStore = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_18__.DisposableStore();\r\n this._cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__.CancellationTokenSource();\r\n this._renameInputField = this._dispoableStore.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_19__.IdleValue(() => this._dispoableStore.add(this._instaService.createInstance(_renameInputField_js__WEBPACK_IMPORTED_MODULE_6__.RenameInputField, this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview']))));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(RenameController.ID);\r\n }\r\n dispose() {\r\n this._dispoableStore.dispose();\r\n this._cts.dispose(true);\r\n }\r\n run() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this._cts.dispose(true);\r\n if (!this.editor.hasModel()) {\r\n return undefined;\r\n }\r\n const position = this.editor.getPosition();\r\n const skeleton = new RenameSkeleton(this.editor.getModel(), position);\r\n if (!skeleton.hasProvider()) {\r\n return undefined;\r\n }\r\n this._cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__.EditorStateCancellationTokenSource(this.editor, 4 /* Position */ | 1 /* Value */);\r\n // resolve rename location\r\n let loc;\r\n try {\r\n const resolveLocationOperation = skeleton.resolveRenameLocation(this._cts.token);\r\n this._progressService.showWhile(resolveLocationOperation, 250);\r\n loc = yield resolveLocationOperation;\r\n }\r\n catch (e) {\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__.MessageController.get(this.editor).showMessage(e || _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('resolveRenameLocationFailed', \"An unknown error occurred while resolving rename location\"), position);\r\n return undefined;\r\n }\r\n if (!loc) {\r\n return undefined;\r\n }\r\n if (loc.rejectReason) {\r\n _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__.MessageController.get(this.editor).showMessage(loc.rejectReason, position);\r\n return undefined;\r\n }\r\n if (this._cts.token.isCancellationRequested) {\r\n return undefined;\r\n }\r\n this._cts.dispose();\r\n this._cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__.EditorStateCancellationTokenSource(this.editor, 4 /* Position */ | 1 /* Value */, loc.range);\r\n // do rename at location\r\n let selection = this.editor.getSelection();\r\n let selectionStart = 0;\r\n let selectionEnd = loc.text.length;\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.isEmpty(selection) && !_common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.spansMultipleLines(selection) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__.Range.containsRange(loc.range, selection)) {\r\n selectionStart = Math.max(0, selection.startColumn - loc.range.startColumn);\r\n selectionEnd = Math.min(loc.range.endColumn, selection.endColumn) - loc.range.startColumn;\r\n }\r\n const supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, 'editor.rename.enablePreview');\r\n const inputFieldResult = yield this._renameInputField.value.getInput(loc.range, loc.text, selectionStart, selectionEnd, supportPreview, this._cts.token);\r\n // no result, only hint to focus the editor or not\r\n if (typeof inputFieldResult === 'boolean') {\r\n if (inputFieldResult) {\r\n this.editor.focus();\r\n }\r\n return undefined;\r\n }\r\n this.editor.focus();\r\n const renameOperation = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_19__.raceCancellation)(skeleton.provideRenameEdits(inputFieldResult.newName, this._cts.token), this._cts.token).then((renameResult) => __awaiter(this, void 0, void 0, function* () {\r\n if (!renameResult || !this.editor.hasModel()) {\r\n return;\r\n }\r\n if (renameResult.rejectReason) {\r\n this._notificationService.info(renameResult.rejectReason);\r\n return;\r\n }\r\n this._bulkEditService.apply(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__.ResourceEdit.convert(renameResult), {\r\n editor: this.editor,\r\n showPreview: inputFieldResult.wantsPreview,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('label', \"Renaming '{0}'\", loc === null || loc === void 0 ? void 0 : loc.text),\r\n quotableLabel: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('quotableLabel', \"Renaming {0}\", loc === null || loc === void 0 ? void 0 : loc.text),\r\n }).then(result => {\r\n if (result.ariaSummary) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_9__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('aria', \"Successfully renamed '{0}' to '{1}'. Summary: {2}\", loc.text, inputFieldResult.newName, result.ariaSummary));\r\n }\r\n }).catch(err => {\r\n this._notificationService.error(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rename.failedApply', \"Rename failed to apply edits\"));\r\n this._logService.error(err);\r\n });\r\n }), err => {\r\n this._notificationService.error(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rename.failed', \"Rename failed to compute edits\"));\r\n this._logService.error(err);\r\n });\r\n this._progressService.showWhile(renameOperation, 250);\r\n return renameOperation;\r\n });\r\n }\r\n acceptRenameInput(wantsPreview) {\r\n this._renameInputField.value.acceptInput(wantsPreview);\r\n }\r\n cancelRenameInput() {\r\n this._renameInputField.value.cancelInput(true);\r\n }\r\n};\r\nRenameController.ID = 'editor.contrib.renameController';\r\nRenameController = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_21__.IInstantiationService),\r\n __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__.INotificationService),\r\n __param(3, _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__.IBulkEditService),\r\n __param(4, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_3__.IEditorProgressService),\r\n __param(5, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_20__.ILogService),\r\n __param(6, _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_24__.ITextResourceConfigurationService)\r\n], RenameController);\r\n// ---- action implementation\r\nclass RenameAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.rename',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('rename.label', \"Rename Symbol\"),\r\n alias: 'Rename Symbol',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.hasRenameProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.editorTextFocus,\r\n primary: 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.1\r\n }\r\n });\r\n }\r\n runCommand(accessor, args) {\r\n const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_16__.ICodeEditorService);\r\n const [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__.URI.isUri(uri) && _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__.Position.isIPosition(pos)) {\r\n return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\r\n if (!editor) {\r\n return;\r\n }\r\n editor.setPosition(pos);\r\n editor.invokeWithinContext(accessor => {\r\n this.reportTelemetry(accessor, editor);\r\n return this.run(accessor, editor);\r\n });\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError);\r\n }\r\n return super.runCommand(accessor, args);\r\n }\r\n run(accessor, editor) {\r\n const controller = RenameController.get(editor);\r\n if (controller) {\r\n return controller.run();\r\n }\r\n return Promise.resolve();\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(RenameController.ID, RenameController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(RenameAction);\r\nconst RenameCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorCommand.bindToContribution(RenameController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new RenameCommand({\r\n id: 'acceptRenameInput',\r\n precondition: _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_RENAME_INPUT_VISIBLE,\r\n handler: x => x.acceptRenameInput(false),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 3 /* Enter */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new RenameCommand({\r\n id: 'acceptRenameInputWithPreview',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.ContextKeyExpr.and(_renameInputField_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_RENAME_INPUT_VISIBLE, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.ContextKeyExpr.has('config.editor.rename.enablePreview')),\r\n handler: x => x.acceptRenameInput(true),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ + 3 /* Enter */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorCommand)(new RenameCommand({\r\n id: 'cancelRenameInput',\r\n precondition: _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__.CONTEXT_RENAME_INPUT_VISIBLE,\r\n handler: x => x.cancelRenameInput(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__.EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n// ---- api bridge command\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerModelAndPositionCommand)('_executeDocumentRenameProvider', function (model, position, ...args) {\r\n const [newName] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_25__.assertType)(typeof newName === 'string');\r\n return rename(model, position, newName);\r\n});\r\n//todo@jrieken use editor options world\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_22__.Registry.as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_23__.Extensions.Configuration).registerConfiguration({\r\n id: 'editor',\r\n properties: {\r\n 'editor.rename.enablePreview': {\r\n scope: 5 /* LANGUAGE_OVERRIDABLE */,\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('enablePreview', \"Enable/disable the ability to preview changes before renaming\"),\r\n default: true,\r\n type: 'boolean'\r\n }\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CONTEXT_RENAME_INPUT_VISIBLE\": () => (/* binding */ CONTEXT_RENAME_INPUT_VISIBLE),\n/* harmony export */ \"RenameInputField\": () => (/* binding */ RenameInputField)\n/* harmony export */ });\n/* harmony import */ var _renameInputField_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./renameInputField.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CONTEXT_RENAME_INPUT_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.RawContextKey('renameInputVisible', false);\r\nlet RenameInputField = class RenameInputField {\r\n constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService) {\r\n this._editor = _editor;\r\n this._acceptKeybindings = _acceptKeybindings;\r\n this._themeService = _themeService;\r\n this._keybindingService = _keybindingService;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this.allowEditorOverflow = true;\r\n this._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\r\n this._editor.addContentWidget(this);\r\n this._disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateFont();\r\n }\r\n }));\r\n this._disposables.add(_themeService.onDidColorThemeChange(this._updateStyles, this));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return '__renameInputWidget';\r\n }\r\n getDomNode() {\r\n if (!this._domNode) {\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'monaco-editor rename-box';\r\n this._input = document.createElement('input');\r\n this._input.className = 'rename-input';\r\n this._input.type = 'text';\r\n this._input.setAttribute('aria-label', (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('renameAriaLabel', \"Rename input. Type new name and press Enter to commit.\"));\r\n this._domNode.appendChild(this._input);\r\n this._label = document.createElement('div');\r\n this._label.className = 'rename-label';\r\n this._domNode.appendChild(this._label);\r\n const updateLabel = () => {\r\n var _a, _b;\r\n const [accept, preview] = this._acceptKeybindings;\r\n this._keybindingService.lookupKeybinding(accept);\r\n this._label.innerText = (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)({ key: 'label', comment: ['placeholders are keybindings, e.g \"F2 to Rename, Shift+F2 to Preview\"'] }, \"{0} to Rename, {1} to Preview\", (_a = this._keybindingService.lookupKeybinding(accept)) === null || _a === void 0 ? void 0 : _a.getLabel(), (_b = this._keybindingService.lookupKeybinding(preview)) === null || _b === void 0 ? void 0 : _b.getLabel());\r\n };\r\n updateLabel();\r\n this._disposables.add(this._keybindingService.onDidUpdateKeybindings(updateLabel));\r\n this._updateFont();\r\n this._updateStyles(this._themeService.getColorTheme());\r\n }\r\n return this._domNode;\r\n }\r\n _updateStyles(theme) {\r\n var _a, _b, _c, _d;\r\n if (!this._input || !this._domNode) {\r\n return;\r\n }\r\n const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.widgetShadow);\r\n this._domNode.style.backgroundColor = String((_a = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.editorWidgetBackground)) !== null && _a !== void 0 ? _a : '');\r\n this._domNode.style.boxShadow = widgetShadowColor ? ` 0 0 8px 2px ${widgetShadowColor}` : '';\r\n this._domNode.style.color = String((_b = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputForeground)) !== null && _b !== void 0 ? _b : '');\r\n this._input.style.backgroundColor = String((_c = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputBackground)) !== null && _c !== void 0 ? _c : '');\r\n // this._input.style.color = String(theme.getColor(inputForeground) ?? '');\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__.inputBorder);\r\n this._input.style.borderWidth = border ? '1px' : '0px';\r\n this._input.style.borderStyle = border ? 'solid' : 'none';\r\n this._input.style.borderColor = (_d = border === null || border === void 0 ? void 0 : border.toString()) !== null && _d !== void 0 ? _d : 'none';\r\n }\r\n _updateFont() {\r\n if (!this._input || !this._label) {\r\n return;\r\n }\r\n const fontInfo = this._editor.getOption(38 /* fontInfo */);\r\n this._input.style.fontFamily = fontInfo.fontFamily;\r\n this._input.style.fontWeight = fontInfo.fontWeight;\r\n this._input.style.fontSize = `${fontInfo.fontSize}px`;\r\n this._label.style.fontSize = `${fontInfo.fontSize * 0.8}px`;\r\n }\r\n getPosition() {\r\n if (!this._visible) {\r\n return null;\r\n }\r\n return {\r\n position: this._position,\r\n preference: [2 /* BELOW */, 1 /* ABOVE */]\r\n };\r\n }\r\n afterRender(position) {\r\n if (!position) {\r\n // cancel rename when input widget isn't rendered anymore\r\n this.cancelInput(true);\r\n }\r\n }\r\n acceptInput(wantsPreview) {\r\n if (this._currentAcceptInput) {\r\n this._currentAcceptInput(wantsPreview);\r\n }\r\n }\r\n cancelInput(focusEditor) {\r\n if (this._currentCancelInput) {\r\n this._currentCancelInput(focusEditor);\r\n }\r\n }\r\n getInput(where, value, selectionStart, selectionEnd, supportPreview, token) {\r\n this._domNode.classList.toggle('preview', supportPreview);\r\n this._position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(where.startLineNumber, where.startColumn);\r\n this._input.value = value;\r\n this._input.setAttribute('selectionStart', selectionStart.toString());\r\n this._input.setAttribute('selectionEnd', selectionEnd.toString());\r\n this._input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20);\r\n const disposeOnDone = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n return new Promise(resolve => {\r\n this._currentCancelInput = (focusEditor) => {\r\n this._currentAcceptInput = undefined;\r\n this._currentCancelInput = undefined;\r\n resolve(focusEditor);\r\n return true;\r\n };\r\n this._currentAcceptInput = (wantsPreview) => {\r\n if (this._input.value.trim().length === 0 || this._input.value === value) {\r\n // empty or whitespace only or not changed\r\n this.cancelInput(true);\r\n return;\r\n }\r\n this._currentAcceptInput = undefined;\r\n this._currentCancelInput = undefined;\r\n resolve({\r\n newName: this._input.value,\r\n wantsPreview: supportPreview && wantsPreview\r\n });\r\n };\r\n token.onCancellationRequested(() => this.cancelInput(true));\r\n disposeOnDone.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(false)));\r\n this._show();\r\n }).finally(() => {\r\n disposeOnDone.dispose();\r\n this._hide();\r\n });\r\n }\r\n _show() {\r\n this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0 /* Smooth */);\r\n this._visible = true;\r\n this._visibleContextKey.set(true);\r\n this._editor.layoutContentWidget(this);\r\n setTimeout(() => {\r\n this._input.focus();\r\n this._input.setSelectionRange(parseInt(this._input.getAttribute('selectionStart')), parseInt(this._input.getAttribute('selectionEnd')));\r\n }, 100);\r\n }\r\n _hide() {\r\n this._visible = false;\r\n this._visibleContextKey.reset();\r\n this._editor.layoutContentWidget(this);\r\n }\r\n};\r\nRenameInputField = __decorate([\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__.IThemeService),\r\n __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__.IKeybindingService),\r\n __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.IContextKeyService)\r\n], RenameInputField);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BracketSelectionRangeProvider\": () => (/* binding */ BracketSelectionRangeProvider)\n/* harmony export */ });\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\nclass BracketSelectionRangeProvider {\r\n provideSelectionRanges(model, positions) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const result = [];\r\n for (const position of positions) {\r\n const bucket = [];\r\n result.push(bucket);\r\n const ranges = new Map();\r\n yield new Promise(resolve => BracketSelectionRangeProvider._bracketsRightYield(resolve, 0, model, position, ranges));\r\n yield new Promise(resolve => BracketSelectionRangeProvider._bracketsLeftYield(resolve, 0, model, position, ranges, bucket));\r\n }\r\n return result;\r\n });\r\n }\r\n static _bracketsRightYield(resolve, round, model, pos, ranges) {\r\n const counts = new Map();\r\n const t1 = Date.now();\r\n while (true) {\r\n if (round >= BracketSelectionRangeProvider._maxRounds) {\r\n resolve();\r\n break;\r\n }\r\n if (!pos) {\r\n resolve();\r\n break;\r\n }\r\n let bracket = model.findNextBracket(pos);\r\n if (!bracket) {\r\n resolve();\r\n break;\r\n }\r\n let d = Date.now() - t1;\r\n if (d > BracketSelectionRangeProvider._maxDuration) {\r\n setTimeout(() => BracketSelectionRangeProvider._bracketsRightYield(resolve, round + 1, model, pos, ranges));\r\n break;\r\n }\r\n const key = bracket.close[0];\r\n if (bracket.isOpen) {\r\n // wait for closing\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n counts.set(key, val + 1);\r\n }\r\n else {\r\n // process closing\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n val -= 1;\r\n counts.set(key, Math.max(0, val));\r\n if (val < 0) {\r\n let list = ranges.get(key);\r\n if (!list) {\r\n list = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__.LinkedList();\r\n ranges.set(key, list);\r\n }\r\n list.push(bracket.range);\r\n }\r\n }\r\n pos = bracket.range.getEndPosition();\r\n }\r\n }\r\n static _bracketsLeftYield(resolve, round, model, pos, ranges, bucket) {\r\n const counts = new Map();\r\n const t1 = Date.now();\r\n while (true) {\r\n if (round >= BracketSelectionRangeProvider._maxRounds && ranges.size === 0) {\r\n resolve();\r\n break;\r\n }\r\n if (!pos) {\r\n resolve();\r\n break;\r\n }\r\n let bracket = model.findPrevBracket(pos);\r\n if (!bracket) {\r\n resolve();\r\n break;\r\n }\r\n let d = Date.now() - t1;\r\n if (d > BracketSelectionRangeProvider._maxDuration) {\r\n setTimeout(() => BracketSelectionRangeProvider._bracketsLeftYield(resolve, round + 1, model, pos, ranges, bucket));\r\n break;\r\n }\r\n const key = bracket.close[0];\r\n if (!bracket.isOpen) {\r\n // wait for opening\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n counts.set(key, val + 1);\r\n }\r\n else {\r\n // opening\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n val -= 1;\r\n counts.set(key, Math.max(0, val));\r\n if (val < 0) {\r\n let list = ranges.get(key);\r\n if (list) {\r\n let closing = list.shift();\r\n if (list.size === 0) {\r\n ranges.delete(key);\r\n }\r\n const innerBracket = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(bracket.range.getEndPosition(), closing.getStartPosition());\r\n const outerBracket = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(bracket.range.getStartPosition(), closing.getEndPosition());\r\n bucket.push({ range: innerBracket });\r\n bucket.push({ range: outerBracket });\r\n BracketSelectionRangeProvider._addBracketLeading(model, outerBracket, bucket);\r\n }\r\n }\r\n }\r\n pos = bracket.range.getStartPosition();\r\n }\r\n }\r\n static _addBracketLeading(model, bracket, bucket) {\r\n if (bracket.startLineNumber === bracket.endLineNumber) {\r\n return;\r\n }\r\n // xxxxxxxx {\r\n //\r\n // }\r\n const startLine = bracket.startLineNumber;\r\n const column = model.getLineFirstNonWhitespaceColumn(startLine);\r\n if (column !== 0 && column !== bracket.startColumn) {\r\n bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(startLine, column), bracket.getEndPosition()) });\r\n bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(startLine, 1), bracket.getEndPosition()) });\r\n }\r\n // xxxxxxxx\r\n // {\r\n //\r\n // }\r\n const aboveLine = startLine - 1;\r\n if (aboveLine > 0) {\r\n const column = model.getLineFirstNonWhitespaceColumn(aboveLine);\r\n if (column === bracket.startColumn && column !== model.getLineLastNonWhitespaceColumn(aboveLine)) {\r\n bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(aboveLine, column), bracket.getEndPosition()) });\r\n bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__.Position(aboveLine, 1), bracket.getEndPosition()) });\r\n }\r\n }\r\n }\r\n}\r\nBracketSelectionRangeProvider._maxDuration = 30;\r\nBracketSelectionRangeProvider._maxRounds = 2;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"provideSelectionRanges\": () => (/* binding */ provideSelectionRanges)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _wordSelections_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./wordSelections.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js\");\n/* harmony import */ var _bracketSelections_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./bracketSelections.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass SelectionRanges {\r\n constructor(index, ranges) {\r\n this.index = index;\r\n this.ranges = ranges;\r\n }\r\n mov(fwd) {\r\n let index = this.index + (fwd ? 1 : -1);\r\n if (index < 0 || index >= this.ranges.length) {\r\n return this;\r\n }\r\n const res = new SelectionRanges(index, this.ranges);\r\n if (res.ranges[index].equalsRange(this.ranges[this.index])) {\r\n // next range equals this range, retry with next-next\r\n return res.mov(fwd);\r\n }\r\n return res;\r\n }\r\n}\r\nclass SmartSelectController {\r\n constructor(_editor) {\r\n this._editor = _editor;\r\n this._ignoreSelection = false;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SmartSelectController.ID);\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n }\r\n run(forward) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const selections = this._editor.getSelections();\r\n const model = this._editor.getModel();\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_7__.SelectionRangeRegistry.has(model)) {\r\n return;\r\n }\r\n if (!this._state) {\r\n yield provideSelectionRanges(model, selections.map(s => s.getPosition()), this._editor.getOption(97 /* smartSelect */), _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None).then(ranges => {\r\n var _a;\r\n if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray(ranges) || ranges.length !== selections.length) {\r\n // invalid result\r\n return;\r\n }\r\n if (!this._editor.hasModel() || !_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.equals(this._editor.getSelections(), selections, (a, b) => a.equalsSelection(b))) {\r\n // invalid editor state\r\n return;\r\n }\r\n for (let i = 0; i < ranges.length; i++) {\r\n ranges[i] = ranges[i].filter(range => {\r\n // filter ranges inside the selection\r\n return range.containsPosition(selections[i].getStartPosition()) && range.containsPosition(selections[i].getEndPosition());\r\n });\r\n // prepend current selection\r\n ranges[i].unshift(selections[i]);\r\n }\r\n this._state = ranges.map(ranges => new SelectionRanges(0, ranges));\r\n // listen to caret move and forget about state\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._selectionListener = this._editor.onDidChangeCursorPosition(() => {\r\n var _a;\r\n if (!this._ignoreSelection) {\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._state = undefined;\r\n }\r\n });\r\n });\r\n }\r\n if (!this._state) {\r\n // no state\r\n return;\r\n }\r\n this._state = this._state.map(state => state.mov(forward));\r\n const newSelections = this._state.map(state => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__.Selection.fromPositions(state.ranges[state.index].getStartPosition(), state.ranges[state.index].getEndPosition()));\r\n this._ignoreSelection = true;\r\n try {\r\n this._editor.setSelections(newSelections);\r\n }\r\n finally {\r\n this._ignoreSelection = false;\r\n }\r\n });\r\n }\r\n}\r\nSmartSelectController.ID = 'editor.contrib.smartSelectController';\r\nclass AbstractSmartSelect extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor(forward, opts) {\r\n super(opts);\r\n this._forward = forward;\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = SmartSelectController.get(editor);\r\n if (controller) {\r\n yield controller.run(this._forward);\r\n }\r\n });\r\n }\r\n}\r\nclass GrowSelectionAction extends AbstractSmartSelect {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.smartSelect.expand',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_8__.localize('smartSelect.expand', \"Expand Selection\"),\r\n alias: 'Expand Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */,\r\n secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */],\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuId.MenubarSelectionMenu,\r\n group: '1_basic',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_8__.localize({ key: 'miSmartSelectGrow', comment: ['&& denotes a mnemonic'] }, \"&&Expand Selection\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\n// renamed command id\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_12__.CommandsRegistry.registerCommandAlias('editor.action.smartSelect.grow', 'editor.action.smartSelect.expand');\r\nclass ShrinkSelectionAction extends AbstractSmartSelect {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.smartSelect.shrink',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_8__.localize('smartSelect.shrink', \"Shrink Selection\"),\r\n alias: 'Shrink Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */,\r\n secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */],\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuId.MenubarSelectionMenu,\r\n group: '1_basic',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_8__.localize({ key: 'miSmartSelectShrink', comment: ['&& denotes a mnemonic'] }, \"&&Shrink Selection\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorContribution)(SmartSelectController.ID, SmartSelectController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(GrowSelectionAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(ShrinkSelectionAction);\r\n// word selection\r\n_common_modes_js__WEBPACK_IMPORTED_MODULE_7__.SelectionRangeRegistry.register('*', new _wordSelections_js__WEBPACK_IMPORTED_MODULE_10__.WordSelectionRangeProvider());\r\nfunction provideSelectionRanges(model, positions, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_7__.SelectionRangeRegistry.all(model);\r\n if (providers.length === 1) {\r\n // add word selection and bracket selection when no provider exists\r\n providers.unshift(new _bracketSelections_js__WEBPACK_IMPORTED_MODULE_11__.BracketSelectionRangeProvider());\r\n }\r\n let work = [];\r\n let allRawRanges = [];\r\n for (const provider of providers) {\r\n work.push(Promise.resolve(provider.provideSelectionRanges(model, positions, token)).then(allProviderRanges => {\r\n if (_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray(allProviderRanges) && allProviderRanges.length === positions.length) {\r\n for (let i = 0; i < positions.length; i++) {\r\n if (!allRawRanges[i]) {\r\n allRawRanges[i] = [];\r\n }\r\n for (const oneProviderRanges of allProviderRanges[i]) {\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.isIRange(oneProviderRanges.range) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.containsPosition(oneProviderRanges.range, positions[i])) {\r\n allRawRanges[i].push(_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.lift(oneProviderRanges.range));\r\n }\r\n }\r\n }\r\n }\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_13__.onUnexpectedExternalError));\r\n }\r\n yield Promise.all(work);\r\n return allRawRanges.map(oneRawRanges => {\r\n if (oneRawRanges.length === 0) {\r\n return [];\r\n }\r\n // sort all by start/end position\r\n oneRawRanges.sort((a, b) => {\r\n if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.isBefore(a.getStartPosition(), b.getStartPosition())) {\r\n return 1;\r\n }\r\n else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.isBefore(b.getStartPosition(), a.getStartPosition())) {\r\n return -1;\r\n }\r\n else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.isBefore(a.getEndPosition(), b.getEndPosition())) {\r\n return -1;\r\n }\r\n else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__.Position.isBefore(b.getEndPosition(), a.getEndPosition())) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n // remove ranges that don't contain the former range or that are equal to the\r\n // former range\r\n let oneRanges = [];\r\n let last;\r\n for (const range of oneRawRanges) {\r\n if (!last || (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.containsRange(range, last) && !_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range.equalsRange(range, last))) {\r\n oneRanges.push(range);\r\n last = range;\r\n }\r\n }\r\n if (!options.selectLeadingAndTrailingWhitespace) {\r\n return oneRanges;\r\n }\r\n // add ranges that expand trivia at line starts and ends whenever a range\r\n // wraps onto the a new line\r\n let oneRangesWithTrivia = [oneRanges[0]];\r\n for (let i = 1; i < oneRanges.length; i++) {\r\n const prev = oneRanges[i - 1];\r\n const cur = oneRanges[i];\r\n if (cur.startLineNumber !== prev.startLineNumber || cur.endLineNumber !== prev.endLineNumber) {\r\n // add line/block range without leading/failing whitespace\r\n const rangeNoWhitespace = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(prev.startLineNumber, model.getLineFirstNonWhitespaceColumn(prev.startLineNumber), prev.endLineNumber, model.getLineLastNonWhitespaceColumn(prev.endLineNumber));\r\n if (rangeNoWhitespace.containsRange(prev) && !rangeNoWhitespace.equalsRange(prev) && cur.containsRange(rangeNoWhitespace) && !cur.equalsRange(rangeNoWhitespace)) {\r\n oneRangesWithTrivia.push(rangeNoWhitespace);\r\n }\r\n // add line/block range\r\n const rangeFull = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__.Range(prev.startLineNumber, 1, prev.endLineNumber, model.getLineMaxColumn(prev.endLineNumber));\r\n if (rangeFull.containsRange(prev) && !rangeFull.equalsRange(rangeNoWhitespace) && cur.containsRange(rangeFull) && !cur.equalsRange(rangeFull)) {\r\n oneRangesWithTrivia.push(rangeFull);\r\n }\r\n }\r\n oneRangesWithTrivia.push(cur);\r\n }\r\n return oneRangesWithTrivia;\r\n });\r\n });\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerModelCommand)('_executeSelectionRangeProvider', function (model, ...args) {\r\n const [positions] = args;\r\n return provideSelectionRanges(model, positions, { selectLeadingAndTrailingWhitespace: true }, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__.CancellationToken.None);\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WordSelectionRangeProvider\": () => (/* binding */ WordSelectionRangeProvider)\n/* harmony export */ });\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass WordSelectionRangeProvider {\r\n provideSelectionRanges(model, positions) {\r\n const result = [];\r\n for (const position of positions) {\r\n const bucket = [];\r\n result.push(bucket);\r\n this._addInWordRanges(bucket, model, position);\r\n this._addWordRanges(bucket, model, position);\r\n this._addWhitespaceLine(bucket, model, position);\r\n bucket.push({ range: model.getFullModelRange() });\r\n }\r\n return result;\r\n }\r\n _addInWordRanges(bucket, model, pos) {\r\n const obj = model.getWordAtPosition(pos);\r\n if (!obj) {\r\n return;\r\n }\r\n let { word, startColumn } = obj;\r\n let offset = pos.column - startColumn;\r\n let start = offset;\r\n let end = offset;\r\n let lastCh = 0;\r\n // LEFT anchor (start)\r\n for (; start >= 0; start--) {\r\n let ch = word.charCodeAt(start);\r\n if ((start !== offset) && (ch === 95 /* Underline */ || ch === 45 /* Dash */)) {\r\n // foo-bar OR foo_bar\r\n break;\r\n }\r\n else if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isLowerAsciiLetter)(ch) && (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isUpperAsciiLetter)(lastCh)) {\r\n // fooBar\r\n break;\r\n }\r\n lastCh = ch;\r\n }\r\n start += 1;\r\n // RIGHT anchor (end)\r\n for (; end < word.length; end++) {\r\n let ch = word.charCodeAt(end);\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isUpperAsciiLetter)(ch) && (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.isLowerAsciiLetter)(lastCh)) {\r\n // fooBar\r\n break;\r\n }\r\n else if (ch === 95 /* Underline */ || ch === 45 /* Dash */) {\r\n // foo-bar OR foo_bar\r\n break;\r\n }\r\n lastCh = ch;\r\n }\r\n if (start < end) {\r\n bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(pos.lineNumber, startColumn + start, pos.lineNumber, startColumn + end) });\r\n }\r\n }\r\n _addWordRanges(bucket, model, pos) {\r\n const word = model.getWordAtPosition(pos);\r\n if (word) {\r\n bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(pos.lineNumber, word.startColumn, pos.lineNumber, word.endColumn) });\r\n }\r\n }\r\n _addWhitespaceLine(bucket, model, pos) {\r\n if (model.getLineLength(pos.lineNumber) > 0\r\n && model.getLineFirstNonWhitespaceColumn(pos.lineNumber) === 0\r\n && model.getLineLastNonWhitespaceColumn(pos.lineNumber) === 0) {\r\n bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__.Range(pos.lineNumber, 1, pos.lineNumber, model.getLineMaxColumn(pos.lineNumber)) });\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SnippetController2\": () => (/* binding */ SnippetController2)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _suggest_suggest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../suggest/suggest.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _snippetSession_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./snippetSession.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst _defaultOptions = {\r\n overwriteBefore: 0,\r\n overwriteAfter: 0,\r\n undoStopBefore: true,\r\n undoStopAfter: true,\r\n adjustWhitespace: true,\r\n clipboardText: undefined,\r\n overtypingCapturer: undefined\r\n};\r\nlet SnippetController2 = class SnippetController2 {\r\n constructor(_editor, _logService, contextKeyService) {\r\n this._editor = _editor;\r\n this._logService = _logService;\r\n this._snippetListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.DisposableStore();\r\n this._modelVersionId = -1;\r\n this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService);\r\n this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService);\r\n this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SnippetController2.ID);\r\n }\r\n dispose() {\r\n var _a;\r\n this._inSnippet.reset();\r\n this._hasPrevTabstop.reset();\r\n this._hasNextTabstop.reset();\r\n (_a = this._session) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._snippetListener.dispose();\r\n }\r\n insert(template, opts) {\r\n // this is here to find out more about the yet-not-understood\r\n // error that sometimes happens when we fail to inserted a nested\r\n // snippet\r\n try {\r\n this._doInsert(template, typeof opts === 'undefined' ? _defaultOptions : Object.assign(Object.assign({}, _defaultOptions), opts));\r\n }\r\n catch (e) {\r\n this.cancel();\r\n this._logService.error(e);\r\n this._logService.error('snippet_error');\r\n this._logService.error('insert_template=', template);\r\n this._logService.error('existing_template=', this._session ? this._session._logInfo() : '<no_session>');\r\n }\r\n }\r\n _doInsert(template, opts) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // don't listen while inserting the snippet\r\n // as that is the inflight state causing cancelation\r\n this._snippetListener.clear();\r\n if (opts.undoStopBefore) {\r\n this._editor.getModel().pushStackElement();\r\n }\r\n if (!this._session) {\r\n this._modelVersionId = this._editor.getModel().getAlternativeVersionId();\r\n this._session = new _snippetSession_js__WEBPACK_IMPORTED_MODULE_8__.SnippetSession(this._editor, template, opts);\r\n this._session.insert();\r\n }\r\n else {\r\n this._session.merge(template, opts);\r\n }\r\n if (opts.undoStopAfter) {\r\n this._editor.getModel().pushStackElement();\r\n }\r\n this._updateState();\r\n this._snippetListener.add(this._editor.onDidChangeModelContent(e => e.isFlush && this.cancel()));\r\n this._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel()));\r\n this._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState()));\r\n }\r\n _updateState() {\r\n if (!this._session || !this._editor.hasModel()) {\r\n // canceled in the meanwhile\r\n return;\r\n }\r\n if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) {\r\n // undo until the 'before' state happened\r\n // and makes use cancel snippet mode\r\n return this.cancel();\r\n }\r\n if (!this._session.hasPlaceholder) {\r\n // don't listen for selection changes and don't\r\n // update context keys when the snippet is plain text\r\n return this.cancel();\r\n }\r\n if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) {\r\n return this.cancel();\r\n }\r\n this._inSnippet.set(true);\r\n this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);\r\n this._hasNextTabstop.set(!this._session.isAtLastPlaceholder);\r\n this._handleChoice();\r\n }\r\n _handleChoice() {\r\n if (!this._session || !this._editor.hasModel()) {\r\n this._currentChoice = undefined;\r\n return;\r\n }\r\n const { choice } = this._session;\r\n if (!choice) {\r\n this._currentChoice = undefined;\r\n return;\r\n }\r\n if (this._currentChoice !== choice) {\r\n this._currentChoice = choice;\r\n this._editor.setSelections(this._editor.getSelections()\r\n .map(s => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__.Selection.fromPositions(s.getStartPosition())));\r\n const [first] = choice.options;\r\n (0,_suggest_suggest_js__WEBPACK_IMPORTED_MODULE_5__.showSimpleSuggestions)(this._editor, choice.options.map((option, i) => {\r\n // let before = choice.options.slice(0, i);\r\n // let after = choice.options.slice(i);\r\n return {\r\n kind: 13 /* Value */,\r\n label: option.value,\r\n insertText: option.value,\r\n // insertText: `\\${1|${after.concat(before).join(',')}|}$0`,\r\n // snippetType: 'textmate',\r\n sortText: 'a'.repeat(i + 1),\r\n range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range.fromPositions(this._editor.getPosition(), this._editor.getPosition().delta(0, first.value.length))\r\n };\r\n }));\r\n }\r\n }\r\n finish() {\r\n while (this._inSnippet.get()) {\r\n this.next();\r\n }\r\n }\r\n cancel(resetSelection = false) {\r\n var _a;\r\n this._inSnippet.reset();\r\n this._hasPrevTabstop.reset();\r\n this._hasNextTabstop.reset();\r\n this._snippetListener.clear();\r\n (_a = this._session) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._session = undefined;\r\n this._modelVersionId = -1;\r\n if (resetSelection) {\r\n // reset selection to the primary cursor when being asked\r\n // for. this happens when explicitly cancelling snippet mode,\r\n // e.g. when pressing ESC\r\n this._editor.setSelections([this._editor.getSelection()]);\r\n }\r\n }\r\n prev() {\r\n if (this._session) {\r\n this._session.prev();\r\n }\r\n this._updateState();\r\n }\r\n next() {\r\n if (this._session) {\r\n this._session.next();\r\n }\r\n this._updateState();\r\n }\r\n isInSnippet() {\r\n return Boolean(this._inSnippet.get());\r\n }\r\n};\r\nSnippetController2.ID = 'snippetController2';\r\nSnippetController2.InSnippetMode = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.RawContextKey('inSnippetMode', false);\r\nSnippetController2.HasNextTabstop = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.RawContextKey('hasNextTabstop', false);\r\nSnippetController2.HasPrevTabstop = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.RawContextKey('hasPrevTabstop', false);\r\nSnippetController2 = __decorate([\r\n __param(1, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_7__.ILogService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.IContextKeyService)\r\n], SnippetController2);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorContribution)(SnippetController2.ID, SnippetController2);\r\nconst CommandCtor = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorCommand.bindToContribution(SnippetController2.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CommandCtor({\r\n id: 'jumpToNextSnippetPlaceholder',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop),\r\n handler: ctrl => ctrl.next(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CommandCtor({\r\n id: 'jumpToPrevSnippetPlaceholder',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop),\r\n handler: ctrl => ctrl.prev(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 2 /* Tab */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CommandCtor({\r\n id: 'leaveSnippet',\r\n precondition: SnippetController2.InSnippetMode,\r\n handler: ctrl => ctrl.cancel(true),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__.EditorContextKeys.editorTextFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CommandCtor({\r\n id: 'acceptSnippet',\r\n precondition: SnippetController2.InSnippetMode,\r\n handler: ctrl => ctrl.finish(),\r\n // kbOpts: {\r\n // \tweight: KeybindingWeight.EditorContrib + 30,\r\n // \tkbExpr: EditorContextKeys.textFocus,\r\n // \tprimary: KeyCode.Enter,\r\n // }\r\n}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Scanner\": () => (/* binding */ Scanner),\n/* harmony export */ \"Marker\": () => (/* binding */ Marker),\n/* harmony export */ \"Text\": () => (/* binding */ Text),\n/* harmony export */ \"TransformableMarker\": () => (/* binding */ TransformableMarker),\n/* harmony export */ \"Placeholder\": () => (/* binding */ Placeholder),\n/* harmony export */ \"Choice\": () => (/* binding */ Choice),\n/* harmony export */ \"Transform\": () => (/* binding */ Transform),\n/* harmony export */ \"FormatString\": () => (/* binding */ FormatString),\n/* harmony export */ \"Variable\": () => (/* binding */ Variable),\n/* harmony export */ \"TextmateSnippet\": () => (/* binding */ TextmateSnippet),\n/* harmony export */ \"SnippetParser\": () => (/* binding */ SnippetParser)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Scanner {\r\n constructor() {\r\n this.value = '';\r\n this.pos = 0;\r\n }\r\n static isDigitCharacter(ch) {\r\n return ch >= 48 /* Digit0 */ && ch <= 57 /* Digit9 */;\r\n }\r\n static isVariableCharacter(ch) {\r\n return ch === 95 /* Underline */\r\n || (ch >= 97 /* a */ && ch <= 122 /* z */)\r\n || (ch >= 65 /* A */ && ch <= 90 /* Z */);\r\n }\r\n text(value) {\r\n this.value = value;\r\n this.pos = 0;\r\n }\r\n tokenText(token) {\r\n return this.value.substr(token.pos, token.len);\r\n }\r\n next() {\r\n if (this.pos >= this.value.length) {\r\n return { type: 14 /* EOF */, pos: this.pos, len: 0 };\r\n }\r\n let pos = this.pos;\r\n let len = 0;\r\n let ch = this.value.charCodeAt(pos);\r\n let type;\r\n // static types\r\n type = Scanner._table[ch];\r\n if (typeof type === 'number') {\r\n this.pos += 1;\r\n return { type, pos, len: 1 };\r\n }\r\n // number\r\n if (Scanner.isDigitCharacter(ch)) {\r\n type = 8 /* Int */;\r\n do {\r\n len += 1;\r\n ch = this.value.charCodeAt(pos + len);\r\n } while (Scanner.isDigitCharacter(ch));\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n // variable name\r\n if (Scanner.isVariableCharacter(ch)) {\r\n type = 9 /* VariableName */;\r\n do {\r\n ch = this.value.charCodeAt(pos + (++len));\r\n } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch));\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n // format\r\n type = 10 /* Format */;\r\n do {\r\n len += 1;\r\n ch = this.value.charCodeAt(pos + len);\r\n } while (!isNaN(ch)\r\n && typeof Scanner._table[ch] === 'undefined' // not static token\r\n && !Scanner.isDigitCharacter(ch) // not number\r\n && !Scanner.isVariableCharacter(ch) // not variable\r\n );\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n}\r\nScanner._table = {\r\n [36 /* DollarSign */]: 0 /* Dollar */,\r\n [58 /* Colon */]: 1 /* Colon */,\r\n [44 /* Comma */]: 2 /* Comma */,\r\n [123 /* OpenCurlyBrace */]: 3 /* CurlyOpen */,\r\n [125 /* CloseCurlyBrace */]: 4 /* CurlyClose */,\r\n [92 /* Backslash */]: 5 /* Backslash */,\r\n [47 /* Slash */]: 6 /* Forwardslash */,\r\n [124 /* Pipe */]: 7 /* Pipe */,\r\n [43 /* Plus */]: 11 /* Plus */,\r\n [45 /* Dash */]: 12 /* Dash */,\r\n [63 /* QuestionMark */]: 13 /* QuestionMark */,\r\n};\r\nclass Marker {\r\n constructor() {\r\n this._children = [];\r\n }\r\n appendChild(child) {\r\n if (child instanceof Text && this._children[this._children.length - 1] instanceof Text) {\r\n // this and previous child are text -> merge them\r\n this._children[this._children.length - 1].value += child.value;\r\n }\r\n else {\r\n // normal adoption of child\r\n child.parent = this;\r\n this._children.push(child);\r\n }\r\n return this;\r\n }\r\n replace(child, others) {\r\n const { parent } = child;\r\n const idx = parent.children.indexOf(child);\r\n const newChildren = parent.children.slice(0);\r\n newChildren.splice(idx, 1, ...others);\r\n parent._children = newChildren;\r\n (function _fixParent(children, parent) {\r\n for (const child of children) {\r\n child.parent = parent;\r\n _fixParent(child.children, child);\r\n }\r\n })(others, parent);\r\n }\r\n get children() {\r\n return this._children;\r\n }\r\n get snippet() {\r\n let candidate = this;\r\n while (true) {\r\n if (!candidate) {\r\n return undefined;\r\n }\r\n if (candidate instanceof TextmateSnippet) {\r\n return candidate;\r\n }\r\n candidate = candidate.parent;\r\n }\r\n }\r\n toString() {\r\n return this.children.reduce((prev, cur) => prev + cur.toString(), '');\r\n }\r\n len() {\r\n return 0;\r\n }\r\n}\r\nclass Text extends Marker {\r\n constructor(value) {\r\n super();\r\n this.value = value;\r\n }\r\n toString() {\r\n return this.value;\r\n }\r\n len() {\r\n return this.value.length;\r\n }\r\n clone() {\r\n return new Text(this.value);\r\n }\r\n}\r\nclass TransformableMarker extends Marker {\r\n}\r\nclass Placeholder extends TransformableMarker {\r\n constructor(index) {\r\n super();\r\n this.index = index;\r\n }\r\n static compareByIndex(a, b) {\r\n if (a.index === b.index) {\r\n return 0;\r\n }\r\n else if (a.isFinalTabstop) {\r\n return 1;\r\n }\r\n else if (b.isFinalTabstop) {\r\n return -1;\r\n }\r\n else if (a.index < b.index) {\r\n return -1;\r\n }\r\n else if (a.index > b.index) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n get isFinalTabstop() {\r\n return this.index === 0;\r\n }\r\n get choice() {\r\n return this._children.length === 1 && this._children[0] instanceof Choice\r\n ? this._children[0]\r\n : undefined;\r\n }\r\n clone() {\r\n let ret = new Placeholder(this.index);\r\n if (this.transform) {\r\n ret.transform = this.transform.clone();\r\n }\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nclass Choice extends Marker {\r\n constructor() {\r\n super(...arguments);\r\n this.options = [];\r\n }\r\n appendChild(marker) {\r\n if (marker instanceof Text) {\r\n marker.parent = this;\r\n this.options.push(marker);\r\n }\r\n return this;\r\n }\r\n toString() {\r\n return this.options[0].value;\r\n }\r\n len() {\r\n return this.options[0].len();\r\n }\r\n clone() {\r\n let ret = new Choice();\r\n this.options.forEach(ret.appendChild, ret);\r\n return ret;\r\n }\r\n}\r\nclass Transform extends Marker {\r\n constructor() {\r\n super(...arguments);\r\n this.regexp = new RegExp('');\r\n }\r\n resolve(value) {\r\n const _this = this;\r\n let didMatch = false;\r\n let ret = value.replace(this.regexp, function () {\r\n didMatch = true;\r\n return _this._replace(Array.prototype.slice.call(arguments, 0, -2));\r\n });\r\n // when the regex didn't match and when the transform has\r\n // else branches, then run those\r\n if (!didMatch && this._children.some(child => child instanceof FormatString && Boolean(child.elseValue))) {\r\n ret = this._replace([]);\r\n }\r\n return ret;\r\n }\r\n _replace(groups) {\r\n let ret = '';\r\n for (const marker of this._children) {\r\n if (marker instanceof FormatString) {\r\n let value = groups[marker.index] || '';\r\n value = marker.resolve(value);\r\n ret += value;\r\n }\r\n else {\r\n ret += marker.toString();\r\n }\r\n }\r\n return ret;\r\n }\r\n toString() {\r\n return '';\r\n }\r\n clone() {\r\n let ret = new Transform();\r\n ret.regexp = new RegExp(this.regexp.source, '' + (this.regexp.ignoreCase ? 'i' : '') + (this.regexp.global ? 'g' : ''));\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nclass FormatString extends Marker {\r\n constructor(index, shorthandName, ifValue, elseValue) {\r\n super();\r\n this.index = index;\r\n this.shorthandName = shorthandName;\r\n this.ifValue = ifValue;\r\n this.elseValue = elseValue;\r\n }\r\n resolve(value) {\r\n if (this.shorthandName === 'upcase') {\r\n return !value ? '' : value.toLocaleUpperCase();\r\n }\r\n else if (this.shorthandName === 'downcase') {\r\n return !value ? '' : value.toLocaleLowerCase();\r\n }\r\n else if (this.shorthandName === 'capitalize') {\r\n return !value ? '' : (value[0].toLocaleUpperCase() + value.substr(1));\r\n }\r\n else if (this.shorthandName === 'pascalcase') {\r\n return !value ? '' : this._toPascalCase(value);\r\n }\r\n else if (Boolean(value) && typeof this.ifValue === 'string') {\r\n return this.ifValue;\r\n }\r\n else if (!Boolean(value) && typeof this.elseValue === 'string') {\r\n return this.elseValue;\r\n }\r\n else {\r\n return value || '';\r\n }\r\n }\r\n _toPascalCase(value) {\r\n const match = value.match(/[a-z]+/gi);\r\n if (!match) {\r\n return value;\r\n }\r\n return match.map(function (word) {\r\n return word.charAt(0).toUpperCase()\r\n + word.substr(1).toLowerCase();\r\n })\r\n .join('');\r\n }\r\n clone() {\r\n let ret = new FormatString(this.index, this.shorthandName, this.ifValue, this.elseValue);\r\n return ret;\r\n }\r\n}\r\nclass Variable extends TransformableMarker {\r\n constructor(name) {\r\n super();\r\n this.name = name;\r\n }\r\n resolve(resolver) {\r\n let value = resolver.resolve(this);\r\n if (this.transform) {\r\n value = this.transform.resolve(value || '');\r\n }\r\n if (value !== undefined) {\r\n this._children = [new Text(value)];\r\n return true;\r\n }\r\n return false;\r\n }\r\n clone() {\r\n const ret = new Variable(this.name);\r\n if (this.transform) {\r\n ret.transform = this.transform.clone();\r\n }\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nfunction walk(marker, visitor) {\r\n const stack = [...marker];\r\n while (stack.length > 0) {\r\n const marker = stack.shift();\r\n const recurse = visitor(marker);\r\n if (!recurse) {\r\n break;\r\n }\r\n stack.unshift(...marker.children);\r\n }\r\n}\r\nclass TextmateSnippet extends Marker {\r\n get placeholderInfo() {\r\n if (!this._placeholders) {\r\n // fill in placeholders\r\n let all = [];\r\n let last;\r\n this.walk(function (candidate) {\r\n if (candidate instanceof Placeholder) {\r\n all.push(candidate);\r\n last = !last || last.index < candidate.index ? candidate : last;\r\n }\r\n return true;\r\n });\r\n this._placeholders = { all, last };\r\n }\r\n return this._placeholders;\r\n }\r\n get placeholders() {\r\n const { all } = this.placeholderInfo;\r\n return all;\r\n }\r\n offset(marker) {\r\n let pos = 0;\r\n let found = false;\r\n this.walk(candidate => {\r\n if (candidate === marker) {\r\n found = true;\r\n return false;\r\n }\r\n pos += candidate.len();\r\n return true;\r\n });\r\n if (!found) {\r\n return -1;\r\n }\r\n return pos;\r\n }\r\n fullLen(marker) {\r\n let ret = 0;\r\n walk([marker], marker => {\r\n ret += marker.len();\r\n return true;\r\n });\r\n return ret;\r\n }\r\n enclosingPlaceholders(placeholder) {\r\n let ret = [];\r\n let { parent } = placeholder;\r\n while (parent) {\r\n if (parent instanceof Placeholder) {\r\n ret.push(parent);\r\n }\r\n parent = parent.parent;\r\n }\r\n return ret;\r\n }\r\n resolveVariables(resolver) {\r\n this.walk(candidate => {\r\n if (candidate instanceof Variable) {\r\n if (candidate.resolve(resolver)) {\r\n this._placeholders = undefined;\r\n }\r\n }\r\n return true;\r\n });\r\n return this;\r\n }\r\n appendChild(child) {\r\n this._placeholders = undefined;\r\n return super.appendChild(child);\r\n }\r\n replace(child, others) {\r\n this._placeholders = undefined;\r\n return super.replace(child, others);\r\n }\r\n clone() {\r\n let ret = new TextmateSnippet();\r\n this._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n walk(visitor) {\r\n walk(this.children, visitor);\r\n }\r\n}\r\nclass SnippetParser {\r\n constructor() {\r\n this._scanner = new Scanner();\r\n this._token = { type: 14 /* EOF */, pos: 0, len: 0 };\r\n }\r\n static escape(value) {\r\n return value.replace(/\\$|}|\\\\/g, '\\\\$&');\r\n }\r\n static guessNeedsClipboard(template) {\r\n return /\\${?CLIPBOARD/.test(template);\r\n }\r\n parse(value, insertFinalTabstop, enforceFinalTabstop) {\r\n this._scanner.text(value);\r\n this._token = this._scanner.next();\r\n const snippet = new TextmateSnippet();\r\n while (this._parse(snippet)) {\r\n // nothing\r\n }\r\n // fill in values for placeholders. the first placeholder of an index\r\n // that has a value defines the value for all placeholders with that index\r\n const placeholderDefaultValues = new Map();\r\n const incompletePlaceholders = [];\r\n let placeholderCount = 0;\r\n snippet.walk(marker => {\r\n if (marker instanceof Placeholder) {\r\n placeholderCount += 1;\r\n if (marker.isFinalTabstop) {\r\n placeholderDefaultValues.set(0, undefined);\r\n }\r\n else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) {\r\n placeholderDefaultValues.set(marker.index, marker.children);\r\n }\r\n else {\r\n incompletePlaceholders.push(marker);\r\n }\r\n }\r\n return true;\r\n });\r\n for (const placeholder of incompletePlaceholders) {\r\n const defaultValues = placeholderDefaultValues.get(placeholder.index);\r\n if (defaultValues) {\r\n const clone = new Placeholder(placeholder.index);\r\n clone.transform = placeholder.transform;\r\n for (const child of defaultValues) {\r\n clone.appendChild(child.clone());\r\n }\r\n snippet.replace(placeholder, [clone]);\r\n }\r\n }\r\n if (!enforceFinalTabstop) {\r\n enforceFinalTabstop = placeholderCount > 0 && insertFinalTabstop;\r\n }\r\n if (!placeholderDefaultValues.has(0) && enforceFinalTabstop) {\r\n // the snippet uses placeholders but has no\r\n // final tabstop defined -> insert at the end\r\n snippet.appendChild(new Placeholder(0));\r\n }\r\n return snippet;\r\n }\r\n _accept(type, value) {\r\n if (type === undefined || this._token.type === type) {\r\n let ret = !value ? true : this._scanner.tokenText(this._token);\r\n this._token = this._scanner.next();\r\n return ret;\r\n }\r\n return false;\r\n }\r\n _backTo(token) {\r\n this._scanner.pos = token.pos + token.len;\r\n this._token = token;\r\n return false;\r\n }\r\n _until(type) {\r\n const start = this._token;\r\n while (this._token.type !== type) {\r\n if (this._token.type === 14 /* EOF */) {\r\n return false;\r\n }\r\n else if (this._token.type === 5 /* Backslash */) {\r\n const nextToken = this._scanner.next();\r\n if (nextToken.type !== 0 /* Dollar */\r\n && nextToken.type !== 4 /* CurlyClose */\r\n && nextToken.type !== 5 /* Backslash */) {\r\n return false;\r\n }\r\n }\r\n this._token = this._scanner.next();\r\n }\r\n const value = this._scanner.value.substring(start.pos, this._token.pos).replace(/\\\\(\\$|}|\\\\)/g, '$1');\r\n this._token = this._scanner.next();\r\n return value;\r\n }\r\n _parse(marker) {\r\n return this._parseEscaped(marker)\r\n || this._parseTabstopOrVariableName(marker)\r\n || this._parseComplexPlaceholder(marker)\r\n || this._parseComplexVariable(marker)\r\n || this._parseAnything(marker);\r\n }\r\n // \\$, \\\\, \\} -> just text\r\n _parseEscaped(marker) {\r\n let value;\r\n if (value = this._accept(5 /* Backslash */, true)) {\r\n // saw a backslash, append escaped token or that backslash\r\n value = this._accept(0 /* Dollar */, true)\r\n || this._accept(4 /* CurlyClose */, true)\r\n || this._accept(5 /* Backslash */, true)\r\n || value;\r\n marker.appendChild(new Text(value));\r\n return true;\r\n }\r\n return false;\r\n }\r\n // $foo -> variable, $1 -> tabstop\r\n _parseTabstopOrVariableName(parent) {\r\n let value;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && (value = this._accept(9 /* VariableName */, true) || this._accept(8 /* Int */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n parent.appendChild(/^\\d+$/.test(value)\r\n ? new Placeholder(Number(value))\r\n : new Variable(value));\r\n return true;\r\n }\r\n // ${1:<children>}, ${1} -> placeholder\r\n _parseComplexPlaceholder(parent) {\r\n let index;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && this._accept(3 /* CurlyOpen */)\r\n && (index = this._accept(8 /* Int */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n const placeholder = new Placeholder(Number(index));\r\n if (this._accept(1 /* Colon */)) {\r\n // ${1:<children>}\r\n while (true) {\r\n // ...} -> done\r\n if (this._accept(4 /* CurlyClose */)) {\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n if (this._parse(placeholder)) {\r\n continue;\r\n }\r\n // fallback\r\n parent.appendChild(new Text('${' + index + ':'));\r\n placeholder.children.forEach(parent.appendChild, parent);\r\n return true;\r\n }\r\n }\r\n else if (placeholder.index > 0 && this._accept(7 /* Pipe */)) {\r\n // ${1|one,two,three|}\r\n const choice = new Choice();\r\n while (true) {\r\n if (this._parseChoiceElement(choice)) {\r\n if (this._accept(2 /* Comma */)) {\r\n // opt, -> more\r\n continue;\r\n }\r\n if (this._accept(7 /* Pipe */)) {\r\n placeholder.appendChild(choice);\r\n if (this._accept(4 /* CurlyClose */)) {\r\n // ..|} -> done\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n }\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n }\r\n else if (this._accept(6 /* Forwardslash */)) {\r\n // ${1/<regex>/<format>/<options>}\r\n if (this._parseTransform(placeholder)) {\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${1}\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n else {\r\n // ${1 <- missing curly or colon\r\n return this._backTo(token);\r\n }\r\n }\r\n _parseChoiceElement(parent) {\r\n const token = this._token;\r\n const values = [];\r\n while (true) {\r\n if (this._token.type === 2 /* Comma */ || this._token.type === 7 /* Pipe */) {\r\n break;\r\n }\r\n let value;\r\n if (value = this._accept(5 /* Backslash */, true)) {\r\n // \\, \\|, or \\\\\r\n value = this._accept(2 /* Comma */, true)\r\n || this._accept(7 /* Pipe */, true)\r\n || this._accept(5 /* Backslash */, true)\r\n || value;\r\n }\r\n else {\r\n value = this._accept(undefined, true);\r\n }\r\n if (!value) {\r\n // EOF\r\n this._backTo(token);\r\n return false;\r\n }\r\n values.push(value);\r\n }\r\n if (values.length === 0) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n parent.appendChild(new Text(values.join('')));\r\n return true;\r\n }\r\n // ${foo:<children>}, ${foo} -> variable\r\n _parseComplexVariable(parent) {\r\n let name;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && this._accept(3 /* CurlyOpen */)\r\n && (name = this._accept(9 /* VariableName */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n const variable = new Variable(name);\r\n if (this._accept(1 /* Colon */)) {\r\n // ${foo:<children>}\r\n while (true) {\r\n // ...} -> done\r\n if (this._accept(4 /* CurlyClose */)) {\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n if (this._parse(variable)) {\r\n continue;\r\n }\r\n // fallback\r\n parent.appendChild(new Text('${' + name + ':'));\r\n variable.children.forEach(parent.appendChild, parent);\r\n return true;\r\n }\r\n }\r\n else if (this._accept(6 /* Forwardslash */)) {\r\n // ${foo/<regex>/<format>/<options>}\r\n if (this._parseTransform(variable)) {\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${foo}\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n else {\r\n // ${foo <- missing curly or colon\r\n return this._backTo(token);\r\n }\r\n }\r\n _parseTransform(parent) {\r\n // ...<regex>/<format>/<options>}\r\n let transform = new Transform();\r\n let regexValue = '';\r\n let regexOptions = '';\r\n // (1) /regex\r\n while (true) {\r\n if (this._accept(6 /* Forwardslash */)) {\r\n break;\r\n }\r\n let escaped;\r\n if (escaped = this._accept(5 /* Backslash */, true)) {\r\n escaped = this._accept(6 /* Forwardslash */, true) || escaped;\r\n regexValue += escaped;\r\n continue;\r\n }\r\n if (this._token.type !== 14 /* EOF */) {\r\n regexValue += this._accept(undefined, true);\r\n continue;\r\n }\r\n return false;\r\n }\r\n // (2) /format\r\n while (true) {\r\n if (this._accept(6 /* Forwardslash */)) {\r\n break;\r\n }\r\n let escaped;\r\n if (escaped = this._accept(5 /* Backslash */, true)) {\r\n escaped = this._accept(5 /* Backslash */, true) || this._accept(6 /* Forwardslash */, true) || escaped;\r\n transform.appendChild(new Text(escaped));\r\n continue;\r\n }\r\n if (this._parseFormatString(transform) || this._parseAnything(transform)) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n // (3) /option\r\n while (true) {\r\n if (this._accept(4 /* CurlyClose */)) {\r\n break;\r\n }\r\n if (this._token.type !== 14 /* EOF */) {\r\n regexOptions += this._accept(undefined, true);\r\n continue;\r\n }\r\n return false;\r\n }\r\n try {\r\n transform.regexp = new RegExp(regexValue, regexOptions);\r\n }\r\n catch (e) {\r\n // invalid regexp\r\n return false;\r\n }\r\n parent.transform = transform;\r\n return true;\r\n }\r\n _parseFormatString(parent) {\r\n const token = this._token;\r\n if (!this._accept(0 /* Dollar */)) {\r\n return false;\r\n }\r\n let complex = false;\r\n if (this._accept(3 /* CurlyOpen */)) {\r\n complex = true;\r\n }\r\n let index = this._accept(8 /* Int */, true);\r\n if (!index) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (!complex) {\r\n // $1\r\n parent.appendChild(new FormatString(Number(index)));\r\n return true;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${1}\r\n parent.appendChild(new FormatString(Number(index)));\r\n return true;\r\n }\r\n else if (!this._accept(1 /* Colon */)) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n if (this._accept(6 /* Forwardslash */)) {\r\n // ${1:/upcase}\r\n let shorthand = this._accept(9 /* VariableName */, true);\r\n if (!shorthand || !this._accept(4 /* CurlyClose */)) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n else {\r\n parent.appendChild(new FormatString(Number(index), shorthand));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(11 /* Plus */)) {\r\n // ${1:+<if>}\r\n let ifValue = this._until(4 /* CurlyClose */);\r\n if (ifValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, undefined));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(12 /* Dash */)) {\r\n // ${2:-<else>}\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(13 /* QuestionMark */)) {\r\n // ${2:?<if>:<else>}\r\n let ifValue = this._until(1 /* Colon */);\r\n if (ifValue) {\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, elseValue));\r\n return true;\r\n }\r\n }\r\n }\r\n else {\r\n // ${1:<else>}\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\r\n return true;\r\n }\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n _parseAnything(marker) {\r\n if (this._token.type !== 14 /* EOF */) {\r\n marker.appendChild(new Text(this._scanner.tokenText(this._token)));\r\n this._accept(undefined);\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OneSnippet\": () => (/* binding */ OneSnippet),\n/* harmony export */ \"SnippetSession\": () => (/* binding */ SnippetSession)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _snippetSession_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./snippetSession.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ \"./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./snippetParser.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js\");\n/* harmony import */ var _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./snippetVariables.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/label/common/label.js */ \"./node_modules/monaco-editor/esm/vs/platform/label/common/label.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__.registerThemingParticipant)((theme, collector) => {\r\n function getColorGraceful(name) {\r\n const color = theme.getColor(name);\r\n return color ? color.toString() : 'transparent';\r\n }\r\n collector.addRule(`.monaco-editor .snippet-placeholder { background-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.snippetTabstopHighlightBackground)}; outline-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.snippetTabstopHighlightBorder)}; }`);\r\n collector.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.snippetFinalTabstopHighlightBackground)}; outline-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.snippetFinalTabstopHighlightBorder)}; }`);\r\n});\r\nclass OneSnippet {\r\n constructor(_editor, _snippet, _offset, _snippetLineLeadingWhitespace) {\r\n this._editor = _editor;\r\n this._snippet = _snippet;\r\n this._offset = _offset;\r\n this._snippetLineLeadingWhitespace = _snippetLineLeadingWhitespace;\r\n this._nestingLevel = 1;\r\n this._placeholderGroups = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_snippet.placeholders, _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Placeholder.compareByIndex);\r\n this._placeholderGroupsIdx = -1;\r\n }\r\n dispose() {\r\n if (this._placeholderDecorations) {\r\n this._editor.deltaDecorations([...this._placeholderDecorations.values()], []);\r\n }\r\n this._placeholderGroups.length = 0;\r\n }\r\n _initDecorations() {\r\n if (this._placeholderDecorations) {\r\n // already initialized\r\n return;\r\n }\r\n this._placeholderDecorations = new Map();\r\n const model = this._editor.getModel();\r\n this._editor.changeDecorations(accessor => {\r\n // create a decoration for each placeholder\r\n for (const placeholder of this._snippet.placeholders) {\r\n const placeholderOffset = this._snippet.offset(placeholder);\r\n const placeholderLen = this._snippet.fullLen(placeholder);\r\n const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.fromPositions(model.getPositionAt(this._offset + placeholderOffset), model.getPositionAt(this._offset + placeholderOffset + placeholderLen));\r\n const options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive;\r\n const handle = accessor.addDecoration(range, options);\r\n this._placeholderDecorations.set(placeholder, handle);\r\n }\r\n });\r\n }\r\n move(fwd) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n this._initDecorations();\r\n // Transform placeholder text if necessary\r\n if (this._placeholderGroupsIdx >= 0) {\r\n let operations = [];\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n // Check if the placeholder has a transformation\r\n if (placeholder.transform) {\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n const currentValue = this._editor.getModel().getValueInRange(range);\r\n const transformedValueLines = placeholder.transform.resolve(currentValue).split(/\\r\\n|\\r|\\n/);\r\n // fix indentation for transformed lines\r\n for (let i = 1; i < transformedValueLines.length; i++) {\r\n transformedValueLines[i] = this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace + transformedValueLines[i]);\r\n }\r\n operations.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__.EditOperation.replace(range, transformedValueLines.join(this._editor.getModel().getEOL())));\r\n }\r\n }\r\n if (operations.length > 0) {\r\n this._editor.executeEdits('snippet.placeholderTransform', operations);\r\n }\r\n }\r\n let couldSkipThisPlaceholder = false;\r\n if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) {\r\n this._placeholderGroupsIdx += 1;\r\n couldSkipThisPlaceholder = true;\r\n }\r\n else if (fwd === false && this._placeholderGroupsIdx > 0) {\r\n this._placeholderGroupsIdx -= 1;\r\n couldSkipThisPlaceholder = true;\r\n }\r\n else {\r\n // the selection of the current placeholder might\r\n // not acurate any more -> simply restore it\r\n }\r\n const newSelections = this._editor.getModel().changeDecorations(accessor => {\r\n const activePlaceholders = new Set();\r\n // change stickiness to always grow when typing at its edges\r\n // because these decorations represent the currently active\r\n // tabstop.\r\n // Special case #1: reaching the final tabstop\r\n // Special case #2: placeholders enclosing active placeholders\r\n const selections = [];\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n selections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn));\r\n // consider to skip this placeholder index when the decoration\r\n // range is empty but when the placeholder wasn't. that's a strong\r\n // hint that the placeholder has been deleted. (all placeholder must match this)\r\n couldSkipThisPlaceholder = couldSkipThisPlaceholder && this._hasPlaceholderBeenCollapsed(placeholder);\r\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\r\n activePlaceholders.add(placeholder);\r\n for (const enclosingPlaceholder of this._snippet.enclosingPlaceholders(placeholder)) {\r\n const id = this._placeholderDecorations.get(enclosingPlaceholder);\r\n accessor.changeDecorationOptions(id, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\r\n activePlaceholders.add(enclosingPlaceholder);\r\n }\r\n }\r\n // change stickness to never grow when typing at its edges\r\n // so that in-active tabstops never grow\r\n for (const [placeholder, id] of this._placeholderDecorations) {\r\n if (!activePlaceholders.has(placeholder)) {\r\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive);\r\n }\r\n }\r\n return selections;\r\n });\r\n return !couldSkipThisPlaceholder ? newSelections !== null && newSelections !== void 0 ? newSelections : [] : this.move(fwd);\r\n }\r\n _hasPlaceholderBeenCollapsed(placeholder) {\r\n // A placeholder is empty when it wasn't empty when authored but\r\n // when its tracking decoration is empty. This also applies to all\r\n // potential parent placeholders\r\n let marker = placeholder;\r\n while (marker) {\r\n if (marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Placeholder) {\r\n const id = this._placeholderDecorations.get(marker);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n if (range.isEmpty() && marker.toString().length > 0) {\r\n return true;\r\n }\r\n }\r\n marker = marker.parent;\r\n }\r\n return false;\r\n }\r\n get isAtFirstPlaceholder() {\r\n return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0;\r\n }\r\n get isAtLastPlaceholder() {\r\n return this._placeholderGroupsIdx === this._placeholderGroups.length - 1;\r\n }\r\n get hasPlaceholder() {\r\n return this._snippet.placeholders.length > 0;\r\n }\r\n computePossibleSelections() {\r\n const result = new Map();\r\n for (const placeholdersWithEqualIndex of this._placeholderGroups) {\r\n let ranges;\r\n for (const placeholder of placeholdersWithEqualIndex) {\r\n if (placeholder.isFinalTabstop) {\r\n // ignore those\r\n break;\r\n }\r\n if (!ranges) {\r\n ranges = [];\r\n result.set(placeholder.index, ranges);\r\n }\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n if (!range) {\r\n // one of the placeholder lost its decoration and\r\n // therefore we bail out and pretend the placeholder\r\n // (with its mirrors) doesn't exist anymore.\r\n result.delete(placeholder.index);\r\n break;\r\n }\r\n ranges.push(range);\r\n }\r\n }\r\n return result;\r\n }\r\n get choice() {\r\n return this._placeholderGroups[this._placeholderGroupsIdx][0].choice;\r\n }\r\n merge(others) {\r\n const model = this._editor.getModel();\r\n this._nestingLevel *= 10;\r\n this._editor.changeDecorations(accessor => {\r\n // For each active placeholder take one snippet and merge it\r\n // in that the placeholder (can be many for `$1foo$1foo`). Because\r\n // everything is sorted by editor selection we can simply remove\r\n // elements from the beginning of the array\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n const nested = others.shift();\r\n console.assert(!nested._placeholderDecorations);\r\n // Massage placeholder-indicies of the nested snippet to be\r\n // sorted right after the insertion point. This ensures we move\r\n // through the placeholders in the correct order\r\n const indexLastPlaceholder = nested._snippet.placeholderInfo.last.index;\r\n for (const nestedPlaceholder of nested._snippet.placeholderInfo.all) {\r\n if (nestedPlaceholder.isFinalTabstop) {\r\n nestedPlaceholder.index = placeholder.index + ((indexLastPlaceholder + 1) / this._nestingLevel);\r\n }\r\n else {\r\n nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / this._nestingLevel);\r\n }\r\n }\r\n this._snippet.replace(placeholder, nested._snippet.children);\r\n // Remove the placeholder at which position are inserting\r\n // the snippet and also remove its decoration.\r\n const id = this._placeholderDecorations.get(placeholder);\r\n accessor.removeDecoration(id);\r\n this._placeholderDecorations.delete(placeholder);\r\n // For each *new* placeholder we create decoration to monitor\r\n // how and if it grows/shrinks.\r\n for (const placeholder of nested._snippet.placeholders) {\r\n const placeholderOffset = nested._snippet.offset(placeholder);\r\n const placeholderLen = nested._snippet.fullLen(placeholder);\r\n const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.fromPositions(model.getPositionAt(nested._offset + placeholderOffset), model.getPositionAt(nested._offset + placeholderOffset + placeholderLen));\r\n const handle = accessor.addDecoration(range, OneSnippet._decor.inactive);\r\n this._placeholderDecorations.set(placeholder, handle);\r\n }\r\n }\r\n // Last, re-create the placeholder groups by sorting placeholders by their index.\r\n this._placeholderGroups = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.groupBy)(this._snippet.placeholders, _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Placeholder.compareByIndex);\r\n });\r\n }\r\n}\r\nOneSnippet._decor = {\r\n active: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__.ModelDecorationOptions.register({ stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }),\r\n inactive: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__.ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }),\r\n activeFinal: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__.ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }),\r\n inactiveFinal: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__.ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }),\r\n};\r\nconst _defaultOptions = {\r\n overwriteBefore: 0,\r\n overwriteAfter: 0,\r\n adjustWhitespace: true,\r\n clipboardText: undefined,\r\n overtypingCapturer: undefined\r\n};\r\nclass SnippetSession {\r\n constructor(editor, template, options = _defaultOptions) {\r\n this._templateMerges = [];\r\n this._snippets = [];\r\n this._editor = editor;\r\n this._template = template;\r\n this._options = options;\r\n }\r\n static adjustWhitespace(model, position, snippet, adjustIndentation, adjustNewlines) {\r\n const line = model.getLineContent(position.lineNumber);\r\n const lineLeadingWhitespace = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__.getLeadingWhitespace)(line, 0, position.column - 1);\r\n // the snippet as inserted\r\n let snippetTextString;\r\n snippet.walk(marker => {\r\n // all text elements that are not inside choice\r\n if (!(marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Text) || marker.parent instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Choice) {\r\n return true;\r\n }\r\n const lines = marker.value.split(/\\r\\n|\\r|\\n/);\r\n if (adjustIndentation) {\r\n // adjust indentation of snippet test\r\n // -the snippet-start doesn't get extra-indented (lineLeadingWhitespace), only normalized\r\n // -all N+1 lines get extra-indented and normalized\r\n // -the text start get extra-indented and normalized when following a linebreak\r\n const offset = snippet.offset(marker);\r\n if (offset === 0) {\r\n // snippet start\r\n lines[0] = model.normalizeIndentation(lines[0]);\r\n }\r\n else {\r\n // check if text start is after a linebreak\r\n snippetTextString = snippetTextString !== null && snippetTextString !== void 0 ? snippetTextString : snippet.toString();\r\n let prevChar = snippetTextString.charCodeAt(offset - 1);\r\n if (prevChar === 10 /* LineFeed */ || prevChar === 13 /* CarriageReturn */) {\r\n lines[0] = model.normalizeIndentation(lineLeadingWhitespace + lines[0]);\r\n }\r\n }\r\n for (let i = 1; i < lines.length; i++) {\r\n lines[i] = model.normalizeIndentation(lineLeadingWhitespace + lines[i]);\r\n }\r\n }\r\n const newValue = lines.join(model.getEOL());\r\n if (newValue !== marker.value) {\r\n marker.parent.replace(marker, [new _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.Text(newValue)]);\r\n snippetTextString = undefined;\r\n }\r\n return true;\r\n });\r\n return lineLeadingWhitespace;\r\n }\r\n static adjustSelection(model, selection, overwriteBefore, overwriteAfter) {\r\n if (overwriteBefore !== 0 || overwriteAfter !== 0) {\r\n // overwrite[Before|After] is compute using the position, not the whole\r\n // selection. therefore we adjust the selection around that position\r\n const { positionLineNumber, positionColumn } = selection;\r\n const positionColumnBefore = positionColumn - overwriteBefore;\r\n const positionColumnAfter = positionColumn + overwriteAfter;\r\n const range = model.validateRange({\r\n startLineNumber: positionLineNumber,\r\n startColumn: positionColumnBefore,\r\n endLineNumber: positionLineNumber,\r\n endColumn: positionColumnAfter\r\n });\r\n selection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection.createWithDirection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn, selection.getDirection());\r\n }\r\n return selection;\r\n }\r\n static createEditsAndSnippets(editor, template, overwriteBefore, overwriteAfter, enforceFinalTabstop, adjustWhitespace, clipboardText, overtypingCapturer) {\r\n const edits = [];\r\n const snippets = [];\r\n if (!editor.hasModel()) {\r\n return { edits, snippets };\r\n }\r\n const model = editor.getModel();\r\n const workspaceService = editor.invokeWithinContext(accessor => accessor.get(_platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_8__.IWorkspaceContextService, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__.optional));\r\n const modelBasedVariableResolver = editor.invokeWithinContext(accessor => new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.ModelBasedVariableResolver(accessor.get(_platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__.ILabelService, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__.optional), model));\r\n const readClipboardText = () => clipboardText;\r\n let delta = 0;\r\n // know what text the overwrite[Before|After] extensions\r\n // of the primary curser have selected because only when\r\n // secondary selections extend to the same text we can grow them\r\n let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0));\r\n let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter));\r\n // remember the first non-whitespace column to decide if\r\n // `keepWhitespace` should be overruled for secondary selections\r\n let firstLineFirstNonWhitespace = model.getLineFirstNonWhitespaceColumn(editor.getSelection().positionLineNumber);\r\n // sort selections by their start position but remeber\r\n // the original index. that allows you to create correct\r\n // offset-based selection logic without changing the\r\n // primary selection\r\n const indexedSelections = editor.getSelections()\r\n .map((selection, idx) => ({ selection, idx }))\r\n .sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts(a.selection, b.selection));\r\n for (const { selection, idx } of indexedSelections) {\r\n // extend selection with the `overwriteBefore` and `overwriteAfter` and then\r\n // compare if this matches the extensions of the primary selection\r\n let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0);\r\n let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter);\r\n if (firstBeforeText !== model.getValueInRange(extensionBefore)) {\r\n extensionBefore = selection;\r\n }\r\n if (firstAfterText !== model.getValueInRange(extensionAfter)) {\r\n extensionAfter = selection;\r\n }\r\n // merge the before and after selection into one\r\n const snippetSelection = selection\r\n .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn)\r\n .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn);\r\n const snippet = new _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__.SnippetParser().parse(template, true, enforceFinalTabstop);\r\n // adjust the template string to match the indentation and\r\n // whitespace rules of this insert location (can be different for each cursor)\r\n // happens when being asked for (default) or when this is a secondary\r\n // cursor and the leading whitespace is different\r\n const start = snippetSelection.getStartPosition();\r\n const snippetLineLeadingWhitespace = SnippetSession.adjustWhitespace(model, start, snippet, adjustWhitespace || (idx > 0 && firstLineFirstNonWhitespace !== model.getLineFirstNonWhitespaceColumn(selection.positionLineNumber)), true);\r\n snippet.resolveVariables(new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.CompositeSnippetVariableResolver([\r\n modelBasedVariableResolver,\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.ClipboardBasedVariableResolver(readClipboardText, idx, indexedSelections.length, editor.getOption(65 /* multiCursorPaste */) === 'spread'),\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.SelectionBasedVariableResolver(model, selection, idx, overtypingCapturer),\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.CommentBasedVariableResolver(model, selection),\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.TimeBasedVariableResolver,\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.WorkspaceBasedVariableResolver(workspaceService),\r\n new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__.RandomBasedVariableResolver,\r\n ]));\r\n const offset = model.getOffsetAt(start) + delta;\r\n delta += snippet.toString().length - model.getValueLengthInRange(snippetSelection);\r\n // store snippets with the index of their originating selection.\r\n // that ensures the primiary cursor stays primary despite not being\r\n // the one with lowest start position\r\n edits[idx] = _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__.EditOperation.replace(snippetSelection, snippet.toString());\r\n edits[idx].identifier = { major: idx, minor: 0 }; // mark the edit so only our undo edits will be used to generate end cursors\r\n snippets[idx] = new OneSnippet(editor, snippet, offset, snippetLineLeadingWhitespace);\r\n }\r\n return { edits, snippets };\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.dispose)(this._snippets);\r\n }\r\n _logInfo() {\r\n return `template=\"${this._template}\", merged_templates=\"${this._templateMerges.join(' -> ')}\"`;\r\n }\r\n insert() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // make insert edit and start with first selections\r\n const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, false, this._options.adjustWhitespace, this._options.clipboardText, this._options.overtypingCapturer);\r\n this._snippets = snippets;\r\n this._editor.executeEdits('snippet', edits, undoEdits => {\r\n if (this._snippets[0].hasPlaceholder) {\r\n return this._move(true);\r\n }\r\n else {\r\n return undoEdits\r\n .filter(edit => !!edit.identifier) // only use our undo edits\r\n .map(edit => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection.fromPositions(edit.range.getEndPosition()));\r\n }\r\n });\r\n this._editor.revealRange(this._editor.getSelections()[0]);\r\n }\r\n merge(template, options = _defaultOptions) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, template]);\r\n const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, options.overwriteBefore, options.overwriteAfter, true, options.adjustWhitespace, options.clipboardText, options.overtypingCapturer);\r\n this._editor.executeEdits('snippet', edits, undoEdits => {\r\n for (const snippet of this._snippets) {\r\n snippet.merge(snippets);\r\n }\r\n console.assert(snippets.length === 0);\r\n if (this._snippets[0].hasPlaceholder) {\r\n return this._move(undefined);\r\n }\r\n else {\r\n return (undoEdits\r\n .filter(edit => !!edit.identifier) // only use our undo edits\r\n .map(edit => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__.Selection.fromPositions(edit.range.getEndPosition())));\r\n }\r\n });\r\n }\r\n next() {\r\n const newSelections = this._move(true);\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\r\n }\r\n prev() {\r\n const newSelections = this._move(false);\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\r\n }\r\n _move(fwd) {\r\n const selections = [];\r\n for (const snippet of this._snippets) {\r\n const oneSelection = snippet.move(fwd);\r\n selections.push(...oneSelection);\r\n }\r\n return selections;\r\n }\r\n get isAtFirstPlaceholder() {\r\n return this._snippets[0].isAtFirstPlaceholder;\r\n }\r\n get isAtLastPlaceholder() {\r\n return this._snippets[0].isAtLastPlaceholder;\r\n }\r\n get hasPlaceholder() {\r\n return this._snippets[0].hasPlaceholder;\r\n }\r\n get choice() {\r\n return this._snippets[0].choice;\r\n }\r\n isSelectionWithinPlaceholders() {\r\n if (!this.hasPlaceholder) {\r\n return false;\r\n }\r\n const selections = this._editor.getSelections();\r\n if (selections.length < this._snippets.length) {\r\n // this means we started snippet mode with N\r\n // selections and have M (N > M) selections.\r\n // So one snippet is without selection -> cancel\r\n return false;\r\n }\r\n let allPossibleSelections = new Map();\r\n for (const snippet of this._snippets) {\r\n const possibleSelections = snippet.computePossibleSelections();\r\n // for the first snippet find the placeholder (and its ranges)\r\n // that contain at least one selection. for all remaining snippets\r\n // the same placeholder (and their ranges) must be used.\r\n if (allPossibleSelections.size === 0) {\r\n for (const [index, ranges] of possibleSelections) {\r\n ranges.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts);\r\n for (const selection of selections) {\r\n if (ranges[0].containsRange(selection)) {\r\n allPossibleSelections.set(index, []);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (allPossibleSelections.size === 0) {\r\n // return false if we couldn't associate a selection to\r\n // this (the first) snippet\r\n return false;\r\n }\r\n // add selections from 'this' snippet so that we know all\r\n // selections for this placeholder\r\n allPossibleSelections.forEach((array, index) => {\r\n array.push(...possibleSelections.get(index));\r\n });\r\n }\r\n // sort selections (and later placeholder-ranges). then walk both\r\n // arrays and make sure the placeholder-ranges contain the corresponding\r\n // selection\r\n selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts);\r\n for (let [index, ranges] of allPossibleSelections) {\r\n if (ranges.length !== selections.length) {\r\n allPossibleSelections.delete(index);\r\n continue;\r\n }\r\n ranges.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.compareRangesUsingStarts);\r\n for (let i = 0; i < ranges.length; i++) {\r\n if (!ranges[i].containsRange(selections[i])) {\r\n allPossibleSelections.delete(index);\r\n continue;\r\n }\r\n }\r\n }\r\n // from all possible selections we have deleted those\r\n // that don't match with the current selection. if we don't\r\n // have any left, we don't have a selection anymore\r\n return allPossibleSelections.size > 0;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompositeSnippetVariableResolver\": () => (/* binding */ CompositeSnippetVariableResolver),\n/* harmony export */ \"SelectionBasedVariableResolver\": () => (/* binding */ SelectionBasedVariableResolver),\n/* harmony export */ \"ModelBasedVariableResolver\": () => (/* binding */ ModelBasedVariableResolver),\n/* harmony export */ \"ClipboardBasedVariableResolver\": () => (/* binding */ ClipboardBasedVariableResolver),\n/* harmony export */ \"CommentBasedVariableResolver\": () => (/* binding */ CommentBasedVariableResolver),\n/* harmony export */ \"TimeBasedVariableResolver\": () => (/* binding */ TimeBasedVariableResolver),\n/* harmony export */ \"WorkspaceBasedVariableResolver\": () => (/* binding */ WorkspaceBasedVariableResolver),\n/* harmony export */ \"RandomBasedVariableResolver\": () => (/* binding */ RandomBasedVariableResolver)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/path.js */ \"./node_modules/monaco-editor/esm/vs/base/common/path.js\");\n/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/resources.js */ \"./node_modules/monaco-editor/esm/vs/base/common/resources.js\");\n/* harmony import */ var _snippetParser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./snippetParser.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/workspaces/common/workspaces.js */ \"./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js\");\n/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/labels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/labels.js\");\n/* harmony import */ var _base_common_uuid_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/uuid.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uuid.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass CompositeSnippetVariableResolver {\r\n constructor(_delegates) {\r\n this._delegates = _delegates;\r\n //\r\n }\r\n resolve(variable) {\r\n for (const delegate of this._delegates) {\r\n let value = delegate.resolve(variable);\r\n if (value !== undefined) {\r\n return value;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nclass SelectionBasedVariableResolver {\r\n constructor(_model, _selection, _selectionIdx, _overtypingCapturer) {\r\n this._model = _model;\r\n this._selection = _selection;\r\n this._selectionIdx = _selectionIdx;\r\n this._overtypingCapturer = _overtypingCapturer;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') {\r\n let value = this._model.getValueInRange(this._selection) || undefined;\r\n let isMultiline = this._selection.startLineNumber !== this._selection.endLineNumber;\r\n // If there was no selected text, try to get last overtyped text\r\n if (!value && this._overtypingCapturer) {\r\n const info = this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);\r\n if (info) {\r\n value = info.value;\r\n isMultiline = info.multiline;\r\n }\r\n }\r\n if (value && isMultiline && variable.snippet) {\r\n // Selection is a multiline string which we indentation we now\r\n // need to adjust. We compare the indentation of this variable\r\n // with the indentation at the editor position and add potential\r\n // extra indentation to the value\r\n const line = this._model.getLineContent(this._selection.startLineNumber);\r\n const lineLeadingWhitespace = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.getLeadingWhitespace)(line, 0, this._selection.startColumn - 1);\r\n let varLeadingWhitespace = lineLeadingWhitespace;\r\n variable.snippet.walk(marker => {\r\n if (marker === variable) {\r\n return false;\r\n }\r\n if (marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_3__.Text) {\r\n varLeadingWhitespace = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.getLeadingWhitespace)((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.splitLines)(marker.value).pop());\r\n }\r\n return true;\r\n });\r\n const whitespaceCommonLength = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.commonPrefixLength)(varLeadingWhitespace, lineLeadingWhitespace);\r\n value = value.replace(/(\\r\\n|\\r|\\n)(.*)/g, (m, newline, rest) => `${newline}${varLeadingWhitespace.substr(whitespaceCommonLength)}${rest}`);\r\n }\r\n return value;\r\n }\r\n else if (name === 'TM_CURRENT_LINE') {\r\n return this._model.getLineContent(this._selection.positionLineNumber);\r\n }\r\n else if (name === 'TM_CURRENT_WORD') {\r\n const info = this._model.getWordAtPosition({\r\n lineNumber: this._selection.positionLineNumber,\r\n column: this._selection.positionColumn\r\n });\r\n return info && info.word || undefined;\r\n }\r\n else if (name === 'TM_LINE_INDEX') {\r\n return String(this._selection.positionLineNumber - 1);\r\n }\r\n else if (name === 'TM_LINE_NUMBER') {\r\n return String(this._selection.positionLineNumber);\r\n }\r\n return undefined;\r\n }\r\n}\r\nclass ModelBasedVariableResolver {\r\n constructor(_labelService, _model) {\r\n this._labelService = _labelService;\r\n this._model = _model;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'TM_FILENAME') {\r\n return _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.basename(this._model.uri.fsPath);\r\n }\r\n else if (name === 'TM_FILENAME_BASE') {\r\n const name = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.basename(this._model.uri.fsPath);\r\n const idx = name.lastIndexOf('.');\r\n if (idx <= 0) {\r\n return name;\r\n }\r\n else {\r\n return name.slice(0, idx);\r\n }\r\n }\r\n else if (name === 'TM_DIRECTORY' && this._labelService) {\r\n if (_base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.dirname(this._model.uri.fsPath) === '.') {\r\n return '';\r\n }\r\n return this._labelService.getUriLabel((0,_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__.dirname)(this._model.uri));\r\n }\r\n else if (name === 'TM_FILEPATH' && this._labelService) {\r\n return this._labelService.getUriLabel(this._model.uri);\r\n }\r\n else if (name === 'RELATIVE_FILEPATH' && this._labelService) {\r\n return this._labelService.getUriLabel(this._model.uri, { relative: true, noPrefix: true });\r\n }\r\n return undefined;\r\n }\r\n}\r\nclass ClipboardBasedVariableResolver {\r\n constructor(_readClipboardText, _selectionIdx, _selectionCount, _spread) {\r\n this._readClipboardText = _readClipboardText;\r\n this._selectionIdx = _selectionIdx;\r\n this._selectionCount = _selectionCount;\r\n this._spread = _spread;\r\n //\r\n }\r\n resolve(variable) {\r\n if (variable.name !== 'CLIPBOARD') {\r\n return undefined;\r\n }\r\n const clipboardText = this._readClipboardText();\r\n if (!clipboardText) {\r\n return undefined;\r\n }\r\n // `spread` is assigning each cursor a line of the clipboard\r\n // text whenever there the line count equals the cursor count\r\n // and when enabled\r\n if (this._spread) {\r\n const lines = clipboardText.split(/\\r\\n|\\n|\\r/).filter(s => !(0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__.isFalsyOrWhitespace)(s));\r\n if (lines.length === this._selectionCount) {\r\n return lines[this._selectionIdx];\r\n }\r\n }\r\n return clipboardText;\r\n }\r\n}\r\nclass CommentBasedVariableResolver {\r\n constructor(_model, _selection) {\r\n this._model = _model;\r\n this._selection = _selection;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n const langId = this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber, this._selection.selectionStartColumn);\r\n const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__.LanguageConfigurationRegistry.getComments(langId);\r\n if (!config) {\r\n return undefined;\r\n }\r\n if (name === 'LINE_COMMENT') {\r\n return config.lineCommentToken || undefined;\r\n }\r\n else if (name === 'BLOCK_COMMENT_START') {\r\n return config.blockCommentStartToken || undefined;\r\n }\r\n else if (name === 'BLOCK_COMMENT_END') {\r\n return config.blockCommentEndToken || undefined;\r\n }\r\n return undefined;\r\n }\r\n}\r\nclass TimeBasedVariableResolver {\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'CURRENT_YEAR') {\r\n return String(new Date().getFullYear());\r\n }\r\n else if (name === 'CURRENT_YEAR_SHORT') {\r\n return String(new Date().getFullYear()).slice(-2);\r\n }\r\n else if (name === 'CURRENT_MONTH') {\r\n return String(new Date().getMonth().valueOf() + 1).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_DATE') {\r\n return String(new Date().getDate().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_HOUR') {\r\n return String(new Date().getHours().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_MINUTE') {\r\n return String(new Date().getMinutes().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_SECOND') {\r\n return String(new Date().getSeconds().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_DAY_NAME') {\r\n return TimeBasedVariableResolver.dayNames[new Date().getDay()];\r\n }\r\n else if (name === 'CURRENT_DAY_NAME_SHORT') {\r\n return TimeBasedVariableResolver.dayNamesShort[new Date().getDay()];\r\n }\r\n else if (name === 'CURRENT_MONTH_NAME') {\r\n return TimeBasedVariableResolver.monthNames[new Date().getMonth()];\r\n }\r\n else if (name === 'CURRENT_MONTH_NAME_SHORT') {\r\n return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()];\r\n }\r\n else if (name === 'CURRENT_SECONDS_UNIX') {\r\n return String(Math.floor(Date.now() / 1000));\r\n }\r\n return undefined;\r\n }\r\n}\r\nTimeBasedVariableResolver.dayNames = [_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Sunday', \"Sunday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Monday', \"Monday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Tuesday', \"Tuesday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Wednesday', \"Wednesday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Thursday', \"Thursday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Friday', \"Friday\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('Saturday', \"Saturday\")];\r\nTimeBasedVariableResolver.dayNamesShort = [_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('SundayShort', \"Sun\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('MondayShort', \"Mon\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('TuesdayShort', \"Tue\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('WednesdayShort', \"Wed\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('ThursdayShort', \"Thu\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('FridayShort', \"Fri\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('SaturdayShort', \"Sat\")];\r\nTimeBasedVariableResolver.monthNames = [_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('January', \"January\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('February', \"February\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('March', \"March\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('April', \"April\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('May', \"May\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('June', \"June\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('July', \"July\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('August', \"August\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('September', \"September\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('October', \"October\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('November', \"November\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('December', \"December\")];\r\nTimeBasedVariableResolver.monthNamesShort = [_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('JanuaryShort', \"Jan\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('FebruaryShort', \"Feb\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('MarchShort', \"Mar\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('AprilShort', \"Apr\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('MayShort', \"May\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('JuneShort', \"Jun\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('JulyShort', \"Jul\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('AugustShort', \"Aug\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('SeptemberShort', \"Sep\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('OctoberShort', \"Oct\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('NovemberShort', \"Nov\"), _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('DecemberShort', \"Dec\")];\r\nclass WorkspaceBasedVariableResolver {\r\n constructor(_workspaceService) {\r\n this._workspaceService = _workspaceService;\r\n //\r\n }\r\n resolve(variable) {\r\n if (!this._workspaceService) {\r\n return undefined;\r\n }\r\n const workspaceIdentifier = (0,_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());\r\n if (!workspaceIdentifier) {\r\n return undefined;\r\n }\r\n if (variable.name === 'WORKSPACE_NAME') {\r\n return this._resolveWorkspaceName(workspaceIdentifier);\r\n }\r\n else if (variable.name === 'WORKSPACE_FOLDER') {\r\n return this._resoveWorkspacePath(workspaceIdentifier);\r\n }\r\n return undefined;\r\n }\r\n _resolveWorkspaceName(workspaceIdentifier) {\r\n if ((0,_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__.isSingleFolderWorkspaceIdentifier)(workspaceIdentifier)) {\r\n return _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.basename(workspaceIdentifier.uri.path);\r\n }\r\n let filename = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.basename(workspaceIdentifier.configPath.path);\r\n if (filename.endsWith(_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__.WORKSPACE_EXTENSION)) {\r\n filename = filename.substr(0, filename.length - _platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__.WORKSPACE_EXTENSION.length - 1);\r\n }\r\n return filename;\r\n }\r\n _resoveWorkspacePath(workspaceIdentifier) {\r\n if ((0,_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__.isSingleFolderWorkspaceIdentifier)(workspaceIdentifier)) {\r\n return (0,_base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__.normalizeDriveLetter)(workspaceIdentifier.uri.fsPath);\r\n }\r\n let filename = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__.basename(workspaceIdentifier.configPath.path);\r\n let folderpath = workspaceIdentifier.configPath.fsPath;\r\n if (folderpath.endsWith(filename)) {\r\n folderpath = folderpath.substr(0, folderpath.length - filename.length - 1);\r\n }\r\n return (folderpath ? (0,_base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__.normalizeDriveLetter)(folderpath) : '/');\r\n }\r\n}\r\nclass RandomBasedVariableResolver {\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'RANDOM') {\r\n return Math.random().toString().slice(-6);\r\n }\r\n else if (name === 'RANDOM_HEX') {\r\n return Math.random().toString(16).slice(-6);\r\n }\r\n else if (name === 'UUID') {\r\n return (0,_base_common_uuid_js__WEBPACK_IMPORTED_MODULE_8__.generateUuid)();\r\n }\r\n return undefined;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineContext\": () => (/* binding */ LineContext),\n/* harmony export */ \"CompletionModel\": () => (/* binding */ CompletionModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass LineContext {\r\n constructor(leadingLineContent, characterCountDelta) {\r\n this.leadingLineContent = leadingLineContent;\r\n this.characterCountDelta = characterCountDelta;\r\n }\r\n}\r\n/**\r\n * Sorted, filtered completion view model\r\n * */\r\nclass CompletionModel {\r\n constructor(items, column, lineContext, wordDistance, options, snippetSuggestions, clipboardText) {\r\n this.clipboardText = clipboardText;\r\n this._snippetCompareFn = CompletionModel._compareCompletionItems;\r\n this._items = items;\r\n this._column = column;\r\n this._wordDistance = wordDistance;\r\n this._options = options;\r\n this._refilterKind = 1 /* All */;\r\n this._lineContext = lineContext;\r\n if (snippetSuggestions === 'top') {\r\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsUp;\r\n }\r\n else if (snippetSuggestions === 'bottom') {\r\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsDown;\r\n }\r\n }\r\n get lineContext() {\r\n return this._lineContext;\r\n }\r\n set lineContext(value) {\r\n if (this._lineContext.leadingLineContent !== value.leadingLineContent\r\n || this._lineContext.characterCountDelta !== value.characterCountDelta) {\r\n this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? 2 /* Incr */ : 1 /* All */;\r\n this._lineContext = value;\r\n }\r\n }\r\n get items() {\r\n this._ensureCachedState();\r\n return this._filteredItems;\r\n }\r\n get allProvider() {\r\n this._ensureCachedState();\r\n return this._providerInfo.keys();\r\n }\r\n get incomplete() {\r\n this._ensureCachedState();\r\n const result = new Set();\r\n for (let [provider, incomplete] of this._providerInfo) {\r\n if (incomplete) {\r\n result.add(provider);\r\n }\r\n }\r\n return result;\r\n }\r\n adopt(except) {\r\n let res = [];\r\n for (let i = 0; i < this._items.length;) {\r\n if (!except.has(this._items[i].provider)) {\r\n res.push(this._items[i]);\r\n // unordered removed\r\n this._items[i] = this._items[this._items.length - 1];\r\n this._items.pop();\r\n }\r\n else {\r\n // continue with next item\r\n i++;\r\n }\r\n }\r\n this._refilterKind = 1 /* All */;\r\n return res;\r\n }\r\n get stats() {\r\n this._ensureCachedState();\r\n return this._stats;\r\n }\r\n _ensureCachedState() {\r\n if (this._refilterKind !== 0 /* Nothing */) {\r\n this._createCachedState();\r\n }\r\n }\r\n _createCachedState() {\r\n this._providerInfo = new Map();\r\n const labelLengths = [];\r\n const { leadingLineContent, characterCountDelta } = this._lineContext;\r\n let word = '';\r\n let wordLow = '';\r\n // incrementally filter less\r\n const source = this._refilterKind === 1 /* All */ ? this._items : this._filteredItems;\r\n const target = [];\r\n // picks a score function based on the number of\r\n // items that we have to score/filter and based on the\r\n // user-configuration\r\n const scoreFn = (!this._options.filterGraceful || source.length > 2000) ? _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__.fuzzyScore : _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__.fuzzyScoreGracefulAggressive;\r\n for (let i = 0; i < source.length; i++) {\r\n const item = source[i];\r\n if (item.isInvalid) {\r\n continue; // SKIP invalid items\r\n }\r\n // collect all support, know if their result is incomplete\r\n this._providerInfo.set(item.provider, Boolean(item.container.incomplete));\r\n // 'word' is that remainder of the current line that we\r\n // filter and score against. In theory each suggestion uses a\r\n // different word, but in practice not - that's why we cache\r\n const overwriteBefore = item.position.column - item.editStart.column;\r\n const wordLen = overwriteBefore + characterCountDelta - (item.position.column - this._column);\r\n if (word.length !== wordLen) {\r\n word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen);\r\n wordLow = word.toLowerCase();\r\n }\r\n const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name;\r\n // remember the word against which this item was\r\n // scored\r\n item.word = word;\r\n if (wordLen === 0) {\r\n // when there is nothing to score against, don't\r\n // event try to do. Use a const rank and rely on\r\n // the fallback-sort using the initial sort order.\r\n // use a score of `-100` because that is out of the\r\n // bound of values `fuzzyScore` will return\r\n item.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__.FuzzyScore.Default;\r\n }\r\n else {\r\n // skip word characters that are whitespace until\r\n // we have hit the replace range (overwriteBefore)\r\n let wordPos = 0;\r\n while (wordPos < overwriteBefore) {\r\n const ch = word.charCodeAt(wordPos);\r\n if (ch === 32 /* Space */ || ch === 9 /* Tab */) {\r\n wordPos += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (wordPos >= wordLen) {\r\n // the wordPos at which scoring starts is the whole word\r\n // and therefore the same rules as not having a word apply\r\n item.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__.FuzzyScore.Default;\r\n }\r\n else if (typeof item.completion.filterText === 'string') {\r\n // when there is a `filterText` it must match the `word`.\r\n // if it matches we check with the label to compute highlights\r\n // and if that doesn't yield a result we have no highlights,\r\n // despite having the match\r\n let match = scoreFn(word, wordLow, wordPos, item.completion.filterText, item.filterTextLow, 0, false);\r\n if (!match) {\r\n continue; // NO match\r\n }\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.compareIgnoreCase)(item.completion.filterText, textLabel) === 0) {\r\n // filterText and label are actually the same -> use good highlights\r\n item.score = match;\r\n }\r\n else {\r\n // re-run the scorer on the label in the hope of a result BUT use the rank\r\n // of the filterText-match\r\n item.score = (0,_base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__.anyScore)(word, wordLow, wordPos, textLabel, item.labelLow, 0);\r\n item.score[0] = match[0]; // use score from filterText\r\n }\r\n }\r\n else {\r\n // by default match `word` against the `label`\r\n let match = scoreFn(word, wordLow, wordPos, textLabel, item.labelLow, 0, false);\r\n if (!match) {\r\n continue; // NO match\r\n }\r\n item.score = match;\r\n }\r\n }\r\n item.idx = i;\r\n item.distance = this._wordDistance.distance(item.position, item.completion);\r\n target.push(item);\r\n // update stats\r\n labelLengths.push(textLabel.length);\r\n }\r\n this._filteredItems = target.sort(this._snippetCompareFn);\r\n this._refilterKind = 0 /* Nothing */;\r\n this._stats = {\r\n pLabelLen: labelLengths.length ?\r\n (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__.quickSelect)(labelLengths.length - .85, labelLengths, (a, b) => a - b)\r\n : 0\r\n };\r\n }\r\n static _compareCompletionItems(a, b) {\r\n if (a.score[0] > b.score[0]) {\r\n return -1;\r\n }\r\n else if (a.score[0] < b.score[0]) {\r\n return 1;\r\n }\r\n else if (a.distance < b.distance) {\r\n return -1;\r\n }\r\n else if (a.distance > b.distance) {\r\n return 1;\r\n }\r\n else if (a.idx < b.idx) {\r\n return -1;\r\n }\r\n else if (a.idx > b.idx) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n static _compareCompletionItemsSnippetsDown(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n }\r\n return CompletionModel._compareCompletionItems(a, b);\r\n }\r\n static _compareCompletionItemsSnippetsUp(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n }\r\n return CompletionModel._compareCompletionItems(a, b);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/resizable.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/resizable.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResizableHTMLElement\": () => (/* binding */ ResizableHTMLElement)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass ResizableHTMLElement {\r\n constructor() {\r\n this._onDidWillResize = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidWillResize = this._onDidWillResize.event;\r\n this._onDidResize = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Emitter();\r\n this.onDidResize = this._onDidResize.event;\r\n this._sashListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._size = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(0, 0);\r\n this._minSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(0, 0);\r\n this._maxSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\r\n this.domNode = document.createElement('div');\r\n this._eastSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.Sash(this.domNode, { getVerticalSashLeft: () => this._size.width }, { orientation: 0 /* VERTICAL */ });\r\n this._westSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.Sash(this.domNode, { getVerticalSashLeft: () => 0 }, { orientation: 0 /* VERTICAL */ });\r\n this._northSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.Sash(this.domNode, { getHorizontalSashTop: () => 0 }, { orientation: 1 /* HORIZONTAL */, orthogonalEdge: _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.OrthogonalEdge.North });\r\n this._southSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.Sash(this.domNode, { getHorizontalSashTop: () => this._size.height }, { orientation: 1 /* HORIZONTAL */, orthogonalEdge: _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_3__.OrthogonalEdge.South });\r\n this._northSash.orthogonalStartSash = this._westSash;\r\n this._northSash.orthogonalEndSash = this._eastSash;\r\n this._southSash.orthogonalStartSash = this._westSash;\r\n this._southSash.orthogonalEndSash = this._eastSash;\r\n let currentSize;\r\n let deltaY = 0;\r\n let deltaX = 0;\r\n this._sashListener.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Event.any(this._northSash.onDidStart, this._eastSash.onDidStart, this._southSash.onDidStart, this._westSash.onDidStart)(() => {\r\n if (currentSize === undefined) {\r\n this._onDidWillResize.fire();\r\n currentSize = this._size;\r\n deltaY = 0;\r\n deltaX = 0;\r\n }\r\n }));\r\n this._sashListener.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Event.any(this._northSash.onDidEnd, this._eastSash.onDidEnd, this._southSash.onDidEnd, this._westSash.onDidEnd)(() => {\r\n if (currentSize !== undefined) {\r\n currentSize = undefined;\r\n deltaY = 0;\r\n deltaX = 0;\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n this._sashListener.add(this._eastSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaX = e.currentX - e.startX;\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, east: true });\r\n }\r\n }));\r\n this._sashListener.add(this._westSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaX = -(e.currentX - e.startX);\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, west: true });\r\n }\r\n }));\r\n this._sashListener.add(this._northSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaY = -(e.currentY - e.startY);\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, north: true });\r\n }\r\n }));\r\n this._sashListener.add(this._southSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaY = e.currentY - e.startY;\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, south: true });\r\n }\r\n }));\r\n this._sashListener.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Event.any(this._eastSash.onDidReset, this._westSash.onDidReset)(e => {\r\n if (this._preferredSize) {\r\n this.layout(this._size.height, this._preferredSize.width);\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n this._sashListener.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.Event.any(this._northSash.onDidReset, this._southSash.onDidReset)(e => {\r\n if (this._preferredSize) {\r\n this.layout(this._preferredSize.height, this._size.width);\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._northSash.dispose();\r\n this._southSash.dispose();\r\n this._eastSash.dispose();\r\n this._westSash.dispose();\r\n this._sashListener.dispose();\r\n this.domNode.remove();\r\n }\r\n enableSashes(north, east, south, west) {\r\n this._northSash.state = north ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._eastSash.state = east ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._southSash.state = south ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._westSash.state = west ? 3 /* Enabled */ : 0 /* Disabled */;\r\n }\r\n layout(height = this.size.height, width = this.size.width) {\r\n const { height: minHeight, width: minWidth } = this._minSize;\r\n const { height: maxHeight, width: maxWidth } = this._maxSize;\r\n height = Math.max(minHeight, Math.min(maxHeight, height));\r\n width = Math.max(minWidth, Math.min(maxWidth, width));\r\n const newSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(width, height);\r\n if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension.equals(newSize, this._size)) {\r\n this.domNode.style.height = height + 'px';\r\n this.domNode.style.width = width + 'px';\r\n this._size = newSize;\r\n this._northSash.layout();\r\n this._eastSash.layout();\r\n this._southSash.layout();\r\n this._westSash.layout();\r\n }\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n set maxSize(value) {\r\n this._maxSize = value;\r\n }\r\n get maxSize() {\r\n return this._maxSize;\r\n }\r\n set minSize(value) {\r\n this._minSize = value;\r\n }\r\n get minSize() {\r\n return this._minSize;\r\n }\r\n set preferredSize(value) {\r\n this._preferredSize = value;\r\n }\r\n get preferredSize() {\r\n return this._preferredSize;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/resizable.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Context\": () => (/* binding */ Context),\n/* harmony export */ \"suggestWidgetStatusbarMenu\": () => (/* binding */ suggestWidgetStatusbarMenu),\n/* harmony export */ \"CompletionItem\": () => (/* binding */ CompletionItem),\n/* harmony export */ \"CompletionOptions\": () => (/* binding */ CompletionOptions),\n/* harmony export */ \"getSnippetSuggestSupport\": () => (/* binding */ getSnippetSuggestSupport),\n/* harmony export */ \"CompletionItemModel\": () => (/* binding */ CompletionItemModel),\n/* harmony export */ \"provideSuggestionItems\": () => (/* binding */ provideSuggestionItems),\n/* harmony export */ \"getSuggestionComparator\": () => (/* binding */ getSuggestionComparator),\n/* harmony export */ \"showSimpleSuggestions\": () => (/* binding */ showSimpleSuggestions)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../snippet/snippetParser.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst Context = {\r\n Visible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestWidgetVisible', false),\r\n DetailsVisible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestWidgetDetailsVisible', false),\r\n MultipleSuggestions: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestWidgetMultipleSuggestions', false),\r\n MakesTextEdit: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestionMakesTextEdit', true),\r\n AcceptSuggestionsOnEnter: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('acceptSuggestionOnEnter', true),\r\n HasInsertAndReplaceRange: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestionHasInsertAndReplaceRange', false),\r\n InsertMode: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestionInsertMode', undefined),\r\n CanResolve: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.RawContextKey('suggestionCanResolve', false),\r\n};\r\nconst suggestWidgetStatusbarMenu = new _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_8__.MenuId('suggestWidgetStatusBar');\r\nclass CompletionItem {\r\n constructor(position, completion, container, provider) {\r\n this.position = position;\r\n this.completion = completion;\r\n this.container = container;\r\n this.provider = provider;\r\n // validation\r\n this.isInvalid = false;\r\n // sorting, filtering\r\n this.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_6__.FuzzyScore.Default;\r\n this.distance = 0;\r\n this.textLabel = typeof completion.label === 'string'\r\n ? completion.label\r\n : completion.label.name;\r\n // ensure lower-variants (perf)\r\n this.labelLow = this.textLabel.toLowerCase();\r\n // validate label\r\n this.isInvalid = !this.textLabel;\r\n this.sortTextLow = completion.sortText && completion.sortText.toLowerCase();\r\n this.filterTextLow = completion.filterText && completion.filterText.toLowerCase();\r\n // normalize ranges\r\n if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.isIRange(completion.range)) {\r\n this.editStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.startLineNumber, completion.range.startColumn);\r\n this.editInsertEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.endLineNumber, completion.range.endColumn);\r\n this.editReplaceEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.endLineNumber, completion.range.endColumn);\r\n // validate range\r\n this.isInvalid = this.isInvalid\r\n || _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.spansMultipleLines(completion.range) || completion.range.startLineNumber !== position.lineNumber;\r\n }\r\n else {\r\n this.editStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.insert.startLineNumber, completion.range.insert.startColumn);\r\n this.editInsertEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.insert.endLineNumber, completion.range.insert.endColumn);\r\n this.editReplaceEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position(completion.range.replace.endLineNumber, completion.range.replace.endColumn);\r\n // validate ranges\r\n this.isInvalid = this.isInvalid\r\n || _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.spansMultipleLines(completion.range.insert) || _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.spansMultipleLines(completion.range.replace)\r\n || completion.range.insert.startLineNumber !== position.lineNumber || completion.range.replace.startLineNumber !== position.lineNumber\r\n || completion.range.insert.startColumn !== completion.range.replace.startColumn;\r\n }\r\n // create the suggestion resolver\r\n if (typeof provider.resolveCompletionItem !== 'function') {\r\n this._resolveCache = Promise.resolve();\r\n this._isResolved = true;\r\n }\r\n }\r\n // ---- resolving\r\n get isResolved() {\r\n return !!this._isResolved;\r\n }\r\n resolve(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._resolveCache) {\r\n const sub = token.onCancellationRequested(() => {\r\n this._resolveCache = undefined;\r\n this._isResolved = false;\r\n });\r\n this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem(this.completion, token)).then(value => {\r\n Object.assign(this.completion, value);\r\n this._isResolved = true;\r\n sub.dispose();\r\n }, err => {\r\n if ((0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.isPromiseCanceledError)(err)) {\r\n // the IPC queue will reject the request with the\r\n // cancellation error -> reset cached\r\n this._resolveCache = undefined;\r\n this._isResolved = false;\r\n }\r\n });\r\n }\r\n return this._resolveCache;\r\n });\r\n }\r\n}\r\nclass CompletionOptions {\r\n constructor(snippetSortOrder = 2 /* Bottom */, kindFilter = new Set(), providerFilter = new Set()) {\r\n this.snippetSortOrder = snippetSortOrder;\r\n this.kindFilter = kindFilter;\r\n this.providerFilter = providerFilter;\r\n }\r\n}\r\nCompletionOptions.default = new CompletionOptions();\r\nlet _snippetSuggestSupport;\r\nfunction getSnippetSuggestSupport() {\r\n return _snippetSuggestSupport;\r\n}\r\nclass CompletionItemModel {\r\n constructor(items, needsClipboard, durations, disposable) {\r\n this.items = items;\r\n this.needsClipboard = needsClipboard;\r\n this.durations = durations;\r\n this.disposable = disposable;\r\n }\r\n}\r\nfunction provideSuggestionItems(model, position, options = CompletionOptions.default, context = { triggerKind: 0 /* Invoke */ }, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__.CancellationToken.None) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_10__.StopWatch(true);\r\n position = position.clone();\r\n const word = model.getWordAtPosition(position);\r\n const defaultReplaceRange = word ? new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__.Range.fromPositions(position);\r\n const defaultRange = { replace: defaultReplaceRange, insert: defaultReplaceRange.setEndPosition(position.lineNumber, position.column) };\r\n const result = [];\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.DisposableStore();\r\n const durations = [];\r\n let needsClipboard = false;\r\n const onCompletionList = (provider, container, sw) => {\r\n var _a, _b;\r\n if (!container) {\r\n return;\r\n }\r\n for (let suggestion of container.suggestions) {\r\n if (!options.kindFilter.has(suggestion.kind)) {\r\n // fill in default range when missing\r\n if (!suggestion.range) {\r\n suggestion.range = defaultRange;\r\n }\r\n // fill in default sortText when missing\r\n if (!suggestion.sortText) {\r\n suggestion.sortText = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n }\r\n if (!needsClipboard && suggestion.insertTextRules && suggestion.insertTextRules & 4 /* InsertAsSnippet */) {\r\n needsClipboard = _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_9__.SnippetParser.guessNeedsClipboard(suggestion.insertText);\r\n }\r\n result.push(new CompletionItem(position, suggestion, container, provider));\r\n }\r\n }\r\n if ((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__.isDisposable)(container)) {\r\n disposables.add(container);\r\n }\r\n durations.push({\r\n providerName: (_a = provider._debugDisplayName) !== null && _a !== void 0 ? _a : 'unkown_provider', elapsedProvider: (_b = container.duration) !== null && _b !== void 0 ? _b : -1,\r\n elapsedOverall: sw.elapsed()\r\n });\r\n };\r\n // ask for snippets in parallel to asking \"real\" providers. Only do something if configured to\r\n // do so - no snippet filter, no special-providers-only request\r\n const snippetCompletions = (() => __awaiter(this, void 0, void 0, function* () {\r\n if (!_snippetSuggestSupport || options.kindFilter.has(27 /* Snippet */)) {\r\n return;\r\n }\r\n if (options.providerFilter.size > 0 && !options.providerFilter.has(_snippetSuggestSupport)) {\r\n return;\r\n }\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_10__.StopWatch(true);\r\n const list = yield _snippetSuggestSupport.provideCompletionItems(model, position, context, token);\r\n onCompletionList(_snippetSuggestSupport, list, sw);\r\n }))();\r\n // add suggestions from contributed providers - providers are ordered in groups of\r\n // equal score and once a group produces a result the process stops\r\n // get provider groups, always add snippet suggestion provider\r\n for (let providerGroup of _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.CompletionProviderRegistry.orderedGroups(model)) {\r\n // for each support in the group ask for suggestions\r\n let lenBefore = result.length;\r\n yield Promise.all(providerGroup.map((provider) => __awaiter(this, void 0, void 0, function* () {\r\n if (options.providerFilter.size > 0 && !options.providerFilter.has(provider)) {\r\n return;\r\n }\r\n try {\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_10__.StopWatch(true);\r\n const list = yield provider.provideCompletionItems(model, position, context, token);\r\n onCompletionList(provider, list, sw);\r\n }\r\n catch (err) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.onUnexpectedExternalError)(err);\r\n }\r\n })));\r\n if (lenBefore !== result.length || token.isCancellationRequested) {\r\n break;\r\n }\r\n }\r\n yield snippetCompletions;\r\n if (token.isCancellationRequested) {\r\n disposables.dispose();\r\n return Promise.reject((0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.canceled)());\r\n }\r\n return new CompletionItemModel(result.sort(getSuggestionComparator(options.snippetSortOrder)), needsClipboard, { entries: durations, elapsed: sw.elapsed() }, disposables);\r\n });\r\n}\r\nfunction defaultComparator(a, b) {\r\n // check with 'sortText'\r\n if (a.sortTextLow && b.sortTextLow) {\r\n if (a.sortTextLow < b.sortTextLow) {\r\n return -1;\r\n }\r\n else if (a.sortTextLow > b.sortTextLow) {\r\n return 1;\r\n }\r\n }\r\n // check with 'label'\r\n if (a.completion.label < b.completion.label) {\r\n return -1;\r\n }\r\n else if (a.completion.label > b.completion.label) {\r\n return 1;\r\n }\r\n // check with 'type'\r\n return a.completion.kind - b.completion.kind;\r\n}\r\nfunction snippetUpComparator(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n }\r\n return defaultComparator(a, b);\r\n}\r\nfunction snippetDownComparator(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n }\r\n return defaultComparator(a, b);\r\n}\r\nconst _snippetComparators = new Map();\r\n_snippetComparators.set(0 /* Top */, snippetUpComparator);\r\n_snippetComparators.set(2 /* Bottom */, snippetDownComparator);\r\n_snippetComparators.set(1 /* Inline */, defaultComparator);\r\nfunction getSuggestionComparator(snippetConfig) {\r\n return _snippetComparators.get(snippetConfig);\r\n}\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_11__.CommandsRegistry.registerCommand('_executeCompletionItemProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, position, triggerCharacter, maxItemsToResolve] = args;\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_13__.URI.isUri(uri));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(_common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position.isIPosition(position));\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(typeof triggerCharacter === 'string' || !triggerCharacter);\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__.assertType)(typeof maxItemsToResolve === 'number' || !maxItemsToResolve);\r\n const ref = yield accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_14__.ITextModelService).createModelReference(uri);\r\n try {\r\n const result = {\r\n incomplete: false,\r\n suggestions: []\r\n };\r\n const resolving = [];\r\n const completions = yield provideSuggestionItems(ref.object.textEditorModel, _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__.Position.lift(position), undefined, { triggerCharacter, triggerKind: triggerCharacter ? 1 /* TriggerCharacter */ : 0 /* Invoke */ });\r\n for (const item of completions.items) {\r\n if (resolving.length < (maxItemsToResolve !== null && maxItemsToResolve !== void 0 ? maxItemsToResolve : 0)) {\r\n resolving.push(item.resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__.CancellationToken.None));\r\n }\r\n result.incomplete = result.incomplete || item.container.incomplete;\r\n result.suggestions.push(item.completion);\r\n }\r\n try {\r\n yield Promise.all(resolving);\r\n return result;\r\n }\r\n finally {\r\n setTimeout(() => completions.disposable.dispose(), 100);\r\n }\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\nconst _provider = new class {\r\n constructor() {\r\n this.onlyOnceSuggestions = [];\r\n }\r\n provideCompletionItems() {\r\n let suggestions = this.onlyOnceSuggestions.slice(0);\r\n let result = { suggestions };\r\n this.onlyOnceSuggestions.length = 0;\r\n return result;\r\n }\r\n};\r\n_common_modes_js__WEBPACK_IMPORTED_MODULE_1__.CompletionProviderRegistry.register('*', _provider);\r\nfunction showSimpleSuggestions(editor, suggestions) {\r\n setTimeout(() => {\r\n _provider.onlyOnceSuggestions.push(...suggestions);\r\n editor.getContribution('editor.contrib.suggestController').triggerSuggest(new Set().add(_provider));\r\n }, 0);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SuggestAlternatives\": () => (/* binding */ SuggestAlternatives)\n/* harmony export */ });\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\nlet SuggestAlternatives = class SuggestAlternatives {\r\n constructor(_editor, contextKeyService) {\r\n this._editor = _editor;\r\n this._index = 0;\r\n this._ckOtherSuggestions = SuggestAlternatives.OtherSuggestions.bindTo(contextKeyService);\r\n }\r\n dispose() {\r\n this.reset();\r\n }\r\n reset() {\r\n var _a;\r\n this._ckOtherSuggestions.reset();\r\n (_a = this._listener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._model = undefined;\r\n this._acceptNext = undefined;\r\n this._ignore = false;\r\n }\r\n set({ model, index }, acceptNext) {\r\n // no suggestions -> nothing to do\r\n if (model.items.length === 0) {\r\n this.reset();\r\n return;\r\n }\r\n // no alternative suggestions -> nothing to do\r\n let nextIndex = SuggestAlternatives._moveIndex(true, model, index);\r\n if (nextIndex === index) {\r\n this.reset();\r\n return;\r\n }\r\n this._acceptNext = acceptNext;\r\n this._model = model;\r\n this._index = index;\r\n this._listener = this._editor.onDidChangeCursorPosition(() => {\r\n if (!this._ignore) {\r\n this.reset();\r\n }\r\n });\r\n this._ckOtherSuggestions.set(true);\r\n }\r\n static _moveIndex(fwd, model, index) {\r\n let newIndex = index;\r\n while (true) {\r\n newIndex = (newIndex + model.items.length + (fwd ? +1 : -1)) % model.items.length;\r\n if (newIndex === index) {\r\n break;\r\n }\r\n if (!model.items[newIndex].completion.additionalTextEdits) {\r\n break;\r\n }\r\n }\r\n return newIndex;\r\n }\r\n next() {\r\n this._move(true);\r\n }\r\n prev() {\r\n this._move(false);\r\n }\r\n _move(fwd) {\r\n if (!this._model) {\r\n // nothing to reason about\r\n return;\r\n }\r\n try {\r\n this._ignore = true;\r\n this._index = SuggestAlternatives._moveIndex(fwd, this._model, this._index);\r\n this._acceptNext({ index: this._index, item: this._model.items[this._index], model: this._model });\r\n }\r\n finally {\r\n this._ignore = false;\r\n }\r\n }\r\n};\r\nSuggestAlternatives.OtherSuggestions = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.RawContextKey('hasOtherSuggestions', false);\r\nSuggestAlternatives = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService)\r\n], SuggestAlternatives);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CommitCharacterController\": () => (/* binding */ CommitCharacterController)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass CommitCharacterController {\r\n constructor(editor, widget, accept) {\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._disposables.add(widget.onDidShow(() => this._onItem(widget.getFocusedItem())));\r\n this._disposables.add(widget.onDidFocus(this._onItem, this));\r\n this._disposables.add(widget.onDidHide(this.reset, this));\r\n this._disposables.add(editor.onWillType(text => {\r\n if (this._active && !widget.isFrozen()) {\r\n const ch = text.charCodeAt(text.length - 1);\r\n if (this._active.acceptCharacters.has(ch) && editor.getOption(0 /* acceptSuggestionOnCommitCharacter */)) {\r\n accept(this._active.item);\r\n }\r\n }\r\n }));\r\n }\r\n _onItem(selected) {\r\n if (!selected || !(0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isNonEmptyArray)(selected.item.completion.commitCharacters)) {\r\n // no item or no commit characters\r\n this.reset();\r\n return;\r\n }\r\n if (this._active && this._active.item.item === selected.item) {\r\n // still the same item\r\n return;\r\n }\r\n // keep item and its commit characters\r\n const acceptCharacters = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_2__.CharacterSet();\r\n for (const ch of selected.item.completion.commitCharacters) {\r\n if (ch.length > 0) {\r\n acceptCharacters.add(ch.charCodeAt(0));\r\n }\r\n }\r\n this._active = { acceptCharacters, item: selected };\r\n }\r\n reset() {\r\n this._active = undefined;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SuggestController\": () => (/* binding */ SuggestController),\n/* harmony export */ \"TriggerSuggestAction\": () => (/* binding */ TriggerSuggestAction)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../snippet/snippetController2.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js\");\n/* harmony import */ var _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../snippet/snippetParser.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js\");\n/* harmony import */ var _suggestMemory_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./suggestMemory.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./suggest.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js\");\n/* harmony import */ var _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./suggestAlternatives.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js\");\n/* harmony import */ var _suggestModel_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./suggestModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js\");\n/* harmony import */ var _suggestWidget_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./suggestWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js\");\n/* harmony import */ var _wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./wordContextKey.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _suggestCommitCharacters_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./suggestCommitCharacters.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js\");\n/* harmony import */ var _suggestOvertypingCapturer_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./suggestOvertypingCapturer.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// sticky suggest widget which doesn't disappear on focus out and such\r\nlet _sticky = false;\r\n// _sticky = Boolean(\"true\"); // done \"weirdly\" so that a lint warning prevents you from pushing this\r\nclass LineSuffix {\r\n constructor(_model, _position) {\r\n this._model = _model;\r\n this._position = _position;\r\n // spy on what's happening right of the cursor. two cases:\r\n // 1. end of line -> check that it's still end of line\r\n // 2. mid of line -> add a marker and compute the delta\r\n const maxColumn = _model.getLineMaxColumn(_position.lineNumber);\r\n if (maxColumn !== _position.column) {\r\n const offset = _model.getOffsetAt(_position);\r\n const end = _model.getPositionAt(offset + 1);\r\n this._marker = _model.deltaDecorations([], [{\r\n range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.fromPositions(_position, end),\r\n options: { stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ }\r\n }]);\r\n }\r\n }\r\n dispose() {\r\n if (this._marker && !this._model.isDisposed()) {\r\n this._model.deltaDecorations(this._marker, []);\r\n }\r\n }\r\n delta(position) {\r\n if (this._model.isDisposed() || this._position.lineNumber !== position.lineNumber) {\r\n // bail out early if things seems fishy\r\n return 0;\r\n }\r\n // read the marker (in case suggest was triggered at line end) or compare\r\n // the cursor to the line end.\r\n if (this._marker) {\r\n const range = this._model.getDecorationRange(this._marker[0]);\r\n const end = this._model.getOffsetAt(range.getStartPosition());\r\n return end - this._model.getOffsetAt(position);\r\n }\r\n else {\r\n return this._model.getLineMaxColumn(position.lineNumber) - position.column;\r\n }\r\n }\r\n}\r\nlet SuggestController = class SuggestController {\r\n constructor(editor, _memoryService, _commandService, _contextKeyService, _instantiationService, _logService) {\r\n this._memoryService = _memoryService;\r\n this._commandService = _commandService;\r\n this._contextKeyService = _contextKeyService;\r\n this._instantiationService = _instantiationService;\r\n this._logService = _logService;\r\n this._lineSuffix = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.MutableDisposable();\r\n this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this.editor = editor;\r\n this.model = _instantiationService.createInstance(_suggestModel_js__WEBPACK_IMPORTED_MODULE_20__.SuggestModel, this.editor);\r\n // context key: update insert/replace mode\r\n const ctxInsertMode = _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.InsertMode.bindTo(_contextKeyService);\r\n ctxInsertMode.set(editor.getOption(101 /* suggest */).insertMode);\r\n this.model.onDidTrigger(() => ctxInsertMode.set(editor.getOption(101 /* suggest */).insertMode));\r\n this.widget = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__.IdleValue(() => {\r\n const widget = this._instantiationService.createInstance(_suggestWidget_js__WEBPACK_IMPORTED_MODULE_21__.SuggestWidget, this.editor);\r\n this._toDispose.add(widget);\r\n this._toDispose.add(widget.onDidSelect(item => this._insertSuggestion(item, 0), this));\r\n // Wire up logic to accept a suggestion on certain characters\r\n const commitCharacterController = new _suggestCommitCharacters_js__WEBPACK_IMPORTED_MODULE_26__.CommitCharacterController(this.editor, widget, item => this._insertSuggestion(item, 2 /* NoAfterUndoStop */));\r\n this._toDispose.add(commitCharacterController);\r\n this._toDispose.add(this.model.onDidSuggest(e => {\r\n if (e.completionModel.items.length === 0) {\r\n commitCharacterController.reset();\r\n }\r\n }));\r\n // Wire up makes text edit context key\r\n const ctxMakesTextEdit = _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MakesTextEdit.bindTo(this._contextKeyService);\r\n const ctxHasInsertAndReplace = _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService);\r\n const ctxCanResolve = _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.CanResolve.bindTo(this._contextKeyService);\r\n this._toDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => {\r\n ctxMakesTextEdit.reset();\r\n ctxHasInsertAndReplace.reset();\r\n ctxCanResolve.reset();\r\n }));\r\n this._toDispose.add(widget.onDidFocus(({ item }) => {\r\n // (ctx: makesTextEdit)\r\n const position = this.editor.getPosition();\r\n const startColumn = item.editStart.column;\r\n const endColumn = position.column;\r\n let value = true;\r\n if (this.editor.getOption(1 /* acceptSuggestionOnEnter */) === 'smart'\r\n && this.model.state === 2 /* Auto */\r\n && !item.completion.command\r\n && !item.completion.additionalTextEdits\r\n && !(item.completion.insertTextRules & 4 /* InsertAsSnippet */)\r\n && endColumn - startColumn === item.completion.insertText.length) {\r\n const oldText = this.editor.getModel().getValueInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn,\r\n endLineNumber: position.lineNumber,\r\n endColumn\r\n });\r\n value = oldText !== item.completion.insertText;\r\n }\r\n ctxMakesTextEdit.set(value);\r\n // (ctx: hasInsertAndReplaceRange)\r\n ctxHasInsertAndReplace.set(!_common_core_position_js__WEBPACK_IMPORTED_MODULE_28__.Position.equals(item.editInsertEnd, item.editReplaceEnd));\r\n // (ctx: canResolve)\r\n ctxCanResolve.set(Boolean(item.provider.resolveCompletionItem) || Boolean(item.completion.documentation) || item.completion.detail !== item.completion.label);\r\n }));\r\n this._toDispose.add(widget.onDetailsKeyDown(e => {\r\n // cmd + c on macOS, ctrl + c on Win / Linux\r\n if (e.toKeybinding().equals(new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__.SimpleKeybinding(true, false, false, false, 33 /* KEY_C */)) ||\r\n (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_29__.isMacintosh && e.toKeybinding().equals(new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__.SimpleKeybinding(false, false, false, true, 33 /* KEY_C */)))) {\r\n e.stopPropagation();\r\n return;\r\n }\r\n if (!e.toKeybinding().isModifierKey()) {\r\n this.editor.focus();\r\n }\r\n }));\r\n return widget;\r\n }));\r\n // Wire up text overtyping capture\r\n this._overtypingCapturer = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__.IdleValue(() => {\r\n return this._toDispose.add(new _suggestOvertypingCapturer_js__WEBPACK_IMPORTED_MODULE_27__.OvertypingCapturer(this.editor, this.model));\r\n }));\r\n this._alternatives = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__.IdleValue(() => {\r\n return this._toDispose.add(new _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__.SuggestAlternatives(this.editor, this._contextKeyService));\r\n }));\r\n this._toDispose.add(_instantiationService.createInstance(_wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__.WordContextKey, editor));\r\n this._toDispose.add(this.model.onDidTrigger(e => {\r\n this.widget.value.showTriggered(e.auto, e.shy ? 250 : 50);\r\n this._lineSuffix.value = new LineSuffix(this.editor.getModel(), e.position);\r\n }));\r\n this._toDispose.add(this.model.onDidSuggest(e => {\r\n if (!e.shy) {\r\n let index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), e.completionModel.items);\r\n this.widget.value.showSuggestions(e.completionModel, index, e.isFrozen, e.auto);\r\n }\r\n }));\r\n this._toDispose.add(this.model.onDidCancel(e => {\r\n if (!e.retrigger) {\r\n this.widget.value.hideWidget();\r\n }\r\n }));\r\n this._toDispose.add(this.editor.onDidBlurEditorWidget(() => {\r\n if (!_sticky) {\r\n this.model.cancel();\r\n this.model.clear();\r\n }\r\n }));\r\n // Manage the acceptSuggestionsOnEnter context key\r\n let acceptSuggestionsOnEnter = _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.AcceptSuggestionsOnEnter.bindTo(_contextKeyService);\r\n let updateFromConfig = () => {\r\n const acceptSuggestionOnEnter = this.editor.getOption(1 /* acceptSuggestionOnEnter */);\r\n acceptSuggestionsOnEnter.set(acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart');\r\n };\r\n this._toDispose.add(this.editor.onDidChangeConfiguration(() => updateFromConfig()));\r\n updateFromConfig();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SuggestController.ID);\r\n }\r\n dispose() {\r\n this._alternatives.dispose();\r\n this._toDispose.dispose();\r\n this.widget.dispose();\r\n this.model.dispose();\r\n this._lineSuffix.dispose();\r\n }\r\n _insertSuggestion(event, flags) {\r\n if (!event || !event.item) {\r\n this._alternatives.value.reset();\r\n this.model.cancel();\r\n this.model.clear();\r\n return;\r\n }\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n const modelVersionNow = model.getAlternativeVersionId();\r\n const { item } = event;\r\n //\r\n const tasks = [];\r\n const cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_31__.CancellationTokenSource();\r\n // pushing undo stops *before* additional text edits and\r\n // *after* the main edit\r\n if (!(flags & 1 /* NoBeforeUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n // compute overwrite[Before|After] deltas BEFORE applying extra edits\r\n const info = this.getOverwriteInfo(item, Boolean(flags & 8 /* AlternativeOverwriteConfig */));\r\n // keep item in memory\r\n this._memoryService.memorize(model, this.editor.getPosition(), item);\r\n if (Array.isArray(item.completion.additionalTextEdits)) {\r\n // sync additional edits\r\n const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.StableEditorScrollState.capture(this.editor);\r\n this.editor.executeEdits('suggestController.additionalTextEdits.sync', item.completion.additionalTextEdits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(edit.range), edit.text)));\r\n scrollState.restoreRelativeVerticalPositionOfCursor(this.editor);\r\n }\r\n else if (!item.isResolved) {\r\n // async additional edits\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_33__.StopWatch(true);\r\n let position;\r\n const docListener = model.onDidChangeContent(e => {\r\n if (e.isFlush) {\r\n cts.cancel();\r\n docListener.dispose();\r\n return;\r\n }\r\n for (let change of e.changes) {\r\n const thisPosition = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.getEndPosition(change.range);\r\n if (!position || _common_core_position_js__WEBPACK_IMPORTED_MODULE_28__.Position.isBefore(thisPosition, position)) {\r\n position = thisPosition;\r\n }\r\n }\r\n });\r\n let oldFlags = flags;\r\n flags |= 2 /* NoAfterUndoStop */;\r\n let didType = false;\r\n let typeListener = this.editor.onWillType(() => {\r\n typeListener.dispose();\r\n didType = true;\r\n if (!(oldFlags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n });\r\n tasks.push(item.resolve(cts.token).then(() => {\r\n if (!item.completion.additionalTextEdits || cts.token.isCancellationRequested) {\r\n return false;\r\n }\r\n if (position && item.completion.additionalTextEdits.some(edit => _common_core_position_js__WEBPACK_IMPORTED_MODULE_28__.Position.isBefore(position, _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.getStartPosition(edit.range)))) {\r\n return false;\r\n }\r\n if (didType) {\r\n this.editor.pushUndoStop();\r\n }\r\n const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__.StableEditorScrollState.capture(this.editor);\r\n this.editor.executeEdits('suggestController.additionalTextEdits.async', item.completion.additionalTextEdits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__.EditOperation.replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__.Range.lift(edit.range), edit.text)));\r\n scrollState.restoreRelativeVerticalPositionOfCursor(this.editor);\r\n if (didType || !(oldFlags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n return true;\r\n }).then(applied => {\r\n this._logService.trace('[suggest] async resolving of edits DONE (ms, applied?)', sw.elapsed(), applied);\r\n docListener.dispose();\r\n typeListener.dispose();\r\n }));\r\n }\r\n let { insertText } = item.completion;\r\n if (!(item.completion.insertTextRules & 4 /* InsertAsSnippet */)) {\r\n insertText = _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_11__.SnippetParser.escape(insertText);\r\n }\r\n _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__.SnippetController2.get(this.editor).insert(insertText, {\r\n overwriteBefore: info.overwriteBefore,\r\n overwriteAfter: info.overwriteAfter,\r\n undoStopBefore: false,\r\n undoStopAfter: false,\r\n adjustWhitespace: !(item.completion.insertTextRules & 1 /* KeepWhitespace */),\r\n clipboardText: event.model.clipboardText,\r\n overtypingCapturer: this._overtypingCapturer.value\r\n });\r\n if (!(flags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n if (!item.completion.command) {\r\n // done\r\n this.model.cancel();\r\n }\r\n else if (item.completion.command.id === TriggerSuggestAction.id) {\r\n // retigger\r\n this.model.trigger({ auto: true, shy: false }, true);\r\n }\r\n else {\r\n // exec command, done\r\n tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedError));\r\n this.model.cancel();\r\n }\r\n if (flags & 4 /* KeepAlternativeSuggestions */) {\r\n this._alternatives.value.set(event, next => {\r\n // cancel resolving of additional edits\r\n cts.cancel();\r\n // this is not so pretty. when inserting the 'next'\r\n // suggestion we undo until we are at the state at\r\n // which we were before inserting the previous suggestion...\r\n while (model.canUndo()) {\r\n if (modelVersionNow !== model.getAlternativeVersionId()) {\r\n model.undo();\r\n }\r\n this._insertSuggestion(next, 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */ | (flags & 8 /* AlternativeOverwriteConfig */ ? 8 /* AlternativeOverwriteConfig */ : 0));\r\n break;\r\n }\r\n });\r\n }\r\n this._alertCompletionItem(item);\r\n // clear only now - after all tasks are done\r\n Promise.all(tasks).finally(() => {\r\n this.model.clear();\r\n cts.dispose();\r\n });\r\n }\r\n getOverwriteInfo(item, toggleMode) {\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_25__.assertType)(this.editor.hasModel());\r\n let replace = this.editor.getOption(101 /* suggest */).insertMode === 'replace';\r\n if (toggleMode) {\r\n replace = !replace;\r\n }\r\n const overwriteBefore = item.position.column - item.editStart.column;\r\n const overwriteAfter = (replace ? item.editReplaceEnd.column : item.editInsertEnd.column) - item.position.column;\r\n const columnDelta = this.editor.getPosition().column - item.position.column;\r\n const suffixDelta = this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0;\r\n return {\r\n overwriteBefore: overwriteBefore + columnDelta,\r\n overwriteAfter: overwriteAfter + suffixDelta\r\n };\r\n }\r\n _alertCompletionItem({ completion: suggestion }) {\r\n const textLabel = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.isNonEmptyArray)(suggestion.additionalTextEdits)) {\r\n let msg = _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('aria.alert.snippet', \"Accepting '{0}' made {1} additional edits\", textLabel, suggestion.additionalTextEdits.length);\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.alert)(msg);\r\n }\r\n }\r\n triggerSuggest(onlyFrom) {\r\n if (this.editor.hasModel()) {\r\n this.model.trigger({ auto: false, shy: false }, false, onlyFrom);\r\n this.editor.revealLine(this.editor.getPosition().lineNumber, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n }\r\n triggerSuggestAndAcceptBest(arg) {\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const positionNow = this.editor.getPosition();\r\n const fallback = () => {\r\n if (positionNow.equals(this.editor.getPosition())) {\r\n this._commandService.executeCommand(arg.fallback);\r\n }\r\n };\r\n const makesTextEdit = (item) => {\r\n if (item.completion.insertTextRules & 4 /* InsertAsSnippet */ || item.completion.additionalTextEdits) {\r\n // snippet, other editor -> makes edit\r\n return true;\r\n }\r\n const position = this.editor.getPosition();\r\n const startColumn = item.editStart.column;\r\n const endColumn = position.column;\r\n if (endColumn - startColumn !== item.completion.insertText.length) {\r\n // unequal lengths -> makes edit\r\n return true;\r\n }\r\n const textNow = this.editor.getModel().getValueInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn,\r\n endLineNumber: position.lineNumber,\r\n endColumn\r\n });\r\n // unequal text -> makes edit\r\n return textNow !== item.completion.insertText;\r\n };\r\n _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__.Event.once(this.model.onDidTrigger)(_ => {\r\n // wait for trigger because only then the cancel-event is trustworthy\r\n let listener = [];\r\n _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__.Event.any(this.model.onDidTrigger, this.model.onDidCancel)(() => {\r\n // retrigger or cancel -> try to type default text\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(listener);\r\n fallback();\r\n }, undefined, listener);\r\n this.model.onDidSuggest(({ completionModel }) => {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(listener);\r\n if (completionModel.items.length === 0) {\r\n fallback();\r\n return;\r\n }\r\n const index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), completionModel.items);\r\n const item = completionModel.items[index];\r\n if (!makesTextEdit(item)) {\r\n fallback();\r\n return;\r\n }\r\n this.editor.pushUndoStop();\r\n this._insertSuggestion({ index, item, model: completionModel }, 4 /* KeepAlternativeSuggestions */ | 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */);\r\n }, undefined, listener);\r\n });\r\n this.model.trigger({ auto: false, shy: true });\r\n this.editor.revealLine(positionNow.lineNumber, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n acceptSelectedSuggestion(keepAlternativeSuggestions, alternativeOverwriteConfig) {\r\n const item = this.widget.value.getFocusedItem();\r\n let flags = 0;\r\n if (keepAlternativeSuggestions) {\r\n flags |= 4 /* KeepAlternativeSuggestions */;\r\n }\r\n if (alternativeOverwriteConfig) {\r\n flags |= 8 /* AlternativeOverwriteConfig */;\r\n }\r\n this._insertSuggestion(item, flags);\r\n }\r\n acceptNextSuggestion() {\r\n this._alternatives.value.next();\r\n }\r\n acceptPrevSuggestion() {\r\n this._alternatives.value.prev();\r\n }\r\n cancelSuggestWidget() {\r\n this.model.cancel();\r\n this.model.clear();\r\n this.widget.value.hideWidget();\r\n }\r\n selectNextSuggestion() {\r\n this.widget.value.selectNext();\r\n }\r\n selectNextPageSuggestion() {\r\n this.widget.value.selectNextPage();\r\n }\r\n selectLastSuggestion() {\r\n this.widget.value.selectLast();\r\n }\r\n selectPrevSuggestion() {\r\n this.widget.value.selectPrevious();\r\n }\r\n selectPrevPageSuggestion() {\r\n this.widget.value.selectPreviousPage();\r\n }\r\n selectFirstSuggestion() {\r\n this.widget.value.selectFirst();\r\n }\r\n toggleSuggestionDetails() {\r\n this.widget.value.toggleDetails();\r\n }\r\n toggleExplainMode() {\r\n this.widget.value.toggleExplainMode();\r\n }\r\n toggleSuggestionFocus() {\r\n this.widget.value.toggleDetailsFocus();\r\n }\r\n resetWidgetSize() {\r\n this.widget.value.resetPersistedSize();\r\n }\r\n};\r\nSuggestController.ID = 'editor.contrib.suggestController';\r\nSuggestController = __decorate([\r\n __param(1, _suggestMemory_js__WEBPACK_IMPORTED_MODULE_12__.ISuggestMemoryService),\r\n __param(2, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__.ICommandService),\r\n __param(3, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.IContextKeyService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__.IInstantiationService),\r\n __param(5, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_32__.ILogService)\r\n], SuggestController);\r\n\r\nclass TriggerSuggestAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorAction {\r\n constructor() {\r\n super({\r\n id: TriggerSuggestAction.id,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('suggest.trigger.label', \"Trigger Suggest\"),\r\n alias: 'Trigger Suggest',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.hasCompletionItemProvider),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\r\n secondary: [2048 /* CtrlCmd */ | 39 /* KEY_I */],\r\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */, secondary: [512 /* Alt */ | 9 /* Escape */, 2048 /* CtrlCmd */ | 39 /* KEY_I */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = SuggestController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.triggerSuggest();\r\n }\r\n}\r\nTriggerSuggestAction.id = 'editor.action.triggerSuggest';\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorContribution)(SuggestController.ID, SuggestController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorAction)(TriggerSuggestAction);\r\nconst weight = 100 /* EditorContrib */ + 90;\r\nconst SuggestCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorCommand.bindToContribution(SuggestController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'acceptSelectedSuggestion',\r\n precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible,\r\n handler(x) {\r\n x.acceptSelectedSuggestion(true, false);\r\n }\r\n}));\r\n// normal tab\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__.KeybindingsRegistry.registerKeybindingRule({\r\n id: 'acceptSelectedSuggestion',\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus),\r\n primary: 2 /* Tab */,\r\n weight\r\n});\r\n// accept on enter has special rules\r\n_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__.KeybindingsRegistry.registerKeybindingRule({\r\n id: 'acceptSelectedSuggestion',\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.AcceptSuggestionsOnEnter, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MakesTextEdit),\r\n primary: 3 /* Enter */,\r\n weight,\r\n});\r\n_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_30__.MenuRegistry.appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('accept.insert', \"Insert\") },\r\n group: 'left',\r\n order: 1,\r\n when: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange.toNegated()\r\n});\r\n_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_30__.MenuRegistry.appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('accept.insert', \"Insert\") },\r\n group: 'left',\r\n order: 1,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.InsertMode.isEqualTo('insert'))\r\n});\r\n_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_30__.MenuRegistry.appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('accept.replace', \"Replace\") },\r\n group: 'left',\r\n order: 1,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.InsertMode.isEqualTo('replace'))\r\n});\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'acceptAlternativeSelectedSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 3 /* Enter */,\r\n secondary: [1024 /* Shift */ | 2 /* Tab */],\r\n },\r\n handler(x) {\r\n x.acceptSelectedSuggestion(false, true);\r\n },\r\n menuOpts: [{\r\n menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu,\r\n group: 'left',\r\n order: 2,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.InsertMode.isEqualTo('insert')),\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('accept.replace', \"Replace\")\r\n }, {\r\n menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu,\r\n group: 'left',\r\n order: 2,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.HasInsertAndReplaceRange, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.InsertMode.isEqualTo('replace')),\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('accept.insert', \"Insert\")\r\n }]\r\n}));\r\n// continue to support the old command\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__.CommandsRegistry.registerCommandAlias('acceptSelectedSuggestionOnEnter', 'acceptSelectedSuggestion');\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'hideSuggestWidget',\r\n precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible,\r\n handler: x => x.cancelSuggestWidget(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectNextSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectNextSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 18 /* DownArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */],\r\n mac: { primary: 18 /* DownArrow */, secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectNextPageSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectNextPageSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 12 /* PageDown */,\r\n secondary: [2048 /* CtrlCmd */ | 12 /* PageDown */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectLastSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectLastSuggestion()\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectPrevSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectPrevSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 16 /* UpArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */],\r\n mac: { primary: 16 /* UpArrow */, secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectPrevPageSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectPrevPageSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 11 /* PageUp */,\r\n secondary: [2048 /* CtrlCmd */ | 11 /* PageUp */]\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'selectFirstSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.MultipleSuggestions),\r\n handler: c => c.selectFirstSuggestion()\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'toggleSuggestionDetails',\r\n precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible,\r\n handler: x => x.toggleSuggestionDetails(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\r\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */ }\r\n },\r\n menuOpts: [{\r\n menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu,\r\n group: 'right',\r\n order: 1,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.DetailsVisible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.CanResolve),\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('detail.more', \"show less\")\r\n }, {\r\n menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.suggestWidgetStatusbarMenu,\r\n group: 'right',\r\n order: 1,\r\n when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.DetailsVisible.toNegated(), _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.CanResolve),\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('detail.less', \"show more\")\r\n }]\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'toggleExplainMode',\r\n precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible,\r\n handler: x => x.toggleExplainMode(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */,\r\n primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */,\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'toggleSuggestionFocus',\r\n precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible,\r\n handler: x => x.toggleSuggestionFocus(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 10 /* Space */,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 10 /* Space */ }\r\n }\r\n}));\r\n//#region tab completions\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'insertBestCompletion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), _wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__.WordContextKey.AtEnd, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible.toNegated(), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__.SuggestAlternatives.OtherSuggestions.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__.SnippetController2.InSnippetMode.toNegated()),\r\n handler: (x, arg) => {\r\n x.triggerSuggestAndAcceptBest((0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_25__.isObject)(arg) ? Object.assign({ fallback: 'tab' }, arg) : { fallback: 'tab' });\r\n },\r\n kbOpts: {\r\n weight,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'insertNextSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__.SuggestAlternatives.OtherSuggestions, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__.SnippetController2.InSnippetMode.toNegated()),\r\n handler: x => x.acceptNextSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorCommand)(new SuggestCommand({\r\n id: 'insertPrevSuggestion',\r\n precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__.ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__.SuggestAlternatives.OtherSuggestions, _suggest_js__WEBPACK_IMPORTED_MODULE_18__.Context.Visible.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__.SnippetController2.InSnippetMode.toNegated()),\r\n handler: x => x.acceptPrevSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 2 /* Tab */\r\n }\r\n}));\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorAction)(class extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.resetSuggestSize',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_13__.localize('suggest.reset.label', \"Reset Suggest Widget Size\"),\r\n alias: 'Reset Suggest Widget Size',\r\n precondition: undefined\r\n });\r\n }\r\n run(_accessor, editor) {\r\n SuggestController.get(editor).resetWidgetSize();\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Memory\": () => (/* binding */ Memory),\n/* harmony export */ \"NoMemory\": () => (/* binding */ NoMemory),\n/* harmony export */ \"LRUMemory\": () => (/* binding */ LRUMemory),\n/* harmony export */ \"PrefixMemory\": () => (/* binding */ PrefixMemory),\n/* harmony export */ \"SuggestMemoryService\": () => (/* binding */ SuggestMemoryService),\n/* harmony export */ \"ISuggestMemoryService\": () => (/* binding */ ISuggestMemoryService)\n/* harmony export */ });\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass Memory {\r\n constructor(name) {\r\n this.name = name;\r\n }\r\n select(model, pos, items) {\r\n if (items.length === 0) {\r\n return 0;\r\n }\r\n let topScore = items[0].score[0];\r\n for (let i = 0; i < items.length; i++) {\r\n const { score, completion: suggestion } = items[i];\r\n if (score[0] !== topScore) {\r\n // stop when leaving the group of top matches\r\n break;\r\n }\r\n if (suggestion.preselect) {\r\n // stop when seeing an auto-select-item\r\n return i;\r\n }\r\n }\r\n return 0;\r\n }\r\n}\r\nclass NoMemory extends Memory {\r\n constructor() {\r\n super('first');\r\n }\r\n memorize(model, pos, item) {\r\n // no-op\r\n }\r\n toJSON() {\r\n return undefined;\r\n }\r\n fromJSON() {\r\n //\r\n }\r\n}\r\nclass LRUMemory extends Memory {\r\n constructor() {\r\n super('recentlyUsed');\r\n this._cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.LRUCache(300, 0.66);\r\n this._seq = 0;\r\n }\r\n memorize(model, pos, item) {\r\n const key = `${model.getLanguageIdentifier().language}/${item.textLabel}`;\r\n this._cache.set(key, {\r\n touch: this._seq++,\r\n type: item.completion.kind,\r\n insertText: item.completion.insertText\r\n });\r\n }\r\n select(model, pos, items) {\r\n if (items.length === 0) {\r\n return 0;\r\n }\r\n const lineSuffix = model.getLineContent(pos.lineNumber).substr(pos.column - 10, pos.column - 1);\r\n if (/\\s$/.test(lineSuffix)) {\r\n return super.select(model, pos, items);\r\n }\r\n let topScore = items[0].score[0];\r\n let indexPreselect = -1;\r\n let indexRecency = -1;\r\n let seq = -1;\r\n for (let i = 0; i < items.length; i++) {\r\n if (items[i].score[0] !== topScore) {\r\n // consider only top items\r\n break;\r\n }\r\n const key = `${model.getLanguageIdentifier().language}/${items[i].textLabel}`;\r\n const item = this._cache.peek(key);\r\n if (item && item.touch > seq && item.type === items[i].completion.kind && item.insertText === items[i].completion.insertText) {\r\n seq = item.touch;\r\n indexRecency = i;\r\n }\r\n if (items[i].completion.preselect && indexPreselect === -1) {\r\n // stop when seeing an auto-select-item\r\n return indexPreselect = i;\r\n }\r\n }\r\n if (indexRecency !== -1) {\r\n return indexRecency;\r\n }\r\n else if (indexPreselect !== -1) {\r\n return indexPreselect;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n toJSON() {\r\n return this._cache.toJSON();\r\n }\r\n fromJSON(data) {\r\n this._cache.clear();\r\n let seq = 0;\r\n for (const [key, value] of data) {\r\n value.touch = seq;\r\n value.type = typeof value.type === 'number' ? value.type : (0,_common_modes_js__WEBPACK_IMPORTED_MODULE_2__.completionKindFromString)(value.type);\r\n this._cache.set(key, value);\r\n }\r\n this._seq = this._cache.size;\r\n }\r\n}\r\nclass PrefixMemory extends Memory {\r\n constructor() {\r\n super('recentlyUsedByPrefix');\r\n this._trie = _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.TernarySearchTree.forStrings();\r\n this._seq = 0;\r\n }\r\n memorize(model, pos, item) {\r\n const { word } = model.getWordUntilPosition(pos);\r\n const key = `${model.getLanguageIdentifier().language}/${word}`;\r\n this._trie.set(key, {\r\n type: item.completion.kind,\r\n insertText: item.completion.insertText,\r\n touch: this._seq++\r\n });\r\n }\r\n select(model, pos, items) {\r\n let { word } = model.getWordUntilPosition(pos);\r\n if (!word) {\r\n return super.select(model, pos, items);\r\n }\r\n let key = `${model.getLanguageIdentifier().language}/${word}`;\r\n let item = this._trie.get(key);\r\n if (!item) {\r\n item = this._trie.findSubstr(key);\r\n }\r\n if (item) {\r\n for (let i = 0; i < items.length; i++) {\r\n let { kind, insertText } = items[i].completion;\r\n if (kind === item.type && insertText === item.insertText) {\r\n return i;\r\n }\r\n }\r\n }\r\n return super.select(model, pos, items);\r\n }\r\n toJSON() {\r\n let entries = [];\r\n this._trie.forEach((value, key) => entries.push([key, value]));\r\n // sort by last recently used (touch), then\r\n // take the top 200 item and normalize their\r\n // touch\r\n entries\r\n .sort((a, b) => -(a[1].touch - b[1].touch))\r\n .forEach((value, i) => value[1].touch = i);\r\n return entries.slice(0, 200);\r\n }\r\n fromJSON(data) {\r\n this._trie.clear();\r\n if (data.length > 0) {\r\n this._seq = data[0][1].touch + 1;\r\n for (const [key, value] of data) {\r\n value.type = typeof value.type === 'number' ? value.type : (0,_common_modes_js__WEBPACK_IMPORTED_MODULE_2__.completionKindFromString)(value.type);\r\n this._trie.set(key, value);\r\n }\r\n }\r\n }\r\n}\r\nlet SuggestMemoryService = class SuggestMemoryService {\r\n constructor(_storageService, _modeService, _configService) {\r\n this._storageService = _storageService;\r\n this._modeService = _modeService;\r\n this._configService = _configService;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._persistSoon = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__.RunOnceScheduler(() => this._saveState(), 500);\r\n this._disposables.add(_storageService.onWillSaveState(e => {\r\n if (e.reason === _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__.WillSaveStateReason.SHUTDOWN) {\r\n this._saveState();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._persistSoon.dispose();\r\n }\r\n memorize(model, pos, item) {\r\n this._withStrategy(model, pos).memorize(model, pos, item);\r\n this._persistSoon.schedule();\r\n }\r\n select(model, pos, items) {\r\n return this._withStrategy(model, pos).select(model, pos, items);\r\n }\r\n _withStrategy(model, pos) {\r\n var _a, _b;\r\n const mode = this._configService.getValue('editor.suggestSelection', {\r\n overrideIdentifier: (_a = this._modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(pos.lineNumber, pos.column))) === null || _a === void 0 ? void 0 : _a.language,\r\n resource: model.uri\r\n });\r\n if (((_b = this._strategy) === null || _b === void 0 ? void 0 : _b.name) !== mode) {\r\n this._saveState();\r\n const ctor = SuggestMemoryService._strategyCtors.get(mode) || NoMemory;\r\n this._strategy = new ctor();\r\n try {\r\n const share = this._configService.getValue('editor.suggest.shareSuggestSelections');\r\n const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;\r\n const raw = this._storageService.get(`${SuggestMemoryService._storagePrefix}/${mode}`, scope);\r\n if (raw) {\r\n this._strategy.fromJSON(JSON.parse(raw));\r\n }\r\n }\r\n catch (e) {\r\n // things can go wrong with JSON...\r\n }\r\n }\r\n return this._strategy;\r\n }\r\n _saveState() {\r\n if (this._strategy) {\r\n const share = this._configService.getValue('editor.suggest.shareSuggestSelections');\r\n const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;\r\n const raw = JSON.stringify(this._strategy);\r\n this._storageService.store(`${SuggestMemoryService._storagePrefix}/${this._strategy.name}`, raw, scope, 1 /* MACHINE */);\r\n }\r\n }\r\n};\r\nSuggestMemoryService._strategyCtors = new Map([\r\n ['recentlyUsedByPrefix', PrefixMemory],\r\n ['recentlyUsed', LRUMemory],\r\n ['first', NoMemory]\r\n]);\r\nSuggestMemoryService._storagePrefix = 'suggest/memories';\r\nSuggestMemoryService = __decorate([\r\n __param(0, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__.IStorageService),\r\n __param(1, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__.IModeService),\r\n __param(2, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService)\r\n], SuggestMemoryService);\r\n\r\nconst ISuggestMemoryService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__.createDecorator)('ISuggestMemories');\r\n(0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_7__.registerSingleton)(ISuggestMemoryService, SuggestMemoryService, true);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LineContext\": () => (/* binding */ LineContext),\n/* harmony export */ \"SuggestModel\": () => (/* binding */ SuggestModel)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _completionModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./completionModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js\");\n/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./suggest.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js\");\n/* harmony import */ var _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../snippet/snippetController2.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _wordDistance_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./wordDistance.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass LineContext {\r\n constructor(model, position, auto, shy) {\r\n this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1);\r\n this.leadingWord = model.getWordUntilPosition(position);\r\n this.lineNumber = position.lineNumber;\r\n this.column = position.column;\r\n this.auto = auto;\r\n this.shy = shy;\r\n }\r\n static shouldAutoTrigger(editor) {\r\n if (!editor.hasModel()) {\r\n return false;\r\n }\r\n const model = editor.getModel();\r\n const pos = editor.getPosition();\r\n model.tokenizeIfCheap(pos.lineNumber);\r\n const word = model.getWordAtPosition(pos);\r\n if (!word) {\r\n return false;\r\n }\r\n if (word.endColumn !== pos.column) {\r\n return false;\r\n }\r\n if (!isNaN(Number(word.word))) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\nlet SuggestModel = class SuggestModel {\r\n constructor(_editor, _editorWorkerService, _clipboardService, _telemetryService, _logService) {\r\n this._editor = _editor;\r\n this._editorWorkerService = _editorWorkerService;\r\n this._clipboardService = _clipboardService;\r\n this._telemetryService = _telemetryService;\r\n this._logService = _logService;\r\n this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._quickSuggestDelay = 10;\r\n this._triggerCharacterListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._triggerQuickSuggest = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer();\r\n this._state = 0 /* Idle */;\r\n this._completionDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.DisposableStore();\r\n this._onDidCancel = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this._onDidTrigger = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this._onDidSuggest = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this.onDidCancel = this._onDidCancel.event;\r\n this.onDidTrigger = this._onDidTrigger.event;\r\n this.onDidSuggest = this._onDidSuggest.event;\r\n this._telemetryGate = 0;\r\n this._currentSelection = this._editor.getSelection() || new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__.Selection(1, 1, 1, 1);\r\n // wire up various listeners\r\n this._toDispose.add(this._editor.onDidChangeModel(() => {\r\n this._updateTriggerCharacters();\r\n this.cancel();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeModelLanguage(() => {\r\n this._updateTriggerCharacters();\r\n this.cancel();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeConfiguration(() => {\r\n this._updateTriggerCharacters();\r\n this._updateQuickSuggest();\r\n }));\r\n this._toDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.onDidChange(() => {\r\n this._updateTriggerCharacters();\r\n this._updateActiveSuggestSession();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeCursorSelection(e => {\r\n this._onCursorChange(e);\r\n }));\r\n let editorIsComposing = false;\r\n this._toDispose.add(this._editor.onDidCompositionStart(() => {\r\n editorIsComposing = true;\r\n }));\r\n this._toDispose.add(this._editor.onDidCompositionEnd(() => {\r\n // refilter when composition ends\r\n editorIsComposing = false;\r\n this._refilterCompletionItems();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeModelContent(() => {\r\n // only filter completions when the editor isn't\r\n // composing a character, e.g. ¨ + u makes ü but just\r\n // ¨ cannot be used for filtering\r\n if (!editorIsComposing) {\r\n this._refilterCompletionItems();\r\n }\r\n }));\r\n this._updateTriggerCharacters();\r\n this._updateQuickSuggest();\r\n }\r\n dispose() {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)(this._triggerCharacterListener);\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.dispose)([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest]);\r\n this._toDispose.dispose();\r\n this._completionDisposables.dispose();\r\n this.cancel();\r\n }\r\n // --- handle configuration & precondition changes\r\n _updateQuickSuggest() {\r\n this._quickSuggestDelay = this._editor.getOption(74 /* quickSuggestionsDelay */);\r\n if (isNaN(this._quickSuggestDelay) || (!this._quickSuggestDelay && this._quickSuggestDelay !== 0) || this._quickSuggestDelay < 0) {\r\n this._quickSuggestDelay = 10;\r\n }\r\n }\r\n _updateTriggerCharacters() {\r\n this._triggerCharacterListener.clear();\r\n if (this._editor.getOption(75 /* readOnly */)\r\n || !this._editor.hasModel()\r\n || !this._editor.getOption(104 /* suggestOnTriggerCharacters */)) {\r\n return;\r\n }\r\n const supportsByTriggerCharacter = new Map();\r\n for (const support of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.all(this._editor.getModel())) {\r\n for (const ch of support.triggerCharacters || []) {\r\n let set = supportsByTriggerCharacter.get(ch);\r\n if (!set) {\r\n set = new Set();\r\n set.add((0,_suggest_js__WEBPACK_IMPORTED_MODULE_7__.getSnippetSuggestSupport)());\r\n supportsByTriggerCharacter.set(ch, set);\r\n }\r\n set.add(support);\r\n }\r\n }\r\n const checkTriggerCharacter = (text) => {\r\n if (!text) {\r\n // came here from the compositionEnd-event\r\n const position = this._editor.getPosition();\r\n const model = this._editor.getModel();\r\n text = model.getLineContent(position.lineNumber).substr(0, position.column - 1);\r\n }\r\n let lastChar = '';\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_12__.isLowSurrogate)(text.charCodeAt(text.length - 1))) {\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_12__.isHighSurrogate)(text.charCodeAt(text.length - 2))) {\r\n lastChar = text.substr(text.length - 2);\r\n }\r\n }\r\n else {\r\n lastChar = text.charAt(text.length - 1);\r\n }\r\n const supports = supportsByTriggerCharacter.get(lastChar);\r\n if (supports) {\r\n // keep existing items that where not computed by the\r\n // supports/providers that want to trigger now\r\n const existing = this._completionModel\r\n ? { items: this._completionModel.adopt(supports), clipboardText: this._completionModel.clipboardText }\r\n : undefined;\r\n this.trigger({ auto: true, shy: false, triggerCharacter: lastChar }, Boolean(this._completionModel), supports, existing);\r\n }\r\n };\r\n this._triggerCharacterListener.add(this._editor.onDidType(checkTriggerCharacter));\r\n this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(checkTriggerCharacter));\r\n }\r\n // --- trigger/retrigger/cancel suggest\r\n get state() {\r\n return this._state;\r\n }\r\n cancel(retrigger = false) {\r\n var _a;\r\n if (this._state !== 0 /* Idle */) {\r\n this._triggerQuickSuggest.cancel();\r\n (_a = this._requestToken) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._requestToken = undefined;\r\n this._state = 0 /* Idle */;\r\n this._completionModel = undefined;\r\n this._context = undefined;\r\n this._onDidCancel.fire({ retrigger });\r\n }\r\n }\r\n clear() {\r\n this._completionDisposables.clear();\r\n }\r\n _updateActiveSuggestSession() {\r\n if (this._state !== 0 /* Idle */) {\r\n if (!this._editor.hasModel() || !_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.has(this._editor.getModel())) {\r\n this.cancel();\r\n }\r\n else {\r\n this.trigger({ auto: this._state === 2 /* Auto */, shy: false }, true);\r\n }\r\n }\r\n }\r\n _onCursorChange(e) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const prevSelection = this._currentSelection;\r\n this._currentSelection = this._editor.getSelection();\r\n if (!e.selection.isEmpty()\r\n || (e.reason !== 0 /* NotSet */ && e.reason !== 3 /* Explicit */)\r\n || (e.source !== 'keyboard' && e.source !== 'deleteLeft')) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n this.cancel();\r\n return;\r\n }\r\n if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.has(model)) {\r\n return;\r\n }\r\n if (this._state === 0 /* Idle */ && e.reason === 0 /* NotSet */) {\r\n if (this._editor.getOption(73 /* quickSuggestions */) === false) {\r\n // not enabled\r\n return;\r\n }\r\n if (!prevSelection.containsRange(this._currentSelection) && !prevSelection.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) {\r\n // cursor didn't move RIGHT\r\n return;\r\n }\r\n if (this._editor.getOption(101 /* suggest */).snippetsPreventQuickSuggestions && _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_8__.SnippetController2.get(this._editor).isInSnippet()) {\r\n // no quick suggestion when in snippet mode\r\n return;\r\n }\r\n this.cancel();\r\n this._triggerQuickSuggest.cancelAndSet(() => {\r\n if (this._state !== 0 /* Idle */) {\r\n return;\r\n }\r\n if (!LineContext.shouldAutoTrigger(this._editor)) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const pos = this._editor.getPosition();\r\n // validate enabled now\r\n const quickSuggestions = this._editor.getOption(73 /* quickSuggestions */);\r\n if (quickSuggestions === false) {\r\n return;\r\n }\r\n else if (quickSuggestions === true) {\r\n // all good\r\n }\r\n else {\r\n // Check the type of the token that triggered this\r\n model.tokenizeIfCheap(pos.lineNumber);\r\n const lineTokens = model.getLineTokens(pos.lineNumber);\r\n const tokenType = lineTokens.getStandardTokenType(lineTokens.findTokenIndexAtOffset(Math.max(pos.column - 1 - 1, 0)));\r\n const inValidScope = quickSuggestions.other && tokenType === 0 /* Other */\r\n || quickSuggestions.comments && tokenType === 1 /* Comment */\r\n || quickSuggestions.strings && tokenType === 2 /* String */;\r\n if (!inValidScope) {\r\n return;\r\n }\r\n }\r\n // we made it till here -> trigger now\r\n this.trigger({ auto: true, shy: false });\r\n }, this._quickSuggestDelay);\r\n }\r\n else if (this._state !== 0 /* Idle */ && e.reason === 3 /* Explicit */) {\r\n // suggest is active and something like cursor keys are used to move\r\n // the cursor. this means we can refilter at the new position\r\n this._refilterCompletionItems();\r\n }\r\n }\r\n _refilterCompletionItems() {\r\n // Re-filter suggestions. This MUST run async because filtering/scoring\r\n // uses the model content AND the cursor position. The latter is NOT\r\n // updated when the document has changed (the event which drives this method)\r\n // and therefore a little pause (next mirco task) is needed. See:\r\n // https://stackoverflow.com/questions/25915634/difference-between-microtask-and-macrotask-within-an-event-loop-context#25933985\r\n Promise.resolve().then(() => {\r\n if (this._state === 0 /* Idle */) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const position = this._editor.getPosition();\r\n const ctx = new LineContext(model, position, this._state === 2 /* Auto */, false);\r\n this._onNewContext(ctx);\r\n });\r\n }\r\n trigger(context, retrigger = false, onlyFrom, existing) {\r\n var _a;\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const auto = context.auto;\r\n const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy);\r\n // Cancel previous requests, change state & update UI\r\n this.cancel(retrigger);\r\n this._state = auto ? 2 /* Auto */ : 1 /* Manual */;\r\n this._onDidTrigger.fire({ auto, shy: context.shy, position: this._editor.getPosition() });\r\n // Capture context when request was sent\r\n this._context = ctx;\r\n // Build context for request\r\n let suggestCtx = { triggerKind: (_a = context.triggerKind) !== null && _a !== void 0 ? _a : 0 /* Invoke */ };\r\n if (context.triggerCharacter) {\r\n suggestCtx = {\r\n triggerKind: 1 /* TriggerCharacter */,\r\n triggerCharacter: context.triggerCharacter\r\n };\r\n }\r\n this._requestToken = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__.CancellationTokenSource();\r\n // kind filter and snippet sort rules\r\n const snippetSuggestions = this._editor.getOption(96 /* snippetSuggestions */);\r\n let snippetSortOrder = 1 /* Inline */;\r\n switch (snippetSuggestions) {\r\n case 'top':\r\n snippetSortOrder = 0 /* Top */;\r\n break;\r\n // \t↓ that's the default anyways...\r\n // case 'inline':\r\n // \tsnippetSortOrder = SnippetSortOrder.Inline;\r\n // \tbreak;\r\n case 'bottom':\r\n snippetSortOrder = 2 /* Bottom */;\r\n break;\r\n }\r\n const itemKindFilter = SuggestModel._createItemKindFilter(this._editor);\r\n const wordDistance = _wordDistance_js__WEBPACK_IMPORTED_MODULE_11__.WordDistance.create(this._editorWorkerService, this._editor);\r\n const completions = (0,_suggest_js__WEBPACK_IMPORTED_MODULE_7__.provideSuggestionItems)(model, this._editor.getPosition(), new _suggest_js__WEBPACK_IMPORTED_MODULE_7__.CompletionOptions(snippetSortOrder, itemKindFilter, onlyFrom), suggestCtx, this._requestToken.token);\r\n Promise.all([completions, wordDistance]).then(([completions, wordDistance]) => __awaiter(this, void 0, void 0, function* () {\r\n var _b;\r\n (_b = this._requestToken) === null || _b === void 0 ? void 0 : _b.dispose();\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let clipboardText = existing === null || existing === void 0 ? void 0 : existing.clipboardText;\r\n if (!clipboardText && completions.needsClipboard) {\r\n clipboardText = yield this._clipboardService.readText();\r\n }\r\n if (this._state === 0 /* Idle */) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n let items = completions.items;\r\n if (existing) {\r\n const cmpFn = (0,_suggest_js__WEBPACK_IMPORTED_MODULE_7__.getSuggestionComparator)(snippetSortOrder);\r\n items = items.concat(existing.items).sort(cmpFn);\r\n }\r\n const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy);\r\n this._completionModel = new _completionModel_js__WEBPACK_IMPORTED_MODULE_6__.CompletionModel(items, this._context.column, {\r\n leadingLineContent: ctx.leadingLineContent,\r\n characterCountDelta: ctx.column - this._context.column\r\n }, wordDistance, this._editor.getOption(101 /* suggest */), this._editor.getOption(96 /* snippetSuggestions */), clipboardText);\r\n // store containers so that they can be disposed later\r\n this._completionDisposables.add(completions.disposable);\r\n this._onNewContext(ctx);\r\n // finally report telemetry about durations\r\n this._reportDurationsTelemetry(completions.durations);\r\n })).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__.onUnexpectedError);\r\n }\r\n _reportDurationsTelemetry(durations) {\r\n if (this._telemetryGate++ % 230 !== 0) {\r\n return;\r\n }\r\n setTimeout(() => {\r\n this._telemetryService.publicLog2('suggest.durations.json', { data: JSON.stringify(durations) });\r\n this._logService.debug('suggest.durations.json', durations);\r\n });\r\n }\r\n static _createItemKindFilter(editor) {\r\n // kind filter and snippet sort rules\r\n const result = new Set();\r\n // snippet setting\r\n const snippetSuggestions = editor.getOption(96 /* snippetSuggestions */);\r\n if (snippetSuggestions === 'none') {\r\n result.add(27 /* Snippet */);\r\n }\r\n // type setting\r\n const suggestOptions = editor.getOption(101 /* suggest */);\r\n if (!suggestOptions.showMethods) {\r\n result.add(0 /* Method */);\r\n }\r\n if (!suggestOptions.showFunctions) {\r\n result.add(1 /* Function */);\r\n }\r\n if (!suggestOptions.showConstructors) {\r\n result.add(2 /* Constructor */);\r\n }\r\n if (!suggestOptions.showFields) {\r\n result.add(3 /* Field */);\r\n }\r\n if (!suggestOptions.showVariables) {\r\n result.add(4 /* Variable */);\r\n }\r\n if (!suggestOptions.showClasses) {\r\n result.add(5 /* Class */);\r\n }\r\n if (!suggestOptions.showStructs) {\r\n result.add(6 /* Struct */);\r\n }\r\n if (!suggestOptions.showInterfaces) {\r\n result.add(7 /* Interface */);\r\n }\r\n if (!suggestOptions.showModules) {\r\n result.add(8 /* Module */);\r\n }\r\n if (!suggestOptions.showProperties) {\r\n result.add(9 /* Property */);\r\n }\r\n if (!suggestOptions.showEvents) {\r\n result.add(10 /* Event */);\r\n }\r\n if (!suggestOptions.showOperators) {\r\n result.add(11 /* Operator */);\r\n }\r\n if (!suggestOptions.showUnits) {\r\n result.add(12 /* Unit */);\r\n }\r\n if (!suggestOptions.showValues) {\r\n result.add(13 /* Value */);\r\n }\r\n if (!suggestOptions.showConstants) {\r\n result.add(14 /* Constant */);\r\n }\r\n if (!suggestOptions.showEnums) {\r\n result.add(15 /* Enum */);\r\n }\r\n if (!suggestOptions.showEnumMembers) {\r\n result.add(16 /* EnumMember */);\r\n }\r\n if (!suggestOptions.showKeywords) {\r\n result.add(17 /* Keyword */);\r\n }\r\n if (!suggestOptions.showWords) {\r\n result.add(18 /* Text */);\r\n }\r\n if (!suggestOptions.showColors) {\r\n result.add(19 /* Color */);\r\n }\r\n if (!suggestOptions.showFiles) {\r\n result.add(20 /* File */);\r\n }\r\n if (!suggestOptions.showReferences) {\r\n result.add(21 /* Reference */);\r\n }\r\n if (!suggestOptions.showColors) {\r\n result.add(22 /* Customcolor */);\r\n }\r\n if (!suggestOptions.showFolders) {\r\n result.add(23 /* Folder */);\r\n }\r\n if (!suggestOptions.showTypeParameters) {\r\n result.add(24 /* TypeParameter */);\r\n }\r\n if (!suggestOptions.showSnippets) {\r\n result.add(27 /* Snippet */);\r\n }\r\n if (!suggestOptions.showUsers) {\r\n result.add(25 /* User */);\r\n }\r\n if (!suggestOptions.showIssues) {\r\n result.add(26 /* Issue */);\r\n }\r\n return result;\r\n }\r\n _onNewContext(ctx) {\r\n if (!this._context) {\r\n // happens when 24x7 IntelliSense is enabled and still in its delay\r\n return;\r\n }\r\n if (ctx.lineNumber !== this._context.lineNumber) {\r\n // e.g. happens when pressing Enter while IntelliSense is computed\r\n this.cancel();\r\n return;\r\n }\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_12__.getLeadingWhitespace)(ctx.leadingLineContent) !== (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_12__.getLeadingWhitespace)(this._context.leadingLineContent)) {\r\n // cancel IntelliSense when line start changes\r\n // happens when the current word gets outdented\r\n this.cancel();\r\n return;\r\n }\r\n if (ctx.column < this._context.column) {\r\n // typed -> moved cursor LEFT -> retrigger if still on a word\r\n if (ctx.leadingWord.word) {\r\n this.trigger({ auto: this._context.auto, shy: false }, true);\r\n }\r\n else {\r\n this.cancel();\r\n }\r\n return;\r\n }\r\n if (!this._completionModel) {\r\n // happens when IntelliSense is not yet computed\r\n return;\r\n }\r\n if (ctx.leadingWord.word.length !== 0 && ctx.leadingWord.startColumn > this._context.leadingWord.startColumn) {\r\n // started a new word while IntelliSense shows -> retrigger\r\n // Select those providers have not contributed to this completion model and re-trigger completions for\r\n // them. Also adopt the existing items and merge them into the new completion model\r\n const inactiveProvider = new Set(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.CompletionProviderRegistry.all(this._editor.getModel()));\r\n for (let provider of this._completionModel.allProvider) {\r\n inactiveProvider.delete(provider);\r\n }\r\n const items = this._completionModel.adopt(new Set());\r\n this.trigger({ auto: this._context.auto, shy: false }, true, inactiveProvider, { items, clipboardText: this._completionModel.clipboardText });\r\n return;\r\n }\r\n if (ctx.column > this._context.column && this._completionModel.incomplete.size > 0 && ctx.leadingWord.word.length !== 0) {\r\n // typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger\r\n const { incomplete } = this._completionModel;\r\n const items = this._completionModel.adopt(incomplete);\r\n this.trigger({ auto: this._state === 2 /* Auto */, shy: false, triggerKind: 2 /* TriggerForIncompleteCompletions */ }, true, incomplete, { items, clipboardText: this._completionModel.clipboardText });\r\n }\r\n else {\r\n // typed -> moved cursor RIGHT -> update UI\r\n let oldLineContext = this._completionModel.lineContext;\r\n let isFrozen = false;\r\n this._completionModel.lineContext = {\r\n leadingLineContent: ctx.leadingLineContent,\r\n characterCountDelta: ctx.column - this._context.column\r\n };\r\n if (this._completionModel.items.length === 0) {\r\n if (LineContext.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < ctx.leadingWord.startColumn) {\r\n // retrigger when heading into a new word\r\n this.trigger({ auto: this._context.auto, shy: false }, true);\r\n return;\r\n }\r\n if (!this._context.auto) {\r\n // freeze when IntelliSense was manually requested\r\n this._completionModel.lineContext = oldLineContext;\r\n isFrozen = this._completionModel.items.length > 0;\r\n if (isFrozen && ctx.leadingWord.word.length === 0) {\r\n // there were results before but now there aren't\r\n // and also we are not on a word anymore -> cancel\r\n this.cancel();\r\n return;\r\n }\r\n }\r\n else {\r\n // nothing left\r\n this.cancel();\r\n return;\r\n }\r\n }\r\n this._onDidSuggest.fire({\r\n completionModel: this._completionModel,\r\n auto: this._context.auto,\r\n shy: this._context.shy,\r\n isFrozen,\r\n });\r\n }\r\n }\r\n};\r\nSuggestModel = __decorate([\r\n __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__.IEditorWorkerService),\r\n __param(2, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_13__.IClipboardService),\r\n __param(3, _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_14__.ITelemetryService),\r\n __param(4, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_15__.ILogService)\r\n], SuggestModel);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OvertypingCapturer\": () => (/* binding */ OvertypingCapturer)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass OvertypingCapturer {\r\n constructor(editor, suggestModel) {\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.DisposableStore();\r\n this._lastOvertyped = [];\r\n this._empty = true;\r\n this._disposables.add(editor.onWillType(() => {\r\n if (!this._empty) {\r\n return;\r\n }\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n const selectionsLength = selections.length;\r\n // Check if it will overtype any selections\r\n let willOvertype = false;\r\n for (let i = 0; i < selectionsLength; i++) {\r\n if (!selections[i].isEmpty()) {\r\n willOvertype = true;\r\n break;\r\n }\r\n }\r\n if (!willOvertype) {\r\n return;\r\n }\r\n this._lastOvertyped = [];\r\n const model = editor.getModel();\r\n for (let i = 0; i < selectionsLength; i++) {\r\n const selection = selections[i];\r\n // Check for overtyping capturer restrictions\r\n if (model.getValueLengthInRange(selection) > OvertypingCapturer._maxSelectionLength) {\r\n return;\r\n }\r\n this._lastOvertyped[i] = { value: model.getValueInRange(selection), multiline: selection.startLineNumber !== selection.endLineNumber };\r\n }\r\n this._empty = false;\r\n }));\r\n this._disposables.add(suggestModel.onDidCancel(e => {\r\n if (!this._empty && !e.retrigger) {\r\n this._empty = true;\r\n }\r\n }));\r\n }\r\n getLastOvertypedInfo(idx) {\r\n if (!this._empty && idx >= 0 && idx < this._lastOvertyped.length) {\r\n return this._lastOvertyped[idx];\r\n }\r\n return undefined;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n}\r\nOvertypingCapturer._maxSelectionLength = 51200;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"editorSuggestWidgetBackground\": () => (/* binding */ editorSuggestWidgetBackground),\n/* harmony export */ \"editorSuggestWidgetBorder\": () => (/* binding */ editorSuggestWidgetBorder),\n/* harmony export */ \"editorSuggestWidgetForeground\": () => (/* binding */ editorSuggestWidgetForeground),\n/* harmony export */ \"editorSuggestWidgetSelectedBackground\": () => (/* binding */ editorSuggestWidgetSelectedBackground),\n/* harmony export */ \"editorSuggestWidgetHighlightForeground\": () => (/* binding */ editorSuggestWidgetHighlightForeground),\n/* harmony export */ \"SuggestWidget\": () => (/* binding */ SuggestWidget),\n/* harmony export */ \"SuggestContentWidget\": () => (/* binding */ SuggestContentWidget)\n/* harmony export */ });\n/* harmony import */ var _media_suggest_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/suggest.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css\");\n/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/codicons/codiconStyles.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js\");\n/* harmony import */ var _symbolIcons_symbolIcons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbolIcons/symbolIcons.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/symbolIcons.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/browser/ui/list/listWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./suggest.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js\");\n/* harmony import */ var _platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/styler.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./suggestWidgetDetails.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetDetails.js\");\n/* harmony import */ var _suggestWidgetStatus_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./suggestWidgetStatus.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetStatus.js\");\n/* harmony import */ var _suggestWidgetRenderer_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./suggestWidgetRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetRenderer.js\");\n/* harmony import */ var _resizable_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./resizable.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/resizable.js\");\n/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../browser/widget/embeddedCodeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js\");\n/* harmony import */ var _base_common_numbers_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../base/common/numbers.js */ \"./node_modules/monaco-editor/esm/vs/base/common/numbers.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n // The codicon symbol styles are defined here and must be loaded\r\n // The codicon symbol colors are defined here and must be loaded to get colors\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Suggest widget colors\r\n */\r\nconst editorSuggestWidgetBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.registerColor)('editorSuggestWidget.background', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBackground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBackground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.'));\r\nconst editorSuggestWidgetBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.registerColor)('editorSuggestWidget.border', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBorder, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBorder, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorWidgetBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));\r\nconst editorSuggestWidgetForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.registerColor)('editorSuggestWidget.foreground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorForeground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorForeground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.editorForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.'));\r\nconst editorSuggestWidgetSelectedBackground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.registerColor)('editorSuggestWidget.selectedBackground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.quickInputListFocusBackground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.quickInputListFocusBackground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.quickInputListFocusBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.'));\r\nconst editorSuggestWidgetHighlightForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.registerColor)('editorSuggestWidget.highlightForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.listHighlightForeground, light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.listHighlightForeground, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.listHighlightForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.'));\r\nclass PersistedWidgetSize {\r\n constructor(_service, editor) {\r\n this._service = _service;\r\n this._key = `suggestWidget.size/${editor.getEditorType()}/${editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_22__.EmbeddedCodeEditorWidget}`;\r\n }\r\n restore() {\r\n var _a;\r\n const raw = (_a = this._service.get(this._key, 0 /* GLOBAL */)) !== null && _a !== void 0 ? _a : '';\r\n try {\r\n const obj = JSON.parse(raw);\r\n if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension.is(obj)) {\r\n return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension.lift(obj);\r\n }\r\n }\r\n catch (_b) {\r\n // ignore\r\n }\r\n return undefined;\r\n }\r\n store(size) {\r\n this._service.store(this._key, JSON.stringify(size), 0 /* GLOBAL */, 1 /* MACHINE */);\r\n }\r\n reset() {\r\n this._service.remove(this._key, 0 /* GLOBAL */);\r\n }\r\n}\r\nlet SuggestWidget = class SuggestWidget {\r\n constructor(editor, _storageService, _contextKeyService, _themeService, instantiationService) {\r\n this.editor = editor;\r\n this._storageService = _storageService;\r\n this._state = 0 /* Hidden */;\r\n this._isAuto = false;\r\n this._ignoreFocusEvents = false;\r\n this._explainMode = false;\r\n this._showTimeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_16__.TimeoutTimer();\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.DisposableStore();\r\n this._onDidSelect = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this._onDidFocus = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this._onDidHide = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this._onDidShow = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onDidSelect = this._onDidSelect.event;\r\n this.onDidFocus = this._onDidFocus.event;\r\n this.onDidHide = this._onDidHide.event;\r\n this.onDidShow = this._onDidShow.event;\r\n this._onDetailsKeydown = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Emitter();\r\n this.onDetailsKeyDown = this._onDetailsKeydown.event;\r\n this.element = new _resizable_js__WEBPACK_IMPORTED_MODULE_21__.ResizableHTMLElement();\r\n this.element.domNode.classList.add('editor-widget', 'suggest-widget');\r\n this._contentWidget = new SuggestContentWidget(this, editor);\r\n this._persistedSize = new PersistedWidgetSize(_storageService, editor);\r\n class ResizeState {\r\n constructor(persistedSize, currentSize, persistHeight = false, persistWidth = false) {\r\n this.persistedSize = persistedSize;\r\n this.currentSize = currentSize;\r\n this.persistHeight = persistHeight;\r\n this.persistWidth = persistWidth;\r\n }\r\n }\r\n let state;\r\n this._disposables.add(this.element.onDidWillResize(() => {\r\n this._contentWidget.lockPreference();\r\n state = new ResizeState(this._persistedSize.restore(), this.element.size);\r\n }));\r\n this._disposables.add(this.element.onDidResize(e => {\r\n var _a, _b, _c, _d;\r\n this._resize(e.dimension.width, e.dimension.height);\r\n if (state) {\r\n state.persistHeight = state.persistHeight || !!e.north || !!e.south;\r\n state.persistWidth = state.persistWidth || !!e.east || !!e.west;\r\n }\r\n if (!e.done) {\r\n return;\r\n }\r\n if (state) {\r\n // only store width or height value that have changed and also\r\n // only store changes that are above a certain threshold\r\n const { itemHeight, defaultSize } = this.getLayoutInfo();\r\n const threshold = Math.round(itemHeight / 2);\r\n let { width, height } = this.element.size;\r\n if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) {\r\n height = (_b = (_a = state.persistedSize) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : defaultSize.height;\r\n }\r\n if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) {\r\n width = (_d = (_c = state.persistedSize) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : defaultSize.width;\r\n }\r\n this._persistedSize.store(new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(width, height));\r\n }\r\n // reset working state\r\n this._contentWidget.unlockPreference();\r\n state = undefined;\r\n }));\r\n this._messageElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.append(this.element.domNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.$('.message'));\r\n this._listElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.append(this.element.domNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.$('.tree'));\r\n const details = instantiationService.createInstance(_suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_18__.SuggestDetailsWidget, this.editor);\r\n details.onDidClose(this.toggleDetails, this, this._disposables);\r\n this._details = new _suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_18__.SuggestDetailsOverlay(details, this.editor);\r\n const applyIconStyle = () => this.element.domNode.classList.toggle('no-icons', !this.editor.getOption(101 /* suggest */).showIcons);\r\n applyIconStyle();\r\n const renderer = instantiationService.createInstance(_suggestWidgetRenderer_js__WEBPACK_IMPORTED_MODULE_20__.ItemRenderer, this.editor);\r\n this._disposables.add(renderer);\r\n this._disposables.add(renderer.onDidToggleDetails(() => this.toggleDetails()));\r\n this._list = new _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_9__.List('SuggestWidget', this._listElement, {\r\n getHeight: (_element) => this.getLayoutInfo().itemHeight,\r\n getTemplateId: (_element) => 'suggestion'\r\n }, [renderer], {\r\n alwaysConsumeMouseWheel: true,\r\n useShadows: false,\r\n mouseSupport: false,\r\n accessibilityProvider: {\r\n getRole: () => 'option',\r\n getAriaLabel: (item) => {\r\n const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name;\r\n if (item.isResolved && this._isDetailsVisible()) {\r\n const { documentation, detail } = item.completion;\r\n const docs = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__.format('{0}{1}', detail || '', documentation ? (typeof documentation === 'string' ? documentation : documentation.value) : '');\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('ariaCurrenttSuggestionReadDetails', \"{0}, docs: {1}\", textLabel, docs);\r\n }\r\n else {\r\n return textLabel;\r\n }\r\n },\r\n getWidgetAriaLabel: () => _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('suggest', \"Suggest\"),\r\n getWidgetRole: () => 'listbox'\r\n }\r\n });\r\n this._status = instantiationService.createInstance(_suggestWidgetStatus_js__WEBPACK_IMPORTED_MODULE_19__.SuggestWidgetStatus, this.element.domNode);\r\n const applyStatusBarStyle = () => this.element.domNode.classList.toggle('with-status-bar', this.editor.getOption(101 /* suggest */).showStatusBar);\r\n applyStatusBarStyle();\r\n this._disposables.add((0,_platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this._list, _themeService, {\r\n listInactiveFocusBackground: editorSuggestWidgetSelectedBackground,\r\n listInactiveFocusOutline: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.activeContrastBorder\r\n }));\r\n this._disposables.add(_themeService.onDidColorThemeChange(t => this._onThemeChange(t)));\r\n this._onThemeChange(_themeService.getColorTheme());\r\n this._disposables.add(this._list.onMouseDown(e => this._onListMouseDownOrTap(e)));\r\n this._disposables.add(this._list.onTap(e => this._onListMouseDownOrTap(e)));\r\n this._disposables.add(this._list.onDidChangeSelection(e => this._onListSelection(e)));\r\n this._disposables.add(this._list.onDidChangeFocus(e => this._onListFocus(e)));\r\n this._disposables.add(this.editor.onDidChangeCursorSelection(() => this._onCursorSelectionChanged()));\r\n this._disposables.add(this.editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(101 /* suggest */)) {\r\n applyStatusBarStyle();\r\n applyIconStyle();\r\n }\r\n }));\r\n this._ctxSuggestWidgetVisible = _suggest_js__WEBPACK_IMPORTED_MODULE_11__.Context.Visible.bindTo(_contextKeyService);\r\n this._ctxSuggestWidgetDetailsVisible = _suggest_js__WEBPACK_IMPORTED_MODULE_11__.Context.DetailsVisible.bindTo(_contextKeyService);\r\n this._ctxSuggestWidgetMultipleSuggestions = _suggest_js__WEBPACK_IMPORTED_MODULE_11__.Context.MultipleSuggestions.bindTo(_contextKeyService);\r\n this._disposables.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.addStandardDisposableListener(this._details.widget.domNode, 'keydown', e => {\r\n this._onDetailsKeydown.fire(e);\r\n }));\r\n this._disposables.add(this.editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n }\r\n dispose() {\r\n var _a;\r\n this._details.widget.dispose();\r\n this._details.dispose();\r\n this._list.dispose();\r\n this._status.dispose();\r\n this._disposables.dispose();\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._showTimeout.dispose();\r\n this._contentWidget.dispose();\r\n this.element.dispose();\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n if (this._details.widget.domNode.contains(mouseEvent.target.element)) {\r\n // Clicking inside details\r\n this._details.widget.domNode.focus();\r\n }\r\n else {\r\n // Clicking outside details and inside suggest\r\n if (this.element.domNode.contains(mouseEvent.target.element)) {\r\n this.editor.focus();\r\n }\r\n }\r\n }\r\n _onCursorSelectionChanged() {\r\n if (this._state !== 0 /* Hidden */) {\r\n this._contentWidget.layout();\r\n }\r\n }\r\n _onListMouseDownOrTap(e) {\r\n if (typeof e.element === 'undefined' || typeof e.index === 'undefined') {\r\n return;\r\n }\r\n // prevent stealing browser focus from the editor\r\n e.browserEvent.preventDefault();\r\n e.browserEvent.stopPropagation();\r\n this._select(e.element, e.index);\r\n }\r\n _onListSelection(e) {\r\n if (e.elements.length) {\r\n this._select(e.elements[0], e.indexes[0]);\r\n }\r\n }\r\n _select(item, index) {\r\n const completionModel = this._completionModel;\r\n if (completionModel) {\r\n this._onDidSelect.fire({ item, index, model: completionModel });\r\n this.editor.focus();\r\n }\r\n }\r\n _onThemeChange(theme) {\r\n const backgroundColor = theme.getColor(editorSuggestWidgetBackground);\r\n if (backgroundColor) {\r\n this.element.domNode.style.backgroundColor = backgroundColor.toString();\r\n this._messageElement.style.backgroundColor = backgroundColor.toString();\r\n this._details.widget.domNode.style.backgroundColor = backgroundColor.toString();\r\n }\r\n const borderColor = theme.getColor(editorSuggestWidgetBorder);\r\n if (borderColor) {\r\n this.element.domNode.style.borderColor = borderColor.toString();\r\n this._messageElement.style.borderColor = borderColor.toString();\r\n this._status.element.style.borderTopColor = borderColor.toString();\r\n this._details.widget.domNode.style.borderColor = borderColor.toString();\r\n this._detailsBorderColor = borderColor.toString();\r\n }\r\n const focusBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.focusBorder);\r\n if (focusBorderColor) {\r\n this._detailsFocusBorderColor = focusBorderColor.toString();\r\n }\r\n this._details.widget.borderWidth = theme.type === 'hc' ? 2 : 1;\r\n }\r\n _onListFocus(e) {\r\n var _a;\r\n if (this._ignoreFocusEvents) {\r\n return;\r\n }\r\n if (!e.elements.length) {\r\n if (this._currentSuggestionDetails) {\r\n this._currentSuggestionDetails.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n this._focusedItem = undefined;\r\n }\r\n this.editor.setAriaOptions({ activeDescendant: undefined });\r\n return;\r\n }\r\n if (!this._completionModel) {\r\n return;\r\n }\r\n const item = e.elements[0];\r\n const index = e.indexes[0];\r\n if (item !== this._focusedItem) {\r\n (_a = this._currentSuggestionDetails) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n this._focusedItem = item;\r\n this._list.reveal(index);\r\n this._currentSuggestionDetails = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_16__.createCancelablePromise)((token) => __awaiter(this, void 0, void 0, function* () {\r\n const loading = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_16__.disposableTimeout)(() => {\r\n if (this._isDetailsVisible()) {\r\n this.showDetails(true);\r\n }\r\n }, 250);\r\n token.onCancellationRequested(() => loading.dispose());\r\n const result = yield item.resolve(token);\r\n loading.dispose();\r\n return result;\r\n }));\r\n this._currentSuggestionDetails.then(() => {\r\n if (index >= this._list.length || item !== this._list.element(index)) {\r\n return;\r\n }\r\n // item can have extra information, so re-render\r\n this._ignoreFocusEvents = true;\r\n this._list.splice(index, 1, [item]);\r\n this._list.setFocus([index]);\r\n this._ignoreFocusEvents = false;\r\n if (this._isDetailsVisible()) {\r\n this.showDetails(false);\r\n }\r\n else {\r\n this.element.domNode.classList.remove('docs-side');\r\n }\r\n this.editor.setAriaOptions({ activeDescendant: (0,_suggestWidgetRenderer_js__WEBPACK_IMPORTED_MODULE_20__.getAriaId)(index) });\r\n }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_7__.onUnexpectedError);\r\n }\r\n // emit an event\r\n this._onDidFocus.fire({ item, index, model: this._completionModel });\r\n }\r\n _setState(state) {\r\n if (this._state === state) {\r\n return;\r\n }\r\n this._state = state;\r\n this.element.domNode.classList.toggle('frozen', state === 4 /* Frozen */);\r\n this.element.domNode.classList.remove('message');\r\n switch (state) {\r\n case 0 /* Hidden */:\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._messageElement, this._listElement, this._status.element);\r\n this._details.hide(true);\r\n this._status.hide();\r\n this._contentWidget.hide();\r\n this._ctxSuggestWidgetVisible.reset();\r\n this._ctxSuggestWidgetMultipleSuggestions.reset();\r\n this.element.domNode.classList.remove('visible');\r\n this._list.splice(0, this._list.length);\r\n this._focusedItem = undefined;\r\n this._cappedHeight = undefined;\r\n this._explainMode = false;\r\n break;\r\n case 1 /* Loading */:\r\n this.element.domNode.classList.add('message');\r\n this._messageElement.textContent = SuggestWidget.LOADING_MESSAGE;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._listElement, this._status.element);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.show(this._messageElement);\r\n this._details.hide();\r\n this._show();\r\n this._focusedItem = undefined;\r\n break;\r\n case 2 /* Empty */:\r\n this.element.domNode.classList.add('message');\r\n this._messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._listElement, this._status.element);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.show(this._messageElement);\r\n this._details.hide();\r\n this._show();\r\n this._focusedItem = undefined;\r\n break;\r\n case 3 /* Open */:\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._messageElement);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.show(this._listElement, this._status.element);\r\n this._show();\r\n break;\r\n case 4 /* Frozen */:\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._messageElement);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.show(this._listElement, this._status.element);\r\n this._show();\r\n break;\r\n case 5 /* Details */:\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.hide(this._messageElement);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.show(this._listElement, this._status.element);\r\n this._details.show();\r\n this._show();\r\n break;\r\n }\r\n }\r\n _show() {\r\n this._status.show();\r\n this._contentWidget.show();\r\n this._layout(this._persistedSize.restore());\r\n this._ctxSuggestWidgetVisible.set(true);\r\n this._showTimeout.cancelAndSet(() => {\r\n this.element.domNode.classList.add('visible');\r\n this._onDidShow.fire(this);\r\n }, 100);\r\n }\r\n showTriggered(auto, delay) {\r\n if (this._state !== 0 /* Hidden */) {\r\n return;\r\n }\r\n this._contentWidget.setPosition(this.editor.getPosition());\r\n this._isAuto = !!auto;\r\n if (!this._isAuto) {\r\n this._loadingTimeout = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_16__.disposableTimeout)(() => this._setState(1 /* Loading */), delay);\r\n }\r\n }\r\n showSuggestions(completionModel, selectionIndex, isFrozen, isAuto) {\r\n var _a, _b;\r\n this._contentWidget.setPosition(this.editor.getPosition());\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._currentSuggestionDetails) === null || _b === void 0 ? void 0 : _b.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n if (this._completionModel !== completionModel) {\r\n this._completionModel = completionModel;\r\n }\r\n if (isFrozen && this._state !== 2 /* Empty */ && this._state !== 0 /* Hidden */) {\r\n this._setState(4 /* Frozen */);\r\n return;\r\n }\r\n const visibleCount = this._completionModel.items.length;\r\n const isEmpty = visibleCount === 0;\r\n this._ctxSuggestWidgetMultipleSuggestions.set(visibleCount > 1);\r\n if (isEmpty) {\r\n this._setState(isAuto ? 0 /* Hidden */ : 2 /* Empty */);\r\n this._completionModel = undefined;\r\n return;\r\n }\r\n this._focusedItem = undefined;\r\n this._list.splice(0, this._list.length, this._completionModel.items);\r\n this._setState(isFrozen ? 4 /* Frozen */ : 3 /* Open */);\r\n this._list.reveal(selectionIndex, 0);\r\n this._list.setFocus([selectionIndex]);\r\n this._layout(this.element.size);\r\n // Reset focus border\r\n if (this._detailsBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsBorderColor;\r\n }\r\n }\r\n selectNextPage() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.pageDown();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusNextPage();\r\n return true;\r\n }\r\n }\r\n selectNext() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusNext(1, true);\r\n return true;\r\n }\r\n }\r\n selectLast() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.scrollBottom();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusLast();\r\n return true;\r\n }\r\n }\r\n selectPreviousPage() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.pageUp();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusPreviousPage();\r\n return true;\r\n }\r\n }\r\n selectPrevious() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusPrevious(1, true);\r\n return false;\r\n }\r\n }\r\n selectFirst() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.scrollTop();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusFirst();\r\n return true;\r\n }\r\n }\r\n getFocusedItem() {\r\n if (this._state !== 0 /* Hidden */\r\n && this._state !== 2 /* Empty */\r\n && this._state !== 1 /* Loading */\r\n && this._completionModel) {\r\n return {\r\n item: this._list.getFocusedElements()[0],\r\n index: this._list.getFocus()[0],\r\n model: this._completionModel\r\n };\r\n }\r\n return undefined;\r\n }\r\n toggleDetailsFocus() {\r\n if (this._state === 5 /* Details */) {\r\n this._setState(3 /* Open */);\r\n if (this._detailsBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsBorderColor;\r\n }\r\n }\r\n else if (this._state === 3 /* Open */ && this._isDetailsVisible()) {\r\n this._setState(5 /* Details */);\r\n if (this._detailsFocusBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsFocusBorderColor;\r\n }\r\n }\r\n }\r\n toggleDetails() {\r\n if (this._isDetailsVisible()) {\r\n // hide details widget\r\n this._ctxSuggestWidgetDetailsVisible.set(false);\r\n this._setDetailsVisible(false);\r\n this._details.hide();\r\n this.element.domNode.classList.remove('shows-details');\r\n }\r\n else if ((0,_suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_18__.canExpandCompletionItem)(this._list.getFocusedElements()[0]) && (this._state === 3 /* Open */ || this._state === 5 /* Details */ || this._state === 4 /* Frozen */)) {\r\n // show details widget (iff possible)\r\n this._ctxSuggestWidgetDetailsVisible.set(true);\r\n this._setDetailsVisible(true);\r\n this.showDetails(false);\r\n }\r\n }\r\n showDetails(loading) {\r\n this._details.show();\r\n if (loading) {\r\n this._details.widget.renderLoading();\r\n }\r\n else {\r\n this._details.widget.renderItem(this._list.getFocusedElements()[0], this._explainMode);\r\n }\r\n this._positionDetails();\r\n this.editor.focus();\r\n this.element.domNode.classList.add('shows-details');\r\n }\r\n toggleExplainMode() {\r\n if (this._list.getFocusedElements()[0] && this._isDetailsVisible()) {\r\n this._explainMode = !this._explainMode;\r\n this.showDetails(false);\r\n }\r\n }\r\n resetPersistedSize() {\r\n this._persistedSize.reset();\r\n }\r\n hideWidget() {\r\n var _a;\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._setState(0 /* Hidden */);\r\n this._onDidHide.fire(this);\r\n // ensure that a reasonable widget height is persisted so that\r\n // accidential \"resize-to-single-items\" cases aren't happening\r\n const dim = this._persistedSize.restore();\r\n const minPersistedHeight = Math.ceil(this.getLayoutInfo().itemHeight * 4.3);\r\n if (dim && dim.height < minPersistedHeight) {\r\n this._persistedSize.store(dim.with(undefined, minPersistedHeight));\r\n }\r\n }\r\n isFrozen() {\r\n return this._state === 4 /* Frozen */;\r\n }\r\n _afterRender(position) {\r\n if (position === null) {\r\n if (this._isDetailsVisible()) {\r\n this._details.hide(); //todo@jrieken soft-hide\r\n }\r\n return;\r\n }\r\n if (this._state === 2 /* Empty */ || this._state === 1 /* Loading */) {\r\n // no special positioning when widget isn't showing list\r\n return;\r\n }\r\n if (this._isDetailsVisible()) {\r\n this._details.show();\r\n }\r\n this._positionDetails();\r\n }\r\n _layout(size) {\r\n var _a, _b, _c;\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n if (!this.editor.getDomNode()) {\r\n // happens when running tests\r\n return;\r\n }\r\n const bodyBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.getClientArea(document.body);\r\n const info = this.getLayoutInfo();\r\n if (!size) {\r\n size = info.defaultSize;\r\n }\r\n let height = size.height;\r\n let width = size.width;\r\n // status bar\r\n this._status.element.style.lineHeight = `${info.itemHeight}px`;\r\n if (this._state === 2 /* Empty */ || this._state === 1 /* Loading */) {\r\n // showing a message only\r\n height = info.itemHeight + info.borderHeight;\r\n width = info.defaultSize.width / 2;\r\n this.element.enableSashes(false, false, false, false);\r\n this.element.minSize = this.element.maxSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(width, height);\r\n this._contentWidget.setPreference(2 /* BELOW */);\r\n }\r\n else {\r\n // showing items\r\n // width math\r\n const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;\r\n if (width > maxWidth) {\r\n width = maxWidth;\r\n }\r\n const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;\r\n // height math\r\n const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;\r\n const minHeight = info.itemHeight + info.statusBarHeight;\r\n const editorBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.getDomNodePagePosition(this.editor.getDomNode());\r\n const cursorBox = this.editor.getScrolledVisiblePosition(this.editor.getPosition());\r\n const cursorBottom = editorBox.top + cursorBox.top + cursorBox.height;\r\n const maxHeightBelow = Math.min(bodyBox.height - cursorBottom - info.verticalPadding, fullHeight);\r\n const maxHeightAbove = Math.min(editorBox.top + cursorBox.top - info.verticalPadding, fullHeight);\r\n let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);\r\n if (height === ((_a = this._cappedHeight) === null || _a === void 0 ? void 0 : _a.capped)) {\r\n // Restore the old (wanted) height when the current\r\n // height is capped to fit\r\n height = this._cappedHeight.wanted;\r\n }\r\n if (height < minHeight) {\r\n height = minHeight;\r\n }\r\n if (height > maxHeight) {\r\n height = maxHeight;\r\n }\r\n if (height > maxHeightBelow) {\r\n this._contentWidget.setPreference(1 /* ABOVE */);\r\n this.element.enableSashes(true, true, false, false);\r\n maxHeight = maxHeightAbove;\r\n }\r\n else {\r\n this._contentWidget.setPreference(2 /* BELOW */);\r\n this.element.enableSashes(false, true, true, false);\r\n maxHeight = maxHeightBelow;\r\n }\r\n this.element.preferredSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(preferredWidth, info.defaultSize.height);\r\n this.element.maxSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(maxWidth, maxHeight);\r\n this.element.minSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(220, minHeight);\r\n // Know when the height was capped to fit and remember\r\n // the wanted height for later. This is required when going\r\n // left to widen suggestions.\r\n this._cappedHeight = height === fullHeight\r\n ? { wanted: (_c = (_b = this._cappedHeight) === null || _b === void 0 ? void 0 : _b.wanted) !== null && _c !== void 0 ? _c : size.height, capped: height }\r\n : undefined;\r\n }\r\n this._resize(width, height);\r\n }\r\n _resize(width, height) {\r\n const { width: maxWidth, height: maxHeight } = this.element.maxSize;\r\n width = Math.min(maxWidth, width);\r\n height = Math.min(maxHeight, height);\r\n const { statusBarHeight } = this.getLayoutInfo();\r\n this._list.layout(height - statusBarHeight, width);\r\n this._listElement.style.height = `${height - statusBarHeight}px`;\r\n this.element.layout(height, width);\r\n this._contentWidget.layout();\r\n this._positionDetails();\r\n }\r\n _positionDetails() {\r\n if (this._isDetailsVisible()) {\r\n this._details.placeAtAnchor(this.element.domNode);\r\n }\r\n }\r\n getLayoutInfo() {\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n const itemHeight = (0,_base_common_numbers_js__WEBPACK_IMPORTED_MODULE_23__.clamp)(this.editor.getOption(103 /* suggestLineHeight */) || fontInfo.lineHeight, 8, 1000);\r\n const statusBarHeight = !this.editor.getOption(101 /* suggest */).showStatusBar || this._state === 2 /* Empty */ || this._state === 1 /* Loading */ ? 0 : itemHeight;\r\n const borderWidth = this._details.widget.borderWidth;\r\n const borderHeight = 2 * borderWidth;\r\n return {\r\n itemHeight,\r\n statusBarHeight,\r\n borderWidth,\r\n borderHeight,\r\n typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth,\r\n verticalPadding: 22,\r\n horizontalPadding: 14,\r\n defaultSize: new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(430, statusBarHeight + 12 * itemHeight + borderHeight)\r\n };\r\n }\r\n _isDetailsVisible() {\r\n return this._storageService.getBoolean('expandSuggestionDocs', 0 /* GLOBAL */, false);\r\n }\r\n _setDetailsVisible(value) {\r\n this._storageService.store('expandSuggestionDocs', value, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n};\r\nSuggestWidget.LOADING_MESSAGE = _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('suggestWidget.loading', \"Loading...\");\r\nSuggestWidget.NO_SUGGESTIONS_MESSAGE = _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('suggestWidget.noSuggestions', \"No suggestions.\");\r\nSuggestWidget = __decorate([\r\n __param(1, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__.IStorageService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__.IContextKeyService),\r\n __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_17__.IInstantiationService)\r\n], SuggestWidget);\r\n\r\nclass SuggestContentWidget {\r\n constructor(_widget, _editor) {\r\n this._widget = _widget;\r\n this._editor = _editor;\r\n this.allowEditorOverflow = true;\r\n this.suppressMouseDown = false;\r\n this._preferenceLocked = false;\r\n this._added = false;\r\n this._hidden = false;\r\n }\r\n dispose() {\r\n if (this._added) {\r\n this._added = false;\r\n this._editor.removeContentWidget(this);\r\n }\r\n }\r\n getId() {\r\n return 'editor.widget.suggestWidget';\r\n }\r\n getDomNode() {\r\n return this._widget.element.domNode;\r\n }\r\n show() {\r\n this._hidden = false;\r\n if (!this._added) {\r\n this._added = true;\r\n this._editor.addContentWidget(this);\r\n }\r\n }\r\n hide() {\r\n if (!this._hidden) {\r\n this._hidden = true;\r\n this.layout();\r\n }\r\n }\r\n layout() {\r\n this._editor.layoutContentWidget(this);\r\n }\r\n getPosition() {\r\n if (this._hidden || !this._position || !this._preference) {\r\n return null;\r\n }\r\n return {\r\n position: this._position,\r\n preference: [this._preference]\r\n };\r\n }\r\n beforeRender() {\r\n const { height, width } = this._widget.element.size;\r\n const { borderWidth, horizontalPadding } = this._widget.getLayoutInfo();\r\n return new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_5__.Dimension(width + 2 * borderWidth + horizontalPadding, height + 2 * borderWidth);\r\n }\r\n afterRender(position) {\r\n this._widget._afterRender(position);\r\n }\r\n setPreference(preference) {\r\n if (!this._preferenceLocked) {\r\n this._preference = preference;\r\n }\r\n }\r\n lockPreference() {\r\n this._preferenceLocked = true;\r\n }\r\n unlockPreference() {\r\n this._preferenceLocked = false;\r\n }\r\n setPosition(position) {\r\n this._position = position;\r\n }\r\n}\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.registerThemingParticipant)((theme, collector) => {\r\n const matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground);\r\n if (matchHighlight) {\r\n collector.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`);\r\n }\r\n const foreground = theme.getColor(editorSuggestWidgetForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${foreground}; }`);\r\n }\r\n const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .suggest-details a { color: ${link}; }`);\r\n }\r\n const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__.textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .suggest-details code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetDetails.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetDetails.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"canExpandCompletionItem\": () => (/* binding */ canExpandCompletionItem),\n/* harmony export */ \"SuggestDetailsWidget\": () => (/* binding */ SuggestDetailsWidget),\n/* harmony export */ \"SuggestDetailsOverlay\": () => (/* binding */ SuggestDetailsOverlay)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js\");\n/* harmony import */ var _browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/core/markdownRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/core/markdownRenderer.js\");\n/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ \"./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _resizable_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./resizable.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/resizable.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction canExpandCompletionItem(item) {\r\n return !!item && Boolean(item.completion.documentation || item.completion.detail && item.completion.detail !== item.completion.label);\r\n}\r\nlet SuggestDetailsWidget = class SuggestDetailsWidget {\r\n constructor(_editor, instaService) {\r\n this._editor = _editor;\r\n this._onDidClose = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__.Emitter();\r\n this.onDidClose = this._onDidClose.event;\r\n this._onDidChangeContents = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__.Emitter();\r\n this.onDidChangeContents = this._onDidChangeContents.event;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._renderDisposeable = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._borderWidth = 1;\r\n this._size = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(330, 0);\r\n this.domNode = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('.suggest-details');\r\n this.domNode.classList.add('no-docs');\r\n this._markdownRenderer = instaService.createInstance(_browser_core_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_4__.MarkdownRenderer, { editor: _editor });\r\n this._body = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('.body');\r\n this._scrollbar = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__.DomScrollableElement(this._body, {});\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this.domNode, this._scrollbar.getDomNode());\r\n this._disposables.add(this._scrollbar);\r\n this._header = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this._body, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('.header'));\r\n this._close = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this._header, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('span' + _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__.Codicon.close.cssSelector));\r\n this._close.title = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('details.close', \"Close\");\r\n this._type = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this._header, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('p.type'));\r\n this._docs = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.append(this._body, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.$('p.docs'));\r\n this._configureFont();\r\n this._disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._configureFont();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._renderDisposeable.dispose();\r\n }\r\n _configureFont() {\r\n const options = this._editor.getOptions();\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const fontFamily = fontInfo.fontFamily;\r\n const fontSize = options.get(102 /* suggestFontSize */) || fontInfo.fontSize;\r\n const lineHeight = options.get(103 /* suggestLineHeight */) || fontInfo.lineHeight;\r\n const fontWeight = fontInfo.fontWeight;\r\n const fontSizePx = `${fontSize}px`;\r\n const lineHeightPx = `${lineHeight}px`;\r\n this.domNode.style.fontSize = fontSizePx;\r\n this.domNode.style.lineHeight = lineHeightPx;\r\n this.domNode.style.fontWeight = fontWeight;\r\n this.domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings;\r\n this._type.style.fontFamily = fontFamily;\r\n this._close.style.height = lineHeightPx;\r\n this._close.style.width = lineHeightPx;\r\n }\r\n getLayoutInfo() {\r\n const lineHeight = this._editor.getOption(103 /* suggestLineHeight */) || this._editor.getOption(38 /* fontInfo */).lineHeight;\r\n const borderWidth = this._borderWidth;\r\n const borderHeight = borderWidth * 2;\r\n return {\r\n lineHeight,\r\n borderWidth,\r\n borderHeight,\r\n verticalPadding: 22,\r\n horizontalPadding: 14\r\n };\r\n }\r\n renderLoading() {\r\n this._type.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('loading', \"Loading...\");\r\n this._docs.textContent = '';\r\n this.domNode.classList.remove('no-docs', 'no-type');\r\n this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2);\r\n this._onDidChangeContents.fire(this);\r\n }\r\n renderItem(item, explainMode) {\r\n var _a;\r\n this._renderDisposeable.clear();\r\n let { detail, documentation } = item.completion;\r\n if (explainMode) {\r\n let md = '';\r\n md += `score: ${item.score[0]}${item.word ? `, compared '${item.completion.filterText && (item.completion.filterText + ' (filterText)') || typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name}' with '${item.word}'` : ' (no prefix)'}\\n`;\r\n md += `distance: ${item.distance}, see localityBonus-setting\\n`;\r\n md += `index: ${item.idx}, based on ${item.completion.sortText && `sortText: \"${item.completion.sortText}\"` || 'label'}\\n`;\r\n md += `commit characters: ${(_a = item.completion.commitCharacters) === null || _a === void 0 ? void 0 : _a.join('')}\\n`;\r\n documentation = new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__.MarkdownString().appendCodeblock('empty', md);\r\n detail = `Provider: ${item.provider._debugDisplayName}`;\r\n }\r\n if (!explainMode && !canExpandCompletionItem(item)) {\r\n this.clearContents();\r\n return;\r\n }\r\n this.domNode.classList.remove('no-docs', 'no-type');\r\n // --- details\r\n if (detail) {\r\n const cappedDetail = detail.length > 100000 ? `${detail.substr(0, 100000)}…` : detail;\r\n this._type.textContent = cappedDetail;\r\n this._type.title = cappedDetail;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.show(this._type);\r\n this._type.classList.toggle('auto-wrap', !/\\r?\\n^\\s+/gmi.test(cappedDetail));\r\n }\r\n else {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._type);\r\n this._type.title = '';\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.hide(this._type);\r\n this.domNode.classList.add('no-type');\r\n }\r\n // --- documentation\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._docs);\r\n if (typeof documentation === 'string') {\r\n this._docs.classList.remove('markdown-docs');\r\n this._docs.textContent = documentation;\r\n }\r\n else if (documentation) {\r\n this._docs.classList.add('markdown-docs');\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.clearNode(this._docs);\r\n const renderedContents = this._markdownRenderer.render(documentation);\r\n this._docs.appendChild(renderedContents.element);\r\n this._renderDisposeable.add(renderedContents);\r\n this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(() => {\r\n this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight);\r\n this._onDidChangeContents.fire(this);\r\n }));\r\n }\r\n this.domNode.style.userSelect = 'text';\r\n this.domNode.tabIndex = -1;\r\n this._close.onmousedown = e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._close.onclick = e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._onDidClose.fire();\r\n };\r\n this._body.scrollTop = 0;\r\n this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight);\r\n this._onDidChangeContents.fire(this);\r\n }\r\n clearContents() {\r\n this.domNode.classList.add('no-docs');\r\n this._type.textContent = '';\r\n this._docs.textContent = '';\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n layout(width, height) {\r\n const newSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(width, height);\r\n if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension.equals(newSize, this._size)) {\r\n this._size = newSize;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.size(this.domNode, width, height);\r\n }\r\n this._scrollbar.scanDomNode();\r\n }\r\n scrollDown(much = 8) {\r\n this._body.scrollTop += much;\r\n }\r\n scrollUp(much = 8) {\r\n this._body.scrollTop -= much;\r\n }\r\n scrollTop() {\r\n this._body.scrollTop = 0;\r\n }\r\n scrollBottom() {\r\n this._body.scrollTop = this._body.scrollHeight;\r\n }\r\n pageDown() {\r\n this.scrollDown(80);\r\n }\r\n pageUp() {\r\n this.scrollUp(80);\r\n }\r\n set borderWidth(width) {\r\n this._borderWidth = width;\r\n }\r\n get borderWidth() {\r\n return this._borderWidth;\r\n }\r\n};\r\nSuggestDetailsWidget = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__.IInstantiationService)\r\n], SuggestDetailsWidget);\r\n\r\nclass SuggestDetailsOverlay {\r\n constructor(widget, _editor) {\r\n this.widget = widget;\r\n this._editor = _editor;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n this._added = false;\r\n this._resizable = new _resizable_js__WEBPACK_IMPORTED_MODULE_8__.ResizableHTMLElement();\r\n this._resizable.domNode.classList.add('suggest-details-container');\r\n this._resizable.domNode.appendChild(widget.domNode);\r\n this._resizable.enableSashes(false, true, true, false);\r\n let topLeftNow;\r\n let sizeNow;\r\n let deltaTop = 0;\r\n let deltaLeft = 0;\r\n this._disposables.add(this._resizable.onDidWillResize(() => {\r\n topLeftNow = this._topLeft;\r\n sizeNow = this._resizable.size;\r\n }));\r\n this._disposables.add(this._resizable.onDidResize(e => {\r\n if (topLeftNow && sizeNow) {\r\n this.widget.layout(e.dimension.width, e.dimension.height);\r\n let updateTopLeft = false;\r\n if (e.west) {\r\n deltaLeft = sizeNow.width - e.dimension.width;\r\n updateTopLeft = true;\r\n }\r\n if (e.north) {\r\n deltaTop = sizeNow.height - e.dimension.height;\r\n updateTopLeft = true;\r\n }\r\n if (updateTopLeft) {\r\n this._applyTopLeft({\r\n top: topLeftNow.top + deltaTop,\r\n left: topLeftNow.left + deltaLeft,\r\n });\r\n }\r\n }\r\n if (e.done) {\r\n topLeftNow = undefined;\r\n sizeNow = undefined;\r\n deltaTop = 0;\r\n deltaLeft = 0;\r\n this._userSize = e.dimension;\r\n }\r\n }));\r\n this._disposables.add(this.widget.onDidChangeContents(() => {\r\n var _a;\r\n if (this._anchorBox) {\r\n this._placeAtAnchor(this._anchorBox, (_a = this._userSize) !== null && _a !== void 0 ? _a : this.widget.size);\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this.hide();\r\n }\r\n getId() {\r\n return 'suggest.details';\r\n }\r\n getDomNode() {\r\n return this._resizable.domNode;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n show() {\r\n if (!this._added) {\r\n this._editor.addOverlayWidget(this);\r\n this.getDomNode().style.position = 'fixed';\r\n this._added = true;\r\n }\r\n }\r\n hide(sessionEnded = false) {\r\n if (this._added) {\r\n this._editor.removeOverlayWidget(this);\r\n this._added = false;\r\n this._anchorBox = undefined;\r\n this._topLeft = undefined;\r\n }\r\n if (sessionEnded) {\r\n this._userSize = undefined;\r\n this.widget.clearContents();\r\n }\r\n }\r\n placeAtAnchor(anchor) {\r\n var _a;\r\n const anchorBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getDomNodePagePosition(anchor);\r\n this._anchorBox = anchorBox;\r\n this._placeAtAnchor(this._anchorBox, (_a = this._userSize) !== null && _a !== void 0 ? _a : this.widget.size);\r\n }\r\n _placeAtAnchor(anchorBox, size) {\r\n const bodyBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.getClientArea(document.body);\r\n const info = this.widget.getLayoutInfo();\r\n let maxSizeTop;\r\n let maxSizeBottom;\r\n let minSize = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(220, 2 * info.lineHeight);\r\n let left = 0;\r\n let top = anchorBox.top;\r\n let bottom = anchorBox.top + anchorBox.height - info.borderHeight;\r\n let alignAtTop;\r\n let alignEast;\r\n // position: EAST, west, south\r\n let width = bodyBox.width - (anchorBox.left + anchorBox.width + info.borderWidth + info.horizontalPadding);\r\n left = -info.borderWidth + anchorBox.left + anchorBox.width;\r\n alignEast = true;\r\n maxSizeTop = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);\r\n maxSizeBottom = maxSizeTop.with(undefined, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);\r\n // find a better place if the widget is wider than there is space available\r\n if (size.width > width) {\r\n // position: east, WEST, south\r\n if (anchorBox.left > width) {\r\n // pos = SuggestDetailsPosition.West;\r\n width = anchorBox.left - info.borderWidth - info.horizontalPadding;\r\n alignEast = false;\r\n left = Math.max(info.horizontalPadding, anchorBox.left - size.width - info.borderWidth);\r\n maxSizeTop = maxSizeTop.with(width);\r\n maxSizeBottom = maxSizeTop.with(undefined, maxSizeBottom.height);\r\n }\r\n // position: east, west, SOUTH\r\n if (anchorBox.width > width * 1.3 && bodyBox.height - (anchorBox.top + anchorBox.height) > anchorBox.height) {\r\n width = anchorBox.width;\r\n left = anchorBox.left;\r\n top = -info.borderWidth + anchorBox.top + anchorBox.height;\r\n maxSizeTop = new _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dimension(anchorBox.width - info.borderHeight, bodyBox.height - anchorBox.top - anchorBox.height - info.verticalPadding);\r\n maxSizeBottom = maxSizeTop.with(undefined, anchorBox.top - info.verticalPadding);\r\n minSize = minSize.with(maxSizeTop.width);\r\n }\r\n }\r\n // top/bottom placement\r\n let height = size.height;\r\n let maxHeight = Math.max(maxSizeTop.height, maxSizeBottom.height);\r\n if (height > maxHeight) {\r\n height = maxHeight;\r\n }\r\n let maxSize;\r\n if (height <= maxSizeTop.height) {\r\n alignAtTop = true;\r\n maxSize = maxSizeTop;\r\n }\r\n else {\r\n alignAtTop = false;\r\n maxSize = maxSizeBottom;\r\n }\r\n this._applyTopLeft({ left, top: alignAtTop ? top : bottom - height });\r\n this.getDomNode().style.position = 'fixed';\r\n this._resizable.enableSashes(!alignAtTop, alignEast, alignAtTop, !alignEast);\r\n this._resizable.minSize = minSize;\r\n this._resizable.maxSize = maxSize;\r\n this._resizable.layout(height, Math.min(maxSize.width, size.width));\r\n this.widget.layout(this._resizable.size.width, this._resizable.size.height);\r\n }\r\n _applyTopLeft(topLeft) {\r\n this._topLeft = topLeft;\r\n this.getDomNode().style.left = `${this._topLeft.left}px`;\r\n this.getDomNode().style.top = `${this._topLeft.top}px`;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetDetails.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetRenderer.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetRenderer.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getAriaId\": () => (/* binding */ getAriaId),\n/* harmony export */ \"suggestMoreInfoIcon\": () => (/* binding */ suggestMoreInfoIcon),\n/* harmony export */ \"ItemRenderer\": () => (/* binding */ ItemRenderer)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/ui/iconLabel/iconLabel.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js\");\n/* harmony import */ var _common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/getIconClasses.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/files/common/files.js */ \"./node_modules/monaco-editor/esm/vs/platform/files/common/files.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./suggestWidgetDetails.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetDetails.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction getAriaId(index) {\r\n return `suggest-aria-id:${index}`;\r\n}\r\nconst suggestMoreInfoIcon = (0,_platform_theme_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_16__.registerIcon)('suggest-more-info', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_14__.Codicon.chevronRight, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('suggestMoreInfoIcon', 'Icon for more information in the suggest widget.'));\r\nconst _completionItemColor = new (_a = class ColorExtractor {\r\n extract(item, out) {\r\n if (item.textLabel.match(ColorExtractor._regexStrict)) {\r\n out[0] = item.textLabel;\r\n return true;\r\n }\r\n if (item.completion.detail && item.completion.detail.match(ColorExtractor._regexStrict)) {\r\n out[0] = item.completion.detail;\r\n return true;\r\n }\r\n if (typeof item.completion.documentation === 'string') {\r\n const match = ColorExtractor._regexRelaxed.exec(item.completion.documentation);\r\n if (match && (match.index === 0 || match.index + match[0].length === item.completion.documentation.length)) {\r\n out[0] = match[0];\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n _a._regexRelaxed = /(#([\\da-fA-F]{3}){1,2}|(rgb|hsl)a\\(\\s*(\\d{1,3}%?\\s*,\\s*){3}(1|0?\\.\\d+)\\)|(rgb|hsl)\\(\\s*\\d{1,3}%?(\\s*,\\s*\\d{1,3}%?){2}\\s*\\))/,\r\n _a._regexStrict = new RegExp(`^${_a._regexRelaxed.source}$`, 'i'),\r\n _a);\r\nlet ItemRenderer = class ItemRenderer {\r\n constructor(_editor, _modelService, _modeService, _themeService) {\r\n this._editor = _editor;\r\n this._modelService = _modelService;\r\n this._modeService = _modeService;\r\n this._themeService = _themeService;\r\n this._onDidToggleDetails = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_15__.Emitter();\r\n this.onDidToggleDetails = this._onDidToggleDetails.event;\r\n this.templateId = 'suggestion';\r\n }\r\n dispose() {\r\n this._onDidToggleDetails.dispose();\r\n }\r\n renderTemplate(container) {\r\n const data = Object.create(null);\r\n data.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n data.root = container;\r\n data.root.classList.add('show-file-icons');\r\n data.icon = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(container, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.icon'));\r\n data.colorspan = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(data.icon, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.colorspan'));\r\n const text = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(container, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.contents'));\r\n const main = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(text, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.main'));\r\n data.iconContainer = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(main, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('.icon-label.codicon'));\r\n data.left = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(main, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.left'));\r\n data.right = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(main, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.right'));\r\n data.iconLabel = new _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_7__.IconLabel(data.left, { supportHighlights: true, supportIcons: true });\r\n data.disposables.add(data.iconLabel);\r\n data.parametersLabel = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(data.left, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.signature-label'));\r\n data.qualifierLabel = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(data.left, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.qualifier-label'));\r\n data.detailsLabel = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(data.right, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.details-label'));\r\n data.readMore = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.append)(data.right, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.$)('span.readMore' + _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.ThemeIcon.asCSSSelector(suggestMoreInfoIcon)));\r\n data.readMore.title = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('readMore', \"Read More\");\r\n const configureFont = () => {\r\n const options = this._editor.getOptions();\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const fontFamily = fontInfo.fontFamily;\r\n const fontFeatureSettings = fontInfo.fontFeatureSettings;\r\n const fontSize = options.get(102 /* suggestFontSize */) || fontInfo.fontSize;\r\n const lineHeight = options.get(103 /* suggestLineHeight */) || fontInfo.lineHeight;\r\n const fontWeight = fontInfo.fontWeight;\r\n const fontSizePx = `${fontSize}px`;\r\n const lineHeightPx = `${lineHeight}px`;\r\n data.root.style.fontSize = fontSizePx;\r\n data.root.style.fontWeight = fontWeight;\r\n main.style.fontFamily = fontFamily;\r\n main.style.fontFeatureSettings = fontFeatureSettings;\r\n main.style.lineHeight = lineHeightPx;\r\n data.icon.style.height = lineHeightPx;\r\n data.icon.style.width = lineHeightPx;\r\n data.readMore.style.height = lineHeightPx;\r\n data.readMore.style.width = lineHeightPx;\r\n };\r\n configureFont();\r\n data.disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */) || e.hasChanged(102 /* suggestFontSize */) || e.hasChanged(103 /* suggestLineHeight */)) {\r\n configureFont();\r\n }\r\n }));\r\n return data;\r\n }\r\n renderElement(element, index, data) {\r\n var _b, _c, _d;\r\n const { completion } = element;\r\n const textLabel = typeof completion.label === 'string' ? completion.label : completion.label.name;\r\n data.root.id = getAriaId(index);\r\n data.colorspan.style.backgroundColor = '';\r\n const labelOptions = {\r\n labelEscapeNewLines: true,\r\n matches: (0,_base_common_filters_js__WEBPACK_IMPORTED_MODULE_1__.createMatches)(element.score)\r\n };\r\n let color = [];\r\n if (completion.kind === 19 /* Color */ && _completionItemColor.extract(element, color)) {\r\n // special logic for 'color' completion items\r\n data.icon.className = 'icon customcolor';\r\n data.iconContainer.className = 'icon hide';\r\n data.colorspan.style.backgroundColor = color[0];\r\n }\r\n else if (completion.kind === 20 /* File */ && this._themeService.getFileIconTheme().hasFileIcons) {\r\n // special logic for 'file' completion items\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = 'icon hide';\r\n const labelClasses = (0,_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_8__.getIconClasses)(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.from({ scheme: 'fake', path: textLabel }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_11__.FileKind.FILE);\r\n const detailClasses = (0,_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_8__.getIconClasses)(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.from({ scheme: 'fake', path: completion.detail }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_11__.FileKind.FILE);\r\n labelOptions.extraClasses = labelClasses.length > detailClasses.length ? labelClasses : detailClasses;\r\n }\r\n else if (completion.kind === 23 /* Folder */ && this._themeService.getFileIconTheme().hasFolderIcons) {\r\n // special logic for 'folder' completion items\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = 'icon hide';\r\n labelOptions.extraClasses = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__.flatten)([\r\n (0,_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_8__.getIconClasses)(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.from({ scheme: 'fake', path: textLabel }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_11__.FileKind.FOLDER),\r\n (0,_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_8__.getIconClasses)(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_10__.URI.from({ scheme: 'fake', path: completion.detail }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_11__.FileKind.FOLDER)\r\n ]);\r\n }\r\n else {\r\n // normal icon\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = '';\r\n data.iconContainer.classList.add('suggest-icon', ...(0,_common_modes_js__WEBPACK_IMPORTED_MODULE_6__.completionKindToCssClass)(completion.kind).split(' '));\r\n }\r\n if (completion.tags && completion.tags.indexOf(1 /* Deprecated */) >= 0) {\r\n labelOptions.extraClasses = (labelOptions.extraClasses || []).concat(['deprecated']);\r\n labelOptions.matches = [];\r\n }\r\n data.iconLabel.setLabel(textLabel, undefined, labelOptions);\r\n if (typeof completion.label === 'string') {\r\n data.parametersLabel.textContent = '';\r\n data.qualifierLabel.textContent = '';\r\n data.detailsLabel.textContent = (completion.detail || '').replace(/\\n.*$/m, '');\r\n data.root.classList.add('string-label');\r\n data.root.title = '';\r\n }\r\n else {\r\n data.parametersLabel.textContent = (completion.label.parameters || '').replace(/\\n.*$/m, '');\r\n data.qualifierLabel.textContent = (completion.label.qualifier || '').replace(/\\n.*$/m, '');\r\n data.detailsLabel.textContent = (completion.label.type || '').replace(/\\n.*$/m, '');\r\n data.root.classList.remove('string-label');\r\n data.root.title = `${textLabel}${(_b = completion.label.parameters) !== null && _b !== void 0 ? _b : ''} ${(_c = completion.label.qualifier) !== null && _c !== void 0 ? _c : ''} ${(_d = completion.label.type) !== null && _d !== void 0 ? _d : ''}`;\r\n }\r\n if (this._editor.getOption(101 /* suggest */).showInlineDetails) {\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.show)(data.detailsLabel);\r\n }\r\n else {\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.hide)(data.detailsLabel);\r\n }\r\n if ((0,_suggestWidgetDetails_js__WEBPACK_IMPORTED_MODULE_13__.canExpandCompletionItem)(element)) {\r\n data.right.classList.add('can-expand-details');\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.show)(data.readMore);\r\n data.readMore.onmousedown = e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n };\r\n data.readMore.onclick = e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this._onDidToggleDetails.fire();\r\n };\r\n }\r\n else {\r\n data.right.classList.remove('can-expand-details');\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_3__.hide)(data.readMore);\r\n data.readMore.onmousedown = null;\r\n data.readMore.onclick = null;\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n templateData.disposables.dispose();\r\n }\r\n};\r\nItemRenderer = __decorate([\r\n __param(1, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_9__.IModelService),\r\n __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__.IModeService),\r\n __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.IThemeService)\r\n], ItemRenderer);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetRenderer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetStatus.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetStatus.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SuggestWidgetStatus\": () => (/* binding */ SuggestWidgetStatus)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./suggest.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/actions/browser/menuEntryActionViewItem.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass StatusBarViewItem extends _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_5__.MenuEntryActionViewItem {\r\n updateLabel() {\r\n const kb = this._keybindingService.lookupKeybinding(this._action.id);\r\n if (!kb) {\r\n return super.updateLabel();\r\n }\r\n if (this.label) {\r\n this.label.textContent = (0,_nls_js__WEBPACK_IMPORTED_MODULE_4__.localize)('ddd', '{0} ({1})', this._action.label, StatusBarViewItem.symbolPrintEnter(kb));\r\n }\r\n }\r\n static symbolPrintEnter(kb) {\r\n var _a;\r\n return (_a = kb.getLabel()) === null || _a === void 0 ? void 0 : _a.replace(/\\benter\\b/gi, '\\u23CE');\r\n }\r\n}\r\nlet SuggestWidgetStatus = class SuggestWidgetStatus {\r\n constructor(container, instantiationService, _menuService, _contextKeyService) {\r\n this._menuService = _menuService;\r\n this._contextKeyService = _contextKeyService;\r\n this._menuDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this.element = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.append(container, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.$('.suggest-status-bar'));\r\n const actionViewItemProvider = (action => {\r\n return action instanceof _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuItemAction ? instantiationService.createInstance(StatusBarViewItem, action) : undefined;\r\n });\r\n this._leftActions = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_1__.ActionBar(this.element, { actionViewItemProvider });\r\n this._rightActions = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_1__.ActionBar(this.element, { actionViewItemProvider });\r\n this._leftActions.domNode.classList.add('left');\r\n this._rightActions.domNode.classList.add('right');\r\n }\r\n dispose() {\r\n this._menuDisposables.dispose();\r\n this.element.remove();\r\n }\r\n show() {\r\n const menu = this._menuService.createMenu(_suggest_js__WEBPACK_IMPORTED_MODULE_3__.suggestWidgetStatusbarMenu, this._contextKeyService);\r\n const renderMenu = () => {\r\n const left = [];\r\n const right = [];\r\n for (let [group, actions] of menu.getActions()) {\r\n if (group === 'left') {\r\n left.push(...actions);\r\n }\r\n else {\r\n right.push(...actions);\r\n }\r\n }\r\n this._leftActions.clear();\r\n this._leftActions.push(left);\r\n this._rightActions.clear();\r\n this._rightActions.push(right);\r\n };\r\n this._menuDisposables.add(menu.onDidChange(() => renderMenu()));\r\n this._menuDisposables.add(menu);\r\n }\r\n hide() {\r\n this._menuDisposables.clear();\r\n }\r\n};\r\nSuggestWidgetStatus = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__.IInstantiationService),\r\n __param(2, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__.IMenuService),\r\n __param(3, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.IContextKeyService)\r\n], SuggestWidgetStatus);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidgetStatus.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WordContextKey\": () => (/* binding */ WordContextKey)\n/* harmony export */ });\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\nlet WordContextKey = class WordContextKey {\r\n constructor(_editor, contextKeyService) {\r\n this._editor = _editor;\r\n this._enabled = false;\r\n this._ckAtEnd = WordContextKey.AtEnd.bindTo(contextKeyService);\r\n this._configListener = this._editor.onDidChangeConfiguration(e => e.hasChanged(106 /* tabCompletion */) && this._update());\r\n this._update();\r\n }\r\n dispose() {\r\n var _a;\r\n this._configListener.dispose();\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._ckAtEnd.reset();\r\n }\r\n _update() {\r\n // only update this when tab completions are enabled\r\n const enabled = this._editor.getOption(106 /* tabCompletion */) === 'on';\r\n if (this._enabled === enabled) {\r\n return;\r\n }\r\n this._enabled = enabled;\r\n if (this._enabled) {\r\n const checkForWordEnd = () => {\r\n if (!this._editor.hasModel()) {\r\n this._ckAtEnd.set(false);\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const selection = this._editor.getSelection();\r\n const word = model.getWordAtPosition(selection.getStartPosition());\r\n if (!word) {\r\n this._ckAtEnd.set(false);\r\n return;\r\n }\r\n this._ckAtEnd.set(word.endColumn === selection.getStartPosition().column);\r\n };\r\n this._selectionListener = this._editor.onDidChangeCursorSelection(checkForWordEnd);\r\n checkForWordEnd();\r\n }\r\n else if (this._selectionListener) {\r\n this._ckAtEnd.reset();\r\n this._selectionListener.dispose();\r\n this._selectionListener = undefined;\r\n }\r\n }\r\n};\r\nWordContextKey.AtEnd = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.RawContextKey('atEndOfWord', false);\r\nWordContextKey = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService)\r\n], WordContextKey);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WordDistance\": () => (/* binding */ WordDistance)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _smartSelect_bracketSelections_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../smartSelect/bracketSelections.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\nclass WordDistance {\r\n static create(service, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.getOption(101 /* suggest */).localityBonus) {\r\n return WordDistance.None;\r\n }\r\n if (!editor.hasModel()) {\r\n return WordDistance.None;\r\n }\r\n const model = editor.getModel();\r\n const position = editor.getPosition();\r\n if (!service.canComputeWordRanges(model.uri)) {\r\n return WordDistance.None;\r\n }\r\n const [ranges] = yield new _smartSelect_bracketSelections_js__WEBPACK_IMPORTED_MODULE_2__.BracketSelectionRangeProvider().provideSelectionRanges(model, [position]);\r\n if (ranges.length === 0) {\r\n return WordDistance.None;\r\n }\r\n const wordRanges = yield service.computeWordRanges(model.uri, ranges[0].range);\r\n if (!wordRanges) {\r\n return WordDistance.None;\r\n }\r\n // remove current word\r\n const wordUntilPos = model.getWordUntilPosition(position);\r\n delete wordRanges[wordUntilPos.word];\r\n return new class extends WordDistance {\r\n distance(anchor, suggestion) {\r\n if (!position.equals(editor.getPosition())) {\r\n return 0;\r\n }\r\n if (suggestion.kind === 17 /* Keyword */) {\r\n return 2 << 20;\r\n }\r\n let word = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n let wordLines = wordRanges[word];\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isFalsyOrEmpty)(wordLines)) {\r\n return 2 << 20;\r\n }\r\n let idx = (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.binarySearch)(wordLines, _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.fromPositions(anchor), _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.compareRangesUsingStarts);\r\n let bestWordRange = idx >= 0 ? wordLines[idx] : wordLines[Math.max(0, ~idx - 1)];\r\n let blockDistance = ranges.length;\r\n for (const range of ranges) {\r\n if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.containsRange(range.range, bestWordRange)) {\r\n break;\r\n }\r\n blockDistance -= 1;\r\n }\r\n return blockDistance;\r\n }\r\n };\r\n });\r\n }\r\n}\r\nWordDistance.None = new class extends WordDistance {\r\n distance() { return 0; }\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/symbolIcons.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/symbolIcons.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SYMBOL_ICON_ARRAY_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_ARRAY_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_BOOLEAN_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_BOOLEAN_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_CLASS_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_CLASS_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_COLOR_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_COLOR_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_CONSTANT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_CONSTANT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_CONSTRUCTOR_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_CONSTRUCTOR_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_ENUMERATOR_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_ENUMERATOR_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_EVENT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_EVENT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_FIELD_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_FIELD_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_FILE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_FILE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_FOLDER_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_FOLDER_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_FUNCTION_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_FUNCTION_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_INTERFACE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_INTERFACE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_KEY_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_KEY_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_KEYWORD_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_KEYWORD_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_METHOD_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_METHOD_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_MODULE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_MODULE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_NAMESPACE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_NAMESPACE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_NULL_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_NULL_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_NUMBER_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_NUMBER_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_OBJECT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_OBJECT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_OPERATOR_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_OPERATOR_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_PACKAGE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_PACKAGE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_PROPERTY_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_PROPERTY_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_REFERENCE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_REFERENCE_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_SNIPPET_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_SNIPPET_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_STRING_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_STRING_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_STRUCT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_STRUCT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_TEXT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_TEXT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_TYPEPARAMETER_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_TYPEPARAMETER_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_UNIT_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_UNIT_FOREGROUND),\n/* harmony export */ \"SYMBOL_ICON_VARIABLE_FOREGROUND\": () => (/* binding */ SYMBOL_ICON_VARIABLE_FOREGROUND)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nconst SYMBOL_ICON_ARRAY_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.arrayForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.arrayForeground', 'The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_BOOLEAN_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.booleanForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.booleanForeground', 'The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_CLASS_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.classForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.classForeground', 'The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_COLOR_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.colorForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.colorForeground', 'The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_CONSTANT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.constantForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.constantForeground', 'The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_CONSTRUCTOR_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.constructorForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.constructorForeground', 'The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_ENUMERATOR_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.enumeratorForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.enumeratorForeground', 'The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.enumeratorMemberForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.enumeratorMemberForeground', 'The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_EVENT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.eventForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.eventForeground', 'The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_FIELD_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.fieldForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.fieldForeground', 'The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_FILE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.fileForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.fileForeground', 'The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_FOLDER_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.folderForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.folderForeground', 'The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_FUNCTION_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.functionForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.functionForeground', 'The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_INTERFACE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.interfaceForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.interfaceForeground', 'The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_KEY_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.keyForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.keyForeground', 'The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_KEYWORD_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.keywordForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.keywordForeground', 'The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_METHOD_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.methodForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.methodForeground', 'The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_MODULE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.moduleForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.moduleForeground', 'The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_NAMESPACE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.namespaceForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.namespaceForeground', 'The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_NULL_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.nullForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.nullForeground', 'The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_NUMBER_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.numberForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.numberForeground', 'The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_OBJECT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.objectForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.objectForeground', 'The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_OPERATOR_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.operatorForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.operatorForeground', 'The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_PACKAGE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.packageForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.packageForeground', 'The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_PROPERTY_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.propertyForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.propertyForeground', 'The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_REFERENCE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.referenceForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.referenceForeground', 'The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_SNIPPET_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.snippetForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.snippetForeground', 'The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_STRING_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.stringForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.stringForeground', 'The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_STRUCT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.structForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.structForeground', 'The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_TEXT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.textForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.textForeground', 'The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_TYPEPARAMETER_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.typeParameterForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.typeParameterForeground', 'The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_UNIT_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.unitForeground', {\r\n dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground,\r\n hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.foreground\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.unitForeground', 'The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nconst SYMBOL_ICON_VARIABLE_FOREGROUND = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.registerColor)('symbolIcon.variableForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('symbolIcon.variableForeground', 'The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__.registerThemingParticipant)((theme, collector) => {\r\n const symbolIconArrayColor = theme.getColor(SYMBOL_ICON_ARRAY_FOREGROUND);\r\n if (symbolIconArrayColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolArray.cssSelector} { color: ${symbolIconArrayColor}; }`);\r\n }\r\n const symbolIconBooleanColor = theme.getColor(SYMBOL_ICON_BOOLEAN_FOREGROUND);\r\n if (symbolIconBooleanColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolBoolean.cssSelector} { color: ${symbolIconBooleanColor}; }`);\r\n }\r\n const symbolIconClassColor = theme.getColor(SYMBOL_ICON_CLASS_FOREGROUND);\r\n if (symbolIconClassColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolClass.cssSelector} { color: ${symbolIconClassColor}; }`);\r\n }\r\n const symbolIconMethodColor = theme.getColor(SYMBOL_ICON_METHOD_FOREGROUND);\r\n if (symbolIconMethodColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolMethod.cssSelector} { color: ${symbolIconMethodColor}; }`);\r\n }\r\n const symbolIconColorColor = theme.getColor(SYMBOL_ICON_COLOR_FOREGROUND);\r\n if (symbolIconColorColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolColor.cssSelector} { color: ${symbolIconColorColor}; }`);\r\n }\r\n const symbolIconConstantColor = theme.getColor(SYMBOL_ICON_CONSTANT_FOREGROUND);\r\n if (symbolIconConstantColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolConstant.cssSelector} { color: ${symbolIconConstantColor}; }`);\r\n }\r\n const symbolIconConstructorColor = theme.getColor(SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);\r\n if (symbolIconConstructorColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolConstructor.cssSelector} { color: ${symbolIconConstructorColor}; }`);\r\n }\r\n const symbolIconEnumeratorColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_FOREGROUND);\r\n if (symbolIconEnumeratorColor) {\r\n collector.addRule(`\n\t\t\t${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolValue.cssSelector},${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolEnum.cssSelector} { color: ${symbolIconEnumeratorColor}; }`);\r\n }\r\n const symbolIconEnumeratorMemberColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);\r\n if (symbolIconEnumeratorMemberColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolEnumMember.cssSelector} { color: ${symbolIconEnumeratorMemberColor}; }`);\r\n }\r\n const symbolIconEventColor = theme.getColor(SYMBOL_ICON_EVENT_FOREGROUND);\r\n if (symbolIconEventColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolEvent.cssSelector} { color: ${symbolIconEventColor}; }`);\r\n }\r\n const symbolIconFieldColor = theme.getColor(SYMBOL_ICON_FIELD_FOREGROUND);\r\n if (symbolIconFieldColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolField.cssSelector} { color: ${symbolIconFieldColor}; }`);\r\n }\r\n const symbolIconFileColor = theme.getColor(SYMBOL_ICON_FILE_FOREGROUND);\r\n if (symbolIconFileColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolFile.cssSelector} { color: ${symbolIconFileColor}; }`);\r\n }\r\n const symbolIconFolderColor = theme.getColor(SYMBOL_ICON_FOLDER_FOREGROUND);\r\n if (symbolIconFolderColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolFolder.cssSelector} { color: ${symbolIconFolderColor}; }`);\r\n }\r\n const symbolIconFunctionColor = theme.getColor(SYMBOL_ICON_FUNCTION_FOREGROUND);\r\n if (symbolIconFunctionColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolFunction.cssSelector} { color: ${symbolIconFunctionColor}; }`);\r\n }\r\n const symbolIconInterfaceColor = theme.getColor(SYMBOL_ICON_INTERFACE_FOREGROUND);\r\n if (symbolIconInterfaceColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolInterface.cssSelector} { color: ${symbolIconInterfaceColor}; }`);\r\n }\r\n const symbolIconKeyColor = theme.getColor(SYMBOL_ICON_KEY_FOREGROUND);\r\n if (symbolIconKeyColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolKey.cssSelector} { color: ${symbolIconKeyColor}; }`);\r\n }\r\n const symbolIconKeywordColor = theme.getColor(SYMBOL_ICON_KEYWORD_FOREGROUND);\r\n if (symbolIconKeywordColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolKeyword.cssSelector} { color: ${symbolIconKeywordColor}; }`);\r\n }\r\n const symbolIconModuleColor = theme.getColor(SYMBOL_ICON_MODULE_FOREGROUND);\r\n if (symbolIconModuleColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolModule.cssSelector} { color: ${symbolIconModuleColor}; }`);\r\n }\r\n const outlineNamespaceColor = theme.getColor(SYMBOL_ICON_NAMESPACE_FOREGROUND);\r\n if (outlineNamespaceColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolNamespace.cssSelector} { color: ${outlineNamespaceColor}; }`);\r\n }\r\n const symbolIconNullColor = theme.getColor(SYMBOL_ICON_NULL_FOREGROUND);\r\n if (symbolIconNullColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolNull.cssSelector} { color: ${symbolIconNullColor}; }`);\r\n }\r\n const symbolIconNumberColor = theme.getColor(SYMBOL_ICON_NUMBER_FOREGROUND);\r\n if (symbolIconNumberColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolNumber.cssSelector} { color: ${symbolIconNumberColor}; }`);\r\n }\r\n const symbolIconObjectColor = theme.getColor(SYMBOL_ICON_OBJECT_FOREGROUND);\r\n if (symbolIconObjectColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolObject.cssSelector} { color: ${symbolIconObjectColor}; }`);\r\n }\r\n const symbolIconOperatorColor = theme.getColor(SYMBOL_ICON_OPERATOR_FOREGROUND);\r\n if (symbolIconOperatorColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolOperator.cssSelector} { color: ${symbolIconOperatorColor}; }`);\r\n }\r\n const symbolIconPackageColor = theme.getColor(SYMBOL_ICON_PACKAGE_FOREGROUND);\r\n if (symbolIconPackageColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolPackage.cssSelector} { color: ${symbolIconPackageColor}; }`);\r\n }\r\n const symbolIconPropertyColor = theme.getColor(SYMBOL_ICON_PROPERTY_FOREGROUND);\r\n if (symbolIconPropertyColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolProperty.cssSelector} { color: ${symbolIconPropertyColor}; }`);\r\n }\r\n const symbolIconReferenceColor = theme.getColor(SYMBOL_ICON_REFERENCE_FOREGROUND);\r\n if (symbolIconReferenceColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolReference.cssSelector} { color: ${symbolIconReferenceColor}; }`);\r\n }\r\n const symbolIconSnippetColor = theme.getColor(SYMBOL_ICON_SNIPPET_FOREGROUND);\r\n if (symbolIconSnippetColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolSnippet.cssSelector} { color: ${symbolIconSnippetColor}; }`);\r\n }\r\n const symbolIconStringColor = theme.getColor(SYMBOL_ICON_STRING_FOREGROUND);\r\n if (symbolIconStringColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolString.cssSelector} { color: ${symbolIconStringColor}; }`);\r\n }\r\n const symbolIconStructColor = theme.getColor(SYMBOL_ICON_STRUCT_FOREGROUND);\r\n if (symbolIconStructColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolStruct.cssSelector} { color: ${symbolIconStructColor}; }`);\r\n }\r\n const symbolIconTextColor = theme.getColor(SYMBOL_ICON_TEXT_FOREGROUND);\r\n if (symbolIconTextColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolText.cssSelector} { color: ${symbolIconTextColor}; }`);\r\n }\r\n const symbolIconTypeParameterColor = theme.getColor(SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);\r\n if (symbolIconTypeParameterColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolTypeParameter.cssSelector} { color: ${symbolIconTypeParameterColor}; }`);\r\n }\r\n const symbolIconUnitColor = theme.getColor(SYMBOL_ICON_UNIT_FOREGROUND);\r\n if (symbolIconUnitColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolUnit.cssSelector} { color: ${symbolIconUnitColor}; }`);\r\n }\r\n const symbolIconVariableColor = theme.getColor(SYMBOL_ICON_VARIABLE_FOREGROUND);\r\n if (symbolIconVariableColor) {\r\n collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.symbolVariable.cssSelector} { color: ${symbolIconVariableColor}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/symbolIcons.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ToggleTabFocusModeAction\": () => (/* binding */ ToggleTabFocusModeAction)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/config/commonEditorConfig.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass ToggleTabFocusModeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.EditorAction {\r\n constructor() {\r\n super({\r\n id: ToggleTabFocusModeAction.ID,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'toggle.tabMovesFocus', comment: ['Turn on/off use of tab key for moving focus around VS Code'] }, \"Toggle Tab Key Moves Focus\"),\r\n alias: 'Toggle Tab Key Moves Focus',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 43 /* KEY_M */,\r\n mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 43 /* KEY_M */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const oldValue = _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__.TabFocus.getTabFocusMode();\r\n const newValue = !oldValue;\r\n _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__.TabFocus.setTabFocusMode(newValue);\r\n if (newValue) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('toggle.tabMovesFocus.on', \"Pressing Tab will now move focus to the next focusable element\"));\r\n }\r\n else {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__.alert)(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('toggle.tabMovesFocus.off', \"Pressing Tab will now insert the tab character\"));\r\n }\r\n }\r\n}\r\nToggleTabFocusModeAction.ID = 'editor.action.toggleTabFocusMode';\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorAction)(ToggleTabFocusModeAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ \"./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass ForceRetokenizeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.forceRetokenize',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('forceRetokenize', \"Developer: Force Retokenize\"),\r\n alias: 'Developer: Force Retokenize',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n model.resetTokenization();\r\n const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_2__.StopWatch(true);\r\n model.forceTokenization(model.getLineCount());\r\n sw.stop();\r\n console.log(`tokenization took ${sw.elapsed()}`);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(ForceRetokenizeAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js":
|
||
/*!***********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js ***!
|
||
\***********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/dialogs/common/dialogs.js */ \"./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\nconst ignoreUnusualLineTerminators = 'ignoreUnusualLineTerminators';\r\nfunction writeIgnoreState(codeEditorService, model, state) {\r\n codeEditorService.setModelProperty(model.uri, ignoreUnusualLineTerminators, state);\r\n}\r\nfunction readIgnoreState(codeEditorService, model) {\r\n return codeEditorService.getModelProperty(model.uri, ignoreUnusualLineTerminators);\r\n}\r\nlet UnusualLineTerminatorsDetector = class UnusualLineTerminatorsDetector extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(_editor, _dialogService, _codeEditorService) {\r\n super();\r\n this._editor = _editor;\r\n this._dialogService = _dialogService;\r\n this._codeEditorService = _codeEditorService;\r\n this._config = this._editor.getOption(108 /* unusualLineTerminators */);\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(108 /* unusualLineTerminators */)) {\r\n this._config = this._editor.getOption(108 /* unusualLineTerminators */);\r\n this._checkForUnusualLineTerminators();\r\n }\r\n }));\r\n this._register(this._editor.onDidChangeModel(() => {\r\n this._checkForUnusualLineTerminators();\r\n }));\r\n this._register(this._editor.onDidChangeModelContent((e) => {\r\n if (e.isUndoing) {\r\n // skip checking in case of undoing\r\n return;\r\n }\r\n this._checkForUnusualLineTerminators();\r\n }));\r\n }\r\n _checkForUnusualLineTerminators() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._config === 'off') {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model.mightContainUnusualLineTerminators()) {\r\n return;\r\n }\r\n const ignoreState = readIgnoreState(this._codeEditorService, model);\r\n if (ignoreState === true) {\r\n // this model should be ignored\r\n return;\r\n }\r\n if (this._editor.getOption(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return;\r\n }\r\n if (this._config === 'auto') {\r\n // just do it!\r\n model.removeUnusualLineTerminators(this._editor.getSelections());\r\n return;\r\n }\r\n const result = yield this._dialogService.confirm({\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.title', \"Unusual Line Terminators\"),\r\n message: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.message', \"Detected unusual line terminators\"),\r\n detail: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.detail', \"This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\\n\\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\"),\r\n primaryButton: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.fix', \"Fix this file\"),\r\n secondaryButton: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('unusualLineTerminators.ignore', \"Ignore problem for this file\")\r\n });\r\n if (!result.confirmed) {\r\n // this model should be ignored\r\n writeIgnoreState(this._codeEditorService, model, true);\r\n return;\r\n }\r\n model.removeUnusualLineTerminators(this._editor.getSelections());\r\n });\r\n }\r\n};\r\nUnusualLineTerminatorsDetector.ID = 'editor.contrib.unusualLineTerminatorsDetector';\r\nUnusualLineTerminatorsDetector = __decorate([\r\n __param(1, _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__.IDialogService),\r\n __param(2, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__.ICodeEditorService)\r\n], UnusualLineTerminatorsDetector);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorContribution)(UnusualLineTerminatorsDetector.ID, UnusualLineTerminatorsDetector);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js":
|
||
/*!***********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js ***!
|
||
\***********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _common_services_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/semanticTokensProviderStyling.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modelServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js\");\n/* harmony import */ var _common_services_getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/services/getSemanticTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/getSemanticTokens.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet ViewportSemanticTokensContribution = class ViewportSemanticTokensContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(editor, _modelService, _themeService, _configurationService) {\r\n super();\r\n this._modelService = _modelService;\r\n this._themeService = _themeService;\r\n this._configurationService = _configurationService;\r\n this._editor = editor;\r\n this._tokenizeViewport = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._tokenizeViewportNow(), 100);\r\n this._outstandingRequests = [];\r\n this._register(this._editor.onDidScrollChange(() => {\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._editor.onDidChangeModel(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._editor.onDidChangeModelContent((e) => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentRangeSemanticTokensProviderRegistry.onDidChange(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(_common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__.SEMANTIC_HIGHLIGHTING_SETTING_ID)) {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }\r\n }));\r\n this._register(this._themeService.onDidColorThemeChange(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n }\r\n _cancelAll() {\r\n for (const request of this._outstandingRequests) {\r\n request.cancel();\r\n }\r\n this._outstandingRequests = [];\r\n }\r\n _removeOutstandingRequest(req) {\r\n for (let i = 0, len = this._outstandingRequests.length; i < len; i++) {\r\n if (this._outstandingRequests[i] === req) {\r\n this._outstandingRequests.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n _tokenizeViewportNow() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (model.hasCompleteSemanticTokens()) {\r\n return;\r\n }\r\n if (!(0,_common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__.isSemanticColoringEnabled)(model, this._themeService, this._configurationService)) {\r\n if (model.hasSomeSemanticTokens()) {\r\n model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const provider = (0,_common_services_getSemanticTokens_js__WEBPACK_IMPORTED_MODULE_9__.getDocumentRangeSemanticTokensProvider)(model);\r\n if (!provider) {\r\n if (model.hasSomeSemanticTokens()) {\r\n model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const styling = this._modelService.getSemanticTokensProviderStyling(provider);\r\n const visibleRanges = this._editor.getVisibleRangesPlusViewportAboveBelow();\r\n this._outstandingRequests = this._outstandingRequests.concat(visibleRanges.map(range => this._requestRange(model, range, provider, styling)));\r\n }\r\n _requestRange(model, range, provider, styling) {\r\n const requestVersionId = model.getVersionId();\r\n const request = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.createCancelablePromise)(token => Promise.resolve(provider.provideDocumentRangeSemanticTokens(model, range, token)));\r\n request.then((r) => {\r\n if (!r || model.isDisposed() || model.getVersionId() !== requestVersionId) {\r\n return;\r\n }\r\n model.setPartialSemanticTokens(range, (0,_common_services_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_5__.toMultilineTokens2)(r, styling, model.getLanguageIdentifier()));\r\n }).then(() => this._removeOutstandingRequest(request), () => this._removeOutstandingRequest(request));\r\n return request;\r\n }\r\n};\r\nViewportSemanticTokensContribution.ID = 'editor.contrib.viewportSemanticTokens';\r\nViewportSemanticTokensContribution = __decorate([\r\n __param(1, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__.IModelService),\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__.IThemeService),\r\n __param(3, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__.IConfigurationService)\r\n], ViewportSemanticTokensContribution);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__.registerEditorContribution)(ViewportSemanticTokensContribution.ID, ViewportSemanticTokensContribution);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getOccurrencesAtPosition\": () => (/* binding */ getOccurrencesAtPosition)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst editorWordHighlight = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorWordHighlightStrong = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorWordHighlightBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editor.wordHighlightBorder', { light: null, dark: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlightBorder', 'Border color of a symbol during read-access, like reading a variable.'));\r\nconst editorWordHighlightStrongBorder = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editor.wordHighlightStrongBorder', { light: null, dark: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlightStrongBorder', 'Border color of a symbol during write-access, like writing to a variable.'));\r\nconst overviewRulerWordHighlightForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editorOverviewRuler.wordHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRulerWordHighlightForeground', 'Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst overviewRulerWordHighlightStrongForeground = (0,_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.registerColor)('editorOverviewRuler.wordHighlightStrongForeground', { dark: '#C0A0C0CC', light: '#C0A0C0CC', hc: '#C0A0C0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overviewRulerWordHighlightStrongForeground', 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst ctxHasWordHighlights = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.RawContextKey('hasWordHighlights', false);\r\nfunction getOccurrencesAtPosition(model, position, token) {\r\n const orderedByScore = _common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightProviderRegistry.ordered(model);\r\n // in order of score ask the occurrences provider\r\n // until someone response with a good result\r\n // (good = none empty array)\r\n return (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.first)(orderedByScore.map(provider => () => {\r\n return Promise.resolve(provider.provideDocumentHighlights(model, position, token))\r\n .then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedExternalError);\r\n }), _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.isNonEmptyArray);\r\n}\r\nclass OccurenceAtPositionRequest {\r\n constructor(model, selection, wordSeparators) {\r\n this._wordRange = this._getCurrentWordRange(model, selection);\r\n this.result = (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.createCancelablePromise)(token => this._compute(model, selection, wordSeparators, token));\r\n }\r\n _getCurrentWordRange(model, selection) {\r\n const word = model.getWordAtPosition(selection.getPosition());\r\n if (word) {\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn);\r\n }\r\n return null;\r\n }\r\n isValid(model, selection, decorationIds) {\r\n const lineNumber = selection.startLineNumber;\r\n const startColumn = selection.startColumn;\r\n const endColumn = selection.endColumn;\r\n const currentWordRange = this._getCurrentWordRange(model, selection);\r\n let requestIsValid = Boolean(this._wordRange && this._wordRange.equalsRange(currentWordRange));\r\n // Even if we are on a different word, if that word is in the decorations ranges, the request is still valid\r\n // (Same symbol)\r\n for (let i = 0, len = decorationIds.length; !requestIsValid && i < len; i++) {\r\n let range = model.getDecorationRange(decorationIds[i]);\r\n if (range && range.startLineNumber === lineNumber) {\r\n if (range.startColumn <= startColumn && range.endColumn >= endColumn) {\r\n requestIsValid = true;\r\n }\r\n }\r\n }\r\n return requestIsValid;\r\n }\r\n cancel() {\r\n this.result.cancel();\r\n }\r\n}\r\nclass SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest {\r\n _compute(model, selection, wordSeparators, token) {\r\n return getOccurrencesAtPosition(model, selection.getPosition(), token).then(value => value || []);\r\n }\r\n}\r\nclass TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest {\r\n constructor(model, selection, wordSeparators) {\r\n super(model, selection, wordSeparators);\r\n this._selectionIsEmpty = selection.isEmpty();\r\n }\r\n _compute(model, selection, wordSeparators, token) {\r\n return (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.timeout)(250, token).then(() => {\r\n if (!selection.isEmpty()) {\r\n return [];\r\n }\r\n const word = model.getWordAtPosition(selection.getPosition());\r\n if (!word || word.word.length > 1000) {\r\n return [];\r\n }\r\n const matches = model.findMatches(word.word, true, false, true, wordSeparators, false);\r\n return matches.map(m => {\r\n return {\r\n range: m.range,\r\n kind: _common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightKind.Text\r\n };\r\n });\r\n });\r\n }\r\n isValid(model, selection, decorationIds) {\r\n const currentSelectionIsEmpty = selection.isEmpty();\r\n if (this._selectionIsEmpty !== currentSelectionIsEmpty) {\r\n return false;\r\n }\r\n return super.isValid(model, selection, decorationIds);\r\n }\r\n}\r\nfunction computeOccurencesAtPosition(model, selection, wordSeparators) {\r\n if (_common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightProviderRegistry.has(model)) {\r\n return new SemanticOccurenceAtPositionRequest(model, selection, wordSeparators);\r\n }\r\n return new TextualOccurenceAtPositionRequest(model, selection, wordSeparators);\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerModelAndPositionCommand)('_executeDocumentHighlights', (model, position) => getOccurrencesAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__.CancellationToken.None));\r\nclass WordHighlighter {\r\n constructor(editor, contextKeyService) {\r\n this.toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.DisposableStore();\r\n this.workerRequestTokenId = 0;\r\n this.workerRequestCompleted = false;\r\n this.workerRequestValue = [];\r\n this.lastCursorPositionChangeTime = 0;\r\n this.renderDecorationsTimer = -1;\r\n this.editor = editor;\r\n this._hasWordHighlights = ctxHasWordHighlights.bindTo(contextKeyService);\r\n this._ignorePositionChangeEvent = false;\r\n this.occurrencesHighlight = this.editor.getOption(66 /* occurrencesHighlight */);\r\n this.model = this.editor.getModel();\r\n this.toUnhook.add(editor.onDidChangeCursorPosition((e) => {\r\n if (this._ignorePositionChangeEvent) {\r\n // We are changing the position => ignore this event\r\n return;\r\n }\r\n if (!this.occurrencesHighlight) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n this._onPositionChanged(e);\r\n }));\r\n this.toUnhook.add(editor.onDidChangeModelContent((e) => {\r\n this._stopAll();\r\n }));\r\n this.toUnhook.add(editor.onDidChangeConfiguration((e) => {\r\n let newValue = this.editor.getOption(66 /* occurrencesHighlight */);\r\n if (this.occurrencesHighlight !== newValue) {\r\n this.occurrencesHighlight = newValue;\r\n this._stopAll();\r\n }\r\n }));\r\n this._decorationIds = [];\r\n this.workerRequestTokenId = 0;\r\n this.workerRequest = null;\r\n this.workerRequestCompleted = false;\r\n this.lastCursorPositionChangeTime = 0;\r\n this.renderDecorationsTimer = -1;\r\n }\r\n hasDecorations() {\r\n return (this._decorationIds.length > 0);\r\n }\r\n restore() {\r\n if (!this.occurrencesHighlight) {\r\n return;\r\n }\r\n this._run();\r\n }\r\n _getSortedHighlights() {\r\n return _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.coalesce(this._decorationIds\r\n .map((id) => this.model.getDecorationRange(id))\r\n .sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.compareRangesUsingStarts));\r\n }\r\n moveNext() {\r\n let highlights = this._getSortedHighlights();\r\n let index = highlights.findIndex((range) => range.containsPosition(this.editor.getPosition()));\r\n let newIndex = ((index + 1) % highlights.length);\r\n let dest = highlights[newIndex];\r\n try {\r\n this._ignorePositionChangeEvent = true;\r\n this.editor.setPosition(dest.getStartPosition());\r\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\r\n const word = this._getWord();\r\n if (word) {\r\n const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__.alert)(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);\r\n }\r\n }\r\n finally {\r\n this._ignorePositionChangeEvent = false;\r\n }\r\n }\r\n moveBack() {\r\n let highlights = this._getSortedHighlights();\r\n let index = highlights.findIndex((range) => range.containsPosition(this.editor.getPosition()));\r\n let newIndex = ((index - 1 + highlights.length) % highlights.length);\r\n let dest = highlights[newIndex];\r\n try {\r\n this._ignorePositionChangeEvent = true;\r\n this.editor.setPosition(dest.getStartPosition());\r\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\r\n const word = this._getWord();\r\n if (word) {\r\n const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__.alert)(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);\r\n }\r\n }\r\n finally {\r\n this._ignorePositionChangeEvent = false;\r\n }\r\n }\r\n _removeDecorations() {\r\n if (this._decorationIds.length > 0) {\r\n // remove decorations\r\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []);\r\n this._hasWordHighlights.set(false);\r\n }\r\n }\r\n _stopAll() {\r\n // Remove any existing decorations\r\n this._removeDecorations();\r\n // Cancel any renderDecorationsTimer\r\n if (this.renderDecorationsTimer !== -1) {\r\n clearTimeout(this.renderDecorationsTimer);\r\n this.renderDecorationsTimer = -1;\r\n }\r\n // Cancel any worker request\r\n if (this.workerRequest !== null) {\r\n this.workerRequest.cancel();\r\n this.workerRequest = null;\r\n }\r\n // Invalidate any worker request callback\r\n if (!this.workerRequestCompleted) {\r\n this.workerRequestTokenId++;\r\n this.workerRequestCompleted = true;\r\n }\r\n }\r\n _onPositionChanged(e) {\r\n // disabled\r\n if (!this.occurrencesHighlight) {\r\n this._stopAll();\r\n return;\r\n }\r\n // ignore typing & other\r\n if (e.reason !== 3 /* Explicit */) {\r\n this._stopAll();\r\n return;\r\n }\r\n this._run();\r\n }\r\n _getWord() {\r\n let editorSelection = this.editor.getSelection();\r\n let lineNumber = editorSelection.startLineNumber;\r\n let startColumn = editorSelection.startColumn;\r\n return this.model.getWordAtPosition({\r\n lineNumber: lineNumber,\r\n column: startColumn\r\n });\r\n }\r\n _run() {\r\n let editorSelection = this.editor.getSelection();\r\n // ignore multiline selection\r\n if (editorSelection.startLineNumber !== editorSelection.endLineNumber) {\r\n this._stopAll();\r\n return;\r\n }\r\n let startColumn = editorSelection.startColumn;\r\n let endColumn = editorSelection.endColumn;\r\n const word = this._getWord();\r\n // The selection must be inside a word or surround one word at most\r\n if (!word || word.startColumn > startColumn || word.endColumn < endColumn) {\r\n this._stopAll();\r\n return;\r\n }\r\n // All the effort below is trying to achieve this:\r\n // - when cursor is moved to a word, trigger immediately a findOccurrences request\r\n // - 250ms later after the last cursor move event, render the occurrences\r\n // - no flickering!\r\n const workerRequestIsValid = (this.workerRequest && this.workerRequest.isValid(this.model, editorSelection, this._decorationIds));\r\n // There are 4 cases:\r\n // a) old workerRequest is valid & completed, renderDecorationsTimer fired\r\n // b) old workerRequest is valid & completed, renderDecorationsTimer not fired\r\n // c) old workerRequest is valid, but not completed\r\n // d) old workerRequest is not valid\r\n // For a) no action is needed\r\n // For c), member 'lastCursorPositionChangeTime' will be used when installing the timer so no action is needed\r\n this.lastCursorPositionChangeTime = (new Date()).getTime();\r\n if (workerRequestIsValid) {\r\n if (this.workerRequestCompleted && this.renderDecorationsTimer !== -1) {\r\n // case b)\r\n // Delay the firing of renderDecorationsTimer by an extra 250 ms\r\n clearTimeout(this.renderDecorationsTimer);\r\n this.renderDecorationsTimer = -1;\r\n this._beginRenderDecorations();\r\n }\r\n }\r\n else {\r\n // case d)\r\n // Stop all previous actions and start fresh\r\n this._stopAll();\r\n let myRequestId = ++this.workerRequestTokenId;\r\n this.workerRequestCompleted = false;\r\n this.workerRequest = computeOccurencesAtPosition(this.model, this.editor.getSelection(), this.editor.getOption(110 /* wordSeparators */));\r\n this.workerRequest.result.then(data => {\r\n if (myRequestId === this.workerRequestTokenId) {\r\n this.workerRequestCompleted = true;\r\n this.workerRequestValue = data || [];\r\n this._beginRenderDecorations();\r\n }\r\n }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__.onUnexpectedError);\r\n }\r\n }\r\n _beginRenderDecorations() {\r\n let currentTime = (new Date()).getTime();\r\n let minimumRenderTime = this.lastCursorPositionChangeTime + 250;\r\n if (currentTime >= minimumRenderTime) {\r\n // Synchronous\r\n this.renderDecorationsTimer = -1;\r\n this.renderDecorations();\r\n }\r\n else {\r\n // Asynchronous\r\n this.renderDecorationsTimer = setTimeout(() => {\r\n this.renderDecorations();\r\n }, (minimumRenderTime - currentTime));\r\n }\r\n }\r\n renderDecorations() {\r\n this.renderDecorationsTimer = -1;\r\n let decorations = [];\r\n for (const info of this.workerRequestValue) {\r\n if (info.range) {\r\n decorations.push({\r\n range: info.range,\r\n options: WordHighlighter._getDecorationOptions(info.kind)\r\n });\r\n }\r\n }\r\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations);\r\n this._hasWordHighlights.set(this.hasDecorations());\r\n }\r\n static _getDecorationOptions(kind) {\r\n if (kind === _common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightKind.Write) {\r\n return this._WRITE_OPTIONS;\r\n }\r\n else if (kind === _common_modes_js__WEBPACK_IMPORTED_MODULE_11__.DocumentHighlightKind.Text) {\r\n return this._TEXT_OPTIONS;\r\n }\r\n else {\r\n return this._REGULAR_OPTIONS;\r\n }\r\n }\r\n dispose() {\r\n this._stopAll();\r\n this.toUnhook.dispose();\r\n }\r\n}\r\nWordHighlighter._WRITE_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'wordHighlightStrong',\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.themeColorFromId)(overviewRulerWordHighlightStrongForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center\r\n }\r\n});\r\nWordHighlighter._TEXT_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.themeColorFromId)(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.overviewRulerSelectionHighlightForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center\r\n }\r\n});\r\nWordHighlighter._REGULAR_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__.ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'wordHighlight',\r\n overviewRuler: {\r\n color: (0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.themeColorFromId)(overviewRulerWordHighlightForeground),\r\n position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__.OverviewRulerLane.Center\r\n }\r\n});\r\nlet WordHighlighterContribution = class WordHighlighterContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this.wordHighlighter = null;\r\n const createWordHighlighterIfPossible = () => {\r\n if (editor.hasModel()) {\r\n this.wordHighlighter = new WordHighlighter(editor, contextKeyService);\r\n }\r\n };\r\n this._register(editor.onDidChangeModel((e) => {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.dispose();\r\n this.wordHighlighter = null;\r\n }\r\n createWordHighlighterIfPossible();\r\n }));\r\n createWordHighlighterIfPossible();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(WordHighlighterContribution.ID);\r\n }\r\n saveViewState() {\r\n if (this.wordHighlighter && this.wordHighlighter.hasDecorations()) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n moveNext() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.moveNext();\r\n }\r\n }\r\n moveBack() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.moveBack();\r\n }\r\n }\r\n restoreViewState(state) {\r\n if (this.wordHighlighter && state) {\r\n this.wordHighlighter.restore();\r\n }\r\n }\r\n dispose() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.dispose();\r\n this.wordHighlighter = null;\r\n }\r\n super.dispose();\r\n }\r\n};\r\nWordHighlighterContribution.ID = 'editor.contrib.wordHighlighter';\r\nWordHighlighterContribution = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService)\r\n], WordHighlighterContribution);\r\nclass WordHighlightNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorAction {\r\n constructor(next, opts) {\r\n super(opts);\r\n this._isNext = next;\r\n }\r\n run(accessor, editor) {\r\n const controller = WordHighlighterContribution.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n if (this._isNext) {\r\n controller.moveNext();\r\n }\r\n else {\r\n controller.moveBack();\r\n }\r\n }\r\n}\r\nclass NextWordHighlightAction extends WordHighlightNavigationAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.wordHighlight.next',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlight.next.label', \"Go to Next Symbol Highlight\"),\r\n alias: 'Go to Next Symbol Highlight',\r\n precondition: ctxHasWordHighlights,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass PrevWordHighlightAction extends WordHighlightNavigationAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.wordHighlight.prev',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlight.previous.label', \"Go to Previous Symbol Highlight\"),\r\n alias: 'Go to Previous Symbol Highlight',\r\n precondition: ctxHasWordHighlights,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass TriggerWordHighlightAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.wordHighlight.trigger',\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('wordHighlight.trigger.label', \"Trigger Symbol Highlight\"),\r\n alias: 'Trigger Symbol Highlight',\r\n precondition: ctxHasWordHighlights.toNegated(),\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n const controller = WordHighlighterContribution.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.restoreViewState(true);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorContribution)(WordHighlighterContribution.ID, WordHighlighterContribution);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorAction)(NextWordHighlightAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorAction)(PrevWordHighlightAction);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__.registerEditorAction)(TriggerWordHighlightAction);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__.registerThemingParticipant)((theme, collector) => {\r\n const selectionHighlight = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorSelectionHighlight);\r\n if (selectionHighlight) {\r\n collector.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${selectionHighlight}; }`);\r\n collector.addRule(`.monaco-editor .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`);\r\n }\r\n const wordHighlight = theme.getColor(editorWordHighlight);\r\n if (wordHighlight) {\r\n collector.addRule(`.monaco-editor .wordHighlight { background-color: ${wordHighlight}; }`);\r\n }\r\n const wordHighlightStrong = theme.getColor(editorWordHighlightStrong);\r\n if (wordHighlightStrong) {\r\n collector.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`);\r\n }\r\n const selectionHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__.editorSelectionHighlightBorder);\r\n if (selectionHighlightBorder) {\r\n collector.addRule(`.monaco-editor .selectionHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${selectionHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const wordHighlightBorder = theme.getColor(editorWordHighlightBorder);\r\n if (wordHighlightBorder) {\r\n collector.addRule(`.monaco-editor .wordHighlight { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const wordHighlightStrongBorder = theme.getColor(editorWordHighlightStrongBorder);\r\n if (wordHighlightStrongBorder) {\r\n collector.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightStrongBorder}; box-sizing: border-box; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MoveWordCommand\": () => (/* binding */ MoveWordCommand),\n/* harmony export */ \"WordLeftCommand\": () => (/* binding */ WordLeftCommand),\n/* harmony export */ \"WordRightCommand\": () => (/* binding */ WordRightCommand),\n/* harmony export */ \"CursorWordStartLeft\": () => (/* binding */ CursorWordStartLeft),\n/* harmony export */ \"CursorWordEndLeft\": () => (/* binding */ CursorWordEndLeft),\n/* harmony export */ \"CursorWordLeft\": () => (/* binding */ CursorWordLeft),\n/* harmony export */ \"CursorWordStartLeftSelect\": () => (/* binding */ CursorWordStartLeftSelect),\n/* harmony export */ \"CursorWordEndLeftSelect\": () => (/* binding */ CursorWordEndLeftSelect),\n/* harmony export */ \"CursorWordLeftSelect\": () => (/* binding */ CursorWordLeftSelect),\n/* harmony export */ \"CursorWordAccessibilityLeft\": () => (/* binding */ CursorWordAccessibilityLeft),\n/* harmony export */ \"CursorWordAccessibilityLeftSelect\": () => (/* binding */ CursorWordAccessibilityLeftSelect),\n/* harmony export */ \"CursorWordStartRight\": () => (/* binding */ CursorWordStartRight),\n/* harmony export */ \"CursorWordEndRight\": () => (/* binding */ CursorWordEndRight),\n/* harmony export */ \"CursorWordRight\": () => (/* binding */ CursorWordRight),\n/* harmony export */ \"CursorWordStartRightSelect\": () => (/* binding */ CursorWordStartRightSelect),\n/* harmony export */ \"CursorWordEndRightSelect\": () => (/* binding */ CursorWordEndRightSelect),\n/* harmony export */ \"CursorWordRightSelect\": () => (/* binding */ CursorWordRightSelect),\n/* harmony export */ \"CursorWordAccessibilityRight\": () => (/* binding */ CursorWordAccessibilityRight),\n/* harmony export */ \"CursorWordAccessibilityRightSelect\": () => (/* binding */ CursorWordAccessibilityRightSelect),\n/* harmony export */ \"DeleteWordCommand\": () => (/* binding */ DeleteWordCommand),\n/* harmony export */ \"DeleteWordLeftCommand\": () => (/* binding */ DeleteWordLeftCommand),\n/* harmony export */ \"DeleteWordRightCommand\": () => (/* binding */ DeleteWordRightCommand),\n/* harmony export */ \"DeleteWordStartLeft\": () => (/* binding */ DeleteWordStartLeft),\n/* harmony export */ \"DeleteWordEndLeft\": () => (/* binding */ DeleteWordEndLeft),\n/* harmony export */ \"DeleteWordLeft\": () => (/* binding */ DeleteWordLeft),\n/* harmony export */ \"DeleteWordStartRight\": () => (/* binding */ DeleteWordStartRight),\n/* harmony export */ \"DeleteWordEndRight\": () => (/* binding */ DeleteWordEndRight),\n/* harmony export */ \"DeleteWordRight\": () => (/* binding */ DeleteWordRight),\n/* harmony export */ \"DeleteInsideWord\": () => (/* binding */ DeleteInsideWord)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js\");\n/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js\");\n/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js\");\n/* harmony import */ var _common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/wordCharacterClassifier.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/selection.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _platform_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkeys.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass MoveWordCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n this._wordNavigationType = opts.wordNavigationType;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = (0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const result = selections.map((sel) => {\r\n const inPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(sel.positionLineNumber, sel.positionColumn);\r\n const outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType);\r\n return this._moveTo(sel, outPosition, this._inSelectionMode);\r\n });\r\n model.pushStackElement();\r\n editor._getViewModel().setCursorStates('moveWordCommand', 3 /* Explicit */, result.map(r => _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__.CursorState.fromModelSelection(r)));\r\n if (result.length === 1) {\r\n const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__.Position(result[0].positionLineNumber, result[0].positionColumn);\r\n editor.revealPosition(pos, 0 /* Smooth */);\r\n }\r\n }\r\n _moveTo(from, to, inSelectionMode) {\r\n if (inSelectionMode) {\r\n // move just position\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__.Selection(from.selectionStartLineNumber, from.selectionStartColumn, to.lineNumber, to.column);\r\n }\r\n else {\r\n // move everything\r\n return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__.Selection(to.lineNumber, to.column, to.lineNumber, to.column);\r\n }\r\n }\r\n}\r\nclass WordLeftCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__.WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);\r\n }\r\n}\r\nclass WordRightCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__.WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\r\n }\r\n}\r\nclass CursorWordStartLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartLeft',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordEndLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndLeft',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordLeft extends WordLeftCommand {\r\n constructor() {\r\n var _a;\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 1 /* WordStartFast */,\r\n id: 'cursorWordLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, (_a = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_10__.CONTEXT_ACCESSIBILITY_MODE_ENABLED, _platform_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__.IsWindowsContext)) === null || _a === void 0 ? void 0 : _a.negate()),\r\n primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */,\r\n mac: { primary: 512 /* Alt */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass CursorWordStartLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartLeftSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordEndLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndLeftSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n var _a;\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 1 /* WordStartFast */,\r\n id: 'cursorWordLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, (_a = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_10__.CONTEXT_ACCESSIBILITY_MODE_ENABLED, _platform_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__.IsWindowsContext)) === null || _a === void 0 ? void 0 : _a.negate()),\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */,\r\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects\r\nclass CursorWordAccessibilityLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityLeft',\r\n precondition: undefined\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move((0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__.EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nclass CursorWordAccessibilityLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityLeftSelect',\r\n precondition: undefined\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move((0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__.EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nclass CursorWordStartRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartRight',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordEndRight extends WordRightCommand {\r\n constructor() {\r\n var _a;\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, (_a = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_10__.CONTEXT_ACCESSIBILITY_MODE_ENABLED, _platform_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__.IsWindowsContext)) === null || _a === void 0 ? void 0 : _a.negate()),\r\n primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */,\r\n mac: { primary: 512 /* Alt */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass CursorWordRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordRight',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordStartRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartRightSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordEndRightSelect extends WordRightCommand {\r\n constructor() {\r\n var _a;\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus, (_a = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__.ContextKeyExpr.and(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_10__.CONTEXT_ACCESSIBILITY_MODE_ENABLED, _platform_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__.IsWindowsContext)) === null || _a === void 0 ? void 0 : _a.negate()),\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */,\r\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass CursorWordRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordRightSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nclass CursorWordAccessibilityRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityRight',\r\n precondition: undefined\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move((0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__.EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nclass CursorWordAccessibilityRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityRightSelect',\r\n precondition: undefined\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move((0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__.EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nclass DeleteWordCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._whitespaceHeuristics = opts.whitespaceHeuristics;\r\n this._wordNavigationType = opts.wordNavigationType;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = (0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const autoClosingBrackets = editor.getOption(5 /* autoClosingBrackets */);\r\n const autoClosingQuotes = editor.getOption(7 /* autoClosingQuotes */);\r\n const autoClosingPairs = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_13__.LanguageConfigurationRegistry.getAutoClosingPairs(model.getLanguageIdentifier().id);\r\n const commands = selections.map((sel) => {\r\n const deleteRange = this._delete({\r\n wordSeparators,\r\n model,\r\n selection: sel,\r\n whitespaceHeuristics: this._whitespaceHeuristics,\r\n autoClosingBrackets,\r\n autoClosingQuotes,\r\n autoClosingPairs,\r\n }, this._wordNavigationType);\r\n return new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(deleteRange, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass DeleteWordLeftCommand extends DeleteWordCommand {\r\n _delete(ctx, wordNavigationType) {\r\n let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__.WordOperations.deleteWordLeft(ctx, wordNavigationType);\r\n if (r) {\r\n return r;\r\n }\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(1, 1, 1, 1);\r\n }\r\n}\r\nclass DeleteWordRightCommand extends DeleteWordCommand {\r\n _delete(ctx, wordNavigationType) {\r\n let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__.WordOperations.deleteWordRight(ctx, wordNavigationType);\r\n if (r) {\r\n return r;\r\n }\r\n const lineCount = ctx.model.getLineCount();\r\n const maxColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range(lineCount, maxColumn, lineCount, maxColumn);\r\n }\r\n}\r\nclass DeleteWordStartLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordStartLeft',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass DeleteWordEndLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordEndLeft',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass DeleteWordLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordLeft',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1 /* Backspace */,\r\n mac: { primary: 512 /* Alt */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass DeleteWordStartRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordStartRight',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass DeleteWordEndRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordEndRight',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass DeleteWordRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordRight',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 20 /* Delete */,\r\n mac: { primary: 512 /* Alt */ | 20 /* Delete */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass DeleteInsideWord extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'deleteInsideWord',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__.EditorContextKeys.writable,\r\n label: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('deleteInsideWord', \"Delete Word\"),\r\n alias: 'Delete Word'\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = (0,_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_5__.getMapForWordSeparators)(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const commands = selections.map((sel) => {\r\n const deleteRange = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_4__.WordOperations.deleteInsideWord(wordSeparators, model, sel);\r\n return new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__.ReplaceCommand(deleteRange, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordStartLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordEndLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordStartLeftSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordEndLeftSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordLeftSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordStartRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordEndRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordStartRightSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordEndRightSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordRightSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordAccessibilityLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordAccessibilityLeftSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordAccessibilityRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new CursorWordAccessibilityRightSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordStartLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordEndLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordStartRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordEndRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorCommand)(new DeleteWordRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorAction)(DeleteInsideWord);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DeleteWordPartLeft\": () => (/* binding */ DeleteWordPartLeft),\n/* harmony export */ \"DeleteWordPartRight\": () => (/* binding */ DeleteWordPartRight),\n/* harmony export */ \"WordPartLeftCommand\": () => (/* binding */ WordPartLeftCommand),\n/* harmony export */ \"CursorWordPartLeft\": () => (/* binding */ CursorWordPartLeft),\n/* harmony export */ \"CursorWordPartLeftSelect\": () => (/* binding */ CursorWordPartLeftSelect),\n/* harmony export */ \"WordPartRightCommand\": () => (/* binding */ WordPartRightCommand),\n/* harmony export */ \"CursorWordPartRight\": () => (/* binding */ CursorWordPartRight),\n/* harmony export */ \"CursorWordPartRightSelect\": () => (/* binding */ CursorWordPartRightSelect)\n/* harmony export */ });\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../wordOperations/wordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass DeleteWordPartLeft extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__.DeleteWordCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordPartLeft',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _delete(ctx, wordNavigationType) {\r\n let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__.WordPartOperations.deleteWordPartLeft(ctx);\r\n if (r) {\r\n return r;\r\n }\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(1, 1, 1, 1);\r\n }\r\n}\r\nclass DeleteWordPartRight extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__.DeleteWordCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordPartRight',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 20 /* Delete */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _delete(ctx, wordNavigationType) {\r\n let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__.WordPartOperations.deleteWordPartRight(ctx);\r\n if (r) {\r\n return r;\r\n }\r\n const lineCount = ctx.model.getLineCount();\r\n const maxColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__.Range(lineCount, maxColumn, lineCount, maxColumn);\r\n }\r\n}\r\nclass WordPartLeftCommand extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__.MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__.WordPartOperations.moveWordPartLeft(wordSeparators, model, position);\r\n }\r\n}\r\nclass CursorWordPartLeft extends WordPartLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordPartLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Register previous id for compatibility purposes\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommandAlias('cursorWordPartStartLeft', 'cursorWordPartLeft');\r\nclass CursorWordPartLeftSelect extends WordPartLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordPartLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Register previous id for compatibility purposes\r\n_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommandAlias('cursorWordPartStartLeftSelect', 'cursorWordPartLeftSelect');\r\nclass WordPartRightCommand extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__.MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__.WordPartOperations.moveWordPartRight(wordSeparators, model, position);\r\n }\r\n}\r\nclass CursorWordPartRight extends WordPartRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordPartRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass CursorWordPartRightSelect extends WordPartRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordPartRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__.EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new DeleteWordPartLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new DeleteWordPartRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new CursorWordPartLeft());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new CursorWordPartLeftSelect());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new CursorWordPartRight());\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorCommand)(new CursorWordPartRightSelect());\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ViewZoneDelegate\": () => (/* binding */ ViewZoneDelegate),\n/* harmony export */ \"OverlayWidgetDelegate\": () => (/* binding */ OverlayWidgetDelegate),\n/* harmony export */ \"ZoneWidget\": () => (/* binding */ ZoneWidget)\n/* harmony export */ });\n/* harmony import */ var _zoneWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoneWidget.css */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/idGenerator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst defaultColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__.RGBA(0, 122, 204));\r\nconst defaultOptions = {\r\n showArrow: true,\r\n showFrame: true,\r\n className: '',\r\n frameColor: defaultColor,\r\n arrowColor: defaultColor,\r\n keepEditorSelection: false\r\n};\r\nconst WIDGET_ID = 'vs.editor.contrib.zoneWidget';\r\nclass ViewZoneDelegate {\r\n constructor(domNode, afterLineNumber, afterColumn, heightInLines, onDomNodeTop, onComputedHeight) {\r\n this.id = ''; // A valid zone id should be greater than 0\r\n this.domNode = domNode;\r\n this.afterLineNumber = afterLineNumber;\r\n this.afterColumn = afterColumn;\r\n this.heightInLines = heightInLines;\r\n this._onDomNodeTop = onDomNodeTop;\r\n this._onComputedHeight = onComputedHeight;\r\n }\r\n onDomNodeTop(top) {\r\n this._onDomNodeTop(top);\r\n }\r\n onComputedHeight(height) {\r\n this._onComputedHeight(height);\r\n }\r\n}\r\nclass OverlayWidgetDelegate {\r\n constructor(id, domNode) {\r\n this._id = id;\r\n this._domNode = domNode;\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n}\r\nclass Arrow {\r\n constructor(_editor) {\r\n this._editor = _editor;\r\n this._ruleName = Arrow._IdGenerator.nextId();\r\n this._decorations = [];\r\n this._color = null;\r\n this._height = -1;\r\n //\r\n }\r\n dispose() {\r\n this.hide();\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.removeCSSRulesContainingSelector(this._ruleName);\r\n }\r\n set color(value) {\r\n if (this._color !== value) {\r\n this._color = value;\r\n this._updateStyle();\r\n }\r\n }\r\n set height(value) {\r\n if (this._height !== value) {\r\n this._height = value;\r\n this._updateStyle();\r\n }\r\n }\r\n _updateStyle() {\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.removeCSSRulesContainingSelector(this._ruleName);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.createCSSRule(`.monaco-editor ${this._ruleName}`, `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `);\r\n }\r\n show(where) {\r\n this._decorations = this._editor.deltaDecorations(this._decorations, [{ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.fromPositions(where), options: { className: this._ruleName, stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ } }]);\r\n }\r\n hide() {\r\n this._editor.deltaDecorations(this._decorations, []);\r\n }\r\n}\r\nArrow._IdGenerator = new _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__.IdGenerator('.arrow-decoration-');\r\nclass ZoneWidget {\r\n constructor(editor, options = {}) {\r\n this._arrow = null;\r\n this._overlayWidget = null;\r\n this._resizeSash = null;\r\n this._positionMarkerId = [];\r\n this._viewZone = null;\r\n this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.DisposableStore();\r\n this.container = null;\r\n this._isShowing = false;\r\n this.editor = editor;\r\n this.options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__.deepClone(options);\r\n _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__.mixin(this.options, defaultOptions, false);\r\n this.domNode = document.createElement('div');\r\n if (!this.options.isAccessible) {\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.domNode.setAttribute('role', 'presentation');\r\n }\r\n this._disposables.add(this.editor.onDidLayoutChange((info) => {\r\n const width = this._getWidth(info);\r\n this.domNode.style.width = width + 'px';\r\n this.domNode.style.left = this._getLeft(info) + 'px';\r\n this._onWidth(width);\r\n }));\r\n }\r\n dispose() {\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n if (this._viewZone) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n this._viewZone = null;\r\n });\r\n }\r\n this.editor.deltaDecorations(this._positionMarkerId, []);\r\n this._positionMarkerId = [];\r\n this._disposables.dispose();\r\n }\r\n create() {\r\n this.domNode.classList.add('zone-widget');\r\n if (this.options.className) {\r\n this.domNode.classList.add(this.options.className);\r\n }\r\n this.container = document.createElement('div');\r\n this.container.classList.add('zone-widget-container');\r\n this.domNode.appendChild(this.container);\r\n if (this.options.showArrow) {\r\n this._arrow = new Arrow(this.editor);\r\n this._disposables.add(this._arrow);\r\n }\r\n this._fillContainer(this.container);\r\n this._initSash();\r\n this._applyStyles();\r\n }\r\n style(styles) {\r\n if (styles.frameColor) {\r\n this.options.frameColor = styles.frameColor;\r\n }\r\n if (styles.arrowColor) {\r\n this.options.arrowColor = styles.arrowColor;\r\n }\r\n this._applyStyles();\r\n }\r\n _applyStyles() {\r\n if (this.container && this.options.frameColor) {\r\n let frameColor = this.options.frameColor.toString();\r\n this.container.style.borderTopColor = frameColor;\r\n this.container.style.borderBottomColor = frameColor;\r\n }\r\n if (this._arrow && this.options.arrowColor) {\r\n let arrowColor = this.options.arrowColor.toString();\r\n this._arrow.color = arrowColor;\r\n }\r\n }\r\n _getWidth(info) {\r\n return info.width - info.minimap.minimapWidth - info.verticalScrollbarWidth;\r\n }\r\n _getLeft(info) {\r\n // If minimap is to the left, we move beyond it\r\n if (info.minimap.minimapWidth > 0 && info.minimap.minimapLeft === 0) {\r\n return info.minimap.minimapWidth;\r\n }\r\n return 0;\r\n }\r\n _onViewZoneTop(top) {\r\n this.domNode.style.top = top + 'px';\r\n }\r\n _onViewZoneHeight(height) {\r\n this.domNode.style.height = `${height}px`;\r\n if (this.container) {\r\n let containerHeight = height - this._decoratingElementsHeight();\r\n this.container.style.height = `${containerHeight}px`;\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n this._doLayout(containerHeight, this._getWidth(layoutInfo));\r\n }\r\n if (this._resizeSash) {\r\n this._resizeSash.layout();\r\n }\r\n }\r\n get position() {\r\n const [id] = this._positionMarkerId;\r\n if (!id) {\r\n return undefined;\r\n }\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return undefined;\r\n }\r\n const range = model.getDecorationRange(id);\r\n if (!range) {\r\n return undefined;\r\n }\r\n return range.getStartPosition();\r\n }\r\n show(rangeOrPos, heightInLines) {\r\n const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.isIRange(rangeOrPos) ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.lift(rangeOrPos) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__.Range.fromPositions(rangeOrPos);\r\n this._isShowing = true;\r\n this._showImpl(range, heightInLines);\r\n this._isShowing = false;\r\n this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__.ModelDecorationOptions.EMPTY }]);\r\n }\r\n hide() {\r\n if (this._viewZone) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n });\r\n this._viewZone = null;\r\n }\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n if (this._arrow) {\r\n this._arrow.hide();\r\n }\r\n }\r\n _decoratingElementsHeight() {\r\n let lineHeight = this.editor.getOption(53 /* lineHeight */);\r\n let result = 0;\r\n if (this.options.showArrow) {\r\n let arrowHeight = Math.round(lineHeight / 3);\r\n result += 2 * arrowHeight;\r\n }\r\n if (this.options.showFrame) {\r\n let frameThickness = Math.round(lineHeight / 9);\r\n result += 2 * frameThickness;\r\n }\r\n return result;\r\n }\r\n _showImpl(where, heightInLines) {\r\n const position = where.getStartPosition();\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n const width = this._getWidth(layoutInfo);\r\n this.domNode.style.width = `${width}px`;\r\n this.domNode.style.left = this._getLeft(layoutInfo) + 'px';\r\n // Render the widget as zone (rendering) and widget (lifecycle)\r\n const viewZoneDomNode = document.createElement('div');\r\n viewZoneDomNode.style.overflow = 'hidden';\r\n const lineHeight = this.editor.getOption(53 /* lineHeight */);\r\n // adjust heightInLines to viewport\r\n const maxHeightInLines = Math.max(12, (this.editor.getLayoutInfo().height / lineHeight) * 0.8);\r\n heightInLines = Math.min(heightInLines, maxHeightInLines);\r\n let arrowHeight = 0;\r\n let frameThickness = 0;\r\n // Render the arrow one 1/3 of an editor line height\r\n if (this._arrow && this.options.showArrow) {\r\n arrowHeight = Math.round(lineHeight / 3);\r\n this._arrow.height = arrowHeight;\r\n this._arrow.show(position);\r\n }\r\n // Render the frame as 1/9 of an editor line height\r\n if (this.options.showFrame) {\r\n frameThickness = Math.round(lineHeight / 9);\r\n }\r\n // insert zone widget\r\n this.editor.changeViewZones((accessor) => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n this.domNode.style.top = '-1000px';\r\n this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position.lineNumber, position.column, heightInLines, (top) => this._onViewZoneTop(top), (height) => this._onViewZoneHeight(height));\r\n this._viewZone.id = accessor.addZone(this._viewZone);\r\n this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);\r\n this.editor.addOverlayWidget(this._overlayWidget);\r\n });\r\n if (this.container && this.options.showFrame) {\r\n const width = this.options.frameWidth ? this.options.frameWidth : frameThickness;\r\n this.container.style.borderTopWidth = width + 'px';\r\n this.container.style.borderBottomWidth = width + 'px';\r\n }\r\n let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();\r\n if (this.container) {\r\n this.container.style.top = arrowHeight + 'px';\r\n this.container.style.height = containerHeight + 'px';\r\n this.container.style.overflow = 'hidden';\r\n }\r\n this._doLayout(containerHeight, width);\r\n if (!this.options.keepEditorSelection) {\r\n this.editor.setSelection(where);\r\n }\r\n const model = this.editor.getModel();\r\n if (model) {\r\n const revealLine = where.endLineNumber + 1;\r\n if (revealLine <= model.getLineCount()) {\r\n // reveal line below the zone widget\r\n this.revealLine(revealLine, false);\r\n }\r\n else {\r\n // reveal last line atop\r\n this.revealLine(model.getLineCount(), true);\r\n }\r\n }\r\n }\r\n revealLine(lineNumber, isLastLine) {\r\n if (isLastLine) {\r\n this.editor.revealLineInCenter(lineNumber, 0 /* Smooth */);\r\n }\r\n else {\r\n this.editor.revealLine(lineNumber, 0 /* Smooth */);\r\n }\r\n }\r\n setCssClass(className, classToReplace) {\r\n if (!this.container) {\r\n return;\r\n }\r\n if (classToReplace) {\r\n this.container.classList.remove(classToReplace);\r\n }\r\n this.container.classList.add(className);\r\n }\r\n _onWidth(widthInPixel) {\r\n // implement in subclass\r\n }\r\n _doLayout(heightInPixel, widthInPixel) {\r\n // implement in subclass\r\n }\r\n _relayout(newHeightInLines) {\r\n if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n this._viewZone.heightInLines = newHeightInLines;\r\n accessor.layoutZone(this._viewZone.id);\r\n }\r\n });\r\n }\r\n }\r\n // --- sash\r\n _initSash() {\r\n if (this._resizeSash) {\r\n return;\r\n }\r\n this._resizeSash = this._disposables.add(new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_2__.Sash(this.domNode, this, { orientation: 1 /* HORIZONTAL */ }));\r\n if (!this.options.isResizeable) {\r\n this._resizeSash.hide();\r\n this._resizeSash.state = 0 /* Disabled */;\r\n }\r\n let data;\r\n this._disposables.add(this._resizeSash.onDidStart((e) => {\r\n if (this._viewZone) {\r\n data = {\r\n startY: e.startY,\r\n heightInLines: this._viewZone.heightInLines,\r\n };\r\n }\r\n }));\r\n this._disposables.add(this._resizeSash.onDidEnd(() => {\r\n data = undefined;\r\n }));\r\n this._disposables.add(this._resizeSash.onDidChange((evt) => {\r\n if (data) {\r\n let lineDelta = (evt.currentY - data.startY) / this.editor.getOption(53 /* lineHeight */);\r\n let roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta);\r\n let newHeightInLines = data.heightInLines + roundedLineDelta;\r\n if (newHeightInLines > 5 && newHeightInLines < 35) {\r\n this._relayout(newHeightInLines);\r\n }\r\n }\r\n }));\r\n }\r\n getHorizontalSashLeft() {\r\n return 0;\r\n }\r\n getHorizontalSashTop() {\r\n return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - (this._decoratingElementsHeight() / 2);\r\n }\r\n getHorizontalSashWidth() {\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n return layoutInfo.width - layoutInfo.minimap.minimapWidth;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/edcore.main.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/edcore.main.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_api_js__WEBPACK_IMPORTED_MODULE_10__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_all_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.all.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.all.js\");\n/* harmony import */ var _standalone_browser_accessibilityHelp_accessibilityHelp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./standalone/browser/accessibilityHelp/accessibilityHelp.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js\");\n/* harmony import */ var _standalone_browser_iPadShowKeyboard_iPadShowKeyboard_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js\");\n/* harmony import */ var _standalone_browser_inspectTokens_inspectTokens_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./standalone/browser/inspectTokens/inspectTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js\");\n/* harmony import */ var _standalone_browser_quickAccess_standaloneHelpQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneHelpQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js\");\n/* harmony import */ var _standalone_browser_quickAccess_standaloneGotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js\");\n/* harmony import */ var _standalone_browser_quickAccess_standaloneGotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js\");\n/* harmony import */ var _standalone_browser_quickAccess_standaloneCommandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneCommandsQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js\");\n/* harmony import */ var _standalone_browser_referenceSearch_standaloneReferenceSearch_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./standalone/browser/referenceSearch/standaloneReferenceSearch.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js\");\n/* harmony import */ var _standalone_browser_toggleHighContrast_toggleHighContrast_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./standalone/browser/toggleHighContrast/toggleHighContrast.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js\");\n/* harmony import */ var _editor_api_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/edcore.main.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.all.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/editor.all.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser/controller/coreCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js\");\n/* harmony import */ var _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browser/widget/codeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js\");\n/* harmony import */ var _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./browser/widget/diffEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js\");\n/* harmony import */ var _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./browser/widget/diffNavigator.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js\");\n/* harmony import */ var _contrib_anchorSelect_anchorSelect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contrib/anchorSelect/anchorSelect.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js\");\n/* harmony import */ var _contrib_bracketMatching_bracketMatching_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contrib/bracketMatching/bracketMatching.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js\");\n/* harmony import */ var _contrib_caretOperations_caretOperations_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./contrib/caretOperations/caretOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js\");\n/* harmony import */ var _contrib_caretOperations_transpose_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./contrib/caretOperations/transpose.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js\");\n/* harmony import */ var _contrib_clipboard_clipboard_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contrib/clipboard/clipboard.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js\");\n/* harmony import */ var _contrib_codeAction_codeActionContributions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./contrib/codeAction/codeActionContributions.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js\");\n/* harmony import */ var _contrib_codelens_codelensController_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./contrib/codelens/codelensController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js\");\n/* harmony import */ var _contrib_colorPicker_colorContributions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./contrib/colorPicker/colorContributions.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorContributions.js\");\n/* harmony import */ var _contrib_comment_comment_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./contrib/comment/comment.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js\");\n/* harmony import */ var _contrib_contextmenu_contextmenu_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./contrib/contextmenu/contextmenu.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js\");\n/* harmony import */ var _contrib_cursorUndo_cursorUndo_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./contrib/cursorUndo/cursorUndo.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js\");\n/* harmony import */ var _contrib_dnd_dnd_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./contrib/dnd/dnd.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js\");\n/* harmony import */ var _contrib_find_findController_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./contrib/find/findController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js\");\n/* harmony import */ var _contrib_folding_folding_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./contrib/folding/folding.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js\");\n/* harmony import */ var _contrib_fontZoom_fontZoom_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./contrib/fontZoom/fontZoom.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js\");\n/* harmony import */ var _contrib_format_formatActions_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./contrib/format/formatActions.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js\");\n/* harmony import */ var _contrib_documentSymbols_documentSymbols_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./contrib/documentSymbols/documentSymbols.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/documentSymbols.js\");\n/* harmony import */ var _contrib_gotoSymbol_goToCommands_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./contrib/gotoSymbol/goToCommands.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js\");\n/* harmony import */ var _contrib_gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js\");\n/* harmony import */ var _contrib_gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./contrib/gotoError/gotoError.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js\");\n/* harmony import */ var _contrib_hover_hover_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./contrib/hover/hover.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js\");\n/* harmony import */ var _contrib_indentation_indentation_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./contrib/indentation/indentation.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js\");\n/* harmony import */ var _contrib_inlineHints_inlineHintsController_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./contrib/inlineHints/inlineHintsController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/inlineHints/inlineHintsController.js\");\n/* harmony import */ var _contrib_inPlaceReplace_inPlaceReplace_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./contrib/inPlaceReplace/inPlaceReplace.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js\");\n/* harmony import */ var _contrib_linesOperations_linesOperations_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./contrib/linesOperations/linesOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js\");\n/* harmony import */ var _contrib_linkedEditing_linkedEditing_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./contrib/linkedEditing/linkedEditing.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/linkedEditing/linkedEditing.js\");\n/* harmony import */ var _contrib_links_links_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./contrib/links/links.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js\");\n/* harmony import */ var _contrib_multicursor_multicursor_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./contrib/multicursor/multicursor.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js\");\n/* harmony import */ var _contrib_parameterHints_parameterHints_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./contrib/parameterHints/parameterHints.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js\");\n/* harmony import */ var _contrib_rename_rename_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./contrib/rename/rename.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js\");\n/* harmony import */ var _contrib_smartSelect_smartSelect_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./contrib/smartSelect/smartSelect.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js\");\n/* harmony import */ var _contrib_snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./contrib/snippet/snippetController2.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js\");\n/* harmony import */ var _contrib_suggest_suggestController_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./contrib/suggest/suggestController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js\");\n/* harmony import */ var _contrib_tokenization_tokenization_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./contrib/tokenization/tokenization.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js\");\n/* harmony import */ var _contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./contrib/toggleTabFocusMode/toggleTabFocusMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js\");\n/* harmony import */ var _contrib_unusualLineTerminators_unusualLineTerminators_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./contrib/unusualLineTerminators/unusualLineTerminators.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js\");\n/* harmony import */ var _contrib_viewportSemanticTokens_viewportSemanticTokens_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./contrib/viewportSemanticTokens/viewportSemanticTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js\");\n/* harmony import */ var _contrib_wordHighlighter_wordHighlighter_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./contrib/wordHighlighter/wordHighlighter.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js\");\n/* harmony import */ var _contrib_wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./contrib/wordOperations/wordOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js\");\n/* harmony import */ var _contrib_wordPartOperations_wordPartOperations_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./contrib/wordPartOperations/wordPartOperations.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../base/browser/ui/codicons/codiconStyles.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Load up these strings even in VSCode, even if they are not used\r\n// in order to get them translated\r\n\r\n // The codicons are defined here and must be loaded\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/editor.all.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.api.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/editor.api.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* binding */ CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* binding */ Emitter),\n/* harmony export */ \"KeyCode\": () => (/* binding */ KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* binding */ KeyMod),\n/* harmony export */ \"Position\": () => (/* binding */ Position),\n/* harmony export */ \"Range\": () => (/* binding */ Range),\n/* harmony export */ \"Selection\": () => (/* binding */ Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* binding */ SelectionDirection),\n/* harmony export */ \"MarkerSeverity\": () => (/* binding */ MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* binding */ MarkerTag),\n/* harmony export */ \"Uri\": () => (/* binding */ Uri),\n/* harmony export */ \"Token\": () => (/* binding */ Token),\n/* harmony export */ \"editor\": () => (/* binding */ editor),\n/* harmony export */ \"languages\": () => (/* binding */ languages)\n/* harmony export */ });\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/standalone/standaloneBase.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js\");\n/* harmony import */ var _standalone_browser_standaloneEditor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./standalone/browser/standaloneEditor.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js\");\n/* harmony import */ var _standalone_browser_standaloneLanguages_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./standalone/browser/standaloneLanguages.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _contrib_format_format_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contrib/format/format.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Set defaults for standalone editor\r\n_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__.EditorOptions.wrappingIndent.defaultValue = 0 /* None */;\r\n_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__.EditorOptions.glyphMargin.defaultValue = false;\r\n_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__.EditorOptions.autoIndent.defaultValue = 3 /* Advanced */;\r\n_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__.EditorOptions.overviewRulerLanes.defaultValue = 2;\r\n// We need to register a formatter selector which simply picks the first available formatter.\r\n// See https://github.com/microsoft/monaco-editor/issues/2327\r\n_contrib_format_format_js__WEBPACK_IMPORTED_MODULE_5__.FormattingConflicts.setFormatterSelector((formatter, document, mode) => Promise.resolve(formatter[0]));\r\nconst api = (0,_common_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_1__.createMonacoBaseAPI)();\r\napi.editor = (0,_standalone_browser_standaloneEditor_js__WEBPACK_IMPORTED_MODULE_2__.createMonacoEditorAPI)();\r\napi.languages = (0,_standalone_browser_standaloneLanguages_js__WEBPACK_IMPORTED_MODULE_3__.createMonacoLanguagesAPI)();\r\nconst CancellationTokenSource = api.CancellationTokenSource;\r\nconst Emitter = api.Emitter;\r\nconst KeyCode = api.KeyCode;\r\nconst KeyMod = api.KeyMod;\r\nconst Position = api.Position;\r\nconst Range = api.Range;\r\nconst Selection = api.Selection;\r\nconst SelectionDirection = api.SelectionDirection;\r\nconst MarkerSeverity = api.MarkerSeverity;\r\nconst MarkerTag = api.MarkerTag;\r\nconst Uri = api.Uri;\r\nconst Token = api.Token;\r\nconst editor = api.editor;\r\nconst languages = api.languages;\r\nif (((_a = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__.globals.MonacoEnvironment) === null || _a === void 0 ? void 0 : _a.globalAPI) || (typeof define === 'function' && __webpack_require__.amdO)) {\r\n self.monaco = api;\r\n}\r\nif (typeof self.require !== 'undefined' && typeof self.require.config === 'function') {\r\n self.require.config({\r\n ignoreDuplicateModules: [\r\n 'vscode-languageserver-types',\r\n 'vscode-languageserver-types/main',\r\n 'vscode-languageserver-textdocument',\r\n 'vscode-languageserver-textdocument/main',\r\n 'vscode-nls',\r\n 'vscode-nls/vscode-nls',\r\n 'jsonc-parser',\r\n 'jsonc-parser/main',\r\n 'vscode-uri',\r\n 'vscode-uri/index',\r\n 'vs/basic-languages/typescript/typescript'\r\n ]\r\n });\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/editor.api.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.main.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/editor.main.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _edcore_main__WEBPACK_IMPORTED_MODULE_5__.languages)\n/* harmony export */ });\n/* harmony import */ var _language_typescript_monaco_contribution__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../language/typescript/monaco.contribution */ \"./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js\");\n/* harmony import */ var _language_css_monaco_contribution__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../language/css/monaco.contribution */ \"./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js\");\n/* harmony import */ var _language_json_monaco_contribution__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../language/json/monaco.contribution */ \"./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js\");\n/* harmony import */ var _language_html_monaco_contribution__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../language/html/monaco.contribution */ \"./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js\");\n/* harmony import */ var _basic_languages_monaco_contribution__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../basic-languages/monaco.contribution */ \"./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js\");\n/* harmony import */ var _edcore_main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edcore.main */ \"./node_modules/monaco-editor/esm/vs/editor/edcore.main.js\");\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/editor.main.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js":
|
||
/*!************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js ***!
|
||
\************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessibilityHelp.css */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js\");\n/* harmony import */ var _base_browser_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/formattedTextRenderer.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js\");\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/browser/ui/widget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../contrib/toggleTabFocusMode/toggleTabFocusMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.RawContextKey('accessibilityHelpWidgetVisible', false);\r\nlet AccessibilityHelpController = class AccessibilityHelpController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(editor, instantiationService) {\r\n super();\r\n this._editor = editor;\r\n this._widget = this._register(instantiationService.createInstance(AccessibilityHelpWidget, this._editor));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(AccessibilityHelpController.ID);\r\n }\r\n show() {\r\n this._widget.show();\r\n }\r\n hide() {\r\n this._widget.hide();\r\n }\r\n};\r\nAccessibilityHelpController.ID = 'editor.contrib.accessibilityHelpController';\r\nAccessibilityHelpController = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__.IInstantiationService)\r\n], AccessibilityHelpController);\r\nfunction getSelectionLabel(selections, charactersSelected) {\r\n if (!selections || selections.length === 0) {\r\n return _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.noSelection;\r\n }\r\n if (selections.length === 1) {\r\n if (charactersSelected) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.singleSelectionRange, selections[0].positionLineNumber, selections[0].positionColumn, charactersSelected);\r\n }\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.singleSelection, selections[0].positionLineNumber, selections[0].positionColumn);\r\n }\r\n if (charactersSelected) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.multiSelectionRange, selections.length, charactersSelected);\r\n }\r\n if (selections.length > 0) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.multiSelection, selections.length);\r\n }\r\n return '';\r\n}\r\nlet AccessibilityHelpWidget = class AccessibilityHelpWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_5__.Widget {\r\n constructor(editor, _contextKeyService, _keybindingService, _openerService) {\r\n super();\r\n this._contextKeyService = _contextKeyService;\r\n this._keybindingService = _keybindingService;\r\n this._openerService = _openerService;\r\n this._editor = editor;\r\n this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(this._contextKeyService);\r\n this._domNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._domNode.setClassName('accessibilityHelpWidget');\r\n this._domNode.setDisplay('none');\r\n this._domNode.setAttribute('role', 'dialog');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._contentDomNode = (0,_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__.createFastDomNode)(document.createElement('div'));\r\n this._contentDomNode.setAttribute('role', 'document');\r\n this._domNode.appendChild(this._contentDomNode);\r\n this._isVisible = false;\r\n this._register(this._editor.onDidLayoutChange(() => {\r\n if (this._isVisible) {\r\n this._layout();\r\n }\r\n }));\r\n // Intentionally not configurable!\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 35 /* KEY_E */)) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.alert)(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.emergencyConfOn);\r\n this._editor.updateOptions({\r\n accessibilitySupport: 'on'\r\n });\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.clearNode(this._contentDomNode.domNode);\r\n this._buildContent();\r\n this._contentDomNode.domNode.focus();\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 38 /* KEY_H */)) {\r\n (0,_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__.alert)(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.openingDocs);\r\n let url = this._editor.getRawOptions().accessibilityHelpUrl;\r\n if (typeof url === 'undefined') {\r\n url = 'https://go.microsoft.com/fwlink/?linkid=852450';\r\n }\r\n this._openerService.open(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_9__.URI.parse(url));\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }));\r\n this.onblur(this._contentDomNode.domNode, () => {\r\n this.hide();\r\n });\r\n this._editor.addOverlayWidget(this);\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return AccessibilityHelpWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: null\r\n };\r\n }\r\n show() {\r\n if (this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = true;\r\n this._isVisibleKey.set(true);\r\n this._layout();\r\n this._domNode.setDisplay('block');\r\n this._domNode.setAttribute('aria-hidden', 'false');\r\n this._contentDomNode.domNode.tabIndex = 0;\r\n this._buildContent();\r\n this._contentDomNode.domNode.focus();\r\n }\r\n _descriptionForCommand(commandId, msg, noKbMsg) {\r\n let kb = this._keybindingService.lookupKeybinding(commandId);\r\n if (kb) {\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(msg, kb.getAriaLabel());\r\n }\r\n return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__.format(noKbMsg, commandId);\r\n }\r\n _buildContent() {\r\n const options = this._editor.getOptions();\r\n const selections = this._editor.getSelections();\r\n let charactersSelected = 0;\r\n if (selections) {\r\n const model = this._editor.getModel();\r\n if (model) {\r\n selections.forEach((selection) => {\r\n charactersSelected += model.getValueLengthInRange(selection);\r\n });\r\n }\r\n }\r\n let text = getSelectionLabel(selections, charactersSelected);\r\n if (options.get(49 /* inDiffEditor */)) {\r\n if (options.get(75 /* readOnly */)) {\r\n text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.readonlyDiffEditor;\r\n }\r\n else {\r\n text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.editableDiffEditor;\r\n }\r\n }\r\n else {\r\n if (options.get(75 /* readOnly */)) {\r\n text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.readonlyEditor;\r\n }\r\n else {\r\n text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.editableEditor;\r\n }\r\n }\r\n const turnOnMessage = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__.isMacintosh\r\n ? _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.changeConfigToOnMac\r\n : _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.changeConfigToOnWinLinux);\r\n switch (options.get(2 /* accessibilitySupport */)) {\r\n case 0 /* Unknown */:\r\n text += '\\n\\n - ' + turnOnMessage;\r\n break;\r\n case 2 /* Enabled */:\r\n text += '\\n\\n - ' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.auto_on;\r\n break;\r\n case 1 /* Disabled */:\r\n text += '\\n\\n - ' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.auto_off;\r\n text += ' ' + turnOnMessage;\r\n break;\r\n }\r\n if (options.get(123 /* tabFocusMode */)) {\r\n text += '\\n\\n - ' + this._descriptionForCommand(_contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__.ToggleTabFocusModeAction.ID, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.tabFocusModeOnMsg, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb);\r\n }\r\n else {\r\n text += '\\n\\n - ' + this._descriptionForCommand(_contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__.ToggleTabFocusModeAction.ID, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.tabFocusModeOffMsg, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);\r\n }\r\n const openDocMessage = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__.isMacintosh\r\n ? _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.openDocMac\r\n : _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.openDocWinLinux);\r\n text += '\\n\\n - ' + openDocMessage;\r\n text += '\\n\\n' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.outroMsg;\r\n this._contentDomNode.domNode.appendChild((0,_base_browser_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__.renderFormattedText)(text));\r\n // Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents\r\n this._contentDomNode.domNode.setAttribute('aria-label', text);\r\n }\r\n hide() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = false;\r\n this._isVisibleKey.reset();\r\n this._domNode.setDisplay('none');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._contentDomNode.domNode.tabIndex = -1;\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.clearNode(this._contentDomNode.domNode);\r\n this._editor.focus();\r\n }\r\n _layout() {\r\n let editorLayout = this._editor.getLayoutInfo();\r\n let w = Math.max(5, Math.min(AccessibilityHelpWidget.WIDTH, editorLayout.width - 40));\r\n let h = Math.max(5, Math.min(AccessibilityHelpWidget.HEIGHT, editorLayout.height - 40));\r\n this._domNode.setWidth(w);\r\n this._domNode.setHeight(h);\r\n let top = Math.round((editorLayout.height - h) / 2);\r\n this._domNode.setTop(top);\r\n let left = Math.round((editorLayout.width - w) / 2);\r\n this._domNode.setLeft(left);\r\n }\r\n};\r\nAccessibilityHelpWidget.ID = 'editor.contrib.accessibilityHelpWidget';\r\nAccessibilityHelpWidget.WIDTH = 500;\r\nAccessibilityHelpWidget.HEIGHT = 300;\r\nAccessibilityHelpWidget = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__.IContextKeyService),\r\n __param(2, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__.IKeybindingService),\r\n __param(3, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__.IOpenerService)\r\n], AccessibilityHelpWidget);\r\nclass ShowAccessibilityHelpAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showAccessibilityHelp',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.AccessibilityHelpNLS.showAccessibilityHelpAction,\r\n alias: 'Show Accessibility Help',\r\n precondition: undefined,\r\n kbOpts: {\r\n primary: 512 /* Alt */ | 59 /* F1 */,\r\n weight: 100 /* EditorContrib */,\r\n linux: {\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 59 /* F1 */,\r\n secondary: [512 /* Alt */ | 59 /* F1 */]\r\n }\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = AccessibilityHelpController.get(editor);\r\n if (controller) {\r\n controller.show();\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__.registerEditorContribution)(AccessibilityHelpController.ID, AccessibilityHelpController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__.registerEditorAction)(ShowAccessibilityHelpAction);\r\nconst AccessibilityHelpCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__.EditorCommand.bindToContribution(AccessibilityHelpController.get);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__.registerEditorCommand)(new AccessibilityHelpCommand({\r\n id: 'closeAccessibilityHelp',\r\n precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE,\r\n handler: x => x.hide(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 100,\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__.EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__.registerThemingParticipant)((theme, collector) => {\r\n const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__.editorWidgetBackground);\r\n if (widgetBackground) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${widgetBackground}; }`);\r\n }\r\n const widgetForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__.editorWidgetForeground);\r\n if (widgetForeground) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${widgetForeground}; }`);\r\n }\r\n const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__.widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`);\r\n }\r\n const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__.contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Colorizer\": () => (/* binding */ Colorizer)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/lineTokens.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js\");\n/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js\");\n/* harmony import */ var _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/monarch/monarchLexer.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('standaloneColorizer', { createHTML: value => value });\r\nclass Colorizer {\r\n static colorizeElement(themeService, modeService, domNode, options) {\r\n options = options || {};\r\n let theme = options.theme || 'vs';\r\n let mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang');\r\n if (!mimeType) {\r\n console.error('Mode not detected');\r\n return Promise.resolve();\r\n }\r\n themeService.setTheme(theme);\r\n let text = domNode.firstChild ? domNode.firstChild.nodeValue : '';\r\n domNode.className += ' ' + theme;\r\n let render = (str) => {\r\n var _a;\r\n const trustedhtml = (_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(str)) !== null && _a !== void 0 ? _a : str;\r\n domNode.innerHTML = trustedhtml;\r\n };\r\n return this.colorize(modeService, text || '', mimeType, options).then(render, (err) => console.error(err));\r\n }\r\n static colorize(modeService, text, mimeType, options) {\r\n let tabSize = 4;\r\n if (options && typeof options.tabSize === 'number') {\r\n tabSize = options.tabSize;\r\n }\r\n if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.startsWithUTF8BOM(text)) {\r\n text = text.substr(1);\r\n }\r\n let lines = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.splitLines(text);\r\n let language = modeService.getModeId(mimeType);\r\n if (!language) {\r\n return Promise.resolve(_fakeColorize(lines, tabSize));\r\n }\r\n // Send out the event to create the mode\r\n modeService.triggerMode(language);\r\n const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.get(language);\r\n if (tokenizationSupport) {\r\n return _colorize(lines, tabSize, tokenizationSupport);\r\n }\r\n const tokenizationSupportPromise = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.getPromise(language);\r\n if (tokenizationSupportPromise) {\r\n // A tokenizer will be registered soon\r\n return new Promise((resolve, reject) => {\r\n tokenizationSupportPromise.then(tokenizationSupport => {\r\n _colorize(lines, tabSize, tokenizationSupport).then(resolve, reject);\r\n }, reject);\r\n });\r\n }\r\n return new Promise((resolve, reject) => {\r\n let listener = null;\r\n let timeout = null;\r\n const execute = () => {\r\n if (listener) {\r\n listener.dispose();\r\n listener = null;\r\n }\r\n if (timeout) {\r\n timeout.dispose();\r\n timeout = null;\r\n }\r\n const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.get(language);\r\n if (tokenizationSupport) {\r\n _colorize(lines, tabSize, tokenizationSupport).then(resolve, reject);\r\n return;\r\n }\r\n resolve(_fakeColorize(lines, tabSize));\r\n };\r\n // wait 500ms for mode to load, then give up\r\n timeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.TimeoutTimer();\r\n timeout.cancelAndSet(execute, 500);\r\n listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.onDidChange((e) => {\r\n if (e.changedLanguages.indexOf(language) >= 0) {\r\n execute();\r\n }\r\n });\r\n });\r\n }\r\n static colorizeLine(line, mightContainNonBasicASCII, mightContainRTL, tokens, tabSize = 4) {\r\n const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.isBasicASCII(line, mightContainNonBasicASCII);\r\n const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.containsRTL(line, isBasicASCII, mightContainRTL);\r\n let renderResult = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.renderViewLine2)(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, tokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\r\n return renderResult.html;\r\n }\r\n static colorizeModelLine(model, lineNumber, tabSize = 4) {\r\n let content = model.getLineContent(lineNumber);\r\n model.forceTokenization(lineNumber);\r\n let tokens = model.getLineTokens(lineNumber);\r\n let inflatedTokens = tokens.inflate();\r\n return this.colorizeLine(content, model.mightContainNonBasicASCII(), model.mightContainRTL(), inflatedTokens, tabSize);\r\n }\r\n}\r\nfunction _colorize(lines, tabSize, tokenizationSupport) {\r\n return new Promise((c, e) => {\r\n const execute = () => {\r\n const result = _actualColorize(lines, tabSize, tokenizationSupport);\r\n if (tokenizationSupport instanceof _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_6__.MonarchTokenizer) {\r\n const status = tokenizationSupport.getLoadStatus();\r\n if (status.loaded === false) {\r\n status.promise.then(execute, e);\r\n return;\r\n }\r\n }\r\n c(result);\r\n };\r\n execute();\r\n });\r\n}\r\nfunction _fakeColorize(lines, tabSize) {\r\n let html = [];\r\n const defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\r\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\r\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n const tokens = new Uint32Array(2);\r\n tokens[0] = 0;\r\n tokens[1] = defaultMetadata;\r\n for (let i = 0, length = lines.length; i < length; i++) {\r\n let line = lines[i];\r\n tokens[0] = line.length;\r\n const lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__.LineTokens(tokens, line);\r\n const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\r\n const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\r\n let renderResult = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.renderViewLine2)(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\r\n html = html.concat(renderResult.html);\r\n html.push('<br/>');\r\n }\r\n return html.join('');\r\n}\r\nfunction _actualColorize(lines, tabSize, tokenizationSupport) {\r\n let html = [];\r\n let state = tokenizationSupport.getInitialState();\r\n for (let i = 0, length = lines.length; i < length; i++) {\r\n let line = lines[i];\r\n let tokenizeResult = tokenizationSupport.tokenize2(line, true, state, 0);\r\n _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__.LineTokens.convertToEndOffset(tokenizeResult.tokens, line.length);\r\n let lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__.LineTokens(tokenizeResult.tokens, line);\r\n const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.isBasicASCII(line, /* check for basic ASCII */ true);\r\n const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__.ViewLineRenderingData.containsRTL(line, isBasicASCII, /* check for RTL */ true);\r\n let renderResult = (0,_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.renderViewLine2)(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__.RenderLineInput(false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens.inflate(), [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null));\r\n html = html.concat(renderResult.html);\r\n html.push('<br/>');\r\n state = tokenizeResult.endState;\r\n }\r\n return html.join('');\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js":
|
||
/*!**********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js ***!
|
||
\**********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IPadShowKeyboard\": () => (/* binding */ IPadShowKeyboard)\n/* harmony export */ });\n/* harmony import */ var _iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iPadShowKeyboard.css */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css\");\n/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/browser.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/browser.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nclass IPadShowKeyboard extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this.widget = null;\r\n if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__.isIPad) {\r\n this._register(editor.onDidChangeConfiguration(() => this.update()));\r\n this.update();\r\n }\r\n }\r\n update() {\r\n const shouldHaveWidget = (!this.editor.getOption(75 /* readOnly */));\r\n if (!this.widget && shouldHaveWidget) {\r\n this.widget = new ShowKeyboardWidget(this.editor);\r\n }\r\n else if (this.widget && !shouldHaveWidget) {\r\n this.widget.dispose();\r\n this.widget = null;\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n if (this.widget) {\r\n this.widget.dispose();\r\n this.widget = null;\r\n }\r\n }\r\n}\r\nIPadShowKeyboard.ID = 'editor.contrib.iPadShowKeyboard';\r\nclass ShowKeyboardWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this._domNode = document.createElement('textarea');\r\n this._domNode.className = 'iPadShowKeyboard';\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(this._domNode, 'touchstart', (e) => {\r\n this.editor.focus();\r\n }));\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.addDisposableListener(this._domNode, 'focus', (e) => {\r\n this.editor.focus();\r\n }));\r\n this.editor.addOverlayWidget(this);\r\n }\r\n dispose() {\r\n this.editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return ShowKeyboardWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: 1 /* BOTTOM_RIGHT_CORNER */\r\n };\r\n }\r\n}\r\nShowKeyboardWidget.ID = 'editor.contrib.ShowKeyboardWidget';\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(IPadShowKeyboard.ID, IPadShowKeyboard);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js":
|
||
/*!****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js ***!
|
||
\****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _inspectTokens_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inspectTokens.css */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/standaloneThemeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/theme/common/theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet InspectTokensController = class InspectTokensController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor, standaloneColorService, modeService) {\r\n super();\r\n this._editor = editor;\r\n this._modeService = modeService;\r\n this._widget = null;\r\n this._register(this._editor.onDidChangeModel((e) => this.stop()));\r\n this._register(this._editor.onDidChangeModelLanguage((e) => this.stop()));\r\n this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenizationRegistry.onDidChange((e) => this.stop()));\r\n this._register(this._editor.onKeyUp((e) => e.keyCode === 9 /* Escape */ && this.stop()));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(InspectTokensController.ID);\r\n }\r\n dispose() {\r\n this.stop();\r\n super.dispose();\r\n }\r\n launch() {\r\n if (this._widget) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._widget = new InspectTokensWidget(this._editor, this._modeService);\r\n }\r\n stop() {\r\n if (this._widget) {\r\n this._widget.dispose();\r\n this._widget = null;\r\n }\r\n }\r\n};\r\nInspectTokensController.ID = 'editor.contrib.inspectTokens';\r\nInspectTokensController = __decorate([\r\n __param(1, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__.IStandaloneThemeService),\r\n __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__.IModeService)\r\n], InspectTokensController);\r\nclass InspectTokens extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inspectTokens',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_11__.InspectTokensNLS.inspectTokensAction,\r\n alias: 'Developer: Inspect Tokens',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = InspectTokensController.get(editor);\r\n if (controller) {\r\n controller.launch();\r\n }\r\n }\r\n}\r\nfunction renderTokenText(tokenText) {\r\n let result = '';\r\n for (let charIndex = 0, len = tokenText.length; charIndex < len; charIndex++) {\r\n let charCode = tokenText.charCodeAt(charIndex);\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n result += '\\u2192'; // →\r\n break;\r\n case 32 /* Space */:\r\n result += '\\u00B7'; // ·\r\n break;\r\n default:\r\n result += String.fromCharCode(charCode);\r\n }\r\n }\r\n return result;\r\n}\r\nfunction getSafeTokenizationSupport(languageIdentifier) {\r\n let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenizationRegistry.get(languageIdentifier.language);\r\n if (tokenizationSupport) {\r\n return tokenizationSupport;\r\n }\r\n return {\r\n getInitialState: () => _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__.NULL_STATE,\r\n tokenize: (line, hasEOL, state, deltaOffset) => (0,_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__.nullTokenize)(languageIdentifier.language, line, state, deltaOffset),\r\n tokenize2: (line, hasEOL, state, deltaOffset) => (0,_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__.nullTokenize2)(languageIdentifier.id, line, state, deltaOffset)\r\n };\r\n}\r\nclass InspectTokensWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(editor, modeService) {\r\n super();\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this._editor = editor;\r\n this._modeService = modeService;\r\n this._model = this._editor.getModel();\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'tokens-inspect-widget';\r\n this._tokenizationSupport = getSafeTokenizationSupport(this._model.getLanguageIdentifier());\r\n this._compute(this._editor.getPosition());\r\n this._register(this._editor.onDidChangeCursorPosition((e) => this._compute(this._editor.getPosition())));\r\n this._editor.addContentWidget(this);\r\n }\r\n dispose() {\r\n this._editor.removeContentWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return InspectTokensWidget._ID;\r\n }\r\n _compute(position) {\r\n let data = this._getTokensAtLine(position.lineNumber);\r\n let token1Index = 0;\r\n for (let i = data.tokens1.length - 1; i >= 0; i--) {\r\n let t = data.tokens1[i];\r\n if (position.column - 1 >= t.offset) {\r\n token1Index = i;\r\n break;\r\n }\r\n }\r\n let token2Index = 0;\r\n for (let i = (data.tokens2.length >>> 1); i >= 0; i--) {\r\n if (position.column - 1 >= data.tokens2[(i << 1)]) {\r\n token2Index = i;\r\n break;\r\n }\r\n }\r\n let lineContent = this._model.getLineContent(position.lineNumber);\r\n let tokenText = '';\r\n if (token1Index < data.tokens1.length) {\r\n let tokenStartIndex = data.tokens1[token1Index].offset;\r\n let tokenEndIndex = token1Index + 1 < data.tokens1.length ? data.tokens1[token1Index + 1].offset : lineContent.length;\r\n tokenText = lineContent.substring(tokenStartIndex, tokenEndIndex);\r\n }\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.reset)(this._domNode, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('h2.tm-token', undefined, renderTokenText(tokenText), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('span.tm-token-length', undefined, `${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'}`)));\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(this._domNode, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('hr.tokens-inspect-separator', { 'style': 'clear:both' }));\r\n const metadata = (token2Index << 1) + 1 < data.tokens2.length ? this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]) : null;\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(this._domNode, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('table.tm-metadata-table', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tbody', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tr', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-key', undefined, 'language'), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-value', undefined, `${metadata ? metadata.languageIdentifier.language : '-?-'}`)), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tr', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-key', undefined, 'token type'), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-value', undefined, `${metadata ? this._tokenTypeToString(metadata.tokenType) : '-?-'}`)), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tr', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-key', undefined, 'font style'), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-value', undefined, `${metadata ? this._fontStyleToString(metadata.fontStyle) : '-?-'}`)), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tr', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-key', undefined, 'foreground'), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-value', undefined, `${metadata ? _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.Format.CSS.formatHex(metadata.foreground) : '-?-'}`)), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('tr', undefined, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-key', undefined, 'background'), (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('td.tm-metadata-value', undefined, `${metadata ? _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__.Color.Format.CSS.formatHex(metadata.background) : '-?-'}`)))));\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(this._domNode, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('hr.tokens-inspect-separator'));\r\n if (token1Index < data.tokens1.length) {\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.append)(this._domNode, (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.$)('span.tm-token-type', undefined, data.tokens1[token1Index].type));\r\n }\r\n this._editor.layoutContentWidget(this);\r\n }\r\n _decodeMetadata(metadata) {\r\n let colorMap = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenizationRegistry.getColorMap();\r\n let languageId = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenMetadata.getLanguageId(metadata);\r\n let tokenType = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenMetadata.getTokenType(metadata);\r\n let fontStyle = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenMetadata.getFontStyle(metadata);\r\n let foreground = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenMetadata.getForeground(metadata);\r\n let background = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__.TokenMetadata.getBackground(metadata);\r\n return {\r\n languageIdentifier: this._modeService.getLanguageIdentifier(languageId),\r\n tokenType: tokenType,\r\n fontStyle: fontStyle,\r\n foreground: colorMap[foreground],\r\n background: colorMap[background]\r\n };\r\n }\r\n _tokenTypeToString(tokenType) {\r\n switch (tokenType) {\r\n case 0 /* Other */: return 'Other';\r\n case 1 /* Comment */: return 'Comment';\r\n case 2 /* String */: return 'String';\r\n case 4 /* RegEx */: return 'RegEx';\r\n default: return '??';\r\n }\r\n }\r\n _fontStyleToString(fontStyle) {\r\n let r = '';\r\n if (fontStyle & 1 /* Italic */) {\r\n r += 'italic ';\r\n }\r\n if (fontStyle & 2 /* Bold */) {\r\n r += 'bold ';\r\n }\r\n if (fontStyle & 4 /* Underline */) {\r\n r += 'underline ';\r\n }\r\n if (r.length === 0) {\r\n r = '---';\r\n }\r\n return r;\r\n }\r\n _getTokensAtLine(lineNumber) {\r\n let stateBeforeLine = this._getStateBeforeLine(lineNumber);\r\n let tokenizationResult1 = this._tokenizationSupport.tokenize(this._model.getLineContent(lineNumber), true, stateBeforeLine, 0);\r\n let tokenizationResult2 = this._tokenizationSupport.tokenize2(this._model.getLineContent(lineNumber), true, stateBeforeLine, 0);\r\n return {\r\n startState: stateBeforeLine,\r\n tokens1: tokenizationResult1.tokens,\r\n tokens2: tokenizationResult2.tokens,\r\n endState: tokenizationResult1.endState\r\n };\r\n }\r\n _getStateBeforeLine(lineNumber) {\r\n let state = this._tokenizationSupport.getInitialState();\r\n for (let i = 1; i < lineNumber; i++) {\r\n let tokenizationResult = this._tokenizationSupport.tokenize(this._model.getLineContent(i), true, state, 0);\r\n state = tokenizationResult.endState;\r\n }\r\n return state;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n position: this._editor.getPosition(),\r\n preference: [2 /* BELOW */, 1 /* ABOVE */]\r\n };\r\n }\r\n}\r\nInspectTokensWidget._ID = 'editor.contrib.inspectTokensWidget';\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorContribution)(InspectTokensController.ID, InspectTokensController);\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__.registerEditorAction)(InspectTokens);\r\n(0,_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.registerThemingParticipant)((theme, collector) => {\r\n const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorHoverBorder);\r\n if (border) {\r\n let borderWidth = theme.type === _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_12__.ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { border: ${borderWidth}px solid ${border}; }`);\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${border}; }`);\r\n }\r\n const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorHoverBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${background}; }`);\r\n }\r\n const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__.editorHoverForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { color: ${foreground}; }`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js":
|
||
/*!******************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js ***!
|
||
\******************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneCommandsQuickAccessProvider\": () => (/* binding */ StandaloneCommandsQuickAccessProvider),\n/* harmony export */ \"GotoLineAction\": () => (/* binding */ GotoLineAction)\n/* harmony export */ });\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _contrib_quickAccess_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../contrib/quickAccess/commandsQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet StandaloneCommandsQuickAccessProvider = class StandaloneCommandsQuickAccessProvider extends _contrib_quickAccess_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__.AbstractEditorCommandsQuickAccessProvider {\r\n constructor(instantiationService, codeEditorService, keybindingService, commandService, telemetryService, notificationService) {\r\n super({ showAlias: false }, instantiationService, keybindingService, commandService, telemetryService, notificationService);\r\n this.codeEditorService = codeEditorService;\r\n }\r\n get activeTextEditorControl() { return (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__.withNullAsUndefined)(this.codeEditorService.getFocusedCodeEditor()); }\r\n getCommandPicks() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.getCodeEditorCommandPicks();\r\n });\r\n }\r\n};\r\nStandaloneCommandsQuickAccessProvider = __decorate([\r\n __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_6__.IInstantiationService),\r\n __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__.ICodeEditorService),\r\n __param(2, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__.IKeybindingService),\r\n __param(3, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__.ICommandService),\r\n __param(4, _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_9__.ITelemetryService),\r\n __param(5, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_10__.INotificationService)\r\n], StandaloneCommandsQuickAccessProvider);\r\n\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__.Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneCommandsQuickAccessProvider,\r\n prefix: StandaloneCommandsQuickAccessProvider.PREFIX,\r\n helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__.QuickCommandNLS.quickCommandHelp, needsEditor: true }]\r\n});\r\nclass GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.quickCommand',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__.QuickCommandNLS.quickCommandActionLabel,\r\n alias: 'Command Palette',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__.EditorContextKeys.focus,\r\n primary: 59 /* F1 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'z_commands',\r\n order: 1\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__.IQuickInputService).quickAccess.show(StandaloneCommandsQuickAccessProvider.PREFIX);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__.registerEditorAction)(GotoLineAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js":
|
||
/*!******************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js ***!
|
||
\******************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneGotoLineQuickAccessProvider\": () => (/* binding */ StandaloneGotoLineQuickAccessProvider),\n/* harmony export */ \"GotoLineAction\": () => (/* binding */ GotoLineAction)\n/* harmony export */ });\n/* harmony import */ var _contrib_quickAccess_gotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../contrib/quickAccess/gotoLineQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet StandaloneGotoLineQuickAccessProvider = class StandaloneGotoLineQuickAccessProvider extends _contrib_quickAccess_gotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__.AbstractGotoLineQuickAccessProvider {\r\n constructor(editorService) {\r\n super();\r\n this.editorService = editorService;\r\n this.onDidActiveTextEditorControlChange = _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__.Event.None;\r\n }\r\n get activeTextEditorControl() {\r\n return (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__.withNullAsUndefined)(this.editorService.getFocusedCodeEditor());\r\n }\r\n};\r\nStandaloneGotoLineQuickAccessProvider = __decorate([\r\n __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__.ICodeEditorService)\r\n], StandaloneGotoLineQuickAccessProvider);\r\n\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.Registry.as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__.Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneGotoLineQuickAccessProvider,\r\n prefix: StandaloneGotoLineQuickAccessProvider.PREFIX,\r\n helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__.GoToLineNLS.gotoLineActionLabel, needsEditor: true }]\r\n});\r\nclass GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.gotoLine',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__.GoToLineNLS.gotoLineActionLabel,\r\n alias: 'Go to Line/Column...',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */,\r\n mac: { primary: 256 /* WinCtrl */ | 37 /* KEY_G */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__.IQuickInputService).quickAccess.show(StandaloneGotoLineQuickAccessProvider.PREFIX);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__.registerEditorAction)(GotoLineAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js":
|
||
/*!********************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js ***!
|
||
\********************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneGotoSymbolQuickAccessProvider\": () => (/* binding */ StandaloneGotoSymbolQuickAccessProvider),\n/* harmony export */ \"GotoLineAction\": () => (/* binding */ GotoLineAction)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/ui/codicons/codiconStyles.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js\");\n/* harmony import */ var _contrib_symbolIcons_symbolIcons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../contrib/symbolIcons/symbolIcons.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/symbolIcons/symbolIcons.js\");\n/* harmony import */ var _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../contrib/quickAccess/gotoSymbolQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n // The codicon symbol styles are defined here and must be loaded\r\n // The codicon symbol colors are defined here and must be loaded to get colors\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet StandaloneGotoSymbolQuickAccessProvider = class StandaloneGotoSymbolQuickAccessProvider extends _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractGotoSymbolQuickAccessProvider {\r\n constructor(editorService) {\r\n super();\r\n this.editorService = editorService;\r\n this.onDidActiveTextEditorControlChange = _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__.Event.None;\r\n }\r\n get activeTextEditorControl() {\r\n return (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_6__.withNullAsUndefined)(this.editorService.getFocusedCodeEditor());\r\n }\r\n};\r\nStandaloneGotoSymbolQuickAccessProvider = __decorate([\r\n __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__.ICodeEditorService)\r\n], StandaloneGotoSymbolQuickAccessProvider);\r\n\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__.Registry.as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_4__.Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneGotoSymbolQuickAccessProvider,\r\n prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractGotoSymbolQuickAccessProvider.PREFIX,\r\n helpEntries: [\r\n { description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_7__.QuickOutlineNLS.quickOutlineActionLabel, prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractGotoSymbolQuickAccessProvider.PREFIX, needsEditor: true },\r\n { description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_7__.QuickOutlineNLS.quickOutlineByCategoryActionLabel, prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY, needsEditor: true }\r\n ]\r\n});\r\nclass GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.quickOutline',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_7__.QuickOutlineNLS.quickOutlineActionLabel,\r\n alias: 'Go to Symbol...',\r\n precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.hasDocumentSymbolProvider,\r\n kbOpts: {\r\n kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__.EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 45 /* KEY_O */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 3\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_11__.IQuickInputService).quickAccess.show(_contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__.AbstractGotoSymbolQuickAccessProvider.PREFIX);\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__.registerEditorAction)(GotoLineAction);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js":
|
||
/*!**************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js ***!
|
||
\**************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _platform_quickinput_browser_helpQuickAccess_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/quickinput/browser/helpQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__.Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: _platform_quickinput_browser_helpQuickAccess_js__WEBPACK_IMPORTED_MODULE_3__.HelpQuickAccessProvider,\r\n prefix: '',\r\n helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__.QuickHelpNLS.helpQuickAccessActionLabel, needsEditor: true }]\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js":
|
||
/*!*******************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js ***!
|
||
\*******************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorScopedQuickInputServiceImpl\": () => (/* binding */ EditorScopedQuickInputServiceImpl),\n/* harmony export */ \"StandaloneQuickInputServiceImpl\": () => (/* binding */ StandaloneQuickInputServiceImpl),\n/* harmony export */ \"QuickInputEditorContribution\": () => (/* binding */ QuickInputEditorContribution),\n/* harmony export */ \"QuickInputEditorWidget\": () => (/* binding */ QuickInputEditorWidget)\n/* harmony export */ });\n/* harmony import */ var _standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./standaloneQuickInput.css */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css\");\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/layout/browser/layoutService.js */ \"./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _platform_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/quickinput/browser/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js\");\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet EditorScopedQuickInputServiceImpl = class EditorScopedQuickInputServiceImpl extends _platform_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_9__.QuickInputService {\r\n constructor(editor, instantiationService, contextKeyService, themeService, accessibilityService, layoutService) {\r\n super(instantiationService, contextKeyService, themeService, accessibilityService, layoutService);\r\n this.host = undefined;\r\n // Use the passed in code editor as host for the quick input widget\r\n const contribution = QuickInputEditorContribution.get(editor);\r\n this.host = {\r\n _serviceBrand: undefined,\r\n get container() { return contribution.widget.getDomNode(); },\r\n get dimension() { return editor.getLayoutInfo(); },\r\n get onDidLayout() { return editor.onDidLayoutChange; },\r\n focus: () => editor.focus()\r\n };\r\n }\r\n createController() {\r\n return super.createController(this.host);\r\n }\r\n};\r\nEditorScopedQuickInputServiceImpl = __decorate([\r\n __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__.IInstantiationService),\r\n __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.IContextKeyService),\r\n __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__.IThemeService),\r\n __param(4, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_6__.IAccessibilityService),\r\n __param(5, _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_7__.ILayoutService)\r\n], EditorScopedQuickInputServiceImpl);\r\n\r\nlet StandaloneQuickInputServiceImpl = class StandaloneQuickInputServiceImpl {\r\n constructor(instantiationService, codeEditorService) {\r\n this.instantiationService = instantiationService;\r\n this.codeEditorService = codeEditorService;\r\n this.mapEditorToService = new Map();\r\n }\r\n get activeService() {\r\n const editor = this.codeEditorService.getFocusedCodeEditor();\r\n if (!editor) {\r\n throw new Error('Quick input service needs a focused editor to work.');\r\n }\r\n // Find the quick input implementation for the focused\r\n // editor or create it lazily if not yet created\r\n let quickInputService = this.mapEditorToService.get(editor);\r\n if (!quickInputService) {\r\n const newQuickInputService = quickInputService = this.instantiationService.createInstance(EditorScopedQuickInputServiceImpl, editor);\r\n this.mapEditorToService.set(editor, quickInputService);\r\n (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_10__.once)(editor.onDidDispose)(() => {\r\n newQuickInputService.dispose();\r\n this.mapEditorToService.delete(editor);\r\n });\r\n }\r\n return quickInputService;\r\n }\r\n get quickAccess() { return this.activeService.quickAccess; }\r\n pick(picks, options = {}, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__.CancellationToken.None) {\r\n return this.activeService /* TS fail */.pick(picks, options, token);\r\n }\r\n createQuickPick() {\r\n return this.activeService.createQuickPick();\r\n }\r\n};\r\nStandaloneQuickInputServiceImpl = __decorate([\r\n __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__.IInstantiationService),\r\n __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__.ICodeEditorService)\r\n], StandaloneQuickInputServiceImpl);\r\n\r\nclass QuickInputEditorContribution {\r\n constructor(editor) {\r\n this.editor = editor;\r\n this.widget = new QuickInputEditorWidget(this.editor);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(QuickInputEditorContribution.ID);\r\n }\r\n dispose() {\r\n this.widget.dispose();\r\n }\r\n}\r\nQuickInputEditorContribution.ID = 'editor.controller.quickInput';\r\nclass QuickInputEditorWidget {\r\n constructor(codeEditor) {\r\n this.codeEditor = codeEditor;\r\n this.domNode = document.createElement('div');\r\n this.codeEditor.addOverlayWidget(this);\r\n }\r\n getId() {\r\n return QuickInputEditorWidget.ID;\r\n }\r\n getDomNode() {\r\n return this.domNode;\r\n }\r\n getPosition() {\r\n return { preference: 2 /* TOP_CENTER */ };\r\n }\r\n dispose() {\r\n this.codeEditor.removeOverlayWidget(this);\r\n }\r\n}\r\nQuickInputEditorWidget.ID = 'editor.contrib.quickInputWidget';\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__.registerEditorContribution)(QuickInputEditorContribution.ID, QuickInputEditorContribution);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js":
|
||
/*!******************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js ***!
|
||
\******************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneReferencesController\": () => (/* binding */ StandaloneReferencesController)\n/* harmony export */ });\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../contrib/gotoSymbol/peek/referencesController.js */ \"./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet StandaloneReferencesController = class StandaloneReferencesController extends _contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__.ReferencesController {\r\n constructor(editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService) {\r\n super(true, editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService);\r\n }\r\n};\r\nStandaloneReferencesController = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__.IContextKeyService),\r\n __param(2, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__.ICodeEditorService),\r\n __param(3, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__.INotificationService),\r\n __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__.IInstantiationService),\r\n __param(5, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__.IStorageService),\r\n __param(6, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__.IConfigurationService)\r\n], StandaloneReferencesController);\r\n\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorContribution)(_contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__.ReferencesController.ID, StandaloneReferencesController);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SimpleModel\": () => (/* binding */ SimpleModel),\n/* harmony export */ \"SimpleEditorModelResolverService\": () => (/* binding */ SimpleEditorModelResolverService),\n/* harmony export */ \"SimpleEditorProgressService\": () => (/* binding */ SimpleEditorProgressService),\n/* harmony export */ \"SimpleDialogService\": () => (/* binding */ SimpleDialogService),\n/* harmony export */ \"SimpleNotificationService\": () => (/* binding */ SimpleNotificationService),\n/* harmony export */ \"StandaloneCommandService\": () => (/* binding */ StandaloneCommandService),\n/* harmony export */ \"StandaloneKeybindingService\": () => (/* binding */ StandaloneKeybindingService),\n/* harmony export */ \"SimpleConfigurationService\": () => (/* binding */ SimpleConfigurationService),\n/* harmony export */ \"SimpleResourceConfigurationService\": () => (/* binding */ SimpleResourceConfigurationService),\n/* harmony export */ \"SimpleResourcePropertiesService\": () => (/* binding */ SimpleResourcePropertiesService),\n/* harmony export */ \"StandaloneTelemetryService\": () => (/* binding */ StandaloneTelemetryService),\n/* harmony export */ \"SimpleWorkspaceContextService\": () => (/* binding */ SimpleWorkspaceContextService),\n/* harmony export */ \"updateConfigurationService\": () => (/* binding */ updateConfigurationService),\n/* harmony export */ \"SimpleBulkEditService\": () => (/* binding */ SimpleBulkEditService),\n/* harmony export */ \"SimpleUriLabelService\": () => (/* binding */ SimpleUriLabelService),\n/* harmony export */ \"SimpleLayoutService\": () => (/* binding */ SimpleLayoutService)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/keyboardEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js\");\n/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js\");\n/* harmony import */ var _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/config/commonEditorConfig.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js\");\n/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/editOperation.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js\");\n/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/core/position.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/position.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationModels.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js\");\n/* harmony import */ var _platform_keybinding_common_abstractKeybindingService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/keybinding/common/abstractKeybindingService.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingResolver.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js\");\n/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/keybinding/common/resolvedKeybindingItem.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js\");\n/* harmony import */ var _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/keybinding/common/usLayoutResolvedKeybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ \"./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass SimpleModel {\r\n constructor(model) {\r\n this.disposed = false;\r\n this.model = model;\r\n this._onDispose = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n }\r\n get textEditorModel() {\r\n return this.model;\r\n }\r\n dispose() {\r\n this.disposed = true;\r\n this._onDispose.fire();\r\n }\r\n}\r\nfunction withTypedEditor(widget, codeEditorCallback, diffEditorCallback) {\r\n if ((0,_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_9__.isCodeEditor)(widget)) {\r\n // Single Editor\r\n return codeEditorCallback(widget);\r\n }\r\n else {\r\n // Diff Editor\r\n return diffEditorCallback(widget);\r\n }\r\n}\r\nlet SimpleEditorModelResolverService = class SimpleEditorModelResolverService {\r\n constructor(modelService) {\r\n this.modelService = modelService;\r\n }\r\n setEditor(editor) {\r\n this.editor = editor;\r\n }\r\n createModelReference(resource) {\r\n let model = null;\r\n if (this.editor) {\r\n model = withTypedEditor(this.editor, (editor) => this.findModel(editor, resource), (diffEditor) => this.findModel(diffEditor.getOriginalEditor(), resource) || this.findModel(diffEditor.getModifiedEditor(), resource));\r\n }\r\n if (!model) {\r\n return Promise.reject(new Error(`Model not found`));\r\n }\r\n return Promise.resolve(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.ImmortalReference(new SimpleModel(model)));\r\n }\r\n findModel(editor, resource) {\r\n let model = this.modelService.getModel(resource);\r\n if (model && model.uri.toString() !== resource.toString()) {\r\n return null;\r\n }\r\n return model;\r\n }\r\n};\r\nSimpleEditorModelResolverService = __decorate([\r\n __param(0, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_15__.IModelService)\r\n], SimpleEditorModelResolverService);\r\n\r\nclass SimpleEditorProgressService {\r\n show() {\r\n return SimpleEditorProgressService.NULL_PROGRESS_RUNNER;\r\n }\r\n showWhile(promise, delay) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield promise;\r\n });\r\n }\r\n}\r\nSimpleEditorProgressService.NULL_PROGRESS_RUNNER = {\r\n done: () => { },\r\n total: () => { },\r\n worked: () => { }\r\n};\r\nclass SimpleDialogService {\r\n confirm(confirmation) {\r\n return this.doConfirm(confirmation).then(confirmed => {\r\n return {\r\n confirmed,\r\n checkboxChecked: false // unsupported\r\n };\r\n });\r\n }\r\n doConfirm(confirmation) {\r\n let messageText = confirmation.message;\r\n if (confirmation.detail) {\r\n messageText = messageText + '\\n\\n' + confirmation.detail;\r\n }\r\n return Promise.resolve(window.confirm(messageText));\r\n }\r\n show(severity, message, buttons, options) {\r\n return Promise.resolve({ choice: 0 });\r\n }\r\n}\r\nclass SimpleNotificationService {\r\n info(message) {\r\n return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__.default.Info, message });\r\n }\r\n warn(message) {\r\n return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__.default.Warning, message });\r\n }\r\n error(error) {\r\n return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__.default.Error, message: error });\r\n }\r\n notify(notification) {\r\n switch (notification.severity) {\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__.default.Error:\r\n console.error(notification.message);\r\n break;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__.default.Warning:\r\n console.warn(notification.message);\r\n break;\r\n default:\r\n console.log(notification.message);\r\n break;\r\n }\r\n return SimpleNotificationService.NO_OP;\r\n }\r\n status(message, options) {\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.Disposable.None;\r\n }\r\n}\r\nSimpleNotificationService.NO_OP = new _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_24__.NoOpNotification();\r\nclass StandaloneCommandService {\r\n constructor(instantiationService) {\r\n this._onWillExecuteCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this._onDidExecuteCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this._instantiationService = instantiationService;\r\n }\r\n executeCommand(id, ...args) {\r\n const command = _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__.CommandsRegistry.getCommand(id);\r\n if (!command) {\r\n return Promise.reject(new Error(`command '${id}' not found`));\r\n }\r\n try {\r\n this._onWillExecuteCommand.fire({ commandId: id, args });\r\n const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]);\r\n this._onDidExecuteCommand.fire({ commandId: id, args });\r\n return Promise.resolve(result);\r\n }\r\n catch (err) {\r\n return Promise.reject(err);\r\n }\r\n }\r\n}\r\nclass StandaloneKeybindingService extends _platform_keybinding_common_abstractKeybindingService_js__WEBPACK_IMPORTED_MODULE_19__.AbstractKeybindingService {\r\n constructor(contextKeyService, commandService, telemetryService, notificationService, logService, domNode) {\r\n super(contextKeyService, commandService, telemetryService, notificationService, logService);\r\n this._cachedResolver = null;\r\n this._dynamicKeybindings = [];\r\n // for standard keybindings\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(domNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.KEY_DOWN, (e) => {\r\n const keyEvent = new _base_browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardKeyboardEvent(e);\r\n const shouldPreventDefault = this._dispatch(keyEvent, keyEvent.target);\r\n if (shouldPreventDefault) {\r\n keyEvent.preventDefault();\r\n keyEvent.stopPropagation();\r\n }\r\n }));\r\n // for single modifier chord keybindings (e.g. shift shift)\r\n this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.addDisposableListener(window, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.EventType.KEY_UP, (e) => {\r\n const keyEvent = new _base_browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__.StandardKeyboardEvent(e);\r\n const shouldPreventDefault = this._singleModifierDispatch(keyEvent, keyEvent.target);\r\n if (shouldPreventDefault) {\r\n keyEvent.preventDefault();\r\n }\r\n }));\r\n }\r\n addDynamicKeybinding(commandId, _keybinding, handler, when) {\r\n const keybinding = (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__.createKeybinding)(_keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.OS);\r\n const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.DisposableStore();\r\n if (keybinding) {\r\n this._dynamicKeybindings.push({\r\n keybinding: keybinding,\r\n command: commandId,\r\n when: when,\r\n weight1: 1000,\r\n weight2: 0,\r\n extensionId: null,\r\n isBuiltinExtension: false\r\n });\r\n toDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__.toDisposable)(() => {\r\n for (let i = 0; i < this._dynamicKeybindings.length; i++) {\r\n let kb = this._dynamicKeybindings[i];\r\n if (kb.command === commandId) {\r\n this._dynamicKeybindings.splice(i, 1);\r\n this.updateResolver({ source: 1 /* Default */ });\r\n return;\r\n }\r\n }\r\n }));\r\n }\r\n toDispose.add(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__.CommandsRegistry.registerCommand(commandId, handler));\r\n this.updateResolver({ source: 1 /* Default */ });\r\n return toDispose;\r\n }\r\n updateResolver(event) {\r\n this._cachedResolver = null;\r\n this._onDidUpdateKeybindings.fire(event);\r\n }\r\n _getResolver() {\r\n if (!this._cachedResolver) {\r\n const defaults = this._toNormalizedKeybindingItems(_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_21__.KeybindingsRegistry.getDefaultKeybindings(), true);\r\n const overrides = this._toNormalizedKeybindingItems(this._dynamicKeybindings, false);\r\n this._cachedResolver = new _platform_keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_20__.KeybindingResolver(defaults, overrides, (str) => this._log(str));\r\n }\r\n return this._cachedResolver;\r\n }\r\n _documentHasFocus() {\r\n return document.hasFocus();\r\n }\r\n _toNormalizedKeybindingItems(items, isDefault) {\r\n let result = [], resultLen = 0;\r\n for (const item of items) {\r\n const when = item.when || undefined;\r\n const keybinding = item.keybinding;\r\n if (!keybinding) {\r\n // This might be a removal keybinding item in user settings => accept it\r\n result[resultLen++] = new _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__.ResolvedKeybindingItem(undefined, item.command, item.commandArgs, when, isDefault, null, false);\r\n }\r\n else {\r\n const resolvedKeybindings = this.resolveKeybinding(keybinding);\r\n for (const resolvedKeybinding of resolvedKeybindings) {\r\n result[resultLen++] = new _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__.ResolvedKeybindingItem(resolvedKeybinding, item.command, item.commandArgs, when, isDefault, null, false);\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n resolveKeybinding(keybinding) {\r\n return [new _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__.USLayoutResolvedKeybinding(keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.OS)];\r\n }\r\n resolveKeyboardEvent(keyboardEvent) {\r\n let keybinding = new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__.SimpleKeybinding(keyboardEvent.ctrlKey, keyboardEvent.shiftKey, keyboardEvent.altKey, keyboardEvent.metaKey, keyboardEvent.keyCode).toChord();\r\n return new _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__.USLayoutResolvedKeybinding(keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.OS);\r\n }\r\n}\r\nfunction isConfigurationOverrides(thing) {\r\n return thing\r\n && typeof thing === 'object'\r\n && (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string')\r\n && (!thing.resource || thing.resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__.URI);\r\n}\r\nclass SimpleConfigurationService {\r\n constructor() {\r\n this._onDidChangeConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;\r\n this._configuration = new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__.Configuration(new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__.DefaultConfigurationModel(), new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__.ConfigurationModel());\r\n }\r\n getValue(arg1, arg2) {\r\n const section = typeof arg1 === 'string' ? arg1 : undefined;\r\n const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : {};\r\n return this._configuration.getValue(section, overrides, undefined);\r\n }\r\n updateValues(values) {\r\n const previous = { data: this._configuration.toData() };\r\n let changedKeys = [];\r\n for (const entry of values) {\r\n const [key, value] = entry;\r\n if (this.getValue(key) === value) {\r\n continue;\r\n }\r\n this._configuration.updateValue(key, value);\r\n changedKeys.push(key);\r\n }\r\n if (changedKeys.length > 0) {\r\n const configurationChangeEvent = new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__.ConfigurationChangeEvent({ keys: changedKeys, overrides: [] }, previous, this._configuration);\r\n configurationChangeEvent.source = 7 /* MEMORY */;\r\n configurationChangeEvent.sourceConfig = null;\r\n this._onDidChangeConfiguration.fire(configurationChangeEvent);\r\n }\r\n return Promise.resolve();\r\n }\r\n}\r\nclass SimpleResourceConfigurationService {\r\n constructor(configurationService) {\r\n this.configurationService = configurationService;\r\n this._onDidChangeConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.configurationService.onDidChangeConfiguration((e) => {\r\n this._onDidChangeConfiguration.fire({ affectedKeys: e.affectedKeys, affectsConfiguration: (resource, configuration) => e.affectsConfiguration(configuration) });\r\n });\r\n }\r\n getValue(resource, arg2, arg3) {\r\n const position = _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__.Position.isIPosition(arg2) ? arg2 : null;\r\n const section = position ? (typeof arg3 === 'string' ? arg3 : undefined) : (typeof arg2 === 'string' ? arg2 : undefined);\r\n if (typeof section === 'undefined') {\r\n return this.configurationService.getValue();\r\n }\r\n return this.configurationService.getValue(section);\r\n }\r\n}\r\nlet SimpleResourcePropertiesService = class SimpleResourcePropertiesService {\r\n constructor(configurationService) {\r\n this.configurationService = configurationService;\r\n }\r\n getEOL(resource, language) {\r\n const eol = this.configurationService.getValue('files.eol', { overrideIdentifier: language, resource });\r\n if (eol && eol !== 'auto') {\r\n return eol;\r\n }\r\n return (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.isLinux || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.isMacintosh) ? '\\n' : '\\r\\n';\r\n }\r\n};\r\nSimpleResourcePropertiesService = __decorate([\r\n __param(0, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_17__.IConfigurationService)\r\n], SimpleResourcePropertiesService);\r\n\r\nclass StandaloneTelemetryService {\r\n publicLog(eventName, data) {\r\n return Promise.resolve(undefined);\r\n }\r\n publicLog2(eventName, data) {\r\n return this.publicLog(eventName, data);\r\n }\r\n}\r\nclass SimpleWorkspaceContextService {\r\n constructor() {\r\n const resource = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__.URI.from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' });\r\n this.workspace = { id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82', folders: [new _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_25__.WorkspaceFolder({ uri: resource, name: '', index: 0 })] };\r\n }\r\n getWorkspace() {\r\n return this.workspace;\r\n }\r\n}\r\nSimpleWorkspaceContextService.SCHEME = 'inmemory';\r\nfunction updateConfigurationService(configurationService, source, isDiffEditor) {\r\n if (!source) {\r\n return;\r\n }\r\n if (!(configurationService instanceof SimpleConfigurationService)) {\r\n return;\r\n }\r\n let toUpdate = [];\r\n Object.keys(source).forEach((key) => {\r\n if ((0,_common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__.isEditorConfigurationKey)(key)) {\r\n toUpdate.push([`editor.${key}`, source[key]]);\r\n }\r\n if (isDiffEditor && (0,_common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__.isDiffEditorConfigurationKey)(key)) {\r\n toUpdate.push([`diffEditor.${key}`, source[key]]);\r\n }\r\n });\r\n if (toUpdate.length > 0) {\r\n configurationService.updateValues(toUpdate);\r\n }\r\n}\r\nclass SimpleBulkEditService {\r\n constructor(_modelService) {\r\n this._modelService = _modelService;\r\n //\r\n }\r\n hasPreviewHandler() {\r\n return false;\r\n }\r\n apply(edits, _options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const textEdits = new Map();\r\n for (let edit of edits) {\r\n if (!(edit instanceof _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_10__.ResourceTextEdit)) {\r\n throw new Error('bad edit - only text edits are supported');\r\n }\r\n const model = this._modelService.getModel(edit.resource);\r\n if (!model) {\r\n throw new Error('bad edit - model not found');\r\n }\r\n if (typeof edit.versionId === 'number' && model.getVersionId() !== edit.versionId) {\r\n throw new Error('bad state - model changed in the meantime');\r\n }\r\n let array = textEdits.get(model);\r\n if (!array) {\r\n array = [];\r\n textEdits.set(model, array);\r\n }\r\n array.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_12__.EditOperation.replaceMove(_common_core_range_js__WEBPACK_IMPORTED_MODULE_14__.Range.lift(edit.textEdit.range), edit.textEdit.text));\r\n }\r\n let totalEdits = 0;\r\n let totalFiles = 0;\r\n for (const [model, edits] of textEdits) {\r\n model.pushStackElement();\r\n model.pushEditOperations([], edits, () => []);\r\n model.pushStackElement();\r\n totalFiles += 1;\r\n totalEdits += edits.length;\r\n }\r\n return {\r\n ariaSummary: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.format(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_26__.SimpleServicesNLS.bulkEditServiceSummary, totalEdits, totalFiles)\r\n };\r\n });\r\n }\r\n}\r\nclass SimpleUriLabelService {\r\n getUriLabel(resource, options) {\r\n if (resource.scheme === 'file') {\r\n return resource.fsPath;\r\n }\r\n return resource.path;\r\n }\r\n}\r\nclass SimpleLayoutService {\r\n constructor(_codeEditorService, _container) {\r\n this._codeEditorService = _codeEditorService;\r\n this._container = _container;\r\n this.onDidLayout = _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.None;\r\n }\r\n get dimension() {\r\n if (!this._dimension) {\r\n this._dimension = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.getClientArea(window.document.body);\r\n }\r\n return this._dimension;\r\n }\r\n get container() {\r\n return this._container;\r\n }\r\n focus() {\r\n var _a;\r\n (_a = this._codeEditorService.getFocusedCodeEditor()) === null || _a === void 0 ? void 0 : _a.focus();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneCodeEditor\": () => (/* binding */ StandaloneCodeEditor),\n/* harmony export */ \"StandaloneEditor\": () => (/* binding */ StandaloneEditor),\n/* harmony export */ \"StandaloneDiffEditor\": () => (/* binding */ StandaloneDiffEditor),\n/* harmony export */ \"createTextModel\": () => (/* binding */ createTextModel)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/widget/codeEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js\");\n/* harmony import */ var _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/widget/diffEditorWidget.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js\");\n/* harmony import */ var _common_editorAction_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorAction.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./simpleServices.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js\");\n/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet LAST_GENERATED_COMMAND_ID = 0;\r\nlet ariaDomNodeCreated = false;\r\nfunction createAriaDomNode() {\r\n if (ariaDomNodeCreated) {\r\n return;\r\n }\r\n ariaDomNodeCreated = true;\r\n _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__.setARIAContainer(document.body);\r\n}\r\n/**\r\n * A code editor to be used both by the standalone editor and the standalone diff editor.\r\n */\r\nlet StandaloneCodeEditor = class StandaloneCodeEditor extends _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_3__.CodeEditorWidget {\r\n constructor(domElement, _options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService, accessibilityService) {\r\n const options = Object.assign({}, _options);\r\n options.ariaLabel = options.ariaLabel || _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.StandaloneCodeEditorNLS.editorViewAccessibleLabel;\r\n options.ariaLabel = options.ariaLabel + ';' + (_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__.StandaloneCodeEditorNLS.accessibilityHelpMessage);\r\n super(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService);\r\n if (keybindingService instanceof _simpleServices_js__WEBPACK_IMPORTED_MODULE_7__.StandaloneKeybindingService) {\r\n this._standaloneKeybindingService = keybindingService;\r\n }\r\n else {\r\n this._standaloneKeybindingService = null;\r\n }\r\n // Create the ARIA dom node as soon as the first editor is instantiated\r\n createAriaDomNode();\r\n }\r\n addCommand(keybinding, handler, context) {\r\n if (!this._standaloneKeybindingService) {\r\n console.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\r\n return null;\r\n }\r\n let commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\r\n let whenExpression = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.deserialize(context);\r\n this._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\r\n return commandId;\r\n }\r\n createContextKey(key, defaultValue) {\r\n return this._contextKeyService.createKey(key, defaultValue);\r\n }\r\n addAction(_descriptor) {\r\n if ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\r\n throw new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\r\n }\r\n if (!this._standaloneKeybindingService) {\r\n console.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n }\r\n // Read descriptor options\r\n const id = _descriptor.id;\r\n const label = _descriptor.label;\r\n const precondition = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.equals('editorId', this.getId()), _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.deserialize(_descriptor.precondition));\r\n const keybindings = _descriptor.keybindings;\r\n const keybindingsWhen = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.and(precondition, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.ContextKeyExpr.deserialize(_descriptor.keybindingContext));\r\n const contextMenuGroupId = _descriptor.contextMenuGroupId || null;\r\n const contextMenuOrder = _descriptor.contextMenuOrder || 0;\r\n const run = (accessor, ...args) => {\r\n return Promise.resolve(_descriptor.run(this, ...args));\r\n };\r\n const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n // Generate a unique id to allow the same descriptor.id across multiple editor instances\r\n const uniqueId = this.getId() + ':' + id;\r\n // Register the command\r\n toDispose.add(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__.CommandsRegistry.registerCommand(uniqueId, run));\r\n // Register the context menu item\r\n if (contextMenuGroupId) {\r\n let menuItem = {\r\n command: {\r\n id: uniqueId,\r\n title: label\r\n },\r\n when: precondition,\r\n group: contextMenuGroupId,\r\n order: contextMenuOrder\r\n };\r\n toDispose.add(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuRegistry.appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__.MenuId.EditorContext, menuItem));\r\n }\r\n // Register the keybindings\r\n if (Array.isArray(keybindings)) {\r\n for (const kb of keybindings) {\r\n toDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen));\r\n }\r\n }\r\n // Finally, register an internal editor action\r\n let internalAction = new _common_editorAction_js__WEBPACK_IMPORTED_MODULE_5__.InternalEditorAction(uniqueId, label, label, precondition, run, this._contextKeyService);\r\n // Store it under the original id, such that trigger with the original id will work\r\n this._actions[id] = internalAction;\r\n toDispose.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n delete this._actions[id];\r\n }));\r\n return toDispose;\r\n }\r\n};\r\nStandaloneCodeEditor = __decorate([\r\n __param(2, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__.IInstantiationService),\r\n __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService),\r\n __param(4, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__.ICommandService),\r\n __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(6, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__.IKeybindingService),\r\n __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__.IThemeService),\r\n __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__.INotificationService),\r\n __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], StandaloneCodeEditor);\r\n\r\nlet StandaloneEditor = class StandaloneEditor extends StandaloneCodeEditor {\r\n constructor(domElement, _options, toDispose, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, contextViewService, themeService, notificationService, configurationService, accessibilityService, modelService, modeService) {\r\n const options = Object.assign({}, _options);\r\n (0,_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__.updateConfigurationService)(configurationService, options, false);\r\n const themeDomRegistration = themeService.registerEditorContainer(domElement);\r\n if (typeof options.theme === 'string') {\r\n themeService.setTheme(options.theme);\r\n }\r\n if (typeof options.autoDetectHighContrast !== 'undefined') {\r\n themeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\r\n }\r\n let _model = options.model;\r\n delete options.model;\r\n super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService, accessibilityService);\r\n this._contextViewService = contextViewService;\r\n this._configurationService = configurationService;\r\n this._standaloneThemeService = themeService;\r\n this._register(toDispose);\r\n this._register(themeDomRegistration);\r\n let model;\r\n if (typeof _model === 'undefined') {\r\n model = createTextModel(modelService, modeService, options.value || '', options.language || 'text/plain', undefined);\r\n this._ownsModel = true;\r\n }\r\n else {\r\n model = _model;\r\n this._ownsModel = false;\r\n }\r\n this._attachModel(model);\r\n if (model) {\r\n let e = {\r\n oldModelUrl: null,\r\n newModelUrl: model.uri\r\n };\r\n this._onDidChangeModel.fire(e);\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n updateOptions(newOptions) {\r\n (0,_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__.updateConfigurationService)(this._configurationService, newOptions, false);\r\n if (typeof newOptions.theme === 'string') {\r\n this._standaloneThemeService.setTheme(newOptions.theme);\r\n }\r\n if (typeof newOptions.autoDetectHighContrast !== 'undefined') {\r\n this._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\r\n }\r\n super.updateOptions(newOptions);\r\n }\r\n _attachModel(model) {\r\n super._attachModel(model);\r\n if (this._modelData) {\r\n this._contextViewService.setContainer(this._modelData.view.domNode.domNode);\r\n }\r\n }\r\n _postDetachModelCleanup(detachedModel) {\r\n super._postDetachModelCleanup(detachedModel);\r\n if (detachedModel && this._ownsModel) {\r\n detachedModel.dispose();\r\n this._ownsModel = false;\r\n }\r\n }\r\n};\r\nStandaloneEditor = __decorate([\r\n __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__.IInstantiationService),\r\n __param(4, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService),\r\n __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__.ICommandService),\r\n __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(7, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__.IKeybindingService),\r\n __param(8, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__.IContextViewService),\r\n __param(9, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__.IStandaloneThemeService),\r\n __param(10, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__.INotificationService),\r\n __param(11, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__.IConfigurationService),\r\n __param(12, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService),\r\n __param(13, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_22__.IModelService),\r\n __param(14, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_23__.IModeService)\r\n], StandaloneEditor);\r\n\r\nlet StandaloneDiffEditor = class StandaloneDiffEditor extends _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_4__.DiffEditorWidget {\r\n constructor(domElement, _options, toDispose, instantiationService, contextKeyService, keybindingService, contextViewService, editorWorkerService, codeEditorService, themeService, notificationService, configurationService, contextMenuService, editorProgressService, clipboardService) {\r\n const options = Object.assign({}, _options);\r\n (0,_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__.updateConfigurationService)(configurationService, options, true);\r\n const themeDomRegistration = themeService.registerEditorContainer(domElement);\r\n if (typeof options.theme === 'string') {\r\n themeService.setTheme(options.theme);\r\n }\r\n if (typeof options.autoDetectHighContrast !== 'undefined') {\r\n themeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\r\n }\r\n super(domElement, options, {}, clipboardService, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, editorProgressService);\r\n this._contextViewService = contextViewService;\r\n this._configurationService = configurationService;\r\n this._standaloneThemeService = themeService;\r\n this._register(toDispose);\r\n this._register(themeDomRegistration);\r\n this._contextViewService.setContainer(this._containerDomElement);\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n updateOptions(newOptions) {\r\n (0,_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__.updateConfigurationService)(this._configurationService, newOptions, true);\r\n if (typeof newOptions.theme === 'string') {\r\n this._standaloneThemeService.setTheme(newOptions.theme);\r\n }\r\n if (typeof newOptions.autoDetectHighContrast !== 'undefined') {\r\n this._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\r\n }\r\n super.updateOptions(newOptions);\r\n }\r\n _createInnerEditor(instantiationService, container, options) {\r\n return instantiationService.createInstance(StandaloneCodeEditor, container, options);\r\n }\r\n getOriginalEditor() {\r\n return super.getOriginalEditor();\r\n }\r\n getModifiedEditor() {\r\n return super.getModifiedEditor();\r\n }\r\n addCommand(keybinding, handler, context) {\r\n return this.getModifiedEditor().addCommand(keybinding, handler, context);\r\n }\r\n createContextKey(key, defaultValue) {\r\n return this.getModifiedEditor().createContextKey(key, defaultValue);\r\n }\r\n addAction(descriptor) {\r\n return this.getModifiedEditor().addAction(descriptor);\r\n }\r\n};\r\nStandaloneDiffEditor = __decorate([\r\n __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__.IInstantiationService),\r\n __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__.IContextKeyService),\r\n __param(5, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__.IKeybindingService),\r\n __param(6, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__.IContextViewService),\r\n __param(7, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_6__.IEditorWorkerService),\r\n __param(8, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService),\r\n __param(9, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__.IStandaloneThemeService),\r\n __param(10, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__.INotificationService),\r\n __param(11, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__.IConfigurationService),\r\n __param(12, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__.IContextMenuService),\r\n __param(13, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_21__.IEditorProgressService),\r\n __param(14, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_20__.IClipboardService)\r\n], StandaloneDiffEditor);\r\n\r\n/**\r\n * @internal\r\n */\r\nfunction createTextModel(modelService, modeService, value, language, uri) {\r\n value = value || '';\r\n if (!language) {\r\n const firstLF = value.indexOf('\\n');\r\n let firstLine = value;\r\n if (firstLF !== -1) {\r\n firstLine = value.substring(0, firstLF);\r\n }\r\n return doCreateModel(modelService, value, modeService.createByFilepathOrFirstLine(uri || null, firstLine), uri);\r\n }\r\n return doCreateModel(modelService, value, modeService.create(language), uri);\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction doCreateModel(modelService, value, languageSelection, uri) {\r\n return modelService.createModel(value, languageSelection, uri);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneCodeEditorServiceImpl\": () => (/* binding */ StandaloneCodeEditorServiceImpl)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _browser_services_codeEditorServiceImpl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\nlet StandaloneCodeEditorServiceImpl = class StandaloneCodeEditorServiceImpl extends _browser_services_codeEditorServiceImpl_js__WEBPACK_IMPORTED_MODULE_2__.CodeEditorServiceImpl {\r\n constructor(styleSheet, contextKeyService, themeService) {\r\n super(styleSheet, themeService);\r\n this.onCodeEditorAdd(() => this._checkContextKey());\r\n this.onCodeEditorRemove(() => this._checkContextKey());\r\n this._editorIsOpen = contextKeyService.createKey('editorIsOpen', false);\r\n }\r\n _checkContextKey() {\r\n let hasCodeEditor = false;\r\n for (const editor of this.listCodeEditors()) {\r\n if (!editor.isSimpleWidget) {\r\n hasCodeEditor = true;\r\n break;\r\n }\r\n }\r\n this._editorIsOpen.set(hasCodeEditor);\r\n }\r\n getActiveCodeEditor() {\r\n return null; // not supported in the standalone case\r\n }\r\n openCodeEditor(input, source, sideBySide) {\r\n if (!source) {\r\n return Promise.resolve(null);\r\n }\r\n return Promise.resolve(this.doOpenEditor(source, input));\r\n }\r\n doOpenEditor(editor, input) {\r\n const model = this.findModel(editor, input.resource);\r\n if (!model) {\r\n if (input.resource) {\r\n const schema = input.resource.scheme;\r\n if (schema === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.http || schema === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.https) {\r\n // This is a fully qualified http or https URL\r\n (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.windowOpenNoOpener)(input.resource.toString());\r\n return editor;\r\n }\r\n }\r\n return null;\r\n }\r\n const selection = (input.options ? input.options.selection : null);\r\n if (selection) {\r\n if (typeof selection.endLineNumber === 'number' && typeof selection.endColumn === 'number') {\r\n editor.setSelection(selection);\r\n editor.revealRangeInCenter(selection, 1 /* Immediate */);\r\n }\r\n else {\r\n const pos = {\r\n lineNumber: selection.startLineNumber,\r\n column: selection.startColumn\r\n };\r\n editor.setPosition(pos);\r\n editor.revealPositionInCenter(pos, 1 /* Immediate */);\r\n }\r\n }\r\n return editor;\r\n }\r\n findModel(editor, resource) {\r\n const model = editor.getModel();\r\n if (model && model.uri.toString() !== resource.toString()) {\r\n return null;\r\n }\r\n return model;\r\n }\r\n};\r\nStandaloneCodeEditorServiceImpl = __decorate([\r\n __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.IContextKeyService),\r\n __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.IThemeService)\r\n], StandaloneCodeEditorServiceImpl);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"create\": () => (/* binding */ create),\n/* harmony export */ \"onDidCreateEditor\": () => (/* binding */ onDidCreateEditor),\n/* harmony export */ \"createDiffEditor\": () => (/* binding */ createDiffEditor),\n/* harmony export */ \"createDiffNavigator\": () => (/* binding */ createDiffNavigator),\n/* harmony export */ \"createModel\": () => (/* binding */ createModel),\n/* harmony export */ \"setModelLanguage\": () => (/* binding */ setModelLanguage),\n/* harmony export */ \"setModelMarkers\": () => (/* binding */ setModelMarkers),\n/* harmony export */ \"getModelMarkers\": () => (/* binding */ getModelMarkers),\n/* harmony export */ \"onDidChangeMarkers\": () => (/* binding */ onDidChangeMarkers),\n/* harmony export */ \"getModel\": () => (/* binding */ getModel),\n/* harmony export */ \"getModels\": () => (/* binding */ getModels),\n/* harmony export */ \"onDidCreateModel\": () => (/* binding */ onDidCreateModel),\n/* harmony export */ \"onWillDisposeModel\": () => (/* binding */ onWillDisposeModel),\n/* harmony export */ \"onDidChangeModelLanguage\": () => (/* binding */ onDidChangeModelLanguage),\n/* harmony export */ \"createWebWorker\": () => (/* binding */ createWebWorker),\n/* harmony export */ \"colorizeElement\": () => (/* binding */ colorizeElement),\n/* harmony export */ \"colorize\": () => (/* binding */ colorize),\n/* harmony export */ \"colorizeModelLine\": () => (/* binding */ colorizeModelLine),\n/* harmony export */ \"tokenize\": () => (/* binding */ tokenize),\n/* harmony export */ \"defineTheme\": () => (/* binding */ defineTheme),\n/* harmony export */ \"setTheme\": () => (/* binding */ setTheme),\n/* harmony export */ \"remeasureFonts\": () => (/* binding */ remeasureFonts),\n/* harmony export */ \"registerCommand\": () => (/* binding */ registerCommand),\n/* harmony export */ \"createMonacoEditorAPI\": () => (/* binding */ createMonacoEditorAPI)\n/* harmony export */ });\n/* harmony import */ var _standalone_tokens_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./standalone-tokens.css */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _browser_services_openerService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/openerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js\");\n/* harmony import */ var _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/widget/diffNavigator.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js\");\n/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js\");\n/* harmony import */ var _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/config/fontInfo.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js\");\n/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js\");\n/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/model.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/model.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/services/resolverService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js\");\n/* harmony import */ var _common_services_webWorker_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/services/webWorker.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js\");\n/* harmony import */ var _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/standalone/standaloneEnums.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js\");\n/* harmony import */ var _colorizer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./colorizer.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js\");\n/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./simpleServices.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js\");\n/* harmony import */ var _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./standaloneCodeEditor.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js\");\n/* harmony import */ var _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./standaloneServices.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js\");\n/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ \"./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _browser_config_configuration_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../browser/config/configuration.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction withAllStandaloneServices(domElement, override, callback) {\r\n let services = new _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.DynamicStandaloneServices(domElement, override);\r\n let simpleEditorModelResolverService = null;\r\n if (!services.has(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_12__.ITextModelService)) {\r\n simpleEditorModelResolverService = new _simpleServices_js__WEBPACK_IMPORTED_MODULE_16__.SimpleEditorModelResolverService(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get());\r\n services.set(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_12__.ITextModelService, simpleEditorModelResolverService);\r\n }\r\n if (!services.has(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_27__.IOpenerService)) {\r\n services.set(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_27__.IOpenerService, new _browser_services_openerService_js__WEBPACK_IMPORTED_MODULE_2__.OpenerService(services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__.ICodeEditorService), services.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_20__.ICommandService)));\r\n }\r\n let result = callback(services);\r\n if (simpleEditorModelResolverService) {\r\n simpleEditorModelResolverService.setEditor(result);\r\n }\r\n return result;\r\n}\r\n/**\r\n * Create a new editor under `domElement`.\r\n * `domElement` should be empty (not contain other dom nodes).\r\n * The editor will read the size of `domElement`.\r\n */\r\nfunction create(domElement, options, override) {\r\n return withAllStandaloneServices(domElement, override || {}, (services) => {\r\n return new _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_17__.StandaloneEditor(domElement, options, services, services.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_24__.IInstantiationService), services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__.ICodeEditorService), services.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_20__.ICommandService), services.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_22__.IContextKeyService), services.get(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_25__.IKeybindingService), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_23__.IContextViewService), services.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_19__.IStandaloneThemeService), services.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_26__.INotificationService), services.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_21__.IConfigurationService), services.get(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_28__.IAccessibilityService), services.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_33__.IModelService), services.get(_common_services_modeService_js__WEBPACK_IMPORTED_MODULE_11__.IModeService));\r\n });\r\n}\r\n/**\r\n * Emitted when an editor is created.\r\n * Creating a diff editor might cause this listener to be invoked with the two editors.\r\n * @event\r\n */\r\nfunction onDidCreateEditor(listener) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.codeEditorService.get().onCodeEditorAdd((editor) => {\r\n listener(editor);\r\n });\r\n}\r\n/**\r\n * Create a new diff editor under `domElement`.\r\n * `domElement` should be empty (not contain other dom nodes).\r\n * The editor will read the size of `domElement`.\r\n */\r\nfunction createDiffEditor(domElement, options, override) {\r\n return withAllStandaloneServices(domElement, override || {}, (services) => {\r\n return new _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_17__.StandaloneDiffEditor(domElement, options, services, services.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_24__.IInstantiationService), services.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_22__.IContextKeyService), services.get(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_25__.IKeybindingService), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_23__.IContextViewService), services.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__.IEditorWorkerService), services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__.ICodeEditorService), services.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_19__.IStandaloneThemeService), services.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_26__.INotificationService), services.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_21__.IConfigurationService), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_23__.IContextMenuService), services.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_30__.IEditorProgressService), services.get(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_31__.IClipboardService));\r\n });\r\n}\r\nfunction createDiffNavigator(diffEditor, opts) {\r\n return new _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__.DiffNavigator(diffEditor, opts);\r\n}\r\n/**\r\n * Create a new editor model.\r\n * You can specify the language that should be set for this model or let the language be inferred from the `uri`.\r\n */\r\nfunction createModel(value, language, uri) {\r\n return (0,_standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_17__.createTextModel)(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get(), _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modeService.get(), value, language, uri);\r\n}\r\n/**\r\n * Change the language for a model.\r\n */\r\nfunction setModelLanguage(model, languageId) {\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().setMode(model, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modeService.get().create(languageId));\r\n}\r\n/**\r\n * Set the markers for a model.\r\n */\r\nfunction setModelMarkers(model, owner, markers) {\r\n if (model) {\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.markerService.get().changeOne(owner, model.uri, markers);\r\n }\r\n}\r\n/**\r\n * Get markers for owner and/or resource\r\n *\r\n * @returns list of markers\r\n */\r\nfunction getModelMarkers(filter) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.markerService.get().read(filter);\r\n}\r\n/**\r\n * Emitted when markers change for a model.\r\n * @event\r\n */\r\nfunction onDidChangeMarkers(listener) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.markerService.get().onMarkerChanged(listener);\r\n}\r\n/**\r\n * Get the model that has `uri` if it exists.\r\n */\r\nfunction getModel(uri) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().getModel(uri);\r\n}\r\n/**\r\n * Get all the created models.\r\n */\r\nfunction getModels() {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().getModels();\r\n}\r\n/**\r\n * Emitted when a model is created.\r\n * @event\r\n */\r\nfunction onDidCreateModel(listener) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().onModelAdded(listener);\r\n}\r\n/**\r\n * Emitted right before a model is disposed.\r\n * @event\r\n */\r\nfunction onWillDisposeModel(listener) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().onModelRemoved(listener);\r\n}\r\n/**\r\n * Emitted when a different language is set to a model.\r\n * @event\r\n */\r\nfunction onDidChangeModelLanguage(listener) {\r\n return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get().onModelModeChanged((e) => {\r\n listener({\r\n model: e.model,\r\n oldLanguage: e.oldModeId\r\n });\r\n });\r\n}\r\n/**\r\n * Create a new web worker that has model syncing capabilities built in.\r\n * Specify an AMD module to load that will `create` an object that will be proxied.\r\n */\r\nfunction createWebWorker(opts) {\r\n return (0,_common_services_webWorker_js__WEBPACK_IMPORTED_MODULE_13__.createWebWorker)(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modelService.get(), opts);\r\n}\r\n/**\r\n * Colorize the contents of `domNode` using attribute `data-lang`.\r\n */\r\nfunction colorizeElement(domNode, options) {\r\n const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.standaloneThemeService.get();\r\n themeService.registerEditorContainer(domNode);\r\n return _colorizer_js__WEBPACK_IMPORTED_MODULE_15__.Colorizer.colorizeElement(themeService, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modeService.get(), domNode, options);\r\n}\r\n/**\r\n * Colorize `text` using language `languageId`.\r\n */\r\nfunction colorize(text, languageId, options) {\r\n const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.standaloneThemeService.get();\r\n themeService.registerEditorContainer(document.body);\r\n return _colorizer_js__WEBPACK_IMPORTED_MODULE_15__.Colorizer.colorize(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modeService.get(), text, languageId, options);\r\n}\r\n/**\r\n * Colorize a line in a model.\r\n */\r\nfunction colorizeModelLine(model, lineNumber, tabSize = 4) {\r\n const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.standaloneThemeService.get();\r\n themeService.registerEditorContainer(document.body);\r\n return _colorizer_js__WEBPACK_IMPORTED_MODULE_15__.Colorizer.colorizeModelLine(model, lineNumber, tabSize);\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction getSafeTokenizationSupport(language) {\r\n let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__.TokenizationRegistry.get(language);\r\n if (tokenizationSupport) {\r\n return tokenizationSupport;\r\n }\r\n return {\r\n getInitialState: () => _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__.NULL_STATE,\r\n tokenize: (line, hasEOL, state, deltaOffset) => (0,_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__.nullTokenize)(language, line, state, deltaOffset)\r\n };\r\n}\r\n/**\r\n * Tokenize `text` using language `languageId`\r\n */\r\nfunction tokenize(text, languageId) {\r\n let modeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.modeService.get();\r\n // Needed in order to get the mode registered for subsequent look-ups\r\n modeService.triggerMode(languageId);\r\n let tokenizationSupport = getSafeTokenizationSupport(languageId);\r\n let lines = (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_32__.splitLines)(text);\r\n let result = [];\r\n let state = tokenizationSupport.getInitialState();\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n let line = lines[i];\r\n let tokenizationResult = tokenizationSupport.tokenize(line, true, state, 0);\r\n result[i] = tokenizationResult.tokens;\r\n state = tokenizationResult.endState;\r\n }\r\n return result;\r\n}\r\n/**\r\n * Define a new theme or update an existing theme.\r\n */\r\nfunction defineTheme(themeName, themeData) {\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.standaloneThemeService.get().defineTheme(themeName, themeData);\r\n}\r\n/**\r\n * Switches to a theme.\r\n */\r\nfunction setTheme(themeName) {\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_18__.StaticServices.standaloneThemeService.get().setTheme(themeName);\r\n}\r\n/**\r\n * Clears all cached font measurements and triggers re-measurement.\r\n */\r\nfunction remeasureFonts() {\r\n (0,_browser_config_configuration_js__WEBPACK_IMPORTED_MODULE_29__.clearAllFontInfos)();\r\n}\r\n/**\r\n * Register a command.\r\n */\r\nfunction registerCommand(id, handler) {\r\n return _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_20__.CommandsRegistry.registerCommand({ id, handler });\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction createMonacoEditorAPI() {\r\n return {\r\n // methods\r\n create: create,\r\n onDidCreateEditor: onDidCreateEditor,\r\n createDiffEditor: createDiffEditor,\r\n createDiffNavigator: createDiffNavigator,\r\n createModel: createModel,\r\n setModelLanguage: setModelLanguage,\r\n setModelMarkers: setModelMarkers,\r\n getModelMarkers: getModelMarkers,\r\n onDidChangeMarkers: onDidChangeMarkers,\r\n getModels: getModels,\r\n getModel: getModel,\r\n onDidCreateModel: onDidCreateModel,\r\n onWillDisposeModel: onWillDisposeModel,\r\n onDidChangeModelLanguage: onDidChangeModelLanguage,\r\n createWebWorker: createWebWorker,\r\n colorizeElement: colorizeElement,\r\n colorize: colorize,\r\n colorizeModelLine: colorizeModelLine,\r\n tokenize: tokenize,\r\n defineTheme: defineTheme,\r\n setTheme: setTheme,\r\n remeasureFonts: remeasureFonts,\r\n registerCommand: registerCommand,\r\n // enums\r\n AccessibilitySupport: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.AccessibilitySupport,\r\n ContentWidgetPositionPreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.ContentWidgetPositionPreference,\r\n CursorChangeReason: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.CursorChangeReason,\r\n DefaultEndOfLine: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.DefaultEndOfLine,\r\n EditorAutoIndentStrategy: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.EditorAutoIndentStrategy,\r\n EditorOption: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.EditorOption,\r\n EndOfLinePreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.EndOfLinePreference,\r\n EndOfLineSequence: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.EndOfLineSequence,\r\n MinimapPosition: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.MinimapPosition,\r\n MouseTargetType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.MouseTargetType,\r\n OverlayWidgetPositionPreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.OverlayWidgetPositionPreference,\r\n OverviewRulerLane: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.OverviewRulerLane,\r\n RenderLineNumbersType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.RenderLineNumbersType,\r\n RenderMinimap: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.RenderMinimap,\r\n ScrollbarVisibility: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.ScrollbarVisibility,\r\n ScrollType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.ScrollType,\r\n TextEditorCursorBlinkingStyle: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.TextEditorCursorBlinkingStyle,\r\n TextEditorCursorStyle: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.TextEditorCursorStyle,\r\n TrackedRangeStickiness: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.TrackedRangeStickiness,\r\n WrappingIndent: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_14__.WrappingIndent,\r\n // classes\r\n ConfigurationChangedEvent: _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.ConfigurationChangedEvent,\r\n BareFontInfo: _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__.BareFontInfo,\r\n FontInfo: _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__.FontInfo,\r\n TextModelResolvedOptions: _common_model_js__WEBPACK_IMPORTED_MODULE_7__.TextModelResolvedOptions,\r\n FindMatch: _common_model_js__WEBPACK_IMPORTED_MODULE_7__.FindMatch,\r\n // vars\r\n EditorType: _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_6__.EditorType,\r\n EditorOptions: _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__.EditorOptions\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"register\": () => (/* binding */ register),\n/* harmony export */ \"getLanguages\": () => (/* binding */ getLanguages),\n/* harmony export */ \"getEncodedLanguageId\": () => (/* binding */ getEncodedLanguageId),\n/* harmony export */ \"onLanguage\": () => (/* binding */ onLanguage),\n/* harmony export */ \"setLanguageConfiguration\": () => (/* binding */ setLanguageConfiguration),\n/* harmony export */ \"EncodedTokenizationSupport2Adapter\": () => (/* binding */ EncodedTokenizationSupport2Adapter),\n/* harmony export */ \"TokenizationSupport2Adapter\": () => (/* binding */ TokenizationSupport2Adapter),\n/* harmony export */ \"setColorMap\": () => (/* binding */ setColorMap),\n/* harmony export */ \"setTokensProvider\": () => (/* binding */ setTokensProvider),\n/* harmony export */ \"setMonarchTokensProvider\": () => (/* binding */ setMonarchTokensProvider),\n/* harmony export */ \"registerReferenceProvider\": () => (/* binding */ registerReferenceProvider),\n/* harmony export */ \"registerRenameProvider\": () => (/* binding */ registerRenameProvider),\n/* harmony export */ \"registerSignatureHelpProvider\": () => (/* binding */ registerSignatureHelpProvider),\n/* harmony export */ \"registerHoverProvider\": () => (/* binding */ registerHoverProvider),\n/* harmony export */ \"registerDocumentSymbolProvider\": () => (/* binding */ registerDocumentSymbolProvider),\n/* harmony export */ \"registerDocumentHighlightProvider\": () => (/* binding */ registerDocumentHighlightProvider),\n/* harmony export */ \"registerLinkedEditingRangeProvider\": () => (/* binding */ registerLinkedEditingRangeProvider),\n/* harmony export */ \"registerDefinitionProvider\": () => (/* binding */ registerDefinitionProvider),\n/* harmony export */ \"registerImplementationProvider\": () => (/* binding */ registerImplementationProvider),\n/* harmony export */ \"registerTypeDefinitionProvider\": () => (/* binding */ registerTypeDefinitionProvider),\n/* harmony export */ \"registerCodeLensProvider\": () => (/* binding */ registerCodeLensProvider),\n/* harmony export */ \"registerCodeActionProvider\": () => (/* binding */ registerCodeActionProvider),\n/* harmony export */ \"registerDocumentFormattingEditProvider\": () => (/* binding */ registerDocumentFormattingEditProvider),\n/* harmony export */ \"registerDocumentRangeFormattingEditProvider\": () => (/* binding */ registerDocumentRangeFormattingEditProvider),\n/* harmony export */ \"registerOnTypeFormattingEditProvider\": () => (/* binding */ registerOnTypeFormattingEditProvider),\n/* harmony export */ \"registerLinkProvider\": () => (/* binding */ registerLinkProvider),\n/* harmony export */ \"registerCompletionItemProvider\": () => (/* binding */ registerCompletionItemProvider),\n/* harmony export */ \"registerColorProvider\": () => (/* binding */ registerColorProvider),\n/* harmony export */ \"registerFoldingRangeProvider\": () => (/* binding */ registerFoldingRangeProvider),\n/* harmony export */ \"registerDeclarationProvider\": () => (/* binding */ registerDeclarationProvider),\n/* harmony export */ \"registerSelectionRangeProvider\": () => (/* binding */ registerSelectionRangeProvider),\n/* harmony export */ \"registerDocumentSemanticTokensProvider\": () => (/* binding */ registerDocumentSemanticTokensProvider),\n/* harmony export */ \"registerDocumentRangeSemanticTokensProvider\": () => (/* binding */ registerDocumentRangeSemanticTokensProvider),\n/* harmony export */ \"createMonacoLanguagesAPI\": () => (/* binding */ createMonacoLanguagesAPI)\n/* harmony export */ });\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/range.js\");\n/* harmony import */ var _common_core_token_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/token.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/token.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js\");\n/* harmony import */ var _common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes/modesRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js\");\n/* harmony import */ var _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/standalone/standaloneEnums.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js\");\n/* harmony import */ var _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./standaloneServices.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js\");\n/* harmony import */ var _common_monarch_monarchCompile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/monarch/monarchCompile.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js\");\n/* harmony import */ var _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/monarch/monarchLexer.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Register information about a new language.\r\n */\r\nfunction register(language) {\r\n _common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_5__.ModesRegistry.registerLanguage(language);\r\n}\r\n/**\r\n * Get the information of all the registered languages.\r\n */\r\nfunction getLanguages() {\r\n let result = [];\r\n result = result.concat(_common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_5__.ModesRegistry.getLanguages());\r\n return result;\r\n}\r\nfunction getEncodedLanguageId(languageId) {\r\n let lid = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.modeService.get().getLanguageIdentifier(languageId);\r\n return lid ? lid.id : 0;\r\n}\r\n/**\r\n * An event emitted when a language is first time needed (e.g. a model has it set).\r\n * @event\r\n */\r\nfunction onLanguage(languageId, callback) {\r\n let disposable = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.modeService.get().onDidCreateMode((mode) => {\r\n if (mode.getId() === languageId) {\r\n // stop listening\r\n disposable.dispose();\r\n // invoke actual listener\r\n callback();\r\n }\r\n });\r\n return disposable;\r\n}\r\n/**\r\n * Set the editing configuration for a language.\r\n */\r\nfunction setLanguageConfiguration(languageId, configuration) {\r\n let languageIdentifier = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.modeService.get().getLanguageIdentifier(languageId);\r\n if (!languageIdentifier) {\r\n throw new Error(`Cannot set configuration for unknown language ${languageId}`);\r\n }\r\n return _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__.LanguageConfigurationRegistry.register(languageIdentifier, configuration, 100);\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass EncodedTokenizationSupport2Adapter {\r\n constructor(languageIdentifier, actual) {\r\n this._languageIdentifier = languageIdentifier;\r\n this._actual = actual;\r\n }\r\n getInitialState() {\r\n return this._actual.getInitialState();\r\n }\r\n tokenize(line, hasEOL, state, offsetDelta) {\r\n if (typeof this._actual.tokenize === 'function') {\r\n return TokenizationSupport2Adapter.adaptTokenize(this._languageIdentifier.language, this._actual, line, state, offsetDelta);\r\n }\r\n throw new Error('Not supported!');\r\n }\r\n tokenize2(line, hasEOL, state) {\r\n let result = this._actual.tokenizeEncoded(line, state);\r\n return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_2__.TokenizationResult2(result.tokens, result.endState);\r\n }\r\n}\r\n/**\r\n * @internal\r\n */\r\nclass TokenizationSupport2Adapter {\r\n constructor(standaloneThemeService, languageIdentifier, actual) {\r\n this._standaloneThemeService = standaloneThemeService;\r\n this._languageIdentifier = languageIdentifier;\r\n this._actual = actual;\r\n }\r\n getInitialState() {\r\n return this._actual.getInitialState();\r\n }\r\n static _toClassicTokens(tokens, language, offsetDelta) {\r\n let result = [];\r\n let previousStartIndex = 0;\r\n for (let i = 0, len = tokens.length; i < len; i++) {\r\n const t = tokens[i];\r\n let startIndex = t.startIndex;\r\n // Prevent issues stemming from a buggy external tokenizer.\r\n if (i === 0) {\r\n // Force first token to start at first index!\r\n startIndex = 0;\r\n }\r\n else if (startIndex < previousStartIndex) {\r\n // Force tokens to be after one another!\r\n startIndex = previousStartIndex;\r\n }\r\n result[i] = new _common_core_token_js__WEBPACK_IMPORTED_MODULE_2__.Token(startIndex + offsetDelta, t.scopes, language);\r\n previousStartIndex = startIndex;\r\n }\r\n return result;\r\n }\r\n static adaptTokenize(language, actual, line, state, offsetDelta) {\r\n let actualResult = actual.tokenize(line, state);\r\n let tokens = TokenizationSupport2Adapter._toClassicTokens(actualResult.tokens, language, offsetDelta);\r\n let endState;\r\n // try to save an object if possible\r\n if (actualResult.endState.equals(state)) {\r\n endState = state;\r\n }\r\n else {\r\n endState = actualResult.endState;\r\n }\r\n return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_2__.TokenizationResult(tokens, endState);\r\n }\r\n tokenize(line, hasEOL, state, offsetDelta) {\r\n return TokenizationSupport2Adapter.adaptTokenize(this._languageIdentifier.language, this._actual, line, state, offsetDelta);\r\n }\r\n _toBinaryTokens(tokens, offsetDelta) {\r\n const languageId = this._languageIdentifier.id;\r\n const tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme;\r\n let result = [], resultLen = 0;\r\n let previousStartIndex = 0;\r\n for (let i = 0, len = tokens.length; i < len; i++) {\r\n const t = tokens[i];\r\n const metadata = tokenTheme.match(languageId, t.scopes);\r\n if (resultLen > 0 && result[resultLen - 1] === metadata) {\r\n // same metadata\r\n continue;\r\n }\r\n let startIndex = t.startIndex;\r\n // Prevent issues stemming from a buggy external tokenizer.\r\n if (i === 0) {\r\n // Force first token to start at first index!\r\n startIndex = 0;\r\n }\r\n else if (startIndex < previousStartIndex) {\r\n // Force tokens to be after one another!\r\n startIndex = previousStartIndex;\r\n }\r\n result[resultLen++] = startIndex + offsetDelta;\r\n result[resultLen++] = metadata;\r\n previousStartIndex = startIndex;\r\n }\r\n let actualResult = new Uint32Array(resultLen);\r\n for (let i = 0; i < resultLen; i++) {\r\n actualResult[i] = result[i];\r\n }\r\n return actualResult;\r\n }\r\n tokenize2(line, hasEOL, state, offsetDelta) {\r\n let actualResult = this._actual.tokenize(line, state);\r\n let tokens = this._toBinaryTokens(actualResult.tokens, offsetDelta);\r\n let endState;\r\n // try to save an object if possible\r\n if (actualResult.endState.equals(state)) {\r\n endState = state;\r\n }\r\n else {\r\n endState = actualResult.endState;\r\n }\r\n return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_2__.TokenizationResult2(tokens, endState);\r\n }\r\n}\r\nfunction isEncodedTokensProvider(provider) {\r\n return 'tokenizeEncoded' in provider;\r\n}\r\nfunction isThenable(obj) {\r\n return obj && typeof obj.then === 'function';\r\n}\r\n/**\r\n * Change the color map that is used for token colors.\r\n * Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA\r\n */\r\nfunction setColorMap(colorMap) {\r\n if (colorMap) {\r\n const result = [null];\r\n for (let i = 1, len = colorMap.length; i < len; i++) {\r\n result[i] = _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__.Color.fromHex(colorMap[i]);\r\n }\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.standaloneThemeService.get().setColorMapOverride(result);\r\n }\r\n else {\r\n _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.standaloneThemeService.get().setColorMapOverride(null);\r\n }\r\n}\r\n/**\r\n * Set the tokens provider for a language (manual implementation).\r\n */\r\nfunction setTokensProvider(languageId, provider) {\r\n let languageIdentifier = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.modeService.get().getLanguageIdentifier(languageId);\r\n if (!languageIdentifier) {\r\n throw new Error(`Cannot set tokens provider for unknown language ${languageId}`);\r\n }\r\n const create = (provider) => {\r\n if (isEncodedTokensProvider(provider)) {\r\n return new EncodedTokenizationSupport2Adapter(languageIdentifier, provider);\r\n }\r\n else {\r\n return new TokenizationSupport2Adapter(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.standaloneThemeService.get(), languageIdentifier, provider);\r\n }\r\n };\r\n if (isThenable(provider)) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.registerPromise(languageId, provider.then(provider => create(provider)));\r\n }\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.register(languageId, create(provider));\r\n}\r\n/**\r\n * Set the tokens provider for a language (monarch implementation).\r\n */\r\nfunction setMonarchTokensProvider(languageId, languageDef) {\r\n const create = (languageDef) => {\r\n return (0,_common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_9__.createTokenizationSupport)(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.modeService.get(), _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.standaloneThemeService.get(), languageId, (0,_common_monarch_monarchCompile_js__WEBPACK_IMPORTED_MODULE_8__.compile)(languageId, languageDef));\r\n };\r\n if (isThenable(languageDef)) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.registerPromise(languageId, languageDef.then(languageDef => create(languageDef)));\r\n }\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.register(languageId, create(languageDef));\r\n}\r\n/**\r\n * Register a reference provider (used by e.g. reference search).\r\n */\r\nfunction registerReferenceProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.ReferenceProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a rename provider (used by e.g. rename symbol).\r\n */\r\nfunction registerRenameProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.RenameProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a signature help provider (used by e.g. parameter hints).\r\n */\r\nfunction registerSignatureHelpProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.SignatureHelpProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a hover provider (used by e.g. editor hover).\r\n */\r\nfunction registerHoverProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.HoverProviderRegistry.register(languageId, {\r\n provideHover: (model, position, token) => {\r\n let word = model.getWordAtPosition(position);\r\n return Promise.resolve(provider.provideHover(model, position, token)).then((value) => {\r\n if (!value) {\r\n return undefined;\r\n }\r\n if (!value.range && word) {\r\n value.range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\r\n }\r\n if (!value.range) {\r\n value.range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n }\r\n return value;\r\n });\r\n }\r\n });\r\n}\r\n/**\r\n * Register a document symbol provider (used by e.g. outline).\r\n */\r\nfunction registerDocumentSymbolProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentSymbolProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a document highlight provider (used by e.g. highlight occurrences).\r\n */\r\nfunction registerDocumentHighlightProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentHighlightProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register an linked editing range provider.\r\n */\r\nfunction registerLinkedEditingRangeProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.LinkedEditingRangeProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a definition provider (used by e.g. go to definition).\r\n */\r\nfunction registerDefinitionProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DefinitionProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a implementation provider (used by e.g. go to implementation).\r\n */\r\nfunction registerImplementationProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.ImplementationProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a type definition provider (used by e.g. go to type definition).\r\n */\r\nfunction registerTypeDefinitionProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TypeDefinitionProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a code lens provider (used by e.g. inline code lenses).\r\n */\r\nfunction registerCodeLensProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.CodeLensProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a code action provider (used by e.g. quick fix).\r\n */\r\nfunction registerCodeActionProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.CodeActionProviderRegistry.register(languageId, {\r\n provideCodeActions: (model, range, context, token) => {\r\n let markers = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_7__.StaticServices.markerService.get().read({ resource: model.uri }).filter(m => {\r\n return _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__.Range.areIntersectingOrTouching(m, range);\r\n });\r\n return provider.provideCodeActions(model, range, { markers, only: context.only }, token);\r\n }\r\n });\r\n}\r\n/**\r\n * Register a formatter that can handle only entire models.\r\n */\r\nfunction registerDocumentFormattingEditProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentFormattingEditProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a formatter that can handle a range inside a model.\r\n */\r\nfunction registerDocumentRangeFormattingEditProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentRangeFormattingEditProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a formatter than can do formatting as the user types.\r\n */\r\nfunction registerOnTypeFormattingEditProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.OnTypeFormattingEditProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a link provider that can find links in text.\r\n */\r\nfunction registerLinkProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.LinkProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a completion item provider (use by e.g. suggestions).\r\n */\r\nfunction registerCompletionItemProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.CompletionProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a document color provider (used by Color Picker, Color Decorator).\r\n */\r\nfunction registerColorProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.ColorProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a folding range provider\r\n */\r\nfunction registerFoldingRangeProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.FoldingRangeProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a declaration provider\r\n */\r\nfunction registerDeclarationProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DeclarationProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a selection range provider\r\n */\r\nfunction registerSelectionRangeProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.SelectionRangeRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a document semantic tokens provider\r\n */\r\nfunction registerDocumentSemanticTokensProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentSemanticTokensProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * Register a document range semantic tokens provider\r\n */\r\nfunction registerDocumentRangeSemanticTokensProvider(languageId, provider) {\r\n return _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.DocumentRangeSemanticTokensProviderRegistry.register(languageId, provider);\r\n}\r\n/**\r\n * @internal\r\n */\r\nfunction createMonacoLanguagesAPI() {\r\n return {\r\n register: register,\r\n getLanguages: getLanguages,\r\n onLanguage: onLanguage,\r\n getEncodedLanguageId: getEncodedLanguageId,\r\n // provider methods\r\n setLanguageConfiguration: setLanguageConfiguration,\r\n setColorMap: setColorMap,\r\n setTokensProvider: setTokensProvider,\r\n setMonarchTokensProvider: setMonarchTokensProvider,\r\n registerReferenceProvider: registerReferenceProvider,\r\n registerRenameProvider: registerRenameProvider,\r\n registerCompletionItemProvider: registerCompletionItemProvider,\r\n registerSignatureHelpProvider: registerSignatureHelpProvider,\r\n registerHoverProvider: registerHoverProvider,\r\n registerDocumentSymbolProvider: registerDocumentSymbolProvider,\r\n registerDocumentHighlightProvider: registerDocumentHighlightProvider,\r\n registerLinkedEditingRangeProvider: registerLinkedEditingRangeProvider,\r\n registerDefinitionProvider: registerDefinitionProvider,\r\n registerImplementationProvider: registerImplementationProvider,\r\n registerTypeDefinitionProvider: registerTypeDefinitionProvider,\r\n registerCodeLensProvider: registerCodeLensProvider,\r\n registerCodeActionProvider: registerCodeActionProvider,\r\n registerDocumentFormattingEditProvider: registerDocumentFormattingEditProvider,\r\n registerDocumentRangeFormattingEditProvider: registerDocumentRangeFormattingEditProvider,\r\n registerOnTypeFormattingEditProvider: registerOnTypeFormattingEditProvider,\r\n registerLinkProvider: registerLinkProvider,\r\n registerColorProvider: registerColorProvider,\r\n registerFoldingRangeProvider: registerFoldingRangeProvider,\r\n registerDeclarationProvider: registerDeclarationProvider,\r\n registerSelectionRangeProvider: registerSelectionRangeProvider,\r\n registerDocumentSemanticTokensProvider: registerDocumentSemanticTokensProvider,\r\n registerDocumentRangeSemanticTokensProvider: registerDocumentRangeSemanticTokensProvider,\r\n // enums\r\n DocumentHighlightKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.DocumentHighlightKind,\r\n CompletionItemKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.CompletionItemKind,\r\n CompletionItemTag: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.CompletionItemTag,\r\n CompletionItemInsertTextRule: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.CompletionItemInsertTextRule,\r\n SymbolKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.SymbolKind,\r\n SymbolTag: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.SymbolTag,\r\n IndentAction: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.IndentAction,\r\n CompletionTriggerKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.CompletionTriggerKind,\r\n SignatureHelpTriggerKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.SignatureHelpTriggerKind,\r\n InlineHintKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_6__.InlineHintKind,\r\n // classes\r\n FoldingRangeKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.FoldingRangeKind,\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StaticServices\": () => (/* binding */ StaticServices),\n/* harmony export */ \"DynamicStandaloneServices\": () => (/* binding */ DynamicStandaloneServices)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js\");\n/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js\");\n/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js\");\n/* harmony import */ var _common_services_editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/services/editorWorkerServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js\");\n/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js\");\n/* harmony import */ var _common_services_modeServiceImpl_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modeServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js\");\n/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/services/modelService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js\");\n/* harmony import */ var _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modelServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js\");\n/* harmony import */ var _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/services/textResourceConfigurationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js\");\n/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./simpleServices.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js\");\n/* harmony import */ var _standaloneCodeServiceImpl_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./standaloneCodeServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js\");\n/* harmony import */ var _standaloneThemeServiceImpl_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./standaloneThemeServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js\");\n/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js\");\n/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _platform_contextkey_browser_contextKeyService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/browser/contextKeyService.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js\");\n/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _platform_contextview_browser_contextMenuService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextMenuService.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js\");\n/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _platform_contextview_browser_contextViewService_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextViewService.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js\");\n/* harmony import */ var _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/dialogs/common/dialogs.js */ \"./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js\");\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiationService.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js\");\n/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js\");\n/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/label/common/label.js */ \"./node_modules/monaco-editor/esm/vs/platform/label/common/label.js\");\n/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/list/browser/listService.js */ \"./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js\");\n/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ \"./node_modules/monaco-editor/esm/vs/platform/log/common/log.js\");\n/* harmony import */ var _platform_markers_common_markerService_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/markers/common/markerService.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js\");\n/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ \"./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js\");\n/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ \"./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js\");\n/* harmony import */ var _platform_actions_common_menuService_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../../platform/actions/common/menuService.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js\");\n/* harmony import */ var _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../common/services/markersDecorationService.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js\");\n/* harmony import */ var _common_services_markerDecorationsServiceImpl_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../common/services/markerDecorationsServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js\");\n/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../platform/layout/browser/layoutService.js */ \"./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js\");\n/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _platform_accessibility_common_accessibilityService_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibilityService.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js\");\n/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js\");\n/* harmony import */ var _platform_clipboard_browser_clipboardService_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../../platform/clipboard/browser/clipboardService.js */ \"./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js\");\n/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedo.js */ \"./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js\");\n/* harmony import */ var _platform_undoRedo_common_undoRedoService_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedoService.js */ \"./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js\");\n/* harmony import */ var _quickInput_standaloneQuickInputServiceImpl_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./quickInput/standaloneQuickInputServiceImpl.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js\");\n/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar StaticServices;\r\n(function (StaticServices) {\r\n const _serviceCollection = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__.ServiceCollection();\r\n class LazyStaticService {\r\n constructor(serviceId, factory) {\r\n this._serviceId = serviceId;\r\n this._factory = factory;\r\n this._value = null;\r\n }\r\n get id() { return this._serviceId; }\r\n get(overrides) {\r\n if (!this._value) {\r\n if (overrides) {\r\n this._value = overrides[this._serviceId.toString()];\r\n }\r\n if (!this._value) {\r\n this._value = this._factory(overrides);\r\n }\r\n if (!this._value) {\r\n throw new Error('Service ' + this._serviceId + ' is missing!');\r\n }\r\n _serviceCollection.set(this._serviceId, this._value);\r\n }\r\n return this._value;\r\n }\r\n }\r\n StaticServices.LazyStaticService = LazyStaticService;\r\n let _all = [];\r\n function define(serviceId, factory) {\r\n let r = new LazyStaticService(serviceId, factory);\r\n _all.push(r);\r\n return r;\r\n }\r\n function init(overrides) {\r\n // Create a fresh service collection\r\n let result = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__.ServiceCollection();\r\n // make sure to add all services that use `registerSingleton`\r\n for (const [id, descriptor] of (0,_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_43__.getSingletonServiceDescriptors)()) {\r\n result.set(id, descriptor);\r\n }\r\n // Initialize the service collection with the overrides\r\n for (let serviceId in overrides) {\r\n if (overrides.hasOwnProperty(serviceId)) {\r\n result.set((0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__.createDecorator)(serviceId), overrides[serviceId]);\r\n }\r\n }\r\n // Make sure the same static services are present in all service collections\r\n _all.forEach(service => result.set(service.id, service.get(overrides)));\r\n // Ensure the collection gets the correct instantiation service\r\n let instantiationService = new _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__.InstantiationService(result, true);\r\n result.set(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__.IInstantiationService, instantiationService);\r\n return [result, instantiationService];\r\n }\r\n StaticServices.init = init;\r\n StaticServices.instantiationService = define(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__.IInstantiationService, () => new _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__.InstantiationService(_serviceCollection, true));\r\n const configurationServiceImpl = new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleConfigurationService();\r\n StaticServices.configurationService = define(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__.IConfigurationService, () => configurationServiceImpl);\r\n StaticServices.resourceConfigurationService = define(_common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__.ITextResourceConfigurationService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleResourceConfigurationService(configurationServiceImpl));\r\n StaticServices.resourcePropertiesService = define(_common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__.ITextResourcePropertiesService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleResourcePropertiesService(configurationServiceImpl));\r\n StaticServices.contextService = define(_platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_37__.IWorkspaceContextService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleWorkspaceContextService());\r\n StaticServices.labelService = define(_platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_27__.ILabelService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleUriLabelService());\r\n StaticServices.telemetryService = define(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__.ITelemetryService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.StandaloneTelemetryService());\r\n StaticServices.dialogService = define(_platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_22__.IDialogService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleDialogService());\r\n StaticServices.notificationService = define(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__.INotificationService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleNotificationService());\r\n StaticServices.markerService = define(_platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_31__.IMarkerService, () => new _platform_markers_common_markerService_js__WEBPACK_IMPORTED_MODULE_30__.MarkerService());\r\n StaticServices.modeService = define(_common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__.IModeService, (o) => new _common_services_modeServiceImpl_js__WEBPACK_IMPORTED_MODULE_6__.ModeServiceImpl());\r\n StaticServices.standaloneThemeService = define(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_13__.IStandaloneThemeService, () => new _standaloneThemeServiceImpl_js__WEBPACK_IMPORTED_MODULE_12__.StandaloneThemeServiceImpl());\r\n StaticServices.logService = define(_platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__.ILogService, () => new _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__.LogService(new _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__.ConsoleLogger()));\r\n StaticServices.undoRedoService = define(_platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_47__.IUndoRedoService, (o) => new _platform_undoRedo_common_undoRedoService_js__WEBPACK_IMPORTED_MODULE_48__.UndoRedoService(StaticServices.dialogService.get(o), StaticServices.notificationService.get(o)));\r\n StaticServices.modelService = define(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__.IModelService, (o) => new _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__.ModelServiceImpl(StaticServices.configurationService.get(o), StaticServices.resourcePropertiesService.get(o), StaticServices.standaloneThemeService.get(o), StaticServices.logService.get(o), StaticServices.undoRedoService.get(o)));\r\n StaticServices.markerDecorationsService = define(_common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_39__.IMarkerDecorationsService, (o) => new _common_services_markerDecorationsServiceImpl_js__WEBPACK_IMPORTED_MODULE_40__.MarkerDecorationsService(StaticServices.modelService.get(o), StaticServices.markerService.get(o)));\r\n StaticServices.contextKeyService = define(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__.IContextKeyService, (o) => new _platform_contextkey_browser_contextKeyService_js__WEBPACK_IMPORTED_MODULE_17__.ContextKeyService(StaticServices.configurationService.get(o)));\r\n StaticServices.codeEditorService = define(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService, (o) => new _standaloneCodeServiceImpl_js__WEBPACK_IMPORTED_MODULE_11__.StandaloneCodeEditorServiceImpl(null, StaticServices.contextKeyService.get(o), StaticServices.standaloneThemeService.get(o)));\r\n StaticServices.editorProgressService = define(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_33__.IEditorProgressService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleEditorProgressService());\r\n StaticServices.storageService = define(_platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__.IStorageService, () => new _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__.InMemoryStorageService());\r\n StaticServices.editorWorkerService = define(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_3__.IEditorWorkerService, (o) => new _common_services_editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_4__.EditorWorkerServiceImpl(StaticServices.modelService.get(o), StaticServices.resourceConfigurationService.get(o), StaticServices.logService.get(o)));\r\n})(StaticServices || (StaticServices = {}));\r\nclass DynamicStandaloneServices extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor(domElement, overrides) {\r\n super();\r\n const [_serviceCollection, _instantiationService] = StaticServices.init(overrides);\r\n this._serviceCollection = _serviceCollection;\r\n this._instantiationService = _instantiationService;\r\n const configurationService = this.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__.IConfigurationService);\r\n const notificationService = this.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__.INotificationService);\r\n const telemetryService = this.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__.ITelemetryService);\r\n const themeService = this.get(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__.IThemeService);\r\n const logService = this.get(_platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__.ILogService);\r\n const contextKeyService = this.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__.IContextKeyService);\r\n let ensure = (serviceId, factory) => {\r\n let value = null;\r\n if (overrides) {\r\n value = overrides[serviceId.toString()];\r\n }\r\n if (!value) {\r\n value = factory();\r\n }\r\n this._serviceCollection.set(serviceId, value);\r\n return value;\r\n };\r\n ensure(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_41__.IAccessibilityService, () => new _platform_accessibility_common_accessibilityService_js__WEBPACK_IMPORTED_MODULE_44__.AccessibilityService(contextKeyService, configurationService));\r\n ensure(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__.IListService, () => new _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__.ListService(themeService));\r\n let commandService = ensure(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_15__.ICommandService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.StandaloneCommandService(this._instantiationService));\r\n let keybindingService = ensure(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_26__.IKeybindingService, () => this._register(new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.StandaloneKeybindingService(contextKeyService, commandService, telemetryService, notificationService, logService, domElement)));\r\n let layoutService = ensure(_platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_42__.ILayoutService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleLayoutService(StaticServices.codeEditorService.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService), domElement));\r\n ensure(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_50__.IQuickInputService, () => new _quickInput_standaloneQuickInputServiceImpl_js__WEBPACK_IMPORTED_MODULE_49__.StandaloneQuickInputServiceImpl(_instantiationService, StaticServices.codeEditorService.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__.ICodeEditorService)));\r\n let contextViewService = ensure(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__.IContextViewService, () => this._register(new _platform_contextview_browser_contextViewService_js__WEBPACK_IMPORTED_MODULE_21__.ContextViewService(layoutService)));\r\n ensure(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_45__.IClipboardService, () => new _platform_clipboard_browser_clipboardService_js__WEBPACK_IMPORTED_MODULE_46__.BrowserClipboardService());\r\n ensure(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__.IContextMenuService, () => {\r\n const contextMenuService = new _platform_contextview_browser_contextMenuService_js__WEBPACK_IMPORTED_MODULE_19__.ContextMenuService(telemetryService, notificationService, contextViewService, keybindingService, themeService);\r\n contextMenuService.configure({ blockMouse: false }); // we do not want that in the standalone editor\r\n return this._register(contextMenuService);\r\n });\r\n ensure(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__.IMenuService, () => new _platform_actions_common_menuService_js__WEBPACK_IMPORTED_MODULE_38__.MenuService(commandService));\r\n ensure(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_1__.IBulkEditService, () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__.SimpleBulkEditService(StaticServices.modelService.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__.IModelService)));\r\n }\r\n get(serviceId) {\r\n let r = this._serviceCollection.get(serviceId);\r\n if (!r) {\r\n throw new Error('Missing service ' + serviceId);\r\n }\r\n return r;\r\n }\r\n set(serviceId, instance) {\r\n this._serviceCollection.set(serviceId, instance);\r\n }\r\n has(serviceId) {\r\n return this._serviceCollection.has(serviceId);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"StandaloneThemeServiceImpl\": () => (/* binding */ StandaloneThemeServiceImpl)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/supports/tokenization.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js\");\n/* harmony import */ var _common_themes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/themes.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js\");\n/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/theme/common/theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/* harmony import */ var _platform_theme_browser_iconsStyleSheet_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/theme/browser/iconsStyleSheet.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst VS_THEME_NAME = 'vs';\r\nconst VS_DARK_THEME_NAME = 'vs-dark';\r\nconst HC_BLACK_THEME_NAME = 'hc-black';\r\nconst colorRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.Registry.as(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_7__.Extensions.ColorContribution);\r\nconst themingRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__.Registry.as(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__.Extensions.ThemingContribution);\r\nclass StandaloneTheme {\r\n constructor(name, standaloneThemeData) {\r\n this.semanticHighlighting = false;\r\n this.themeData = standaloneThemeData;\r\n let base = standaloneThemeData.base;\r\n if (name.length > 0) {\r\n if (isBuiltinTheme(name)) {\r\n this.id = name;\r\n }\r\n else {\r\n this.id = base + ' ' + name;\r\n }\r\n this.themeName = name;\r\n }\r\n else {\r\n this.id = base;\r\n this.themeName = base;\r\n }\r\n this.colors = null;\r\n this.defaultColors = Object.create(null);\r\n this._tokenTheme = null;\r\n }\r\n get base() {\r\n return this.themeData.base;\r\n }\r\n notifyBaseUpdated() {\r\n if (this.themeData.inherit) {\r\n this.colors = null;\r\n this._tokenTheme = null;\r\n }\r\n }\r\n getColors() {\r\n if (!this.colors) {\r\n const colors = new Map();\r\n for (let id in this.themeData.colors) {\r\n colors.set(id, _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex(this.themeData.colors[id]));\r\n }\r\n if (this.themeData.inherit) {\r\n let baseData = getBuiltinRules(this.themeData.base);\r\n for (let id in baseData.colors) {\r\n if (!colors.has(id)) {\r\n colors.set(id, _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex(baseData.colors[id]));\r\n }\r\n }\r\n }\r\n this.colors = colors;\r\n }\r\n return this.colors;\r\n }\r\n getColor(colorId, useDefault) {\r\n const color = this.getColors().get(colorId);\r\n if (color) {\r\n return color;\r\n }\r\n if (useDefault !== false) {\r\n return this.getDefault(colorId);\r\n }\r\n return undefined;\r\n }\r\n getDefault(colorId) {\r\n let color = this.defaultColors[colorId];\r\n if (color) {\r\n return color;\r\n }\r\n color = colorRegistry.resolveDefaultColor(colorId, this);\r\n this.defaultColors[colorId] = color;\r\n return color;\r\n }\r\n defines(colorId) {\r\n return Object.prototype.hasOwnProperty.call(this.getColors(), colorId);\r\n }\r\n get type() {\r\n switch (this.base) {\r\n case VS_THEME_NAME: return _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__.ColorScheme.LIGHT;\r\n case HC_BLACK_THEME_NAME: return _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__.ColorScheme.HIGH_CONTRAST;\r\n default: return _platform_theme_common_theme_js__WEBPACK_IMPORTED_MODULE_10__.ColorScheme.DARK;\r\n }\r\n }\r\n get tokenTheme() {\r\n if (!this._tokenTheme) {\r\n let rules = [];\r\n let encodedTokensColors = [];\r\n if (this.themeData.inherit) {\r\n let baseData = getBuiltinRules(this.themeData.base);\r\n rules = baseData.rules;\r\n if (baseData.encodedTokensColors) {\r\n encodedTokensColors = baseData.encodedTokensColors;\r\n }\r\n }\r\n rules = rules.concat(this.themeData.rules);\r\n if (this.themeData.encodedTokensColors) {\r\n encodedTokensColors = this.themeData.encodedTokensColors;\r\n }\r\n this._tokenTheme = _common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__.TokenTheme.createFromRawTokenTheme(rules, encodedTokensColors);\r\n }\r\n return this._tokenTheme;\r\n }\r\n getTokenStyleMetadata(type, modifiers, modelLanguage) {\r\n // use theme rules match\r\n const style = this.tokenTheme._match([type].concat(modifiers).join('.'));\r\n const metadata = style.metadata;\r\n const foreground = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenMetadata.getForeground(metadata);\r\n const fontStyle = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenMetadata.getFontStyle(metadata);\r\n return {\r\n foreground: foreground,\r\n italic: Boolean(fontStyle & 1 /* Italic */),\r\n bold: Boolean(fontStyle & 2 /* Bold */),\r\n underline: Boolean(fontStyle & 4 /* Underline */)\r\n };\r\n }\r\n}\r\nfunction isBuiltinTheme(themeName) {\r\n return (themeName === VS_THEME_NAME\r\n || themeName === VS_DARK_THEME_NAME\r\n || themeName === HC_BLACK_THEME_NAME);\r\n}\r\nfunction getBuiltinRules(builtinTheme) {\r\n switch (builtinTheme) {\r\n case VS_THEME_NAME:\r\n return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__.vs;\r\n case VS_DARK_THEME_NAME:\r\n return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__.vs_dark;\r\n case HC_BLACK_THEME_NAME:\r\n return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__.hc_black;\r\n }\r\n}\r\nfunction newBuiltInTheme(builtinTheme) {\r\n let themeData = getBuiltinRules(builtinTheme);\r\n return new StandaloneTheme(builtinTheme, themeData);\r\n}\r\nclass StandaloneThemeServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.Disposable {\r\n constructor() {\r\n super();\r\n this._onColorThemeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this.onDidColorThemeChange = this._onColorThemeChange.event;\r\n this._environment = Object.create(null);\r\n this._autoDetectHighContrast = true;\r\n this._knownThemes = new Map();\r\n this._knownThemes.set(VS_THEME_NAME, newBuiltInTheme(VS_THEME_NAME));\r\n this._knownThemes.set(VS_DARK_THEME_NAME, newBuiltInTheme(VS_DARK_THEME_NAME));\r\n this._knownThemes.set(HC_BLACK_THEME_NAME, newBuiltInTheme(HC_BLACK_THEME_NAME));\r\n const iconsStyleSheet = (0,_platform_theme_browser_iconsStyleSheet_js__WEBPACK_IMPORTED_MODULE_11__.getIconsStyleSheet)();\r\n this._codiconCSS = iconsStyleSheet.getCSS();\r\n this._themeCSS = '';\r\n this._allCSS = `${this._codiconCSS}\\n${this._themeCSS}`;\r\n this._globalStyleElement = null;\r\n this._styleElements = [];\r\n this._colorMapOverride = null;\r\n this.setTheme(VS_THEME_NAME);\r\n iconsStyleSheet.onDidChange(() => {\r\n this._codiconCSS = iconsStyleSheet.getCSS();\r\n this._updateCSS();\r\n });\r\n window.matchMedia('(forced-colors: active)').addEventListener('change', () => {\r\n this._updateActualTheme();\r\n });\r\n }\r\n registerEditorContainer(domNode) {\r\n if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.isInShadowDOM(domNode)) {\r\n return this._registerShadowDomContainer(domNode);\r\n }\r\n return this._registerRegularEditorContainer();\r\n }\r\n _registerRegularEditorContainer() {\r\n if (!this._globalStyleElement) {\r\n this._globalStyleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.createStyleSheet();\r\n this._globalStyleElement.className = 'monaco-colors';\r\n this._globalStyleElement.textContent = this._allCSS;\r\n this._styleElements.push(this._globalStyleElement);\r\n }\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__.Disposable.None;\r\n }\r\n _registerShadowDomContainer(domNode) {\r\n const styleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.createStyleSheet(domNode);\r\n styleElement.className = 'monaco-colors';\r\n styleElement.textContent = this._allCSS;\r\n this._styleElements.push(styleElement);\r\n return {\r\n dispose: () => {\r\n for (let i = 0; i < this._styleElements.length; i++) {\r\n if (this._styleElements[i] === styleElement) {\r\n this._styleElements.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n }\r\n defineTheme(themeName, themeData) {\r\n if (!/^[a-z0-9\\-]+$/i.test(themeName)) {\r\n throw new Error('Illegal theme name!');\r\n }\r\n if (!isBuiltinTheme(themeData.base) && !isBuiltinTheme(themeName)) {\r\n throw new Error('Illegal theme base!');\r\n }\r\n // set or replace theme\r\n this._knownThemes.set(themeName, new StandaloneTheme(themeName, themeData));\r\n if (isBuiltinTheme(themeName)) {\r\n this._knownThemes.forEach(theme => {\r\n if (theme.base === themeName) {\r\n theme.notifyBaseUpdated();\r\n }\r\n });\r\n }\r\n if (this._theme.themeName === themeName) {\r\n this.setTheme(themeName); // refresh theme\r\n }\r\n }\r\n getColorTheme() {\r\n return this._theme;\r\n }\r\n setColorMapOverride(colorMapOverride) {\r\n this._colorMapOverride = colorMapOverride;\r\n this._updateThemeOrColorMap();\r\n }\r\n setTheme(themeName) {\r\n let theme;\r\n if (this._knownThemes.has(themeName)) {\r\n theme = this._knownThemes.get(themeName);\r\n }\r\n else {\r\n theme = this._knownThemes.get(VS_THEME_NAME);\r\n }\r\n this._desiredTheme = theme;\r\n this._updateActualTheme();\r\n }\r\n _updateActualTheme() {\r\n const theme = (this._autoDetectHighContrast && window.matchMedia(`(forced-colors: active)`).matches\r\n ? this._knownThemes.get(HC_BLACK_THEME_NAME)\r\n : this._desiredTheme);\r\n if (this._theme === theme) {\r\n // Nothing to do\r\n return;\r\n }\r\n this._theme = theme;\r\n this._updateThemeOrColorMap();\r\n }\r\n setAutoDetectHighContrast(autoDetectHighContrast) {\r\n this._autoDetectHighContrast = autoDetectHighContrast;\r\n this._updateActualTheme();\r\n }\r\n _updateThemeOrColorMap() {\r\n let cssRules = [];\r\n let hasRule = {};\r\n let ruleCollector = {\r\n addRule: (rule) => {\r\n if (!hasRule[rule]) {\r\n cssRules.push(rule);\r\n hasRule[rule] = true;\r\n }\r\n }\r\n };\r\n themingRegistry.getThemingParticipants().forEach(p => p(this._theme, ruleCollector, this._environment));\r\n const colorMap = this._colorMapOverride || this._theme.tokenTheme.getColorMap();\r\n ruleCollector.addRule((0,_common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__.generateTokensCSSForColorMap)(colorMap));\r\n this._themeCSS = cssRules.join('\\n');\r\n this._updateCSS();\r\n _common_modes_js__WEBPACK_IMPORTED_MODULE_3__.TokenizationRegistry.setColorMap(colorMap);\r\n this._onColorThemeChange.fire(this._theme);\r\n }\r\n _updateCSS() {\r\n this._allCSS = `${this._codiconCSS}\\n${this._themeCSS}`;\r\n this._styleElements.forEach(styleElement => styleElement.textContent = this._allCSS);\r\n }\r\n getFileIconTheme() {\r\n return {\r\n hasFileIcons: false,\r\n hasFolderIcons: false,\r\n hidesExplorerArrows: false\r\n };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js":
|
||
/*!**************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js ***!
|
||
\**************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ \"./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js\");\n/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/standaloneThemeService.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js\");\n/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass ToggleHighContrast extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.toggleHighContrast',\r\n label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__.ToggleHighContrastNLS.toggleHighContrast,\r\n alias: 'Toggle High Contrast Theme',\r\n precondition: undefined\r\n });\r\n this._originalThemeName = null;\r\n }\r\n run(accessor, editor) {\r\n const standaloneThemeService = accessor.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_1__.IStandaloneThemeService);\r\n if (this._originalThemeName) {\r\n // We must toggle back to the integrator's theme\r\n standaloneThemeService.setTheme(this._originalThemeName);\r\n this._originalThemeName = null;\r\n }\r\n else {\r\n this._originalThemeName = standaloneThemeService.getColorTheme().themeName;\r\n standaloneThemeService.setTheme('hc-black');\r\n }\r\n }\r\n}\r\n(0,_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__.registerEditorAction)(ToggleHighContrast);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isFuzzyActionArr\": () => (/* binding */ isFuzzyActionArr),\n/* harmony export */ \"isFuzzyAction\": () => (/* binding */ isFuzzyAction),\n/* harmony export */ \"isString\": () => (/* binding */ isString),\n/* harmony export */ \"isIAction\": () => (/* binding */ isIAction),\n/* harmony export */ \"empty\": () => (/* binding */ empty),\n/* harmony export */ \"fixCase\": () => (/* binding */ fixCase),\n/* harmony export */ \"sanitize\": () => (/* binding */ sanitize),\n/* harmony export */ \"log\": () => (/* binding */ log),\n/* harmony export */ \"createError\": () => (/* binding */ createError),\n/* harmony export */ \"substituteMatches\": () => (/* binding */ substituteMatches),\n/* harmony export */ \"findRules\": () => (/* binding */ findRules),\n/* harmony export */ \"stateExists\": () => (/* binding */ stateExists)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction isFuzzyActionArr(what) {\r\n return (Array.isArray(what));\r\n}\r\nfunction isFuzzyAction(what) {\r\n return !isFuzzyActionArr(what);\r\n}\r\nfunction isString(what) {\r\n return (typeof what === 'string');\r\n}\r\nfunction isIAction(what) {\r\n return !isString(what);\r\n}\r\n// Small helper functions\r\n/**\r\n * Is a string null, undefined, or empty?\r\n */\r\nfunction empty(s) {\r\n return (s ? false : true);\r\n}\r\n/**\r\n * Puts a string to lower case if 'ignoreCase' is set.\r\n */\r\nfunction fixCase(lexer, str) {\r\n return (lexer.ignoreCase && str ? str.toLowerCase() : str);\r\n}\r\n/**\r\n * Ensures there are no bad characters in a CSS token class.\r\n */\r\nfunction sanitize(s) {\r\n return s.replace(/[&<>'\"_]/g, '-'); // used on all output token CSS classes\r\n}\r\n// Logging\r\n/**\r\n * Logs a message.\r\n */\r\nfunction log(lexer, msg) {\r\n console.log(`${lexer.languageId}: ${msg}`);\r\n}\r\n// Throwing errors\r\nfunction createError(lexer, msg) {\r\n return new Error(`${lexer.languageId}: ${msg}`);\r\n}\r\n// Helper functions for rule finding and substitution\r\n/**\r\n * substituteMatches is used on lexer strings and can substitutes predefined patterns:\r\n * \t\t$$ => $\r\n * \t\t$# => id\r\n * \t\t$n => matched entry n\r\n * \t\t@attr => contents of lexer[attr]\r\n *\r\n * See documentation for more info\r\n */\r\nfunction substituteMatches(lexer, str, id, matches, state) {\r\n const re = /\\$((\\$)|(#)|(\\d\\d?)|[sS](\\d\\d?)|@(\\w+))/g;\r\n let stateMatches = null;\r\n return str.replace(re, function (full, sub, dollar, hash, n, s, attr, ofs, total) {\r\n if (!empty(dollar)) {\r\n return '$'; // $$\r\n }\r\n if (!empty(hash)) {\r\n return fixCase(lexer, id); // default $#\r\n }\r\n if (!empty(n) && n < matches.length) {\r\n return fixCase(lexer, matches[n]); // $n\r\n }\r\n if (!empty(attr) && lexer && typeof (lexer[attr]) === 'string') {\r\n return lexer[attr]; //@attribute\r\n }\r\n if (stateMatches === null) { // split state on demand\r\n stateMatches = state.split('.');\r\n stateMatches.unshift(state);\r\n }\r\n if (!empty(s) && s < stateMatches.length) {\r\n return fixCase(lexer, stateMatches[s]); //$Sn\r\n }\r\n return '';\r\n });\r\n}\r\n/**\r\n * Find the tokenizer rules for a specific state (i.e. next action)\r\n */\r\nfunction findRules(lexer, inState) {\r\n let state = inState;\r\n while (state && state.length > 0) {\r\n const rules = lexer.tokenizer[state];\r\n if (rules) {\r\n return rules;\r\n }\r\n const idx = state.lastIndexOf('.');\r\n if (idx < 0) {\r\n state = null; // no further parent\r\n }\r\n else {\r\n state = state.substr(0, idx);\r\n }\r\n }\r\n return null;\r\n}\r\n/**\r\n * Is a certain state defined? In contrast to 'findRules' this works on a ILexerMin.\r\n * This is used during compilation where we may know the defined states\r\n * but not yet whether the corresponding rules are correct.\r\n */\r\nfunction stateExists(lexer, inState) {\r\n let state = inState;\r\n while (state && state.length > 0) {\r\n const exist = lexer.stateNames[state];\r\n if (exist) {\r\n return true;\r\n }\r\n const idx = state.lastIndexOf('.');\r\n if (idx < 0) {\r\n state = null; // no further parent\r\n }\r\n else {\r\n state = state.substr(0, idx);\r\n }\r\n }\r\n return false;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compile\": () => (/* binding */ compile)\n/* harmony export */ });\n/* harmony import */ var _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./monarchCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/*\r\n * This module only exports 'compile' which compiles a JSON language definition\r\n * into a typed and checked ILexer definition.\r\n */\r\n\r\n/*\r\n * Type helpers\r\n *\r\n * Note: this is just for sanity checks on the JSON description which is\r\n * helpful for the programmer. No checks are done anymore once the lexer is\r\n * already 'compiled and checked'.\r\n *\r\n */\r\nfunction isArrayOf(elemType, obj) {\r\n if (!obj) {\r\n return false;\r\n }\r\n if (!(Array.isArray(obj))) {\r\n return false;\r\n }\r\n for (const el of obj) {\r\n if (!(elemType(el))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction bool(prop, defValue) {\r\n if (typeof prop === 'boolean') {\r\n return prop;\r\n }\r\n return defValue;\r\n}\r\nfunction string(prop, defValue) {\r\n if (typeof (prop) === 'string') {\r\n return prop;\r\n }\r\n return defValue;\r\n}\r\nfunction arrayToHash(array) {\r\n const result = {};\r\n for (const e of array) {\r\n result[e] = true;\r\n }\r\n return result;\r\n}\r\nfunction createKeywordMatcher(arr, caseInsensitive = false) {\r\n if (caseInsensitive) {\r\n arr = arr.map(function (x) { return x.toLowerCase(); });\r\n }\r\n const hash = arrayToHash(arr);\r\n if (caseInsensitive) {\r\n return function (word) {\r\n return hash[word.toLowerCase()] !== undefined && hash.hasOwnProperty(word.toLowerCase());\r\n };\r\n }\r\n else {\r\n return function (word) {\r\n return hash[word] !== undefined && hash.hasOwnProperty(word);\r\n };\r\n }\r\n}\r\n// Lexer helpers\r\n/**\r\n * Compiles a regular expression string, adding the 'i' flag if 'ignoreCase' is set, and the 'u' flag if 'unicode' is set.\r\n * Also replaces @\\w+ or sequences with the content of the specified attribute\r\n * @\\w+ replacement can be avoided by escaping `@` signs with another `@` sign.\r\n * @example /@attr/ will be replaced with the value of lexer[attr]\r\n * @example /@@text/ will not be replaced and will become /@text/.\r\n */\r\nfunction compileRegExp(lexer, str) {\r\n let n = 0;\r\n let hadExpansion;\r\n do {\r\n hadExpansion = false;\r\n str = str.replace(/(.|^)@(\\w+)/g, function (s, charBeforeAtSign, attr) {\r\n if (charBeforeAtSign === '@') {\r\n // do not expand @@\r\n return s;\r\n }\r\n hadExpansion = true;\r\n let sub = '';\r\n if (typeof (lexer[attr]) === 'string') {\r\n sub = lexer[attr];\r\n }\r\n else if (lexer[attr] && lexer[attr] instanceof RegExp) {\r\n sub = lexer[attr].source;\r\n }\r\n else {\r\n if (lexer[attr] === undefined) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'language definition does not contain attribute \\'' + attr + '\\', used at: ' + str);\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'attribute reference \\'' + attr + '\\' must be a string, used at: ' + str);\r\n }\r\n }\r\n return charBeforeAtSign + (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.empty(sub) ? '' : '(?:' + sub + ')');\r\n });\r\n n++;\r\n } while (hadExpansion && n < 5);\r\n // handle escaped @@\r\n str = str.replace(/@@/g, '@');\r\n let flags = (lexer.ignoreCase ? 'i' : '') + (lexer.unicode ? 'u' : '');\r\n return new RegExp(str, flags);\r\n}\r\n/**\r\n * Compiles guard functions for case matches.\r\n * This compiles 'cases' attributes into efficient match functions.\r\n *\r\n */\r\nfunction selectScrutinee(id, matches, state, num) {\r\n if (num < 0) {\r\n return id;\r\n }\r\n if (num < matches.length) {\r\n return matches[num];\r\n }\r\n if (num >= 100) {\r\n num = num - 100;\r\n let parts = state.split('.');\r\n parts.unshift(state);\r\n if (num < parts.length) {\r\n return parts[num];\r\n }\r\n }\r\n return null;\r\n}\r\nfunction createGuard(lexer, ruleName, tkey, val) {\r\n // get the scrutinee and pattern\r\n let scrut = -1; // -1: $!, 0-99: $n, 100+n: $Sn\r\n let oppat = tkey;\r\n let matches = tkey.match(/^\\$(([sS]?)(\\d\\d?)|#)(.*)$/);\r\n if (matches) {\r\n if (matches[3]) { // if digits\r\n scrut = parseInt(matches[3]);\r\n if (matches[2]) {\r\n scrut = scrut + 100; // if [sS] present\r\n }\r\n }\r\n oppat = matches[4];\r\n }\r\n // get operator\r\n let op = '~';\r\n let pat = oppat;\r\n if (!oppat || oppat.length === 0) {\r\n op = '!=';\r\n pat = '';\r\n }\r\n else if (/^\\w*$/.test(pat)) { // just a word\r\n op = '==';\r\n }\r\n else {\r\n matches = oppat.match(/^(@|!@|~|!~|==|!=)(.*)$/);\r\n if (matches) {\r\n op = matches[1];\r\n pat = matches[2];\r\n }\r\n }\r\n // set the tester function\r\n let tester;\r\n // special case a regexp that matches just words\r\n if ((op === '~' || op === '!~') && /^(\\w|\\|)*$/.test(pat)) {\r\n let inWords = createKeywordMatcher(pat.split('|'), lexer.ignoreCase);\r\n tester = function (s) { return (op === '~' ? inWords(s) : !inWords(s)); };\r\n }\r\n else if (op === '@' || op === '!@') {\r\n let words = lexer[pat];\r\n if (!words) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'the @ match target \\'' + pat + '\\' is not defined, in rule: ' + ruleName);\r\n }\r\n if (!(isArrayOf(function (elem) { return (typeof (elem) === 'string'); }, words))) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'the @ match target \\'' + pat + '\\' must be an array of strings, in rule: ' + ruleName);\r\n }\r\n let inWords = createKeywordMatcher(words, lexer.ignoreCase);\r\n tester = function (s) { return (op === '@' ? inWords(s) : !inWords(s)); };\r\n }\r\n else if (op === '~' || op === '!~') {\r\n if (pat.indexOf('$') < 0) {\r\n // precompile regular expression\r\n let re = compileRegExp(lexer, '^' + pat + '$');\r\n tester = function (s) { return (op === '~' ? re.test(s) : !re.test(s)); };\r\n }\r\n else {\r\n tester = function (s, id, matches, state) {\r\n let re = compileRegExp(lexer, '^' + _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.substituteMatches(lexer, pat, id, matches, state) + '$');\r\n return re.test(s);\r\n };\r\n }\r\n }\r\n else { // if (op==='==' || op==='!=') {\r\n if (pat.indexOf('$') < 0) {\r\n let patx = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.fixCase(lexer, pat);\r\n tester = function (s) { return (op === '==' ? s === patx : s !== patx); };\r\n }\r\n else {\r\n let patx = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.fixCase(lexer, pat);\r\n tester = function (s, id, matches, state, eos) {\r\n let patexp = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.substituteMatches(lexer, patx, id, matches, state);\r\n return (op === '==' ? s === patexp : s !== patexp);\r\n };\r\n }\r\n }\r\n // return the branch object\r\n if (scrut === -1) {\r\n return {\r\n name: tkey, value: val, test: function (id, matches, state, eos) {\r\n return tester(id, id, matches, state, eos);\r\n }\r\n };\r\n }\r\n else {\r\n return {\r\n name: tkey, value: val, test: function (id, matches, state, eos) {\r\n let scrutinee = selectScrutinee(id, matches, state, scrut);\r\n return tester(!scrutinee ? '' : scrutinee, id, matches, state, eos);\r\n }\r\n };\r\n }\r\n}\r\n/**\r\n * Compiles an action: i.e. optimize regular expressions and case matches\r\n * and do many sanity checks.\r\n *\r\n * This is called only during compilation but if the lexer definition\r\n * contains user functions as actions (which is usually not allowed), then this\r\n * may be called during lexing. It is important therefore to compile common cases efficiently\r\n */\r\nfunction compileAction(lexer, ruleName, action) {\r\n if (!action) {\r\n return { token: '' };\r\n }\r\n else if (typeof (action) === 'string') {\r\n return action; // { token: action };\r\n }\r\n else if (action.token || action.token === '') {\r\n if (typeof (action.token) !== 'string') {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'a \\'token\\' attribute must be of type string, in rule: ' + ruleName);\r\n }\r\n else {\r\n // only copy specific typed fields (only happens once during compile Lexer)\r\n let newAction = { token: action.token };\r\n if (action.token.indexOf('$') >= 0) {\r\n newAction.tokenSubst = true;\r\n }\r\n if (typeof (action.bracket) === 'string') {\r\n if (action.bracket === '@open') {\r\n newAction.bracket = 1 /* Open */;\r\n }\r\n else if (action.bracket === '@close') {\r\n newAction.bracket = -1 /* Close */;\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'a \\'bracket\\' attribute must be either \\'@open\\' or \\'@close\\', in rule: ' + ruleName);\r\n }\r\n }\r\n if (action.next) {\r\n if (typeof (action.next) !== 'string') {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'the next state must be a string value in rule: ' + ruleName);\r\n }\r\n else {\r\n let next = action.next;\r\n if (!/^(@pop|@push|@popall)$/.test(next)) {\r\n if (next[0] === '@') {\r\n next = next.substr(1); // peel off starting @ sign\r\n }\r\n if (next.indexOf('$') < 0) { // no dollar substitution, we can check if the state exists\r\n if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.stateExists(lexer, _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.substituteMatches(lexer, next, '', [], ''))) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'the next state \\'' + action.next + '\\' is not defined in rule: ' + ruleName);\r\n }\r\n }\r\n }\r\n newAction.next = next;\r\n }\r\n }\r\n if (typeof (action.goBack) === 'number') {\r\n newAction.goBack = action.goBack;\r\n }\r\n if (typeof (action.switchTo) === 'string') {\r\n newAction.switchTo = action.switchTo;\r\n }\r\n if (typeof (action.log) === 'string') {\r\n newAction.log = action.log;\r\n }\r\n if (typeof (action.nextEmbedded) === 'string') {\r\n newAction.nextEmbedded = action.nextEmbedded;\r\n lexer.usesEmbedded = true;\r\n }\r\n return newAction;\r\n }\r\n }\r\n else if (Array.isArray(action)) {\r\n let results = [];\r\n for (let i = 0, len = action.length; i < len; i++) {\r\n results[i] = compileAction(lexer, ruleName, action[i]);\r\n }\r\n return { group: results };\r\n }\r\n else if (action.cases) {\r\n // build an array of test cases\r\n let cases = [];\r\n // for each case, push a test function and result value\r\n for (let tkey in action.cases) {\r\n if (action.cases.hasOwnProperty(tkey)) {\r\n const val = compileAction(lexer, ruleName, action.cases[tkey]);\r\n // what kind of case\r\n if (tkey === '@default' || tkey === '@' || tkey === '') {\r\n cases.push({ test: undefined, value: val, name: tkey });\r\n }\r\n else if (tkey === '@eos') {\r\n cases.push({ test: function (id, matches, state, eos) { return eos; }, value: val, name: tkey });\r\n }\r\n else {\r\n cases.push(createGuard(lexer, ruleName, tkey, val)); // call separate function to avoid local variable capture\r\n }\r\n }\r\n }\r\n // create a matching function\r\n const def = lexer.defaultToken;\r\n return {\r\n test: function (id, matches, state, eos) {\r\n for (const _case of cases) {\r\n const didmatch = (!_case.test || _case.test(id, matches, state, eos));\r\n if (didmatch) {\r\n return _case.value;\r\n }\r\n }\r\n return def;\r\n }\r\n };\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'an action must be a string, an object with a \\'token\\' or \\'cases\\' attribute, or an array of actions; in rule: ' + ruleName);\r\n }\r\n}\r\n/**\r\n * Helper class for creating matching rules\r\n */\r\nclass Rule {\r\n constructor(name) {\r\n this.regex = new RegExp('');\r\n this.action = { token: '' };\r\n this.matchOnlyAtLineStart = false;\r\n this.name = '';\r\n this.name = name;\r\n }\r\n setRegex(lexer, re) {\r\n let sregex;\r\n if (typeof (re) === 'string') {\r\n sregex = re;\r\n }\r\n else if (re instanceof RegExp) {\r\n sregex = re.source;\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'rules must start with a match string or regular expression: ' + this.name);\r\n }\r\n this.matchOnlyAtLineStart = (sregex.length > 0 && sregex[0] === '^');\r\n this.name = this.name + ': ' + sregex;\r\n this.regex = compileRegExp(lexer, '^(?:' + (this.matchOnlyAtLineStart ? sregex.substr(1) : sregex) + ')');\r\n }\r\n setAction(lexer, act) {\r\n this.action = compileAction(lexer, this.name, act);\r\n }\r\n}\r\n/**\r\n * Compiles a json description function into json where all regular expressions,\r\n * case matches etc, are compiled and all include rules are expanded.\r\n * We also compile the bracket definitions, supply defaults, and do many sanity checks.\r\n * If the 'jsonStrict' parameter is 'false', we allow at certain locations\r\n * regular expression objects and functions that get called during lexing.\r\n * (Currently we have no samples that need this so perhaps we should always have\r\n * jsonStrict to true).\r\n */\r\nfunction compile(languageId, json) {\r\n if (!json || typeof (json) !== 'object') {\r\n throw new Error('Monarch: expecting a language definition object');\r\n }\r\n // Create our lexer\r\n let lexer = {};\r\n lexer.languageId = languageId;\r\n lexer.includeLF = bool(json.includeLF, false);\r\n lexer.noThrow = false; // raise exceptions during compilation\r\n lexer.maxStack = 100;\r\n // Set standard fields: be defensive about types\r\n lexer.start = (typeof json.start === 'string' ? json.start : null);\r\n lexer.ignoreCase = bool(json.ignoreCase, false);\r\n lexer.unicode = bool(json.unicode, false);\r\n lexer.tokenPostfix = string(json.tokenPostfix, '.' + lexer.languageId);\r\n lexer.defaultToken = string(json.defaultToken, 'source');\r\n lexer.usesEmbedded = false; // becomes true if we find a nextEmbedded action\r\n // For calling compileAction later on\r\n let lexerMin = json;\r\n lexerMin.languageId = languageId;\r\n lexerMin.includeLF = lexer.includeLF;\r\n lexerMin.ignoreCase = lexer.ignoreCase;\r\n lexerMin.unicode = lexer.unicode;\r\n lexerMin.noThrow = lexer.noThrow;\r\n lexerMin.usesEmbedded = lexer.usesEmbedded;\r\n lexerMin.stateNames = json.tokenizer;\r\n lexerMin.defaultToken = lexer.defaultToken;\r\n // Compile an array of rules into newrules where RegExp objects are created.\r\n function addRules(state, newrules, rules) {\r\n for (const rule of rules) {\r\n let include = rule.include;\r\n if (include) {\r\n if (typeof (include) !== 'string') {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'an \\'include\\' attribute must be a string at: ' + state);\r\n }\r\n if (include[0] === '@') {\r\n include = include.substr(1); // peel off starting @\r\n }\r\n if (!json.tokenizer[include]) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'include target \\'' + include + '\\' is not defined at: ' + state);\r\n }\r\n addRules(state + '.' + include, newrules, json.tokenizer[include]);\r\n }\r\n else {\r\n const newrule = new Rule(state);\r\n // Set up new rule attributes\r\n if (Array.isArray(rule) && rule.length >= 1 && rule.length <= 3) {\r\n newrule.setRegex(lexerMin, rule[0]);\r\n if (rule.length >= 3) {\r\n if (typeof (rule[1]) === 'string') {\r\n newrule.setAction(lexerMin, { token: rule[1], next: rule[2] });\r\n }\r\n else if (typeof (rule[1]) === 'object') {\r\n const rule1 = rule[1];\r\n rule1.next = rule[2];\r\n newrule.setAction(lexerMin, rule1);\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'a next state as the last element of a rule can only be given if the action is either an object or a string, at: ' + state);\r\n }\r\n }\r\n else {\r\n newrule.setAction(lexerMin, rule[1]);\r\n }\r\n }\r\n else {\r\n if (!rule.regex) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'a rule must either be an array, or an object with a \\'regex\\' or \\'include\\' field at: ' + state);\r\n }\r\n if (rule.name) {\r\n if (typeof rule.name === 'string') {\r\n newrule.name = rule.name;\r\n }\r\n }\r\n if (rule.matchOnlyAtStart) {\r\n newrule.matchOnlyAtLineStart = bool(rule.matchOnlyAtLineStart, false);\r\n }\r\n newrule.setRegex(lexerMin, rule.regex);\r\n newrule.setAction(lexerMin, rule.action);\r\n }\r\n newrules.push(newrule);\r\n }\r\n }\r\n }\r\n // compile the tokenizer rules\r\n if (!json.tokenizer || typeof (json.tokenizer) !== 'object') {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'a language definition must define the \\'tokenizer\\' attribute as an object');\r\n }\r\n lexer.tokenizer = [];\r\n for (let key in json.tokenizer) {\r\n if (json.tokenizer.hasOwnProperty(key)) {\r\n if (!lexer.start) {\r\n lexer.start = key;\r\n }\r\n const rules = json.tokenizer[key];\r\n lexer.tokenizer[key] = new Array();\r\n addRules('tokenizer.' + key, lexer.tokenizer[key], rules);\r\n }\r\n }\r\n lexer.usesEmbedded = lexerMin.usesEmbedded; // can be set during compileAction\r\n // Set simple brackets\r\n if (json.brackets) {\r\n if (!(Array.isArray(json.brackets))) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'the \\'brackets\\' attribute must be defined as an array');\r\n }\r\n }\r\n else {\r\n json.brackets = [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ];\r\n }\r\n let brackets = [];\r\n for (let el of json.brackets) {\r\n let desc = el;\r\n if (desc && Array.isArray(desc) && desc.length === 3) {\r\n desc = { token: desc[2], open: desc[0], close: desc[1] };\r\n }\r\n if (desc.open === desc.close) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'open and close brackets in a \\'brackets\\' attribute must be different: ' + desc.open +\r\n '\\n hint: use the \\'bracket\\' attribute if matching on equal brackets is required.');\r\n }\r\n if (typeof desc.open === 'string' && typeof desc.token === 'string' && typeof desc.close === 'string') {\r\n brackets.push({\r\n token: desc.token + lexer.tokenPostfix,\r\n open: _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.fixCase(lexer, desc.open),\r\n close: _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.fixCase(lexer, desc.close)\r\n });\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__.createError(lexer, 'every element in the \\'brackets\\' array must be a \\'{open,close,token}\\' object or array');\r\n }\r\n }\r\n lexer.brackets = brackets;\r\n // Disable throw so the syntax highlighter goes, no matter what\r\n lexer.noThrow = true;\r\n return lexer;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MonarchTokenizer\": () => (/* binding */ MonarchTokenizer),\n/* harmony export */ \"createTokenizationSupport\": () => (/* binding */ createTokenizationSupport)\n/* harmony export */ });\n/* harmony import */ var _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/core/token.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/core/token.js\");\n/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/modes.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes.js\");\n/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/modes/nullMode.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js\");\n/* harmony import */ var _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./monarchCommon.js */ \"./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nconst CACHE_STACK_DEPTH = 5;\r\n/**\r\n * Reuse the same stack elements up to a certain depth.\r\n */\r\nclass MonarchStackElementFactory {\r\n constructor(maxCacheDepth) {\r\n this._maxCacheDepth = maxCacheDepth;\r\n this._entries = Object.create(null);\r\n }\r\n static create(parent, state) {\r\n return this._INSTANCE.create(parent, state);\r\n }\r\n create(parent, state) {\r\n if (parent !== null && parent.depth >= this._maxCacheDepth) {\r\n // no caching above a certain depth\r\n return new MonarchStackElement(parent, state);\r\n }\r\n let stackElementId = MonarchStackElement.getStackElementId(parent);\r\n if (stackElementId.length > 0) {\r\n stackElementId += '|';\r\n }\r\n stackElementId += state;\r\n let result = this._entries[stackElementId];\r\n if (result) {\r\n return result;\r\n }\r\n result = new MonarchStackElement(parent, state);\r\n this._entries[stackElementId] = result;\r\n return result;\r\n }\r\n}\r\nMonarchStackElementFactory._INSTANCE = new MonarchStackElementFactory(CACHE_STACK_DEPTH);\r\nclass MonarchStackElement {\r\n constructor(parent, state) {\r\n this.parent = parent;\r\n this.state = state;\r\n this.depth = (this.parent ? this.parent.depth : 0) + 1;\r\n }\r\n static getStackElementId(element) {\r\n let result = '';\r\n while (element !== null) {\r\n if (result.length > 0) {\r\n result += '|';\r\n }\r\n result += element.state;\r\n element = element.parent;\r\n }\r\n return result;\r\n }\r\n static _equals(a, b) {\r\n while (a !== null && b !== null) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a.state !== b.state) {\r\n return false;\r\n }\r\n a = a.parent;\r\n b = b.parent;\r\n }\r\n if (a === null && b === null) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n equals(other) {\r\n return MonarchStackElement._equals(this, other);\r\n }\r\n push(state) {\r\n return MonarchStackElementFactory.create(this, state);\r\n }\r\n pop() {\r\n return this.parent;\r\n }\r\n popall() {\r\n let result = this;\r\n while (result.parent) {\r\n result = result.parent;\r\n }\r\n return result;\r\n }\r\n switchTo(state) {\r\n return MonarchStackElementFactory.create(this.parent, state);\r\n }\r\n}\r\nclass EmbeddedModeData {\r\n constructor(modeId, state) {\r\n this.modeId = modeId;\r\n this.state = state;\r\n }\r\n equals(other) {\r\n return (this.modeId === other.modeId\r\n && this.state.equals(other.state));\r\n }\r\n clone() {\r\n let stateClone = this.state.clone();\r\n // save an object\r\n if (stateClone === this.state) {\r\n return this;\r\n }\r\n return new EmbeddedModeData(this.modeId, this.state);\r\n }\r\n}\r\n/**\r\n * Reuse the same line states up to a certain depth.\r\n */\r\nclass MonarchLineStateFactory {\r\n constructor(maxCacheDepth) {\r\n this._maxCacheDepth = maxCacheDepth;\r\n this._entries = Object.create(null);\r\n }\r\n static create(stack, embeddedModeData) {\r\n return this._INSTANCE.create(stack, embeddedModeData);\r\n }\r\n create(stack, embeddedModeData) {\r\n if (embeddedModeData !== null) {\r\n // no caching when embedding\r\n return new MonarchLineState(stack, embeddedModeData);\r\n }\r\n if (stack !== null && stack.depth >= this._maxCacheDepth) {\r\n // no caching above a certain depth\r\n return new MonarchLineState(stack, embeddedModeData);\r\n }\r\n let stackElementId = MonarchStackElement.getStackElementId(stack);\r\n let result = this._entries[stackElementId];\r\n if (result) {\r\n return result;\r\n }\r\n result = new MonarchLineState(stack, null);\r\n this._entries[stackElementId] = result;\r\n return result;\r\n }\r\n}\r\nMonarchLineStateFactory._INSTANCE = new MonarchLineStateFactory(CACHE_STACK_DEPTH);\r\nclass MonarchLineState {\r\n constructor(stack, embeddedModeData) {\r\n this.stack = stack;\r\n this.embeddedModeData = embeddedModeData;\r\n }\r\n clone() {\r\n let embeddedModeDataClone = this.embeddedModeData ? this.embeddedModeData.clone() : null;\r\n // save an object\r\n if (embeddedModeDataClone === this.embeddedModeData) {\r\n return this;\r\n }\r\n return MonarchLineStateFactory.create(this.stack, this.embeddedModeData);\r\n }\r\n equals(other) {\r\n if (!(other instanceof MonarchLineState)) {\r\n return false;\r\n }\r\n if (!this.stack.equals(other.stack)) {\r\n return false;\r\n }\r\n if (this.embeddedModeData === null && other.embeddedModeData === null) {\r\n return true;\r\n }\r\n if (this.embeddedModeData === null || other.embeddedModeData === null) {\r\n return false;\r\n }\r\n return this.embeddedModeData.equals(other.embeddedModeData);\r\n }\r\n}\r\nclass MonarchClassicTokensCollector {\r\n constructor() {\r\n this._tokens = [];\r\n this._language = null;\r\n this._lastTokenType = null;\r\n this._lastTokenLanguage = null;\r\n }\r\n enterMode(startOffset, modeId) {\r\n this._language = modeId;\r\n }\r\n emit(startOffset, type) {\r\n if (this._lastTokenType === type && this._lastTokenLanguage === this._language) {\r\n return;\r\n }\r\n this._lastTokenType = type;\r\n this._lastTokenLanguage = this._language;\r\n this._tokens.push(new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__.Token(startOffset, type, this._language));\r\n }\r\n nestedModeTokenize(embeddedModeLine, hasEOL, embeddedModeData, offsetDelta) {\r\n const nestedModeId = embeddedModeData.modeId;\r\n const embeddedModeState = embeddedModeData.state;\r\n const nestedModeTokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.get(nestedModeId);\r\n if (!nestedModeTokenizationSupport) {\r\n this.enterMode(offsetDelta, nestedModeId);\r\n this.emit(offsetDelta, '');\r\n return embeddedModeState;\r\n }\r\n let nestedResult = nestedModeTokenizationSupport.tokenize(embeddedModeLine, hasEOL, embeddedModeState, offsetDelta);\r\n this._tokens = this._tokens.concat(nestedResult.tokens);\r\n this._lastTokenType = null;\r\n this._lastTokenLanguage = null;\r\n this._language = null;\r\n return nestedResult.endState;\r\n }\r\n finalize(endState) {\r\n return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__.TokenizationResult(this._tokens, endState);\r\n }\r\n}\r\nclass MonarchModernTokensCollector {\r\n constructor(modeService, theme) {\r\n this._modeService = modeService;\r\n this._theme = theme;\r\n this._prependTokens = null;\r\n this._tokens = [];\r\n this._currentLanguageId = 0 /* Null */;\r\n this._lastTokenMetadata = 0;\r\n }\r\n enterMode(startOffset, modeId) {\r\n this._currentLanguageId = this._modeService.getLanguageIdentifier(modeId).id;\r\n }\r\n emit(startOffset, type) {\r\n let metadata = this._theme.match(this._currentLanguageId, type);\r\n if (this._lastTokenMetadata === metadata) {\r\n return;\r\n }\r\n this._lastTokenMetadata = metadata;\r\n this._tokens.push(startOffset);\r\n this._tokens.push(metadata);\r\n }\r\n static _merge(a, b, c) {\r\n let aLen = (a !== null ? a.length : 0);\r\n let bLen = b.length;\r\n let cLen = (c !== null ? c.length : 0);\r\n if (aLen === 0 && bLen === 0 && cLen === 0) {\r\n return new Uint32Array(0);\r\n }\r\n if (aLen === 0 && bLen === 0) {\r\n return c;\r\n }\r\n if (bLen === 0 && cLen === 0) {\r\n return a;\r\n }\r\n let result = new Uint32Array(aLen + bLen + cLen);\r\n if (a !== null) {\r\n result.set(a);\r\n }\r\n for (let i = 0; i < bLen; i++) {\r\n result[aLen + i] = b[i];\r\n }\r\n if (c !== null) {\r\n result.set(c, aLen + bLen);\r\n }\r\n return result;\r\n }\r\n nestedModeTokenize(embeddedModeLine, hasEOL, embeddedModeData, offsetDelta) {\r\n const nestedModeId = embeddedModeData.modeId;\r\n const embeddedModeState = embeddedModeData.state;\r\n const nestedModeTokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.get(nestedModeId);\r\n if (!nestedModeTokenizationSupport) {\r\n this.enterMode(offsetDelta, nestedModeId);\r\n this.emit(offsetDelta, '');\r\n return embeddedModeState;\r\n }\r\n let nestedResult = nestedModeTokenizationSupport.tokenize2(embeddedModeLine, hasEOL, embeddedModeState, offsetDelta);\r\n this._prependTokens = MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, nestedResult.tokens);\r\n this._tokens = [];\r\n this._currentLanguageId = 0;\r\n this._lastTokenMetadata = 0;\r\n return nestedResult.endState;\r\n }\r\n finalize(endState) {\r\n return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__.TokenizationResult2(MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, null), endState);\r\n }\r\n}\r\nclass MonarchTokenizer {\r\n constructor(modeService, standaloneThemeService, modeId, lexer) {\r\n this._modeService = modeService;\r\n this._standaloneThemeService = standaloneThemeService;\r\n this._modeId = modeId;\r\n this._lexer = lexer;\r\n this._embeddedModes = Object.create(null);\r\n this.embeddedLoaded = Promise.resolve(undefined);\r\n // Set up listening for embedded modes\r\n let emitting = false;\r\n this._tokenizationRegistryListener = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.onDidChange((e) => {\r\n if (emitting) {\r\n return;\r\n }\r\n let isOneOfMyEmbeddedModes = false;\r\n for (let i = 0, len = e.changedLanguages.length; i < len; i++) {\r\n let language = e.changedLanguages[i];\r\n if (this._embeddedModes[language]) {\r\n isOneOfMyEmbeddedModes = true;\r\n break;\r\n }\r\n }\r\n if (isOneOfMyEmbeddedModes) {\r\n emitting = true;\r\n _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.fire([this._modeId]);\r\n emitting = false;\r\n }\r\n });\r\n }\r\n dispose() {\r\n this._tokenizationRegistryListener.dispose();\r\n }\r\n getLoadStatus() {\r\n let promises = [];\r\n for (let nestedModeId in this._embeddedModes) {\r\n const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.get(nestedModeId);\r\n if (tokenizationSupport) {\r\n // The nested mode is already loaded\r\n if (tokenizationSupport instanceof MonarchTokenizer) {\r\n const nestedModeStatus = tokenizationSupport.getLoadStatus();\r\n if (nestedModeStatus.loaded === false) {\r\n promises.push(nestedModeStatus.promise);\r\n }\r\n }\r\n continue;\r\n }\r\n const tokenizationSupportPromise = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.getPromise(nestedModeId);\r\n if (tokenizationSupportPromise) {\r\n // The nested mode is in the process of being loaded\r\n promises.push(tokenizationSupportPromise);\r\n }\r\n }\r\n if (promises.length === 0) {\r\n return {\r\n loaded: true\r\n };\r\n }\r\n return {\r\n loaded: false,\r\n promise: Promise.all(promises).then(_ => undefined)\r\n };\r\n }\r\n getInitialState() {\r\n let rootState = MonarchStackElementFactory.create(null, this._lexer.start);\r\n return MonarchLineStateFactory.create(rootState, null);\r\n }\r\n tokenize(line, hasEOL, lineState, offsetDelta) {\r\n let tokensCollector = new MonarchClassicTokensCollector();\r\n let endLineState = this._tokenize(line, hasEOL, lineState, offsetDelta, tokensCollector);\r\n return tokensCollector.finalize(endLineState);\r\n }\r\n tokenize2(line, hasEOL, lineState, offsetDelta) {\r\n let tokensCollector = new MonarchModernTokensCollector(this._modeService, this._standaloneThemeService.getColorTheme().tokenTheme);\r\n let endLineState = this._tokenize(line, hasEOL, lineState, offsetDelta, tokensCollector);\r\n return tokensCollector.finalize(endLineState);\r\n }\r\n _tokenize(line, hasEOL, lineState, offsetDelta, collector) {\r\n if (lineState.embeddedModeData) {\r\n return this._nestedTokenize(line, hasEOL, lineState, offsetDelta, collector);\r\n }\r\n else {\r\n return this._myTokenize(line, hasEOL, lineState, offsetDelta, collector);\r\n }\r\n }\r\n _findLeavingNestedModeOffset(line, state) {\r\n let rules = this._lexer.tokenizer[state.stack.state];\r\n if (!rules) {\r\n rules = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.findRules(this._lexer, state.stack.state); // do parent matching\r\n if (!rules) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'tokenizer state is not defined: ' + state.stack.state);\r\n }\r\n }\r\n let popOffset = -1;\r\n let hasEmbeddedPopRule = false;\r\n for (const rule of rules) {\r\n if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.isIAction(rule.action) || rule.action.nextEmbedded !== '@pop') {\r\n continue;\r\n }\r\n hasEmbeddedPopRule = true;\r\n let regex = rule.regex;\r\n let regexSource = rule.regex.source;\r\n if (regexSource.substr(0, 4) === '^(?:' && regexSource.substr(regexSource.length - 1, 1) === ')') {\r\n let flags = (regex.ignoreCase ? 'i' : '') + (regex.unicode ? 'u' : '');\r\n regex = new RegExp(regexSource.substr(4, regexSource.length - 5), flags);\r\n }\r\n let result = line.search(regex);\r\n if (result === -1 || (result !== 0 && rule.matchOnlyAtLineStart)) {\r\n continue;\r\n }\r\n if (popOffset === -1 || result < popOffset) {\r\n popOffset = result;\r\n }\r\n }\r\n if (!hasEmbeddedPopRule) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'no rule containing nextEmbedded: \"@pop\" in tokenizer embedded state: ' + state.stack.state);\r\n }\r\n return popOffset;\r\n }\r\n _nestedTokenize(line, hasEOL, lineState, offsetDelta, tokensCollector) {\r\n let popOffset = this._findLeavingNestedModeOffset(line, lineState);\r\n if (popOffset === -1) {\r\n // tokenization will not leave nested mode\r\n let nestedEndState = tokensCollector.nestedModeTokenize(line, hasEOL, lineState.embeddedModeData, offsetDelta);\r\n return MonarchLineStateFactory.create(lineState.stack, new EmbeddedModeData(lineState.embeddedModeData.modeId, nestedEndState));\r\n }\r\n let nestedModeLine = line.substring(0, popOffset);\r\n if (nestedModeLine.length > 0) {\r\n // tokenize with the nested mode\r\n tokensCollector.nestedModeTokenize(nestedModeLine, false, lineState.embeddedModeData, offsetDelta);\r\n }\r\n let restOfTheLine = line.substring(popOffset);\r\n return this._myTokenize(restOfTheLine, hasEOL, lineState, offsetDelta + popOffset, tokensCollector);\r\n }\r\n _safeRuleName(rule) {\r\n if (rule) {\r\n return rule.name;\r\n }\r\n return '(unknown)';\r\n }\r\n _myTokenize(lineWithoutLF, hasEOL, lineState, offsetDelta, tokensCollector) {\r\n tokensCollector.enterMode(offsetDelta, this._modeId);\r\n const lineWithoutLFLength = lineWithoutLF.length;\r\n const line = (hasEOL && this._lexer.includeLF ? lineWithoutLF + '\\n' : lineWithoutLF);\r\n const lineLength = line.length;\r\n let embeddedModeData = lineState.embeddedModeData;\r\n let stack = lineState.stack;\r\n let pos = 0;\r\n let groupMatching = null;\r\n // See https://github.com/microsoft/monaco-editor/issues/1235\r\n // Evaluate rules at least once for an empty line\r\n let forceEvaluation = true;\r\n while (forceEvaluation || pos < lineLength) {\r\n const pos0 = pos;\r\n const stackLen0 = stack.depth;\r\n const groupLen0 = groupMatching ? groupMatching.groups.length : 0;\r\n const state = stack.state;\r\n let matches = null;\r\n let matched = null;\r\n let action = null;\r\n let rule = null;\r\n let enteringEmbeddedMode = null;\r\n // check if we need to process group matches first\r\n if (groupMatching) {\r\n matches = groupMatching.matches;\r\n const groupEntry = groupMatching.groups.shift();\r\n matched = groupEntry.matched;\r\n action = groupEntry.action;\r\n rule = groupMatching.rule;\r\n // cleanup if necessary\r\n if (groupMatching.groups.length === 0) {\r\n groupMatching = null;\r\n }\r\n }\r\n else {\r\n // otherwise we match on the token stream\r\n if (!forceEvaluation && pos >= lineLength) {\r\n // nothing to do\r\n break;\r\n }\r\n forceEvaluation = false;\r\n // get the rules for this state\r\n let rules = this._lexer.tokenizer[state];\r\n if (!rules) {\r\n rules = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.findRules(this._lexer, state); // do parent matching\r\n if (!rules) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'tokenizer state is not defined: ' + state);\r\n }\r\n }\r\n // try each rule until we match\r\n let restOfLine = line.substr(pos);\r\n for (const rule of rules) {\r\n if (pos === 0 || !rule.matchOnlyAtLineStart) {\r\n matches = restOfLine.match(rule.regex);\r\n if (matches) {\r\n matched = matches[0];\r\n action = rule.action;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n // We matched 'rule' with 'matches' and 'action'\r\n if (!matches) {\r\n matches = [''];\r\n matched = '';\r\n }\r\n if (!action) {\r\n // bad: we didn't match anything, and there is no action to take\r\n // we need to advance the stream or we get progress trouble\r\n if (pos < lineLength) {\r\n matches = [line.charAt(pos)];\r\n matched = matches[0];\r\n }\r\n action = this._lexer.defaultToken;\r\n }\r\n if (matched === null) {\r\n // should never happen, needed for strict null checking\r\n break;\r\n }\r\n // advance stream\r\n pos += matched.length;\r\n // maybe call action function (used for 'cases')\r\n while (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.isFuzzyAction(action) && _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.isIAction(action) && action.test) {\r\n action = action.test(matched, matches, state, pos === lineLength);\r\n }\r\n let result = null;\r\n // set the result: either a string or an array of actions\r\n if (typeof action === 'string' || Array.isArray(action)) {\r\n result = action;\r\n }\r\n else if (action.group) {\r\n result = action.group;\r\n }\r\n else if (action.token !== null && action.token !== undefined) {\r\n // do $n replacements?\r\n if (action.tokenSubst) {\r\n result = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.substituteMatches(this._lexer, action.token, matched, matches, state);\r\n }\r\n else {\r\n result = action.token;\r\n }\r\n // enter embedded mode?\r\n if (action.nextEmbedded) {\r\n if (action.nextEmbedded === '@pop') {\r\n if (!embeddedModeData) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'cannot pop embedded mode if not inside one');\r\n }\r\n embeddedModeData = null;\r\n }\r\n else if (embeddedModeData) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'cannot enter embedded mode from within an embedded mode');\r\n }\r\n else {\r\n enteringEmbeddedMode = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.substituteMatches(this._lexer, action.nextEmbedded, matched, matches, state);\r\n }\r\n }\r\n // state transformations\r\n if (action.goBack) { // back up the stream..\r\n pos = Math.max(0, pos - action.goBack);\r\n }\r\n if (action.switchTo && typeof action.switchTo === 'string') {\r\n let nextState = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.substituteMatches(this._lexer, action.switchTo, matched, matches, state); // switch state without a push...\r\n if (nextState[0] === '@') {\r\n nextState = nextState.substr(1); // peel off starting '@'\r\n }\r\n if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.findRules(this._lexer, nextState)) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'trying to switch to a state \\'' + nextState + '\\' that is undefined in rule: ' + this._safeRuleName(rule));\r\n }\r\n else {\r\n stack = stack.switchTo(nextState);\r\n }\r\n }\r\n else if (action.transform && typeof action.transform === 'function') {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'action.transform not supported');\r\n }\r\n else if (action.next) {\r\n if (action.next === '@push') {\r\n if (stack.depth >= this._lexer.maxStack) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'maximum tokenizer stack size reached: [' +\r\n stack.state + ',' + stack.parent.state + ',...]');\r\n }\r\n else {\r\n stack = stack.push(state);\r\n }\r\n }\r\n else if (action.next === '@pop') {\r\n if (stack.depth <= 1) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'trying to pop an empty stack in rule: ' + this._safeRuleName(rule));\r\n }\r\n else {\r\n stack = stack.pop();\r\n }\r\n }\r\n else if (action.next === '@popall') {\r\n stack = stack.popall();\r\n }\r\n else {\r\n let nextState = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.substituteMatches(this._lexer, action.next, matched, matches, state);\r\n if (nextState[0] === '@') {\r\n nextState = nextState.substr(1); // peel off starting '@'\r\n }\r\n if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.findRules(this._lexer, nextState)) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'trying to set a next state \\'' + nextState + '\\' that is undefined in rule: ' + this._safeRuleName(rule));\r\n }\r\n else {\r\n stack = stack.push(nextState);\r\n }\r\n }\r\n }\r\n if (action.log && typeof (action.log) === 'string') {\r\n _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.log(this._lexer, this._lexer.languageId + ': ' + _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.substituteMatches(this._lexer, action.log, matched, matches, state));\r\n }\r\n }\r\n // check result\r\n if (result === null) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'lexer rule has no well-defined action in rule: ' + this._safeRuleName(rule));\r\n }\r\n const computeNewStateForEmbeddedMode = (enteringEmbeddedMode) => {\r\n // substitute language alias to known modes to support syntax highlighting\r\n let enteringEmbeddedModeId = this._modeService.getModeIdForLanguageName(enteringEmbeddedMode);\r\n if (enteringEmbeddedModeId) {\r\n enteringEmbeddedMode = enteringEmbeddedModeId;\r\n }\r\n const embeddedModeData = this._getNestedEmbeddedModeData(enteringEmbeddedMode);\r\n if (pos < lineLength) {\r\n // there is content from the embedded mode on this line\r\n const restOfLine = lineWithoutLF.substr(pos);\r\n return this._nestedTokenize(restOfLine, hasEOL, MonarchLineStateFactory.create(stack, embeddedModeData), offsetDelta + pos, tokensCollector);\r\n }\r\n else {\r\n return MonarchLineStateFactory.create(stack, embeddedModeData);\r\n }\r\n };\r\n // is the result a group match?\r\n if (Array.isArray(result)) {\r\n if (groupMatching && groupMatching.groups.length > 0) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'groups cannot be nested: ' + this._safeRuleName(rule));\r\n }\r\n if (matches.length !== result.length + 1) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'matched number of groups does not match the number of actions in rule: ' + this._safeRuleName(rule));\r\n }\r\n let totalLen = 0;\r\n for (let i = 1; i < matches.length; i++) {\r\n totalLen += matches[i].length;\r\n }\r\n if (totalLen !== matched.length) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'with groups, all characters should be matched in consecutive groups in rule: ' + this._safeRuleName(rule));\r\n }\r\n groupMatching = {\r\n rule: rule,\r\n matches: matches,\r\n groups: []\r\n };\r\n for (let i = 0; i < result.length; i++) {\r\n groupMatching.groups[i] = {\r\n action: result[i],\r\n matched: matches[i + 1]\r\n };\r\n }\r\n pos -= matched.length;\r\n // call recursively to initiate first result match\r\n continue;\r\n }\r\n else {\r\n // regular result\r\n // check for '@rematch'\r\n if (result === '@rematch') {\r\n pos -= matched.length;\r\n matched = ''; // better set the next state too..\r\n matches = null;\r\n result = '';\r\n // Even though `@rematch` was specified, if `nextEmbedded` also specified,\r\n // a state transition should occur.\r\n if (enteringEmbeddedMode !== null) {\r\n return computeNewStateForEmbeddedMode(enteringEmbeddedMode);\r\n }\r\n }\r\n // check progress\r\n if (matched.length === 0) {\r\n if (lineLength === 0 || stackLen0 !== stack.depth || state !== stack.state || (!groupMatching ? 0 : groupMatching.groups.length) !== groupLen0) {\r\n continue;\r\n }\r\n else {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, 'no progress in tokenizer in rule: ' + this._safeRuleName(rule));\r\n }\r\n }\r\n // return the result (and check for brace matching)\r\n // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions\r\n let tokenType = null;\r\n if (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.isString(result) && result.indexOf('@brackets') === 0) {\r\n let rest = result.substr('@brackets'.length);\r\n let bracket = findBracket(this._lexer, matched);\r\n if (!bracket) {\r\n throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.createError(this._lexer, '@brackets token returned but no bracket defined as: ' + matched);\r\n }\r\n tokenType = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.sanitize(bracket.token + rest);\r\n }\r\n else {\r\n let token = (result === '' ? '' : result + this._lexer.tokenPostfix);\r\n tokenType = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.sanitize(token);\r\n }\r\n if (pos0 < lineWithoutLFLength) {\r\n tokensCollector.emit(pos0 + offsetDelta, tokenType);\r\n }\r\n }\r\n if (enteringEmbeddedMode !== null) {\r\n return computeNewStateForEmbeddedMode(enteringEmbeddedMode);\r\n }\r\n }\r\n return MonarchLineStateFactory.create(stack, embeddedModeData);\r\n }\r\n _getNestedEmbeddedModeData(mimetypeOrModeId) {\r\n let nestedModeId = this._locateMode(mimetypeOrModeId);\r\n if (nestedModeId) {\r\n let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__.TokenizationRegistry.get(nestedModeId);\r\n if (tokenizationSupport) {\r\n return new EmbeddedModeData(nestedModeId, tokenizationSupport.getInitialState());\r\n }\r\n }\r\n return new EmbeddedModeData(nestedModeId || _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__.NULL_MODE_ID, _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__.NULL_STATE);\r\n }\r\n _locateMode(mimetypeOrModeId) {\r\n if (!mimetypeOrModeId || !this._modeService.isRegisteredMode(mimetypeOrModeId)) {\r\n return null;\r\n }\r\n if (mimetypeOrModeId === this._modeId) {\r\n // embedding myself...\r\n return mimetypeOrModeId;\r\n }\r\n let modeId = this._modeService.getModeId(mimetypeOrModeId);\r\n if (modeId) {\r\n // Fire mode loading event\r\n this._modeService.triggerMode(modeId);\r\n this._embeddedModes[modeId] = true;\r\n }\r\n return modeId;\r\n }\r\n}\r\n/**\r\n * Searches for a bracket in the 'brackets' attribute that matches the input.\r\n */\r\nfunction findBracket(lexer, matched) {\r\n if (!matched) {\r\n return null;\r\n }\r\n matched = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__.fixCase(lexer, matched);\r\n let brackets = lexer.brackets;\r\n for (const bracket of brackets) {\r\n if (bracket.open === matched) {\r\n return { token: bracket.token, bracketType: 1 /* Open */ };\r\n }\r\n else if (bracket.close === matched) {\r\n return { token: bracket.token, bracketType: -1 /* Close */ };\r\n }\r\n }\r\n return null;\r\n}\r\nfunction createTokenizationSupport(modeService, standaloneThemeService, modeId, lexer) {\r\n return new MonarchTokenizer(modeService, standaloneThemeService, modeId, lexer);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IStandaloneThemeService\": () => (/* binding */ IStandaloneThemeService)\n/* harmony export */ });\n/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IStandaloneThemeService = (0,_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('themeService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"vs\": () => (/* binding */ vs),\n/* harmony export */ \"vs_dark\": () => (/* binding */ vs_dark),\n/* harmony export */ \"hc_black\": () => (/* binding */ hc_black)\n/* harmony export */ });\n/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js\");\n/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* -------------------------------- Begin vs theme -------------------------------- */\r\nconst vs = {\r\n base: 'vs',\r\n inherit: false,\r\n rules: [\r\n { token: '', foreground: '000000', background: 'fffffe' },\r\n { token: 'invalid', foreground: 'cd3131' },\r\n { token: 'emphasis', fontStyle: 'italic' },\r\n { token: 'strong', fontStyle: 'bold' },\r\n { token: 'variable', foreground: '001188' },\r\n { token: 'variable.predefined', foreground: '4864AA' },\r\n { token: 'constant', foreground: 'dd0000' },\r\n { token: 'comment', foreground: '008000' },\r\n { token: 'number', foreground: '098658' },\r\n { token: 'number.hex', foreground: '3030c0' },\r\n { token: 'regexp', foreground: '800000' },\r\n { token: 'annotation', foreground: '808080' },\r\n { token: 'type', foreground: '008080' },\r\n { token: 'delimiter', foreground: '000000' },\r\n { token: 'delimiter.html', foreground: '383838' },\r\n { token: 'delimiter.xml', foreground: '0000FF' },\r\n { token: 'tag', foreground: '800000' },\r\n { token: 'tag.id.pug', foreground: '4F76AC' },\r\n { token: 'tag.class.pug', foreground: '4F76AC' },\r\n { token: 'meta.scss', foreground: '800000' },\r\n { token: 'metatag', foreground: 'e00000' },\r\n { token: 'metatag.content.html', foreground: 'FF0000' },\r\n { token: 'metatag.html', foreground: '808080' },\r\n { token: 'metatag.xml', foreground: '808080' },\r\n { token: 'metatag.php', fontStyle: 'bold' },\r\n { token: 'key', foreground: '863B00' },\r\n { token: 'string.key.json', foreground: 'A31515' },\r\n { token: 'string.value.json', foreground: '0451A5' },\r\n { token: 'attribute.name', foreground: 'FF0000' },\r\n { token: 'attribute.value', foreground: '0451A5' },\r\n { token: 'attribute.value.number', foreground: '098658' },\r\n { token: 'attribute.value.unit', foreground: '098658' },\r\n { token: 'attribute.value.html', foreground: '0000FF' },\r\n { token: 'attribute.value.xml', foreground: '0000FF' },\r\n { token: 'string', foreground: 'A31515' },\r\n { token: 'string.html', foreground: '0000FF' },\r\n { token: 'string.sql', foreground: 'FF0000' },\r\n { token: 'string.yaml', foreground: '0451A5' },\r\n { token: 'keyword', foreground: '0000FF' },\r\n { token: 'keyword.json', foreground: '0451A5' },\r\n { token: 'keyword.flow', foreground: 'AF00DB' },\r\n { token: 'keyword.flow.scss', foreground: '0000FF' },\r\n { token: 'operator.scss', foreground: '666666' },\r\n { token: 'operator.sql', foreground: '778899' },\r\n { token: 'operator.swift', foreground: '666666' },\r\n { token: 'predefined.sql', foreground: 'C700C7' },\r\n ],\r\n colors: {\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorBackground]: '#FFFFFE',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorForeground]: '#000000',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorInactiveSelection]: '#E5EBF1',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorIndentGuides]: '#D3D3D3',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorActiveIndentGuides]: '#939393',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorSelectionHighlight]: '#ADD6FF4D'\r\n }\r\n};\r\n/* -------------------------------- End vs theme -------------------------------- */\r\n/* -------------------------------- Begin vs-dark theme -------------------------------- */\r\nconst vs_dark = {\r\n base: 'vs-dark',\r\n inherit: false,\r\n rules: [\r\n { token: '', foreground: 'D4D4D4', background: '1E1E1E' },\r\n { token: 'invalid', foreground: 'f44747' },\r\n { token: 'emphasis', fontStyle: 'italic' },\r\n { token: 'strong', fontStyle: 'bold' },\r\n { token: 'variable', foreground: '74B0DF' },\r\n { token: 'variable.predefined', foreground: '4864AA' },\r\n { token: 'variable.parameter', foreground: '9CDCFE' },\r\n { token: 'constant', foreground: '569CD6' },\r\n { token: 'comment', foreground: '608B4E' },\r\n { token: 'number', foreground: 'B5CEA8' },\r\n { token: 'number.hex', foreground: '5BB498' },\r\n { token: 'regexp', foreground: 'B46695' },\r\n { token: 'annotation', foreground: 'cc6666' },\r\n { token: 'type', foreground: '3DC9B0' },\r\n { token: 'delimiter', foreground: 'DCDCDC' },\r\n { token: 'delimiter.html', foreground: '808080' },\r\n { token: 'delimiter.xml', foreground: '808080' },\r\n { token: 'tag', foreground: '569CD6' },\r\n { token: 'tag.id.pug', foreground: '4F76AC' },\r\n { token: 'tag.class.pug', foreground: '4F76AC' },\r\n { token: 'meta.scss', foreground: 'A79873' },\r\n { token: 'meta.tag', foreground: 'CE9178' },\r\n { token: 'metatag', foreground: 'DD6A6F' },\r\n { token: 'metatag.content.html', foreground: '9CDCFE' },\r\n { token: 'metatag.html', foreground: '569CD6' },\r\n { token: 'metatag.xml', foreground: '569CD6' },\r\n { token: 'metatag.php', fontStyle: 'bold' },\r\n { token: 'key', foreground: '9CDCFE' },\r\n { token: 'string.key.json', foreground: '9CDCFE' },\r\n { token: 'string.value.json', foreground: 'CE9178' },\r\n { token: 'attribute.name', foreground: '9CDCFE' },\r\n { token: 'attribute.value', foreground: 'CE9178' },\r\n { token: 'attribute.value.number.css', foreground: 'B5CEA8' },\r\n { token: 'attribute.value.unit.css', foreground: 'B5CEA8' },\r\n { token: 'attribute.value.hex.css', foreground: 'D4D4D4' },\r\n { token: 'string', foreground: 'CE9178' },\r\n { token: 'string.sql', foreground: 'FF0000' },\r\n { token: 'keyword', foreground: '569CD6' },\r\n { token: 'keyword.flow', foreground: 'C586C0' },\r\n { token: 'keyword.json', foreground: 'CE9178' },\r\n { token: 'keyword.flow.scss', foreground: '569CD6' },\r\n { token: 'operator.scss', foreground: '909090' },\r\n { token: 'operator.sql', foreground: '778899' },\r\n { token: 'operator.swift', foreground: '909090' },\r\n { token: 'predefined.sql', foreground: 'FF00FF' },\r\n ],\r\n colors: {\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorBackground]: '#1E1E1E',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorForeground]: '#D4D4D4',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorInactiveSelection]: '#3A3D41',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorIndentGuides]: '#404040',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorActiveIndentGuides]: '#707070',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorSelectionHighlight]: '#ADD6FF26'\r\n }\r\n};\r\n/* -------------------------------- End vs-dark theme -------------------------------- */\r\n/* -------------------------------- Begin hc-black theme -------------------------------- */\r\nconst hc_black = {\r\n base: 'hc-black',\r\n inherit: false,\r\n rules: [\r\n { token: '', foreground: 'FFFFFF', background: '000000' },\r\n { token: 'invalid', foreground: 'f44747' },\r\n { token: 'emphasis', fontStyle: 'italic' },\r\n { token: 'strong', fontStyle: 'bold' },\r\n { token: 'variable', foreground: '1AEBFF' },\r\n { token: 'variable.parameter', foreground: '9CDCFE' },\r\n { token: 'constant', foreground: '569CD6' },\r\n { token: 'comment', foreground: '608B4E' },\r\n { token: 'number', foreground: 'FFFFFF' },\r\n { token: 'regexp', foreground: 'C0C0C0' },\r\n { token: 'annotation', foreground: '569CD6' },\r\n { token: 'type', foreground: '3DC9B0' },\r\n { token: 'delimiter', foreground: 'FFFF00' },\r\n { token: 'delimiter.html', foreground: 'FFFF00' },\r\n { token: 'tag', foreground: '569CD6' },\r\n { token: 'tag.id.pug', foreground: '4F76AC' },\r\n { token: 'tag.class.pug', foreground: '4F76AC' },\r\n { token: 'meta', foreground: 'D4D4D4' },\r\n { token: 'meta.tag', foreground: 'CE9178' },\r\n { token: 'metatag', foreground: '569CD6' },\r\n { token: 'metatag.content.html', foreground: '1AEBFF' },\r\n { token: 'metatag.html', foreground: '569CD6' },\r\n { token: 'metatag.xml', foreground: '569CD6' },\r\n { token: 'metatag.php', fontStyle: 'bold' },\r\n { token: 'key', foreground: '9CDCFE' },\r\n { token: 'string.key', foreground: '9CDCFE' },\r\n { token: 'string.value', foreground: 'CE9178' },\r\n { token: 'attribute.name', foreground: '569CD6' },\r\n { token: 'attribute.value', foreground: '3FF23F' },\r\n { token: 'string', foreground: 'CE9178' },\r\n { token: 'string.sql', foreground: 'FF0000' },\r\n { token: 'keyword', foreground: '569CD6' },\r\n { token: 'keyword.flow', foreground: 'C586C0' },\r\n { token: 'operator.sql', foreground: '778899' },\r\n { token: 'operator.swift', foreground: '909090' },\r\n { token: 'predefined.sql', foreground: 'FF00FF' },\r\n ],\r\n colors: {\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorBackground]: '#000000',\r\n [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__.editorForeground]: '#FFFFFF',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorIndentGuides]: '#FFFFFF',\r\n [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.editorActiveIndentGuides]: '#FFFFFF',\r\n }\r\n};\r\n/* -------------------------------- End hc-black theme -------------------------------- */\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cssDefaults\": () => (/* binding */ cssDefaults),\n/* harmony export */ \"scssDefaults\": () => (/* binding */ scssDefaults),\n/* harmony export */ \"lessDefaults\": () => (/* binding */ lessDefaults)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js\");\n\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n// --- CSS configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) {\r\n this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this._languageId = languageId;\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"diagnosticsOptions\", {\r\n get: function () {\r\n return this._diagnosticsOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar diagnosticDefault = {\r\n validate: true,\r\n lint: {\r\n compatibleVendorPrefixes: 'ignore',\r\n vendorPrefix: 'warning',\r\n duplicateProperties: 'warning',\r\n emptyRules: 'warning',\r\n importStatement: 'ignore',\r\n boxModel: 'ignore',\r\n universalSelector: 'ignore',\r\n zeroUnits: 'ignore',\r\n fontFaceProperties: 'warning',\r\n hexColorLength: 'error',\r\n argumentsInColorFunction: 'error',\r\n unknownProperties: 'warning',\r\n ieHack: 'ignore',\r\n unknownVendorSpecificProperties: 'ignore',\r\n propertyIgnoredDueToDisplay: 'warning',\r\n important: 'ignore',\r\n float: 'ignore',\r\n idSelector: 'ignore'\r\n }\r\n};\r\nvar modeConfigurationDefault = {\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n definitions: true,\r\n references: true,\r\n documentHighlights: true,\r\n rename: true,\r\n colors: true,\r\n foldingRanges: true,\r\n diagnostics: true,\r\n selectionRanges: true\r\n};\r\nvar cssDefaults = new LanguageServiceDefaultsImpl('css', diagnosticDefault, modeConfigurationDefault);\r\nvar scssDefaults = new LanguageServiceDefaultsImpl('scss', diagnosticDefault, modeConfigurationDefault);\r\nvar lessDefaults = new LanguageServiceDefaultsImpl('less', diagnosticDefault, modeConfigurationDefault);\r\n// export to the global based API\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.css = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_language_css_cssMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./cssMode.js */ \"./node_modules/monaco-editor/esm/vs/language/css/cssMode.js\"));\r\n}\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage('less', function () {\r\n getMode().then(function (mode) { return mode.setupMode(lessDefaults); });\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage('scss', function () {\r\n getMode().then(function (mode) { return mode.setupMode(scssDefaults); });\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage('css', function () {\r\n getMode().then(function (mode) { return mode.setupMode(cssDefaults); });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"htmlDefaults\": () => (/* binding */ htmlDefaults),\n/* harmony export */ \"handlebarDefaults\": () => (/* binding */ handlebarDefaults),\n/* harmony export */ \"razorDefaults\": () => (/* binding */ razorDefaults)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js\");\n\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n// --- HTML configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, options, modeConfiguration) {\r\n this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this._languageId = languageId;\r\n this.setOptions(options);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"options\", {\r\n get: function () {\r\n return this._options;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setOptions = function (options) {\r\n this._options = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar formatDefaults = {\r\n tabSize: 4,\r\n insertSpaces: false,\r\n wrapLineLength: 120,\r\n unformatted: 'default\": \"a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',\r\n contentUnformatted: 'pre',\r\n indentInnerHtml: false,\r\n preserveNewLines: true,\r\n maxPreserveNewLines: null,\r\n indentHandlebars: false,\r\n endWithNewline: false,\r\n extraLiners: 'head, body, /html',\r\n wrapAttributes: 'auto'\r\n};\r\nvar htmlOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true, angular1: true, ionic: true }\r\n};\r\nvar handlebarOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true }\r\n};\r\nvar razorOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true, razor: true }\r\n};\r\nfunction getConfigurationDefault(languageId) {\r\n return {\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n links: true,\r\n documentHighlights: true,\r\n rename: true,\r\n colors: true,\r\n foldingRanges: true,\r\n selectionRanges: true,\r\n diagnostics: languageId === htmlLanguageId,\r\n documentFormattingEdits: languageId === htmlLanguageId,\r\n documentRangeFormattingEdits: languageId === htmlLanguageId // turned off for Razor and Handlebar\r\n };\r\n}\r\nvar htmlLanguageId = 'html';\r\nvar handlebarsLanguageId = 'handlebars';\r\nvar razorLanguageId = 'razor';\r\nvar htmlDefaults = new LanguageServiceDefaultsImpl(htmlLanguageId, htmlOptionsDefault, getConfigurationDefault(htmlLanguageId));\r\nvar handlebarDefaults = new LanguageServiceDefaultsImpl(handlebarsLanguageId, handlebarOptionsDefault, getConfigurationDefault(handlebarsLanguageId));\r\nvar razorDefaults = new LanguageServiceDefaultsImpl(razorLanguageId, razorOptionsDefault, getConfigurationDefault(razorLanguageId));\r\n// export to the global based API\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.html = { htmlDefaults: htmlDefaults, razorDefaults: razorDefaults, handlebarDefaults: handlebarDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_language_html_htmlMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./htmlMode.js */ \"./node_modules/monaco-editor/esm/vs/language/html/htmlMode.js\"));\r\n}\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage(htmlLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(htmlDefaults); });\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage(handlebarsLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(handlebarDefaults); });\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage(razorLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(razorDefaults); });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"jsonDefaults\": () => (/* binding */ jsonDefaults)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js\");\n\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) {\r\n this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this._languageId = languageId;\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"diagnosticsOptions\", {\r\n get: function () {\r\n return this._diagnosticsOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar diagnosticDefault = {\r\n validate: true,\r\n allowComments: true,\r\n schemas: [],\r\n enableSchemaRequest: false,\r\n schemaRequest: 'warning',\r\n schemaValidation: 'warning'\r\n};\r\nvar modeConfigurationDefault = {\r\n documentFormattingEdits: true,\r\n documentRangeFormattingEdits: true,\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n tokens: true,\r\n colors: true,\r\n foldingRanges: true,\r\n diagnostics: true,\r\n selectionRanges: true\r\n};\r\nvar jsonDefaults = new LanguageServiceDefaultsImpl('json', diagnosticDefault, modeConfigurationDefault);\r\n// export to the global based API\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.json = { jsonDefaults: jsonDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_language_json_jsonMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./jsonMode.js */ \"./node_modules/monaco-editor/esm/vs/language/json/jsonMode.js\"));\r\n}\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.register({\r\n id: 'json',\r\n extensions: ['.json', '.bowerrc', '.jshintrc', '.jscsrc', '.eslintrc', '.babelrc', '.har'],\r\n aliases: ['JSON', 'json'],\r\n mimetypes: ['application/json']\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.onLanguage('json', function () {\r\n getMode().then(function (mode) { return mode.setupMode(jsonDefaults); });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CancellationTokenSource\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource),\n/* harmony export */ \"Emitter\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Emitter),\n/* harmony export */ \"KeyCode\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyCode),\n/* harmony export */ \"KeyMod\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.KeyMod),\n/* harmony export */ \"MarkerSeverity\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity),\n/* harmony export */ \"MarkerTag\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.MarkerTag),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Selection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Selection),\n/* harmony export */ \"SelectionDirection\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.SelectionDirection),\n/* harmony export */ \"Token\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Token),\n/* harmony export */ \"Uri\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.Uri),\n/* harmony export */ \"editor\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.editor),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__.languages)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"typescriptVersion\": () => (/* binding */ typescriptVersion)\n/* harmony export */ });\n//\r\n// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`\r\n//\r\nvar typescriptVersion = \"4.2.3\";\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ModuleKind\": () => (/* binding */ ModuleKind),\n/* harmony export */ \"JsxEmit\": () => (/* binding */ JsxEmit),\n/* harmony export */ \"NewLineKind\": () => (/* binding */ NewLineKind),\n/* harmony export */ \"ScriptTarget\": () => (/* binding */ ScriptTarget),\n/* harmony export */ \"ModuleResolutionKind\": () => (/* binding */ ModuleResolutionKind),\n/* harmony export */ \"typescriptVersion\": () => (/* binding */ typescriptVersion),\n/* harmony export */ \"typescriptDefaults\": () => (/* binding */ typescriptDefaults),\n/* harmony export */ \"javascriptDefaults\": () => (/* binding */ javascriptDefaults),\n/* harmony export */ \"getTypeScriptWorker\": () => (/* binding */ getTypeScriptWorker),\n/* harmony export */ \"getJavaScriptWorker\": () => (/* binding */ getJavaScriptWorker)\n/* harmony export */ });\n/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ \"./node_modules/monaco-editor/esm/vs/editor/editor.api.js\");\n/* harmony import */ var _lib_typescriptServicesMetadata_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/typescriptServicesMetadata.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js\");\n\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n'use strict';\r\n // do not import the whole typescriptServices here\r\n\r\n//#region enums copied from typescript to prevent loading the entire typescriptServices ---\r\nvar ModuleKind;\r\n(function (ModuleKind) {\r\n ModuleKind[ModuleKind[\"None\"] = 0] = \"None\";\r\n ModuleKind[ModuleKind[\"CommonJS\"] = 1] = \"CommonJS\";\r\n ModuleKind[ModuleKind[\"AMD\"] = 2] = \"AMD\";\r\n ModuleKind[ModuleKind[\"UMD\"] = 3] = \"UMD\";\r\n ModuleKind[ModuleKind[\"System\"] = 4] = \"System\";\r\n ModuleKind[ModuleKind[\"ES2015\"] = 5] = \"ES2015\";\r\n ModuleKind[ModuleKind[\"ESNext\"] = 99] = \"ESNext\";\r\n})(ModuleKind || (ModuleKind = {}));\r\nvar JsxEmit;\r\n(function (JsxEmit) {\r\n JsxEmit[JsxEmit[\"None\"] = 0] = \"None\";\r\n JsxEmit[JsxEmit[\"Preserve\"] = 1] = \"Preserve\";\r\n JsxEmit[JsxEmit[\"React\"] = 2] = \"React\";\r\n JsxEmit[JsxEmit[\"ReactNative\"] = 3] = \"ReactNative\";\r\n JsxEmit[JsxEmit[\"ReactJSX\"] = 4] = \"ReactJSX\";\r\n JsxEmit[JsxEmit[\"ReactJSXDev\"] = 5] = \"ReactJSXDev\";\r\n})(JsxEmit || (JsxEmit = {}));\r\nvar NewLineKind;\r\n(function (NewLineKind) {\r\n NewLineKind[NewLineKind[\"CarriageReturnLineFeed\"] = 0] = \"CarriageReturnLineFeed\";\r\n NewLineKind[NewLineKind[\"LineFeed\"] = 1] = \"LineFeed\";\r\n})(NewLineKind || (NewLineKind = {}));\r\nvar ScriptTarget;\r\n(function (ScriptTarget) {\r\n ScriptTarget[ScriptTarget[\"ES3\"] = 0] = \"ES3\";\r\n ScriptTarget[ScriptTarget[\"ES5\"] = 1] = \"ES5\";\r\n ScriptTarget[ScriptTarget[\"ES2015\"] = 2] = \"ES2015\";\r\n ScriptTarget[ScriptTarget[\"ES2016\"] = 3] = \"ES2016\";\r\n ScriptTarget[ScriptTarget[\"ES2017\"] = 4] = \"ES2017\";\r\n ScriptTarget[ScriptTarget[\"ES2018\"] = 5] = \"ES2018\";\r\n ScriptTarget[ScriptTarget[\"ES2019\"] = 6] = \"ES2019\";\r\n ScriptTarget[ScriptTarget[\"ES2020\"] = 7] = \"ES2020\";\r\n ScriptTarget[ScriptTarget[\"ESNext\"] = 99] = \"ESNext\";\r\n ScriptTarget[ScriptTarget[\"JSON\"] = 100] = \"JSON\";\r\n ScriptTarget[ScriptTarget[\"Latest\"] = 99] = \"Latest\";\r\n})(ScriptTarget || (ScriptTarget = {}));\r\nvar ModuleResolutionKind;\r\n(function (ModuleResolutionKind) {\r\n ModuleResolutionKind[ModuleResolutionKind[\"Classic\"] = 1] = \"Classic\";\r\n ModuleResolutionKind[ModuleResolutionKind[\"NodeJs\"] = 2] = \"NodeJs\";\r\n})(ModuleResolutionKind || (ModuleResolutionKind = {}));\r\n// --- TypeScript configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(compilerOptions, diagnosticsOptions, workerOptions) {\r\n this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this._onDidExtraLibsChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this._extraLibs = Object.create(null);\r\n this._removedExtraLibs = Object.create(null);\r\n this._eagerModelSync = false;\r\n this.setCompilerOptions(compilerOptions);\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setWorkerOptions(workerOptions);\r\n this._onDidExtraLibsChangeTimeout = -1;\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidExtraLibsChange\", {\r\n get: function () {\r\n return this._onDidExtraLibsChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"workerOptions\", {\r\n get: function () {\r\n return this._workerOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.getExtraLibs = function () {\r\n return this._extraLibs;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.addExtraLib = function (content, _filePath) {\r\n var _this = this;\r\n var filePath;\r\n if (typeof _filePath === 'undefined') {\r\n filePath = \"ts:extralib-\" + Math.random().toString(36).substring(2, 15);\r\n }\r\n else {\r\n filePath = _filePath;\r\n }\r\n if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) {\r\n // no-op, there already exists an extra lib with this content\r\n return {\r\n dispose: function () { }\r\n };\r\n }\r\n var myVersion = 1;\r\n if (this._removedExtraLibs[filePath]) {\r\n myVersion = this._removedExtraLibs[filePath] + 1;\r\n }\r\n if (this._extraLibs[filePath]) {\r\n myVersion = this._extraLibs[filePath].version + 1;\r\n }\r\n this._extraLibs[filePath] = {\r\n content: content,\r\n version: myVersion\r\n };\r\n this._fireOnDidExtraLibsChangeSoon();\r\n return {\r\n dispose: function () {\r\n var extraLib = _this._extraLibs[filePath];\r\n if (!extraLib) {\r\n return;\r\n }\r\n if (extraLib.version !== myVersion) {\r\n return;\r\n }\r\n delete _this._extraLibs[filePath];\r\n _this._removedExtraLibs[filePath] = myVersion;\r\n _this._fireOnDidExtraLibsChangeSoon();\r\n }\r\n };\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setExtraLibs = function (libs) {\r\n for (var filePath in this._extraLibs) {\r\n this._removedExtraLibs[filePath] = this._extraLibs[filePath].version;\r\n }\r\n // clear out everything\r\n this._extraLibs = Object.create(null);\r\n if (libs && libs.length > 0) {\r\n for (var _i = 0, libs_1 = libs; _i < libs_1.length; _i++) {\r\n var lib = libs_1[_i];\r\n var filePath = lib.filePath || \"ts:extralib-\" + Math.random().toString(36).substring(2, 15);\r\n var content = lib.content;\r\n var myVersion = 1;\r\n if (this._removedExtraLibs[filePath]) {\r\n myVersion = this._removedExtraLibs[filePath] + 1;\r\n }\r\n this._extraLibs[filePath] = {\r\n content: content,\r\n version: myVersion\r\n };\r\n }\r\n }\r\n this._fireOnDidExtraLibsChangeSoon();\r\n };\r\n LanguageServiceDefaultsImpl.prototype._fireOnDidExtraLibsChangeSoon = function () {\r\n var _this = this;\r\n if (this._onDidExtraLibsChangeTimeout !== -1) {\r\n // already scheduled\r\n return;\r\n }\r\n this._onDidExtraLibsChangeTimeout = setTimeout(function () {\r\n _this._onDidExtraLibsChangeTimeout = -1;\r\n _this._onDidExtraLibsChange.fire(undefined);\r\n }, 0);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getCompilerOptions = function () {\r\n return this._compilerOptions;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setCompilerOptions = function (options) {\r\n this._compilerOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getDiagnosticsOptions = function () {\r\n return this._diagnosticsOptions;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setWorkerOptions = function (options) {\r\n this._workerOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setMaximumWorkerIdleTime = function (value) { };\r\n LanguageServiceDefaultsImpl.prototype.setEagerModelSync = function (value) {\r\n // doesn't fire an event since no\r\n // worker restart is required here\r\n this._eagerModelSync = value;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getEagerModelSync = function () {\r\n return this._eagerModelSync;\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar typescriptVersion = _lib_typescriptServicesMetadata_js__WEBPACK_IMPORTED_MODULE_1__.typescriptVersion;\r\nvar typescriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, target: ScriptTarget.Latest }, { noSemanticValidation: false, noSyntaxValidation: false }, {});\r\nvar javascriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, allowJs: true, target: ScriptTarget.Latest }, { noSemanticValidation: true, noSyntaxValidation: false }, {});\r\nvar getTypeScriptWorker = function () {\r\n return getMode().then(function (mode) { return mode.getTypeScriptWorker(); });\r\n};\r\nvar getJavaScriptWorker = function () {\r\n return getMode().then(function (mode) { return mode.getJavaScriptWorker(); });\r\n};\r\n// export to the global based API\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.typescript = {\r\n ModuleKind: ModuleKind,\r\n JsxEmit: JsxEmit,\r\n NewLineKind: NewLineKind,\r\n ScriptTarget: ScriptTarget,\r\n ModuleResolutionKind: ModuleResolutionKind,\r\n typescriptVersion: typescriptVersion,\r\n typescriptDefaults: typescriptDefaults,\r\n javascriptDefaults: javascriptDefaults,\r\n getTypeScriptWorker: getTypeScriptWorker,\r\n getJavaScriptWorker: getJavaScriptWorker\r\n};\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return __webpack_require__.e(/*! import() */ \"vendors-node_modules_monaco-editor_esm_vs_language_typescript_tsMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./tsMode.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js\"));\r\n}\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.onLanguage('typescript', function () {\r\n return getMode().then(function (mode) { return mode.setupTypeScript(typescriptDefaults); });\r\n});\r\n_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.onLanguage('javascript', function () {\r\n return getMode().then(function (mode) { return mode.setupJavaScript(javascriptDefaults); });\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/nls.js":
|
||
/*!**************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/nls.js ***!
|
||
\**************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"localize\": () => (/* binding */ localize)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction _format(message, args) {\r\n let result;\r\n if (args.length === 0) {\r\n result = message;\r\n }\r\n else {\r\n result = message.replace(/\\{(\\d+)\\}/g, function (match, rest) {\r\n const index = rest[0];\r\n return typeof args[index] !== 'undefined' ? args[index] : match;\r\n });\r\n }\r\n return result;\r\n}\r\nfunction localize(data, message, ...args) {\r\n return _format(message, args);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/nls.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IAccessibilityService\": () => (/* binding */ IAccessibilityService),\n/* harmony export */ \"CONTEXT_ACCESSIBILITY_MODE_ENABLED\": () => (/* binding */ CONTEXT_ACCESSIBILITY_MODE_ENABLED)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst IAccessibilityService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('accessibilityService');\r\nconst CONTEXT_ACCESSIBILITY_MODE_ENABLED = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('accessibilityModeEnabled', false);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AccessibilityService\": () => (/* binding */ AccessibilityService)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _accessibility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\nlet AccessibilityService = class AccessibilityService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable {\r\n constructor(_contextKeyService, _configurationService) {\r\n super();\r\n this._contextKeyService = _contextKeyService;\r\n this._configurationService = _configurationService;\r\n this._accessibilitySupport = 0 /* Unknown */;\r\n this._onDidChangeScreenReaderOptimized = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this._accessibilityModeEnabledContext = _accessibility_js__WEBPACK_IMPORTED_MODULE_1__.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);\r\n const updateContextKey = () => this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());\r\n this._register(this._configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration('editor.accessibilitySupport')) {\r\n updateContextKey();\r\n this._onDidChangeScreenReaderOptimized.fire();\r\n }\r\n }));\r\n updateContextKey();\r\n this.onDidChangeScreenReaderOptimized(() => updateContextKey());\r\n }\r\n get onDidChangeScreenReaderOptimized() {\r\n return this._onDidChangeScreenReaderOptimized.event;\r\n }\r\n isScreenReaderOptimized() {\r\n const config = this._configurationService.getValue('editor.accessibilitySupport');\r\n return config === 'on' || (config === 'auto' && this._accessibilitySupport === 2 /* Enabled */);\r\n }\r\n getAccessibilitySupport() {\r\n return this._accessibilitySupport;\r\n }\r\n};\r\nAccessibilityService = __decorate([\r\n __param(0, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__.IContextKeyService),\r\n __param(1, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_4__.IConfigurationService)\r\n], AccessibilityService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createAndFillInActionBarActions\": () => (/* binding */ createAndFillInActionBarActions),\n/* harmony export */ \"MenuEntryActionViewItem\": () => (/* binding */ MenuEntryActionViewItem),\n/* harmony export */ \"SubmenuEntryActionViewItem\": () => (/* binding */ SubmenuEntryActionViewItem),\n/* harmony export */ \"createActionViewItem\": () => (/* binding */ createActionViewItem)\n/* harmony export */ });\n/* harmony import */ var _menuEntryActionViewItem_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menuEntryActionViewItem.css */ \"./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../contextview/browser/contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionViewItems.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js\");\n/* harmony import */ var _base_browser_ui_dropdown_dropdownActionViewItem_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/browser/ui/dropdown/dropdownActionViewItem.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction createAndFillInActionBarActions(menu, options, target, isPrimaryGroup, primaryMaxCount, shouldInlineSubmenu) {\r\n const groups = menu.getActions(options);\r\n // Action bars handle alternative actions on their own so the alternative actions should be ignored\r\n fillInActions(groups, target, false, isPrimaryGroup, primaryMaxCount, shouldInlineSubmenu);\r\n return asDisposable(groups);\r\n}\r\nfunction asDisposable(groups) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n for (const [, actions] of groups) {\r\n for (const action of actions) {\r\n disposables.add(action);\r\n }\r\n }\r\n return disposables;\r\n}\r\nfunction fillInActions(groups, target, useAlternativeActions, isPrimaryGroup = group => group === 'navigation', primaryMaxCount = Number.MAX_SAFE_INTEGER, shouldInlineSubmenu = () => false) {\r\n let primaryBucket;\r\n let secondaryBucket;\r\n if (Array.isArray(target)) {\r\n primaryBucket = target;\r\n secondaryBucket = target;\r\n }\r\n else {\r\n primaryBucket = target.primary;\r\n secondaryBucket = target.secondary;\r\n }\r\n const submenuInfo = new Set();\r\n for (const [group, actions] of groups) {\r\n let target;\r\n if (isPrimaryGroup(group)) {\r\n target = primaryBucket;\r\n }\r\n else {\r\n target = secondaryBucket;\r\n if (target.length > 0) {\r\n target.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__.Separator());\r\n }\r\n }\r\n for (let action of actions) {\r\n if (useAlternativeActions) {\r\n action = action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuItemAction && action.alt ? action.alt : action;\r\n }\r\n const newLen = target.push(action);\r\n // keep submenu info for later inlining\r\n if (action instanceof _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__.SubmenuAction) {\r\n submenuInfo.add({ group, action, index: newLen - 1 });\r\n }\r\n }\r\n }\r\n // ask the outside if submenu should be inlined or not. only ask when\r\n // there would be enough space\r\n for (const { group, action, index } of submenuInfo) {\r\n const target = isPrimaryGroup(group) ? primaryBucket : secondaryBucket;\r\n // inlining submenus with length 0 or 1 is easy,\r\n // larger submenus need to be checked with the overall limit\r\n const submenuActions = action.actions;\r\n if ((submenuActions.length <= 1 || target.length + submenuActions.length - 2 <= primaryMaxCount) && shouldInlineSubmenu(action, group, target.length)) {\r\n target.splice(index, 1, ...submenuActions);\r\n }\r\n }\r\n // overflow items from the primary group into the secondary bucket\r\n if (primaryBucket !== secondaryBucket && primaryBucket.length > primaryMaxCount) {\r\n const overflow = primaryBucket.splice(primaryMaxCount, primaryBucket.length - primaryMaxCount);\r\n secondaryBucket.unshift(...overflow, new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__.Separator());\r\n }\r\n}\r\nlet MenuEntryActionViewItem = class MenuEntryActionViewItem extends _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_11__.ActionViewItem {\r\n constructor(_action, _keybindingService, _notificationService) {\r\n super(undefined, _action, { icon: !!(_action.class || _action.item.icon), label: !_action.class && !_action.item.icon });\r\n this._action = _action;\r\n this._keybindingService = _keybindingService;\r\n this._notificationService = _notificationService;\r\n this._wantsAltCommand = false;\r\n this._itemClassDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.MutableDisposable());\r\n this._altKey = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.ModifierKeyEmitter.getInstance();\r\n }\r\n get _commandAction() {\r\n return this._wantsAltCommand && this._action.alt || this._action;\r\n }\r\n onClick(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.actionRunner\r\n .run(this._commandAction, this._context)\r\n .catch(err => this._notificationService.error(err));\r\n }\r\n render(container) {\r\n super.render(container);\r\n container.classList.add('menu-entry');\r\n this._updateItemClass(this._action.item);\r\n let mouseOver = false;\r\n let alternativeKeyDown = this._altKey.keyStatus.altKey || ((_base_common_platform_js__WEBPACK_IMPORTED_MODULE_13__.isWindows || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_13__.isLinux) && this._altKey.keyStatus.shiftKey);\r\n const updateAltState = () => {\r\n const wantsAltCommand = mouseOver && alternativeKeyDown;\r\n if (wantsAltCommand !== this._wantsAltCommand) {\r\n this._wantsAltCommand = wantsAltCommand;\r\n this.updateLabel();\r\n this.updateTooltip();\r\n this.updateClass();\r\n }\r\n };\r\n if (this._action.alt) {\r\n this._register(this._altKey.event(value => {\r\n alternativeKeyDown = value.altKey || ((_base_common_platform_js__WEBPACK_IMPORTED_MODULE_13__.isWindows || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_13__.isLinux) && value.shiftKey);\r\n updateAltState();\r\n }));\r\n }\r\n this._register((0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_2__.domEvent)(container, 'mouseleave')(_ => {\r\n mouseOver = false;\r\n updateAltState();\r\n }));\r\n this._register((0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_2__.domEvent)(container, 'mouseenter')(e => {\r\n mouseOver = true;\r\n updateAltState();\r\n }));\r\n }\r\n updateLabel() {\r\n if (this.options.label && this.label) {\r\n this.label.textContent = this._commandAction.label;\r\n }\r\n }\r\n updateTooltip() {\r\n if (this.label) {\r\n const keybinding = this._keybindingService.lookupKeybinding(this._commandAction.id);\r\n const keybindingLabel = keybinding && keybinding.getLabel();\r\n const tooltip = this._commandAction.tooltip || this._commandAction.label;\r\n this.label.title = keybindingLabel\r\n ? (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('titleAndKb', \"{0} ({1})\", tooltip, keybindingLabel)\r\n : tooltip;\r\n }\r\n }\r\n updateClass() {\r\n if (this.options.icon) {\r\n if (this._commandAction !== this._action) {\r\n if (this._action.alt) {\r\n this._updateItemClass(this._action.alt.item);\r\n }\r\n }\r\n else if (this._action.alt) {\r\n this._updateItemClass(this._action.item);\r\n }\r\n }\r\n }\r\n _updateItemClass(item) {\r\n var _a;\r\n this._itemClassDispose.value = undefined;\r\n const { element, label } = this;\r\n if (!element || !label) {\r\n return;\r\n }\r\n const icon = this._commandAction.checked && ((_a = item.toggled) === null || _a === void 0 ? void 0 : _a.icon) ? item.toggled.icon : item.icon;\r\n if (!icon) {\r\n return;\r\n }\r\n if (_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.ThemeIcon.isThemeIcon(icon)) {\r\n // theme icons\r\n const iconClass = _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.ThemeIcon.asClassName(icon);\r\n label.classList.add(...iconClass.split(' '));\r\n this._itemClassDispose.value = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => {\r\n label.classList.remove(...iconClass.split(' '));\r\n });\r\n }\r\n else {\r\n // icon path/url\r\n if (icon.light) {\r\n label.style.setProperty('--menu-entry-icon-light', (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl)(icon.light));\r\n }\r\n if (icon.dark) {\r\n label.style.setProperty('--menu-entry-icon-dark', (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl)(icon.dark));\r\n }\r\n label.classList.add('icon');\r\n this._itemClassDispose.value = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => {\r\n label.classList.remove('icon');\r\n label.style.removeProperty('--menu-entry-icon-light');\r\n label.style.removeProperty('--menu-entry-icon-dark');\r\n });\r\n }\r\n }\r\n};\r\nMenuEntryActionViewItem = __decorate([\r\n __param(1, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_8__.IKeybindingService),\r\n __param(2, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__.INotificationService)\r\n], MenuEntryActionViewItem);\r\n\r\nlet SubmenuEntryActionViewItem = class SubmenuEntryActionViewItem extends _base_browser_ui_dropdown_dropdownActionViewItem_js__WEBPACK_IMPORTED_MODULE_12__.DropdownMenuActionViewItem {\r\n constructor(action, contextMenuService) {\r\n super(action, { getActions: () => action.actions }, contextMenuService, {\r\n menuAsChild: true,\r\n classNames: _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.ThemeIcon.isThemeIcon(action.item.icon) ? _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.ThemeIcon.asClassName(action.item.icon) : undefined,\r\n });\r\n }\r\n render(container) {\r\n super.render(container);\r\n if (this.element) {\r\n container.classList.add('menu-entry');\r\n const { icon } = this._action.item;\r\n if (icon && !_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__.ThemeIcon.isThemeIcon(icon)) {\r\n this.element.classList.add('icon');\r\n if (icon.light) {\r\n this.element.style.setProperty('--menu-entry-icon-light', (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl)(icon.light));\r\n }\r\n if (icon.dark) {\r\n this.element.style.setProperty('--menu-entry-icon-dark', (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__.asCSSUrl)(icon.dark));\r\n }\r\n }\r\n }\r\n }\r\n};\r\nSubmenuEntryActionViewItem = __decorate([\r\n __param(1, _contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_7__.IContextMenuService)\r\n], SubmenuEntryActionViewItem);\r\n\r\n/**\r\n * Creates action view items for menu actions or submenu actions.\r\n */\r\nfunction createActionViewItem(instaService, action) {\r\n if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_6__.MenuItemAction) {\r\n return instaService.createInstance(MenuEntryActionViewItem, action);\r\n }\r\n else if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_6__.SubmenuItemAction) {\r\n return instaService.createInstance(SubmenuEntryActionViewItem, action);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isIMenuItem\": () => (/* binding */ isIMenuItem),\n/* harmony export */ \"MenuId\": () => (/* binding */ MenuId),\n/* harmony export */ \"IMenuService\": () => (/* binding */ IMenuService),\n/* harmony export */ \"MenuRegistry\": () => (/* binding */ MenuRegistry),\n/* harmony export */ \"SubmenuItemAction\": () => (/* binding */ SubmenuItemAction),\n/* harmony export */ \"MenuItemAction\": () => (/* binding */ MenuItemAction)\n/* harmony export */ });\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction isIMenuItem(item) {\r\n return item.command !== undefined;\r\n}\r\nclass MenuId {\r\n constructor(debugName) {\r\n this.id = MenuId._idPool++;\r\n this._debugName = debugName;\r\n }\r\n}\r\nMenuId._idPool = 0;\r\nMenuId.CommandPalette = new MenuId('CommandPalette');\r\nMenuId.EditorContext = new MenuId('EditorContext');\r\nMenuId.EditorContextPeek = new MenuId('EditorContextPeek');\r\nMenuId.MenubarEditMenu = new MenuId('MenubarEditMenu');\r\nMenuId.MenubarGoMenu = new MenuId('MenubarGoMenu');\r\nMenuId.MenubarSelectionMenu = new MenuId('MenubarSelectionMenu');\r\nconst IMenuService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.createDecorator)('menuService');\r\nconst MenuRegistry = new class {\r\n constructor() {\r\n this._commands = new Map();\r\n this._menuItems = new Map();\r\n this._onDidChangeMenu = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__.Emitter();\r\n this.onDidChangeMenu = this._onDidChangeMenu.event;\r\n this._commandPaletteChangeEvent = {\r\n has: id => id === MenuId.CommandPalette\r\n };\r\n }\r\n addCommand(command) {\r\n return this.addCommands(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_7__.Iterable.single(command));\r\n }\r\n addCommands(commands) {\r\n for (const command of commands) {\r\n this._commands.set(command.id, command);\r\n }\r\n this._onDidChangeMenu.fire(this._commandPaletteChangeEvent);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => {\r\n let didChange = false;\r\n for (const command of commands) {\r\n didChange = this._commands.delete(command.id) || didChange;\r\n }\r\n if (didChange) {\r\n this._onDidChangeMenu.fire(this._commandPaletteChangeEvent);\r\n }\r\n });\r\n }\r\n getCommand(id) {\r\n return this._commands.get(id);\r\n }\r\n getCommands() {\r\n const map = new Map();\r\n this._commands.forEach((value, key) => map.set(key, value));\r\n return map;\r\n }\r\n appendMenuItem(id, item) {\r\n return this.appendMenuItems(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_7__.Iterable.single({ id, item }));\r\n }\r\n appendMenuItems(items) {\r\n const changedIds = new Set();\r\n const toRemove = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_8__.LinkedList();\r\n for (const { id, item } of items) {\r\n let list = this._menuItems.get(id);\r\n if (!list) {\r\n list = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_8__.LinkedList();\r\n this._menuItems.set(id, list);\r\n }\r\n toRemove.push(list.push(item));\r\n changedIds.add(id);\r\n }\r\n this._onDidChangeMenu.fire(changedIds);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => {\r\n if (toRemove.size > 0) {\r\n for (let fn of toRemove) {\r\n fn();\r\n }\r\n this._onDidChangeMenu.fire(changedIds);\r\n toRemove.clear();\r\n }\r\n });\r\n }\r\n getMenuItems(id) {\r\n let result;\r\n if (this._menuItems.has(id)) {\r\n result = [...this._menuItems.get(id)];\r\n }\r\n else {\r\n result = [];\r\n }\r\n if (id === MenuId.CommandPalette) {\r\n // CommandPalette is special because it shows\r\n // all commands by default\r\n this._appendImplicitItems(result);\r\n }\r\n return result;\r\n }\r\n _appendImplicitItems(result) {\r\n const set = new Set();\r\n for (const item of result) {\r\n if (isIMenuItem(item)) {\r\n set.add(item.command.id);\r\n if (item.alt) {\r\n set.add(item.alt.id);\r\n }\r\n }\r\n }\r\n this._commands.forEach((command, id) => {\r\n if (!set.has(id)) {\r\n result.push({ command });\r\n }\r\n });\r\n }\r\n};\r\nclass SubmenuItemAction extends _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__.SubmenuAction {\r\n constructor(item, _menuService, _contextKeyService, _options) {\r\n super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, [], 'submenu');\r\n this.item = item;\r\n this._menuService = _menuService;\r\n this._contextKeyService = _contextKeyService;\r\n this._options = _options;\r\n }\r\n get actions() {\r\n const result = [];\r\n const menu = this._menuService.createMenu(this.item.submenu, this._contextKeyService);\r\n const groups = menu.getActions(this._options);\r\n menu.dispose();\r\n for (const [, actions] of groups) {\r\n if (actions.length > 0) {\r\n result.push(...actions);\r\n result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__.Separator());\r\n }\r\n }\r\n if (result.length) {\r\n result.pop(); // remove last separator\r\n }\r\n return result;\r\n }\r\n}\r\n// implements IAction, does NOT extend Action, so that no one\r\n// subscribes to events of Action or modified properties\r\nlet MenuItemAction = class MenuItemAction {\r\n constructor(item, alt, options, contextKeyService, _commandService) {\r\n var _a;\r\n this._commandService = _commandService;\r\n this.id = item.id;\r\n this.label = typeof item.title === 'string' ? item.title : item.title.value;\r\n this.tooltip = (_a = item.tooltip) !== null && _a !== void 0 ? _a : '';\r\n this.enabled = !item.precondition || contextKeyService.contextMatchesRules(item.precondition);\r\n this.checked = false;\r\n if (item.toggled) {\r\n const toggled = (item.toggled.condition ? item.toggled : { condition: item.toggled });\r\n this.checked = contextKeyService.contextMatchesRules(toggled.condition);\r\n if (this.checked && toggled.tooltip) {\r\n this.tooltip = typeof toggled.tooltip === 'string' ? toggled.tooltip : toggled.tooltip.value;\r\n }\r\n }\r\n this.item = item;\r\n this.alt = alt ? new MenuItemAction(alt, undefined, options, contextKeyService, _commandService) : undefined;\r\n this._options = options;\r\n if (_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__.ThemeIcon.isThemeIcon(item.icon)) {\r\n this.class = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_9__.CSSIcon.asClassName(item.icon);\r\n }\r\n }\r\n dispose() {\r\n // there is NOTHING to dispose and the MenuItemAction should\r\n // never have anything to dispose as it is a convenience type\r\n // to bridge into the rendering world.\r\n }\r\n run(...args) {\r\n var _a, _b;\r\n let runArgs = [];\r\n if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.arg) {\r\n runArgs = [...runArgs, this._options.arg];\r\n }\r\n if ((_b = this._options) === null || _b === void 0 ? void 0 : _b.shouldForwardArgs) {\r\n runArgs = [...runArgs, ...args];\r\n }\r\n return this._commandService.executeCommand(this.id, ...runArgs);\r\n }\r\n};\r\nMenuItemAction = __decorate([\r\n __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__.IContextKeyService),\r\n __param(4, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__.ICommandService)\r\n], MenuItemAction);\r\n\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MenuService\": () => (/* binding */ MenuService)\n/* harmony export */ });\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _actions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions.js */ \"./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js\");\n/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet MenuService = class MenuService {\r\n constructor(_commandService) {\r\n this._commandService = _commandService;\r\n //\r\n }\r\n /**\r\n * Create a new menu for the given menu identifier. A menu sends events when it's entries\r\n * have changed (placement, enablement, checked-state). By default it does send events for\r\n * sub menu entries. That is more expensive and must be explicitly enabled with the\r\n * `emitEventsForSubmenuChanges` flag.\r\n */\r\n createMenu(id, contextKeyService, emitEventsForSubmenuChanges = false) {\r\n return new Menu(id, emitEventsForSubmenuChanges, this._commandService, contextKeyService, this);\r\n }\r\n};\r\nMenuService = __decorate([\r\n __param(0, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_4__.ICommandService)\r\n], MenuService);\r\n\r\nlet Menu = class Menu {\r\n constructor(_id, _fireEventsForSubmenuChanges, _commandService, _contextKeyService, _menuService) {\r\n this._id = _id;\r\n this._fireEventsForSubmenuChanges = _fireEventsForSubmenuChanges;\r\n this._commandService = _commandService;\r\n this._contextKeyService = _contextKeyService;\r\n this._menuService = _menuService;\r\n this._dispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._menuGroups = [];\r\n this._contextKeys = new Set();\r\n this._build();\r\n // rebuild this menu whenever the menu registry reports an\r\n // event for this MenuId\r\n const rebuildMenuSoon = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._build(), 50);\r\n this._dispoables.add(rebuildMenuSoon);\r\n this._dispoables.add(_actions_js__WEBPACK_IMPORTED_MODULE_3__.MenuRegistry.onDidChangeMenu(e => {\r\n if (e.has(_id)) {\r\n rebuildMenuSoon.schedule();\r\n }\r\n }));\r\n // when context keys change we need to check if the menu also\r\n // has changed\r\n const fireChangeSoon = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__.RunOnceScheduler(() => this._onDidChange.fire(this), 50);\r\n this._dispoables.add(fireChangeSoon);\r\n this._dispoables.add(_contextKeyService.onDidChangeContext(e => {\r\n if (e.affectsSome(this._contextKeys)) {\r\n fireChangeSoon.schedule();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._dispoables.dispose();\r\n this._onDidChange.dispose();\r\n }\r\n _build() {\r\n // reset\r\n this._menuGroups.length = 0;\r\n this._contextKeys.clear();\r\n const menuItems = _actions_js__WEBPACK_IMPORTED_MODULE_3__.MenuRegistry.getMenuItems(this._id);\r\n let group;\r\n menuItems.sort(Menu._compareMenuItems);\r\n for (let item of menuItems) {\r\n // group by groupId\r\n const groupName = item.group || '';\r\n if (!group || group[0] !== groupName) {\r\n group = [groupName, []];\r\n this._menuGroups.push(group);\r\n }\r\n group[1].push(item);\r\n // keep keys for eventing\r\n this._collectContextKeys(item);\r\n }\r\n this._onDidChange.fire(this);\r\n }\r\n _collectContextKeys(item) {\r\n Menu._fillInKbExprKeys(item.when, this._contextKeys);\r\n if ((0,_actions_js__WEBPACK_IMPORTED_MODULE_3__.isIMenuItem)(item)) {\r\n // keep precondition keys for event if applicable\r\n if (item.command.precondition) {\r\n Menu._fillInKbExprKeys(item.command.precondition, this._contextKeys);\r\n }\r\n // keep toggled keys for event if applicable\r\n if (item.command.toggled) {\r\n const toggledExpression = item.command.toggled.condition || item.command.toggled;\r\n Menu._fillInKbExprKeys(toggledExpression, this._contextKeys);\r\n }\r\n }\r\n else if (this._fireEventsForSubmenuChanges) {\r\n // recursively collect context keys from submenus so that this\r\n // menu fires events when context key changes affect submenus\r\n _actions_js__WEBPACK_IMPORTED_MODULE_3__.MenuRegistry.getMenuItems(item.submenu).forEach(this._collectContextKeys, this);\r\n }\r\n }\r\n getActions(options) {\r\n const result = [];\r\n for (let group of this._menuGroups) {\r\n const [id, items] = group;\r\n const activeActions = [];\r\n for (const item of items) {\r\n if (this._contextKeyService.contextMatchesRules(item.when)) {\r\n const action = (0,_actions_js__WEBPACK_IMPORTED_MODULE_3__.isIMenuItem)(item)\r\n ? new _actions_js__WEBPACK_IMPORTED_MODULE_3__.MenuItemAction(item.command, item.alt, options, this._contextKeyService, this._commandService)\r\n : new _actions_js__WEBPACK_IMPORTED_MODULE_3__.SubmenuItemAction(item, this._menuService, this._contextKeyService, options);\r\n activeActions.push(action);\r\n }\r\n }\r\n if (activeActions.length > 0) {\r\n result.push([id, activeActions]);\r\n }\r\n }\r\n return result;\r\n }\r\n static _fillInKbExprKeys(exp, set) {\r\n if (exp) {\r\n for (let key of exp.keys()) {\r\n set.add(key);\r\n }\r\n }\r\n }\r\n static _compareMenuItems(a, b) {\r\n let aGroup = a.group;\r\n let bGroup = b.group;\r\n if (aGroup !== bGroup) {\r\n // Falsy groups come last\r\n if (!aGroup) {\r\n return 1;\r\n }\r\n else if (!bGroup) {\r\n return -1;\r\n }\r\n // 'navigation' group comes first\r\n if (aGroup === 'navigation') {\r\n return -1;\r\n }\r\n else if (bGroup === 'navigation') {\r\n return 1;\r\n }\r\n // lexical sort for groups\r\n let value = aGroup.localeCompare(bGroup);\r\n if (value !== 0) {\r\n return value;\r\n }\r\n }\r\n // sort on priority - default is 0\r\n let aPrio = a.order || 0;\r\n let bPrio = b.order || 0;\r\n if (aPrio < bPrio) {\r\n return -1;\r\n }\r\n else if (aPrio > bPrio) {\r\n return 1;\r\n }\r\n // sort on titles\r\n return Menu._compareTitles((0,_actions_js__WEBPACK_IMPORTED_MODULE_3__.isIMenuItem)(a) ? a.command.title : a.title, (0,_actions_js__WEBPACK_IMPORTED_MODULE_3__.isIMenuItem)(b) ? b.command.title : b.title);\r\n }\r\n static _compareTitles(a, b) {\r\n const aStr = typeof a === 'string' ? a : a.original;\r\n const bStr = typeof b === 'string' ? b : b.original;\r\n return aStr.localeCompare(bStr);\r\n }\r\n};\r\nMenu = __decorate([\r\n __param(2, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_4__.ICommandService),\r\n __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__.IContextKeyService),\r\n __param(4, _actions_js__WEBPACK_IMPORTED_MODULE_3__.IMenuService)\r\n], Menu);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HistoryNavigationWidgetContext\": () => (/* binding */ HistoryNavigationWidgetContext),\n/* harmony export */ \"HistoryNavigationEnablementContext\": () => (/* binding */ HistoryNavigationEnablementContext),\n/* harmony export */ \"createAndBindHistoryNavigationWidgetScopedContextKeyService\": () => (/* binding */ createAndBindHistoryNavigationWidgetScopedContextKeyService),\n/* harmony export */ \"ContextScopedFindInput\": () => (/* binding */ ContextScopedFindInput),\n/* harmony export */ \"ContextScopedReplaceInput\": () => (/* binding */ ContextScopedReplaceInput)\n/* harmony export */ });\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_browser_ui_findinput_findInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/browser/ui/findinput/findInput.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js\");\n/* harmony import */ var _keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../keybinding/common/keybindingsRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js\");\n/* harmony import */ var _base_browser_ui_findinput_replaceInput_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/browser/ui/findinput/replaceInput.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\nconst HistoryNavigationWidgetContext = 'historyNavigationWidget';\r\nconst HistoryNavigationEnablementContext = 'historyNavigationEnabled';\r\nfunction bindContextScopedWidget(contextKeyService, widget, contextKey) {\r\n new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.RawContextKey(contextKey, widget).bindTo(contextKeyService);\r\n}\r\nfunction createWidgetScopedContextKeyService(contextKeyService, widget) {\r\n return contextKeyService.createScoped(widget.target);\r\n}\r\nfunction getContextScopedWidget(contextKeyService, contextKey) {\r\n return contextKeyService.getContext(document.activeElement).getValue(contextKey);\r\n}\r\nfunction createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, widget) {\r\n const scopedContextKeyService = createWidgetScopedContextKeyService(contextKeyService, widget);\r\n bindContextScopedWidget(scopedContextKeyService, widget, HistoryNavigationWidgetContext);\r\n const historyNavigationEnablement = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.RawContextKey(HistoryNavigationEnablementContext, true).bindTo(scopedContextKeyService);\r\n return { scopedContextKeyService, historyNavigationEnablement };\r\n}\r\nlet ContextScopedFindInput = class ContextScopedFindInput extends _base_browser_ui_findinput_findInput_js__WEBPACK_IMPORTED_MODULE_1__.FindInput {\r\n constructor(container, contextViewProvider, options, contextKeyService, showFindOptions = false) {\r\n super(container, contextViewProvider, showFindOptions, options);\r\n this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService);\r\n }\r\n};\r\nContextScopedFindInput = __decorate([\r\n __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService)\r\n], ContextScopedFindInput);\r\n\r\nlet ContextScopedReplaceInput = class ContextScopedReplaceInput extends _base_browser_ui_findinput_replaceInput_js__WEBPACK_IMPORTED_MODULE_3__.ReplaceInput {\r\n constructor(container, contextViewProvider, options, contextKeyService, showReplaceOptions = false) {\r\n super(container, contextViewProvider, showReplaceOptions, options);\r\n this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService);\r\n }\r\n};\r\nContextScopedReplaceInput = __decorate([\r\n __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService)\r\n], ContextScopedReplaceInput);\r\n\r\n_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'history.showPrevious',\r\n weight: 200 /* WorkbenchContrib */,\r\n when: _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.and(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.has(HistoryNavigationWidgetContext), _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)),\r\n primary: 16 /* UpArrow */,\r\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\r\n handler: (accessor, arg2) => {\r\n const widget = getContextScopedWidget(accessor.get(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService), HistoryNavigationWidgetContext);\r\n if (widget) {\r\n const historyInputBox = widget.historyNavigator;\r\n historyInputBox.showPreviousValue();\r\n }\r\n }\r\n});\r\n_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__.KeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'history.showNext',\r\n weight: 200 /* WorkbenchContrib */,\r\n when: _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.and(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.has(HistoryNavigationWidgetContext), _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)),\r\n primary: 18 /* DownArrow */,\r\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\r\n handler: (accessor, arg2) => {\r\n const widget = getContextScopedWidget(accessor.get(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__.IContextKeyService), HistoryNavigationWidgetContext);\r\n if (widget) {\r\n const historyInputBox = widget.historyNavigator;\r\n historyInputBox.showNextValue();\r\n }\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BrowserClipboardService\": () => (/* binding */ BrowserClipboardService)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\nclass BrowserClipboardService {\r\n constructor() {\r\n this.mapTextToType = new Map(); // unsupported in web (only in-memory)\r\n this.findText = ''; // unsupported in web (only in-memory)\r\n }\r\n writeText(text, type) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // With type: only in-memory is supported\r\n if (type) {\r\n this.mapTextToType.set(type, text);\r\n return;\r\n }\r\n // Guard access to navigator.clipboard with try/catch\r\n // as we have seen DOMExceptions in certain browsers\r\n // due to security policies.\r\n try {\r\n return yield navigator.clipboard.writeText(text);\r\n }\r\n catch (error) {\r\n console.error(error);\r\n }\r\n // Fallback to textarea and execCommand solution\r\n const activeElement = document.activeElement;\r\n const textArea = document.body.appendChild((0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.$)('textarea', { 'aria-hidden': true }));\r\n textArea.style.height = '1px';\r\n textArea.style.width = '1px';\r\n textArea.style.position = 'absolute';\r\n textArea.value = text;\r\n textArea.focus();\r\n textArea.select();\r\n document.execCommand('copy');\r\n if (activeElement instanceof HTMLElement) {\r\n activeElement.focus();\r\n }\r\n document.body.removeChild(textArea);\r\n return;\r\n });\r\n }\r\n readText(type) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // With type: only in-memory is supported\r\n if (type) {\r\n return this.mapTextToType.get(type) || '';\r\n }\r\n // Guard access to navigator.clipboard with try/catch\r\n // as we have seen DOMExceptions in certain browsers\r\n // due to security policies.\r\n try {\r\n return yield navigator.clipboard.readText();\r\n }\r\n catch (error) {\r\n console.error(error);\r\n return '';\r\n }\r\n });\r\n }\r\n readFindText() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.findText;\r\n });\r\n }\r\n writeFindText(text) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.findText = text;\r\n });\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IClipboardService\": () => (/* binding */ IClipboardService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IClipboardService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('clipboardService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ICommandService\": () => (/* binding */ ICommandService),\n/* harmony export */ \"CommandsRegistry\": () => (/* binding */ CommandsRegistry)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ \"./node_modules/monaco-editor/esm/vs/base/common/linkedList.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst ICommandService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__.createDecorator)('commandService');\r\nconst CommandsRegistry = new class {\r\n constructor() {\r\n this._commands = new Map();\r\n this._onDidRegisterCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onDidRegisterCommand = this._onDidRegisterCommand.event;\r\n }\r\n registerCommand(idOrCommand, handler) {\r\n if (!idOrCommand) {\r\n throw new Error(`invalid command`);\r\n }\r\n if (typeof idOrCommand === 'string') {\r\n if (!handler) {\r\n throw new Error(`invalid command`);\r\n }\r\n return this.registerCommand({ id: idOrCommand, handler });\r\n }\r\n // add argument validation if rich command metadata is provided\r\n if (idOrCommand.description) {\r\n const constraints = [];\r\n for (let arg of idOrCommand.description.args) {\r\n constraints.push(arg.constraint);\r\n }\r\n const actualHandler = idOrCommand.handler;\r\n idOrCommand.handler = function (accessor, ...args) {\r\n (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__.validateConstraints)(args, constraints);\r\n return actualHandler(accessor, ...args);\r\n };\r\n }\r\n // find a place to store the command\r\n const { id } = idOrCommand;\r\n let commands = this._commands.get(id);\r\n if (!commands) {\r\n commands = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_4__.LinkedList();\r\n this._commands.set(id, commands);\r\n }\r\n let removeFn = commands.unshift(idOrCommand);\r\n let ret = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.toDisposable)(() => {\r\n removeFn();\r\n const command = this._commands.get(id);\r\n if (command === null || command === void 0 ? void 0 : command.isEmpty()) {\r\n this._commands.delete(id);\r\n }\r\n });\r\n // tell the world about this command\r\n this._onDidRegisterCommand.fire(id);\r\n return ret;\r\n }\r\n registerCommandAlias(oldId, newId) {\r\n return CommandsRegistry.registerCommand(oldId, (accessor, ...args) => accessor.get(ICommandService).executeCommand(newId, ...args));\r\n }\r\n getCommand(id) {\r\n const list = this._commands.get(id);\r\n if (!list || list.isEmpty()) {\r\n return undefined;\r\n }\r\n return _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__.Iterable.first(list);\r\n }\r\n getCommands() {\r\n const result = new Map();\r\n for (const key of this._commands.keys()) {\r\n const command = this.getCommand(key);\r\n if (command) {\r\n result.set(key, command);\r\n }\r\n }\r\n return result;\r\n }\r\n};\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IConfigurationService\": () => (/* binding */ IConfigurationService),\n/* harmony export */ \"toValuesTree\": () => (/* binding */ toValuesTree),\n/* harmony export */ \"addToValueTree\": () => (/* binding */ addToValueTree),\n/* harmony export */ \"removeFromValueTree\": () => (/* binding */ removeFromValueTree),\n/* harmony export */ \"getConfigurationValue\": () => (/* binding */ getConfigurationValue),\n/* harmony export */ \"getConfigurationKeys\": () => (/* binding */ getConfigurationKeys),\n/* harmony export */ \"getDefaultValues\": () => (/* binding */ getDefaultValues)\n/* harmony export */ });\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n\r\n\r\n\r\nconst IConfigurationService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.createDecorator)('configurationService');\r\nfunction toValuesTree(properties, conflictReporter) {\r\n const root = Object.create(null);\r\n for (let key in properties) {\r\n addToValueTree(root, key, properties[key], conflictReporter);\r\n }\r\n return root;\r\n}\r\nfunction addToValueTree(settingsTreeRoot, key, value, conflictReporter) {\r\n const segments = key.split('.');\r\n const last = segments.pop();\r\n let curr = settingsTreeRoot;\r\n for (let i = 0; i < segments.length; i++) {\r\n let s = segments[i];\r\n let obj = curr[s];\r\n switch (typeof obj) {\r\n case 'undefined':\r\n obj = curr[s] = Object.create(null);\r\n break;\r\n case 'object':\r\n break;\r\n default:\r\n conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`);\r\n return;\r\n }\r\n curr = obj;\r\n }\r\n if (typeof curr === 'object' && curr !== null) {\r\n try {\r\n curr[last] = value; // workaround https://github.com/microsoft/vscode/issues/13606\r\n }\r\n catch (e) {\r\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\r\n }\r\n }\r\n else {\r\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\r\n }\r\n}\r\nfunction removeFromValueTree(valueTree, key) {\r\n const segments = key.split('.');\r\n doRemoveFromValueTree(valueTree, segments);\r\n}\r\nfunction doRemoveFromValueTree(valueTree, segments) {\r\n const first = segments.shift();\r\n if (segments.length === 0) {\r\n // Reached last segment\r\n delete valueTree[first];\r\n return;\r\n }\r\n if (Object.keys(valueTree).indexOf(first) !== -1) {\r\n const value = valueTree[first];\r\n if (typeof value === 'object' && !Array.isArray(value)) {\r\n doRemoveFromValueTree(value, segments);\r\n if (Object.keys(value).length === 0) {\r\n delete valueTree[first];\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)\r\n */\r\nfunction getConfigurationValue(config, settingPath, defaultValue) {\r\n function accessSetting(config, path) {\r\n let current = config;\r\n for (const component of path) {\r\n if (typeof current !== 'object' || current === null) {\r\n return undefined;\r\n }\r\n current = current[component];\r\n }\r\n return current;\r\n }\r\n const path = settingPath.split('.');\r\n const result = accessSetting(config, path);\r\n return typeof result === 'undefined' ? defaultValue : result;\r\n}\r\nfunction getConfigurationKeys() {\r\n const properties = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__.Extensions.Configuration).getConfigurationProperties();\r\n return Object.keys(properties);\r\n}\r\nfunction getDefaultValues() {\r\n const valueTreeRoot = Object.create(null);\r\n const properties = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__.Extensions.Configuration).getConfigurationProperties();\r\n for (let key in properties) {\r\n let value = properties[key].default;\r\n addToValueTree(valueTreeRoot, key, value, message => console.error(`Conflict in default settings: ${message}`));\r\n }\r\n return valueTreeRoot;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ConfigurationModel\": () => (/* binding */ ConfigurationModel),\n/* harmony export */ \"DefaultConfigurationModel\": () => (/* binding */ DefaultConfigurationModel),\n/* harmony export */ \"Configuration\": () => (/* binding */ Configuration),\n/* harmony export */ \"ConfigurationChangeEvent\": () => (/* binding */ ConfigurationChangeEvent)\n/* harmony export */ });\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ \"./node_modules/monaco-editor/esm/vs/base/common/objects.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n/* harmony import */ var _configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ConfigurationModel {\r\n constructor(_contents = {}, _keys = [], _overrides = []) {\r\n this._contents = _contents;\r\n this._keys = _keys;\r\n this._overrides = _overrides;\r\n this.isFrozen = false;\r\n }\r\n get contents() {\r\n return this.checkAndFreeze(this._contents);\r\n }\r\n get overrides() {\r\n return this.checkAndFreeze(this._overrides);\r\n }\r\n get keys() {\r\n return this.checkAndFreeze(this._keys);\r\n }\r\n isEmpty() {\r\n return this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\r\n }\r\n getValue(section) {\r\n return section ? (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.getConfigurationValue)(this.contents, section) : this.contents;\r\n }\r\n override(identifier) {\r\n const overrideContents = this.getContentsForOverrideIdentifer(identifier);\r\n if (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\r\n // If there are no valid overrides, return self\r\n return this;\r\n }\r\n let contents = {};\r\n for (const key of _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\r\n let contentsForKey = this.contents[key];\r\n let overrideContentsForKey = overrideContents[key];\r\n // If there are override contents for the key, clone and merge otherwise use base contents\r\n if (overrideContentsForKey) {\r\n // Clone and merge only if base contents and override contents are of type object otherwise just override\r\n if (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\r\n contentsForKey = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(contentsForKey);\r\n this.mergeContents(contentsForKey, overrideContentsForKey);\r\n }\r\n else {\r\n contentsForKey = overrideContentsForKey;\r\n }\r\n }\r\n contents[key] = contentsForKey;\r\n }\r\n return new ConfigurationModel(contents, this.keys, this.overrides);\r\n }\r\n merge(...others) {\r\n const contents = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(this.contents);\r\n const overrides = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(this.overrides);\r\n const keys = [...this.keys];\r\n for (const other of others) {\r\n this.mergeContents(contents, other.contents);\r\n for (const otherOverride of other.overrides) {\r\n const [override] = overrides.filter(o => _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.equals(o.identifiers, otherOverride.identifiers));\r\n if (override) {\r\n this.mergeContents(override.contents, otherOverride.contents);\r\n }\r\n else {\r\n overrides.push(_base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(otherOverride));\r\n }\r\n }\r\n for (const key of other.keys) {\r\n if (keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n }\r\n }\r\n }\r\n return new ConfigurationModel(contents, keys, overrides);\r\n }\r\n freeze() {\r\n this.isFrozen = true;\r\n return this;\r\n }\r\n mergeContents(source, target) {\r\n for (const key of Object.keys(target)) {\r\n if (key in source) {\r\n if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject(source[key]) && _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__.isObject(target[key])) {\r\n this.mergeContents(source[key], target[key]);\r\n continue;\r\n }\r\n }\r\n source[key] = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepClone(target[key]);\r\n }\r\n }\r\n checkAndFreeze(data) {\r\n if (this.isFrozen && !Object.isFrozen(data)) {\r\n return _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.deepFreeze(data);\r\n }\r\n return data;\r\n }\r\n getContentsForOverrideIdentifer(identifier) {\r\n for (const override of this.overrides) {\r\n if (override.identifiers.indexOf(identifier) !== -1) {\r\n return override.contents;\r\n }\r\n }\r\n return null;\r\n }\r\n toJSON() {\r\n return {\r\n contents: this.contents,\r\n overrides: this.overrides,\r\n keys: this.keys\r\n };\r\n }\r\n // Update methods\r\n setValue(key, value) {\r\n this.addKey(key);\r\n (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.addToValueTree)(this.contents, key, value, e => { throw new Error(e); });\r\n }\r\n removeValue(key) {\r\n if (this.removeKey(key)) {\r\n (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.removeFromValueTree)(this.contents, key);\r\n }\r\n }\r\n addKey(key) {\r\n let index = this.keys.length;\r\n for (let i = 0; i < index; i++) {\r\n if (key.indexOf(this.keys[i]) === 0) {\r\n index = i;\r\n }\r\n }\r\n this.keys.splice(index, 1, key);\r\n }\r\n removeKey(key) {\r\n let index = this.keys.indexOf(key);\r\n if (index !== -1) {\r\n this.keys.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nclass DefaultConfigurationModel extends ConfigurationModel {\r\n constructor() {\r\n const contents = (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.getDefaultValues)();\r\n const keys = (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.getConfigurationKeys)();\r\n const overrides = [];\r\n for (const key of Object.keys(contents)) {\r\n if (_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.OVERRIDE_PROPERTY_PATTERN.test(key)) {\r\n overrides.push({\r\n identifiers: [(0,_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__.overrideIdentifierFromKey)(key).trim()],\r\n keys: Object.keys(contents[key]),\r\n contents: (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.toValuesTree)(contents[key], message => console.error(`Conflict in default settings file: ${message}`)),\r\n });\r\n }\r\n }\r\n super(contents, keys, overrides);\r\n }\r\n}\r\nclass Configuration {\r\n constructor(_defaultConfiguration, _localUserConfiguration, _remoteUserConfiguration = new ConfigurationModel(), _workspaceConfiguration = new ConfigurationModel(), _folderConfigurations = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.ResourceMap(), _memoryConfiguration = new ConfigurationModel(), _memoryConfigurationByResource = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.ResourceMap(), _freeze = true) {\r\n this._defaultConfiguration = _defaultConfiguration;\r\n this._localUserConfiguration = _localUserConfiguration;\r\n this._remoteUserConfiguration = _remoteUserConfiguration;\r\n this._workspaceConfiguration = _workspaceConfiguration;\r\n this._folderConfigurations = _folderConfigurations;\r\n this._memoryConfiguration = _memoryConfiguration;\r\n this._memoryConfigurationByResource = _memoryConfigurationByResource;\r\n this._freeze = _freeze;\r\n this._workspaceConsolidatedConfiguration = null;\r\n this._foldersConsolidatedConfigurations = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.ResourceMap();\r\n this._userConfiguration = null;\r\n }\r\n getValue(section, overrides, workspace) {\r\n const consolidateConfigurationModel = this.getConsolidateConfigurationModel(overrides, workspace);\r\n return consolidateConfigurationModel.getValue(section);\r\n }\r\n updateValue(key, value, overrides = {}) {\r\n let memoryConfiguration;\r\n if (overrides.resource) {\r\n memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\r\n if (!memoryConfiguration) {\r\n memoryConfiguration = new ConfigurationModel();\r\n this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\r\n }\r\n }\r\n else {\r\n memoryConfiguration = this._memoryConfiguration;\r\n }\r\n if (value === undefined) {\r\n memoryConfiguration.removeValue(key);\r\n }\r\n else {\r\n memoryConfiguration.setValue(key, value);\r\n }\r\n if (!overrides.resource) {\r\n this._workspaceConsolidatedConfiguration = null;\r\n }\r\n }\r\n get userConfiguration() {\r\n if (!this._userConfiguration) {\r\n this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration);\r\n if (this._freeze) {\r\n this._userConfiguration.freeze();\r\n }\r\n }\r\n return this._userConfiguration;\r\n }\r\n getConsolidateConfigurationModel(overrides, workspace) {\r\n let configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\r\n return overrides.overrideIdentifier ? configurationModel.override(overrides.overrideIdentifier) : configurationModel;\r\n }\r\n getConsolidatedConfigurationModelForResource({ resource }, workspace) {\r\n let consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\r\n if (workspace && resource) {\r\n const root = workspace.getFolder(resource);\r\n if (root) {\r\n consolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\r\n }\r\n const memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\r\n if (memoryConfigurationForResource) {\r\n consolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\r\n }\r\n }\r\n return consolidateConfiguration;\r\n }\r\n getWorkspaceConsolidatedConfiguration() {\r\n if (!this._workspaceConsolidatedConfiguration) {\r\n this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\r\n if (this._freeze) {\r\n this._workspaceConfiguration = this._workspaceConfiguration.freeze();\r\n }\r\n }\r\n return this._workspaceConsolidatedConfiguration;\r\n }\r\n getFolderConsolidatedConfiguration(folder) {\r\n let folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\r\n if (!folderConsolidatedConfiguration) {\r\n const workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\r\n const folderConfiguration = this._folderConfigurations.get(folder);\r\n if (folderConfiguration) {\r\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\r\n if (this._freeze) {\r\n folderConsolidatedConfiguration = folderConsolidatedConfiguration.freeze();\r\n }\r\n this._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\r\n }\r\n else {\r\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration;\r\n }\r\n }\r\n return folderConsolidatedConfiguration;\r\n }\r\n toData() {\r\n return {\r\n defaults: {\r\n contents: this._defaultConfiguration.contents,\r\n overrides: this._defaultConfiguration.overrides,\r\n keys: this._defaultConfiguration.keys\r\n },\r\n user: {\r\n contents: this.userConfiguration.contents,\r\n overrides: this.userConfiguration.overrides,\r\n keys: this.userConfiguration.keys\r\n },\r\n workspace: {\r\n contents: this._workspaceConfiguration.contents,\r\n overrides: this._workspaceConfiguration.overrides,\r\n keys: this._workspaceConfiguration.keys\r\n },\r\n folders: [...this._folderConfigurations.keys()].reduce((result, folder) => {\r\n const { contents, overrides, keys } = this._folderConfigurations.get(folder);\r\n result.push([folder, { contents, overrides, keys }]);\r\n return result;\r\n }, [])\r\n };\r\n }\r\n static parse(data) {\r\n const defaultConfiguration = this.parseConfigurationModel(data.defaults);\r\n const userConfiguration = this.parseConfigurationModel(data.user);\r\n const workspaceConfiguration = this.parseConfigurationModel(data.workspace);\r\n const folders = data.folders.reduce((result, value) => {\r\n result.set(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__.URI.revive(value[0]), this.parseConfigurationModel(value[1]));\r\n return result;\r\n }, new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.ResourceMap());\r\n return new Configuration(defaultConfiguration, userConfiguration, new ConfigurationModel(), workspaceConfiguration, folders, new ConfigurationModel(), new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__.ResourceMap(), false);\r\n }\r\n static parseConfigurationModel(model) {\r\n return new ConfigurationModel(model.contents, model.keys, model.overrides).freeze();\r\n }\r\n}\r\nclass ConfigurationChangeEvent {\r\n constructor(change, previous, currentConfiguraiton, currentWorkspace) {\r\n this.change = change;\r\n this.previous = previous;\r\n this.currentConfiguraiton = currentConfiguraiton;\r\n this.currentWorkspace = currentWorkspace;\r\n this._previousConfiguration = undefined;\r\n const keysSet = new Set();\r\n change.keys.forEach(key => keysSet.add(key));\r\n change.overrides.forEach(([, keys]) => keys.forEach(key => keysSet.add(key)));\r\n this.affectedKeys = [...keysSet.values()];\r\n const configurationModel = new ConfigurationModel();\r\n this.affectedKeys.forEach(key => configurationModel.setValue(key, {}));\r\n this.affectedKeysTree = configurationModel.contents;\r\n }\r\n get previousConfiguration() {\r\n if (!this._previousConfiguration && this.previous) {\r\n this._previousConfiguration = Configuration.parse(this.previous.data);\r\n }\r\n return this._previousConfiguration;\r\n }\r\n affectsConfiguration(section, overrides) {\r\n var _a;\r\n if (this.doesAffectedKeysTreeContains(this.affectedKeysTree, section)) {\r\n if (overrides) {\r\n const value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, (_a = this.previous) === null || _a === void 0 ? void 0 : _a.workspace) : undefined;\r\n const value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\r\n return !_base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__.equals(value1, value2);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n doesAffectedKeysTreeContains(affectedKeysTree, section) {\r\n let requestedTree = (0,_configuration_js__WEBPACK_IMPORTED_MODULE_6__.toValuesTree)({ [section]: true }, () => { });\r\n let key;\r\n while (typeof requestedTree === 'object' && (key = Object.keys(requestedTree)[0])) { // Only one key should present, since we added only one property\r\n affectedKeysTree = affectedKeysTree[key];\r\n if (!affectedKeysTree) {\r\n return false; // Requested tree is not found\r\n }\r\n requestedTree = requestedTree[key];\r\n }\r\n return true;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"allSettings\": () => (/* binding */ allSettings),\n/* harmony export */ \"applicationSettings\": () => (/* binding */ applicationSettings),\n/* harmony export */ \"machineSettings\": () => (/* binding */ machineSettings),\n/* harmony export */ \"machineOverridableSettings\": () => (/* binding */ machineOverridableSettings),\n/* harmony export */ \"windowSettings\": () => (/* binding */ windowSettings),\n/* harmony export */ \"resourceSettings\": () => (/* binding */ resourceSettings),\n/* harmony export */ \"resourceLanguageSettingsSchemaId\": () => (/* binding */ resourceLanguageSettingsSchemaId),\n/* harmony export */ \"OVERRIDE_PROPERTY_PATTERN\": () => (/* binding */ OVERRIDE_PROPERTY_PATTERN),\n/* harmony export */ \"overrideIdentifierFromKey\": () => (/* binding */ overrideIdentifierFromKey),\n/* harmony export */ \"getDefaultValue\": () => (/* binding */ getDefaultValue),\n/* harmony export */ \"validateProperty\": () => (/* binding */ validateProperty)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../jsonschemas/common/jsonContributionRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst Extensions = {\r\n Configuration: 'base.contributions.configuration'\r\n};\r\nconst allSettings = { properties: {}, patternProperties: {} };\r\nconst applicationSettings = { properties: {}, patternProperties: {} };\r\nconst machineSettings = { properties: {}, patternProperties: {} };\r\nconst machineOverridableSettings = { properties: {}, patternProperties: {} };\r\nconst windowSettings = { properties: {}, patternProperties: {} };\r\nconst resourceSettings = { properties: {}, patternProperties: {} };\r\nconst resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\r\nconst contributionRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.Registry.as(_jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__.Extensions.JSONContribution);\r\nclass ConfigurationRegistry {\r\n constructor() {\r\n this.overrideIdentifiers = new Set();\r\n this._onDidSchemaChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this._onDidUpdateConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.defaultValues = {};\r\n this.defaultLanguageConfigurationOverridesNode = {\r\n id: 'defaultOverrides',\r\n title: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\r\n properties: {}\r\n };\r\n this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\r\n this.resourceLanguageSettingsSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowTrailingCommas: true, allowComments: true };\r\n this.configurationProperties = {};\r\n this.excludedConfigurationProperties = {};\r\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\r\n }\r\n registerConfiguration(configuration, validate = true) {\r\n this.registerConfigurations([configuration], validate);\r\n }\r\n registerConfigurations(configurations, validate = true) {\r\n const properties = [];\r\n configurations.forEach(configuration => {\r\n properties.push(...this.validateAndRegisterProperties(configuration, validate)); // fills in defaults\r\n this.configurationContributors.push(configuration);\r\n this.registerJSONConfiguration(configuration);\r\n });\r\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\r\n this._onDidSchemaChange.fire();\r\n this._onDidUpdateConfiguration.fire(properties);\r\n }\r\n registerOverrideIdentifiers(overrideIdentifiers) {\r\n for (const overrideIdentifier of overrideIdentifiers) {\r\n this.overrideIdentifiers.add(overrideIdentifier);\r\n }\r\n this.updateOverridePropertyPatternKey();\r\n }\r\n validateAndRegisterProperties(configuration, validate = true, scope = 3 /* WINDOW */) {\r\n scope = _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\r\n let propertyKeys = [];\r\n let properties = configuration.properties;\r\n if (properties) {\r\n for (let key in properties) {\r\n if (validate && validateProperty(key)) {\r\n delete properties[key];\r\n continue;\r\n }\r\n const property = properties[key];\r\n // update default value\r\n this.updatePropertyDefaultValue(key, property);\r\n // update scope\r\n if (OVERRIDE_PROPERTY_PATTERN.test(key)) {\r\n property.scope = undefined; // No scope for overridable properties `[${identifier}]`\r\n }\r\n else {\r\n property.scope = _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull(property.scope) ? scope : property.scope;\r\n }\r\n // Add to properties maps\r\n // Property is included by default if 'included' is unspecified\r\n if (properties[key].hasOwnProperty('included') && !properties[key].included) {\r\n this.excludedConfigurationProperties[key] = properties[key];\r\n delete properties[key];\r\n continue;\r\n }\r\n else {\r\n this.configurationProperties[key] = properties[key];\r\n }\r\n if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\r\n // If not set, default deprecationMessage to the markdown source\r\n properties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\r\n }\r\n propertyKeys.push(key);\r\n }\r\n }\r\n let subNodes = configuration.allOf;\r\n if (subNodes) {\r\n for (let node of subNodes) {\r\n propertyKeys.push(...this.validateAndRegisterProperties(node, validate, scope));\r\n }\r\n }\r\n return propertyKeys;\r\n }\r\n getConfigurationProperties() {\r\n return this.configurationProperties;\r\n }\r\n registerJSONConfiguration(configuration) {\r\n const register = (configuration) => {\r\n let properties = configuration.properties;\r\n if (properties) {\r\n for (const key in properties) {\r\n this.updateSchema(key, properties[key]);\r\n }\r\n }\r\n let subNodes = configuration.allOf;\r\n if (subNodes) {\r\n subNodes.forEach(register);\r\n }\r\n };\r\n register(configuration);\r\n }\r\n updateSchema(key, property) {\r\n allSettings.properties[key] = property;\r\n switch (property.scope) {\r\n case 1 /* APPLICATION */:\r\n applicationSettings.properties[key] = property;\r\n break;\r\n case 2 /* MACHINE */:\r\n machineSettings.properties[key] = property;\r\n break;\r\n case 6 /* MACHINE_OVERRIDABLE */:\r\n machineOverridableSettings.properties[key] = property;\r\n break;\r\n case 3 /* WINDOW */:\r\n windowSettings.properties[key] = property;\r\n break;\r\n case 4 /* RESOURCE */:\r\n resourceSettings.properties[key] = property;\r\n break;\r\n case 5 /* LANGUAGE_OVERRIDABLE */:\r\n resourceSettings.properties[key] = property;\r\n this.resourceLanguageSettingsSchema.properties[key] = property;\r\n break;\r\n }\r\n }\r\n updateOverridePropertyPatternKey() {\r\n for (const overrideIdentifier of this.overrideIdentifiers.values()) {\r\n const overrideIdentifierProperty = `[${overrideIdentifier}]`;\r\n const resourceLanguagePropertiesSchema = {\r\n type: 'object',\r\n description: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\r\n errorMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\r\n $ref: resourceLanguageSettingsSchemaId,\r\n };\r\n this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\r\n allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\r\n }\r\n this._onDidSchemaChange.fire();\r\n }\r\n updatePropertyDefaultValue(key, property) {\r\n let defaultValue = this.defaultValues[key];\r\n if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefined(defaultValue)) {\r\n defaultValue = property.default;\r\n }\r\n if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefined(defaultValue)) {\r\n defaultValue = getDefaultValue(property.type);\r\n }\r\n property.default = defaultValue;\r\n }\r\n}\r\nconst OVERRIDE_PROPERTY = '\\\\[.*\\\\]$';\r\nconst OVERRIDE_PROPERTY_PATTERN = new RegExp(OVERRIDE_PROPERTY);\r\nfunction overrideIdentifierFromKey(key) {\r\n return key.substring(1, key.length - 1);\r\n}\r\nfunction getDefaultValue(type) {\r\n const t = Array.isArray(type) ? type[0] : type;\r\n switch (t) {\r\n case 'boolean':\r\n return false;\r\n case 'integer':\r\n case 'number':\r\n return 0;\r\n case 'string':\r\n return '';\r\n case 'array':\r\n return [];\r\n case 'object':\r\n return {};\r\n default:\r\n return null;\r\n }\r\n}\r\nconst configurationRegistry = new ConfigurationRegistry();\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.Registry.add(Extensions.Configuration, configurationRegistry);\r\nfunction validateProperty(property) {\r\n if (!property.trim()) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('config.property.empty', \"Cannot register an empty property\");\r\n }\r\n if (OVERRIDE_PROPERTY_PATTERN.test(property)) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\r\n }\r\n if (configurationRegistry.getConfigurationProperties()[property] !== undefined) {\r\n return _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\r\n }\r\n return null;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Context\": () => (/* binding */ Context),\n/* harmony export */ \"AbstractContextKeyService\": () => (/* binding */ AbstractContextKeyService),\n/* harmony export */ \"ContextKeyService\": () => (/* binding */ ContextKeyService)\n/* harmony export */ });\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../keybinding/common/keybindingResolver.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context';\r\nclass Context {\r\n constructor(id, parent) {\r\n this._id = id;\r\n this._parent = parent;\r\n this._value = Object.create(null);\r\n this._value['_contextId'] = id;\r\n }\r\n setValue(key, value) {\r\n // console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);\r\n if (this._value[key] !== value) {\r\n this._value[key] = value;\r\n return true;\r\n }\r\n return false;\r\n }\r\n removeValue(key) {\r\n // console.log('REMOVE ' + key + ' FROM ' + this._id);\r\n if (key in this._value) {\r\n delete this._value[key];\r\n return true;\r\n }\r\n return false;\r\n }\r\n getValue(key) {\r\n const ret = this._value[key];\r\n if (typeof ret === 'undefined' && this._parent) {\r\n return this._parent.getValue(key);\r\n }\r\n return ret;\r\n }\r\n}\r\nclass NullContext extends Context {\r\n constructor() {\r\n super(-1, null);\r\n }\r\n setValue(key, value) {\r\n return false;\r\n }\r\n removeValue(key) {\r\n return false;\r\n }\r\n getValue(key) {\r\n return undefined;\r\n }\r\n}\r\nNullContext.INSTANCE = new NullContext();\r\nclass ConfigAwareContextValuesContainer extends Context {\r\n constructor(id, _configurationService, emitter) {\r\n super(id, null);\r\n this._configurationService = _configurationService;\r\n this._values = _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__.TernarySearchTree.forConfigKeys();\r\n this._listener = this._configurationService.onDidChangeConfiguration(event => {\r\n if (event.source === 6 /* DEFAULT */) {\r\n // new setting, reset everything\r\n const allKeys = Array.from(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_1__.Iterable.map(this._values, ([k]) => k));\r\n this._values.clear();\r\n emitter.fire(new ArrayContextKeyChangeEvent(allKeys));\r\n }\r\n else {\r\n const changedKeys = [];\r\n for (const configKey of event.affectedKeys) {\r\n const contextKey = `config.${configKey}`;\r\n const cachedItems = this._values.findSuperstr(contextKey);\r\n if (cachedItems !== undefined) {\r\n changedKeys.push(..._base_common_iterator_js__WEBPACK_IMPORTED_MODULE_1__.Iterable.map(cachedItems, ([key]) => key));\r\n this._values.deleteSuperstr(contextKey);\r\n }\r\n if (this._values.has(contextKey)) {\r\n changedKeys.push(contextKey);\r\n this._values.delete(contextKey);\r\n }\r\n }\r\n emitter.fire(new ArrayContextKeyChangeEvent(changedKeys));\r\n }\r\n });\r\n }\r\n dispose() {\r\n this._listener.dispose();\r\n }\r\n getValue(key) {\r\n if (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) {\r\n return super.getValue(key);\r\n }\r\n if (this._values.has(key)) {\r\n return this._values.get(key);\r\n }\r\n const configKey = key.substr(ConfigAwareContextValuesContainer._keyPrefix.length);\r\n const configValue = this._configurationService.getValue(configKey);\r\n let value = undefined;\r\n switch (typeof configValue) {\r\n case 'number':\r\n case 'boolean':\r\n case 'string':\r\n value = configValue;\r\n break;\r\n default:\r\n if (Array.isArray(configValue)) {\r\n value = JSON.stringify(configValue);\r\n }\r\n else {\r\n value = configValue;\r\n }\r\n }\r\n this._values.set(key, value);\r\n return value;\r\n }\r\n setValue(key, value) {\r\n return super.setValue(key, value);\r\n }\r\n removeValue(key) {\r\n return super.removeValue(key);\r\n }\r\n}\r\nConfigAwareContextValuesContainer._keyPrefix = 'config.';\r\nclass ContextKey {\r\n constructor(service, key, defaultValue) {\r\n this._service = service;\r\n this._key = key;\r\n this._defaultValue = defaultValue;\r\n this.reset();\r\n }\r\n set(value) {\r\n this._service.setContext(this._key, value);\r\n }\r\n reset() {\r\n if (typeof this._defaultValue === 'undefined') {\r\n this._service.removeContext(this._key);\r\n }\r\n else {\r\n this._service.setContext(this._key, this._defaultValue);\r\n }\r\n }\r\n get() {\r\n return this._service.getContextKeyValue(this._key);\r\n }\r\n}\r\nclass SimpleContextKeyChangeEvent {\r\n constructor(key) {\r\n this.key = key;\r\n }\r\n affectsSome(keys) {\r\n return keys.has(this.key);\r\n }\r\n}\r\nclass ArrayContextKeyChangeEvent {\r\n constructor(keys) {\r\n this.keys = keys;\r\n }\r\n affectsSome(keys) {\r\n for (const key of this.keys) {\r\n if (keys.has(key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nclass CompositeContextKeyChangeEvent {\r\n constructor(events) {\r\n this.events = events;\r\n }\r\n affectsSome(keys) {\r\n for (const e of this.events) {\r\n if (e.affectsSome(keys)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nclass AbstractContextKeyService {\r\n constructor(myContextId) {\r\n this._onDidChangeContext = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__.PauseableEmitter({ merge: input => new CompositeContextKeyChangeEvent(input) });\r\n this.onDidChangeContext = this._onDidChangeContext.event;\r\n this._isDisposed = false;\r\n this._myContextId = myContextId;\r\n }\r\n createKey(key, defaultValue) {\r\n if (this._isDisposed) {\r\n throw new Error(`AbstractContextKeyService has been disposed`);\r\n }\r\n return new ContextKey(this, key, defaultValue);\r\n }\r\n bufferChangeEvents(callback) {\r\n this._onDidChangeContext.pause();\r\n try {\r\n callback();\r\n }\r\n finally {\r\n this._onDidChangeContext.resume();\r\n }\r\n }\r\n createScoped(domNode) {\r\n if (this._isDisposed) {\r\n throw new Error(`AbstractContextKeyService has been disposed`);\r\n }\r\n return new ScopedContextKeyService(this, domNode);\r\n }\r\n contextMatchesRules(rules) {\r\n if (this._isDisposed) {\r\n throw new Error(`AbstractContextKeyService has been disposed`);\r\n }\r\n const context = this.getContextValuesContainer(this._myContextId);\r\n const result = _keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_8__.KeybindingResolver.contextMatchesRules(context, rules);\r\n // console.group(rules.serialize() + ' -> ' + result);\r\n // rules.keys().forEach(key => { console.log(key, ctx[key]); });\r\n // console.groupEnd();\r\n return result;\r\n }\r\n getContextKeyValue(key) {\r\n if (this._isDisposed) {\r\n return undefined;\r\n }\r\n return this.getContextValuesContainer(this._myContextId).getValue(key);\r\n }\r\n setContext(key, value) {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n const myContext = this.getContextValuesContainer(this._myContextId);\r\n if (!myContext) {\r\n return;\r\n }\r\n if (myContext.setValue(key, value)) {\r\n this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\r\n }\r\n }\r\n removeContext(key) {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n if (this.getContextValuesContainer(this._myContextId).removeValue(key)) {\r\n this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\r\n }\r\n }\r\n getContext(target) {\r\n if (this._isDisposed) {\r\n return NullContext.INSTANCE;\r\n }\r\n return this.getContextValuesContainer(findContextAttr(target));\r\n }\r\n}\r\nlet ContextKeyService = class ContextKeyService extends AbstractContextKeyService {\r\n constructor(configurationService) {\r\n super(0);\r\n this._contexts = new Map();\r\n this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n this._lastContextId = 0;\r\n const myContext = new ConfigAwareContextValuesContainer(this._myContextId, configurationService, this._onDidChangeContext);\r\n this._contexts.set(this._myContextId, myContext);\r\n this._toDispose.add(myContext);\r\n // Uncomment this to see the contexts continuously logged\r\n // let lastLoggedValue: string | null = null;\r\n // setInterval(() => {\r\n // \tlet values = Object.keys(this._contexts).map((key) => this._contexts[key]);\r\n // \tlet logValue = values.map(v => JSON.stringify(v._value, null, '\\t')).join('\\n');\r\n // \tif (lastLoggedValue !== logValue) {\r\n // \t\tlastLoggedValue = logValue;\r\n // \t\tconsole.log(lastLoggedValue);\r\n // \t}\r\n // }, 2000);\r\n }\r\n dispose() {\r\n this._onDidChangeContext.dispose();\r\n this._isDisposed = true;\r\n this._toDispose.dispose();\r\n }\r\n getContextValuesContainer(contextId) {\r\n if (this._isDisposed) {\r\n return NullContext.INSTANCE;\r\n }\r\n return this._contexts.get(contextId) || NullContext.INSTANCE;\r\n }\r\n createChildContext(parentContextId = this._myContextId) {\r\n if (this._isDisposed) {\r\n throw new Error(`ContextKeyService has been disposed`);\r\n }\r\n let id = (++this._lastContextId);\r\n this._contexts.set(id, new Context(id, this.getContextValuesContainer(parentContextId)));\r\n return id;\r\n }\r\n disposeContext(contextId) {\r\n if (!this._isDisposed) {\r\n this._contexts.delete(contextId);\r\n }\r\n }\r\n};\r\nContextKeyService = __decorate([\r\n __param(0, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService)\r\n], ContextKeyService);\r\n\r\nclass ScopedContextKeyService extends AbstractContextKeyService {\r\n constructor(parent, domNode) {\r\n super(parent.createChildContext());\r\n this._parentChangeListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.MutableDisposable();\r\n this._parent = parent;\r\n this._updateParentChangeListener();\r\n this._domNode = domNode;\r\n if (this._domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\r\n let extraInfo = '';\r\n if (this._domNode.classList) {\r\n extraInfo = Array.from(this._domNode.classList.values()).join(', ');\r\n }\r\n console.error(`Element already has context attribute${extraInfo ? ': ' + extraInfo : ''}`);\r\n }\r\n this._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(this._myContextId));\r\n }\r\n _updateParentChangeListener() {\r\n // Forward parent events to this listener. Parent will change.\r\n this._parentChangeListener.value = this._parent.onDidChangeContext(this._onDidChangeContext.fire, this._onDidChangeContext);\r\n }\r\n dispose() {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n this._onDidChangeContext.dispose();\r\n this._parent.disposeContext(this._myContextId);\r\n this._parentChangeListener.dispose();\r\n this._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);\r\n this._isDisposed = true;\r\n }\r\n getContextValuesContainer(contextId) {\r\n if (this._isDisposed) {\r\n return NullContext.INSTANCE;\r\n }\r\n return this._parent.getContextValuesContainer(contextId);\r\n }\r\n createChildContext(parentContextId = this._myContextId) {\r\n if (this._isDisposed) {\r\n throw new Error(`ScopedContextKeyService has been disposed`);\r\n }\r\n return this._parent.createChildContext(parentContextId);\r\n }\r\n disposeContext(contextId) {\r\n if (this._isDisposed) {\r\n return;\r\n }\r\n this._parent.disposeContext(contextId);\r\n }\r\n}\r\nfunction findContextAttr(domNode) {\r\n while (domNode) {\r\n if (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\r\n const attr = domNode.getAttribute(KEYBINDING_CONTEXT_ATTR);\r\n if (attr) {\r\n return parseInt(attr, 10);\r\n }\r\n return NaN;\r\n }\r\n domNode = domNode.parentElement;\r\n }\r\n return 0;\r\n}\r\n_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand(_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.SET_CONTEXT_COMMAND_ID, function (accessor, contextKey, contextValue) {\r\n accessor.get(_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.IContextKeyService).createKey(String(contextKey), contextValue);\r\n});\r\n_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand({\r\n id: 'getContextKeyInfo',\r\n handler() {\r\n return [..._common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.RawContextKey.all()].sort((a, b) => a.key.localeCompare(b.key));\r\n },\r\n description: {\r\n description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_4__.localize)('getContextKeyInfo', \"A command that returns information about context keys\"),\r\n args: []\r\n }\r\n});\r\n_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__.CommandsRegistry.registerCommand('_generateContextKeyInfo', function () {\r\n const result = [];\r\n const seen = new Set();\r\n for (let info of _common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__.RawContextKey.all()) {\r\n if (!seen.has(info.key)) {\r\n seen.add(info.key);\r\n result.push(info);\r\n }\r\n }\r\n result.sort((a, b) => a.key.localeCompare(b.key));\r\n console.log(JSON.stringify(result, undefined, 2));\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContextKeyExpr\": () => (/* binding */ ContextKeyExpr),\n/* harmony export */ \"ContextKeyFalseExpr\": () => (/* binding */ ContextKeyFalseExpr),\n/* harmony export */ \"ContextKeyTrueExpr\": () => (/* binding */ ContextKeyTrueExpr),\n/* harmony export */ \"ContextKeyDefinedExpr\": () => (/* binding */ ContextKeyDefinedExpr),\n/* harmony export */ \"ContextKeyEqualsExpr\": () => (/* binding */ ContextKeyEqualsExpr),\n/* harmony export */ \"ContextKeyInExpr\": () => (/* binding */ ContextKeyInExpr),\n/* harmony export */ \"ContextKeyNotInExpr\": () => (/* binding */ ContextKeyNotInExpr),\n/* harmony export */ \"ContextKeyNotEqualsExpr\": () => (/* binding */ ContextKeyNotEqualsExpr),\n/* harmony export */ \"ContextKeyNotExpr\": () => (/* binding */ ContextKeyNotExpr),\n/* harmony export */ \"ContextKeyGreaterExpr\": () => (/* binding */ ContextKeyGreaterExpr),\n/* harmony export */ \"ContextKeyGreaterEqualsExpr\": () => (/* binding */ ContextKeyGreaterEqualsExpr),\n/* harmony export */ \"ContextKeySmallerExpr\": () => (/* binding */ ContextKeySmallerExpr),\n/* harmony export */ \"ContextKeySmallerEqualsExpr\": () => (/* binding */ ContextKeySmallerEqualsExpr),\n/* harmony export */ \"ContextKeyRegexExpr\": () => (/* binding */ ContextKeyRegexExpr),\n/* harmony export */ \"ContextKeyNotRegexExpr\": () => (/* binding */ ContextKeyNotRegexExpr),\n/* harmony export */ \"ContextKeyAndExpr\": () => (/* binding */ ContextKeyAndExpr),\n/* harmony export */ \"ContextKeyOrExpr\": () => (/* binding */ ContextKeyOrExpr),\n/* harmony export */ \"RawContextKey\": () => (/* binding */ RawContextKey),\n/* harmony export */ \"IContextKeyService\": () => (/* binding */ IContextKeyService),\n/* harmony export */ \"SET_CONTEXT_COMMAND_ID\": () => (/* binding */ SET_CONTEXT_COMMAND_ID)\n/* harmony export */ });\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nlet _userAgent = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.userAgent || '';\r\nconst STATIC_VALUES = new Map();\r\nSTATIC_VALUES.set('false', false);\r\nSTATIC_VALUES.set('true', true);\r\nSTATIC_VALUES.set('isMac', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh);\r\nSTATIC_VALUES.set('isLinux', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isLinux);\r\nSTATIC_VALUES.set('isWindows', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWindows);\r\nSTATIC_VALUES.set('isWeb', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWeb);\r\nSTATIC_VALUES.set('isMacNative', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isMacintosh && !_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWeb);\r\nSTATIC_VALUES.set('isEdge', _userAgent.indexOf('Edg/') >= 0);\r\nSTATIC_VALUES.set('isFirefox', _userAgent.indexOf('Firefox') >= 0);\r\nSTATIC_VALUES.set('isChrome', _userAgent.indexOf('Chrome') >= 0);\r\nSTATIC_VALUES.set('isSafari', _userAgent.indexOf('Safari') >= 0);\r\nSTATIC_VALUES.set('isIPad', _userAgent.indexOf('iPad') >= 0);\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nclass ContextKeyExpr {\r\n static has(key) {\r\n return ContextKeyDefinedExpr.create(key);\r\n }\r\n static equals(key, value) {\r\n return ContextKeyEqualsExpr.create(key, value);\r\n }\r\n static regex(key, value) {\r\n return ContextKeyRegexExpr.create(key, value);\r\n }\r\n static not(key) {\r\n return ContextKeyNotExpr.create(key);\r\n }\r\n static and(...expr) {\r\n return ContextKeyAndExpr.create(expr);\r\n }\r\n static or(...expr) {\r\n return ContextKeyOrExpr.create(expr);\r\n }\r\n static deserialize(serialized, strict = false) {\r\n if (!serialized) {\r\n return undefined;\r\n }\r\n return this._deserializeOrExpression(serialized, strict);\r\n }\r\n static _deserializeOrExpression(serialized, strict) {\r\n let pieces = serialized.split('||');\r\n return ContextKeyOrExpr.create(pieces.map(p => this._deserializeAndExpression(p, strict)));\r\n }\r\n static _deserializeAndExpression(serialized, strict) {\r\n let pieces = serialized.split('&&');\r\n return ContextKeyAndExpr.create(pieces.map(p => this._deserializeOne(p, strict)));\r\n }\r\n static _deserializeOne(serializedOne, strict) {\r\n serializedOne = serializedOne.trim();\r\n if (serializedOne.indexOf('!=') >= 0) {\r\n let pieces = serializedOne.split('!=');\r\n return ContextKeyNotEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict));\r\n }\r\n if (serializedOne.indexOf('==') >= 0) {\r\n let pieces = serializedOne.split('==');\r\n return ContextKeyEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict));\r\n }\r\n if (serializedOne.indexOf('=~') >= 0) {\r\n let pieces = serializedOne.split('=~');\r\n return ContextKeyRegexExpr.create(pieces[0].trim(), this._deserializeRegexValue(pieces[1], strict));\r\n }\r\n if (serializedOne.indexOf(' in ') >= 0) {\r\n let pieces = serializedOne.split(' in ');\r\n return ContextKeyInExpr.create(pieces[0].trim(), pieces[1].trim());\r\n }\r\n if (/^[^<=>]+>=[^<=>]+$/.test(serializedOne)) {\r\n const pieces = serializedOne.split('>=');\r\n return ContextKeyGreaterEqualsExpr.create(pieces[0].trim(), pieces[1].trim());\r\n }\r\n if (/^[^<=>]+>[^<=>]+$/.test(serializedOne)) {\r\n const pieces = serializedOne.split('>');\r\n return ContextKeyGreaterExpr.create(pieces[0].trim(), pieces[1].trim());\r\n }\r\n if (/^[^<=>]+<=[^<=>]+$/.test(serializedOne)) {\r\n const pieces = serializedOne.split('<=');\r\n return ContextKeySmallerEqualsExpr.create(pieces[0].trim(), pieces[1].trim());\r\n }\r\n if (/^[^<=>]+<[^<=>]+$/.test(serializedOne)) {\r\n const pieces = serializedOne.split('<');\r\n return ContextKeySmallerExpr.create(pieces[0].trim(), pieces[1].trim());\r\n }\r\n if (/^\\!\\s*/.test(serializedOne)) {\r\n return ContextKeyNotExpr.create(serializedOne.substr(1).trim());\r\n }\r\n return ContextKeyDefinedExpr.create(serializedOne);\r\n }\r\n static _deserializeValue(serializedValue, strict) {\r\n serializedValue = serializedValue.trim();\r\n if (serializedValue === 'true') {\r\n return true;\r\n }\r\n if (serializedValue === 'false') {\r\n return false;\r\n }\r\n let m = /^'([^']*)'$/.exec(serializedValue);\r\n if (m) {\r\n return m[1].trim();\r\n }\r\n return serializedValue;\r\n }\r\n static _deserializeRegexValue(serializedValue, strict) {\r\n if ((0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__.isFalsyOrWhitespace)(serializedValue)) {\r\n if (strict) {\r\n throw new Error('missing regexp-value for =~-expression');\r\n }\r\n else {\r\n console.warn('missing regexp-value for =~-expression');\r\n }\r\n return null;\r\n }\r\n let start = serializedValue.indexOf('/');\r\n let end = serializedValue.lastIndexOf('/');\r\n if (start === end || start < 0 /* || to < 0 */) {\r\n if (strict) {\r\n throw new Error(`bad regexp-value '${serializedValue}', missing /-enclosure`);\r\n }\r\n else {\r\n console.warn(`bad regexp-value '${serializedValue}', missing /-enclosure`);\r\n }\r\n return null;\r\n }\r\n let value = serializedValue.slice(start + 1, end);\r\n let caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : '';\r\n try {\r\n return new RegExp(value, caseIgnoreFlag);\r\n }\r\n catch (e) {\r\n if (strict) {\r\n throw new Error(`bad regexp-value '${serializedValue}', parse error: ${e}`);\r\n }\r\n else {\r\n console.warn(`bad regexp-value '${serializedValue}', parse error: ${e}`);\r\n }\r\n return null;\r\n }\r\n }\r\n}\r\nfunction cmp(a, b) {\r\n return a.cmp(b);\r\n}\r\nclass ContextKeyFalseExpr {\r\n constructor() {\r\n this.type = 0 /* False */;\r\n }\r\n cmp(other) {\r\n return this.type - other.type;\r\n }\r\n equals(other) {\r\n return (other.type === this.type);\r\n }\r\n evaluate(context) {\r\n return false;\r\n }\r\n serialize() {\r\n return 'false';\r\n }\r\n keys() {\r\n return [];\r\n }\r\n negate() {\r\n return ContextKeyTrueExpr.INSTANCE;\r\n }\r\n}\r\nContextKeyFalseExpr.INSTANCE = new ContextKeyFalseExpr();\r\nclass ContextKeyTrueExpr {\r\n constructor() {\r\n this.type = 1 /* True */;\r\n }\r\n cmp(other) {\r\n return this.type - other.type;\r\n }\r\n equals(other) {\r\n return (other.type === this.type);\r\n }\r\n evaluate(context) {\r\n return true;\r\n }\r\n serialize() {\r\n return 'true';\r\n }\r\n keys() {\r\n return [];\r\n }\r\n negate() {\r\n return ContextKeyFalseExpr.INSTANCE;\r\n }\r\n}\r\nContextKeyTrueExpr.INSTANCE = new ContextKeyTrueExpr();\r\nclass ContextKeyDefinedExpr {\r\n constructor(key) {\r\n this.key = key;\r\n this.type = 2 /* Defined */;\r\n }\r\n static create(key) {\r\n const staticValue = STATIC_VALUES.get(key);\r\n if (typeof staticValue === 'boolean') {\r\n return staticValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;\r\n }\r\n return new ContextKeyDefinedExpr(key);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp1(this.key, other.key);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (!!context.getValue(this.key));\r\n }\r\n serialize() {\r\n return this.key;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyNotExpr.create(this.key);\r\n }\r\n}\r\nclass ContextKeyEqualsExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 4 /* Equals */;\r\n }\r\n static create(key, value) {\r\n if (typeof value === 'boolean') {\r\n return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key));\r\n }\r\n const staticValue = STATIC_VALUES.get(key);\r\n if (typeof staticValue === 'boolean') {\r\n const trueValue = staticValue ? 'true' : 'false';\r\n return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);\r\n }\r\n return new ContextKeyEqualsExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n // Intentional ==\r\n // eslint-disable-next-line eqeqeq\r\n return (context.getValue(this.key) == this.value);\r\n }\r\n serialize() {\r\n return `${this.key} == '${this.value}'`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyNotEqualsExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeyInExpr {\r\n constructor(key, valueKey) {\r\n this.key = key;\r\n this.valueKey = valueKey;\r\n this.type = 10 /* In */;\r\n }\r\n static create(key, valueKey) {\r\n return new ContextKeyInExpr(key, valueKey);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.valueKey, other.key, other.valueKey);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.valueKey === other.valueKey);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n const source = context.getValue(this.valueKey);\r\n const item = context.getValue(this.key);\r\n if (Array.isArray(source)) {\r\n return (source.indexOf(item) >= 0);\r\n }\r\n if (typeof item === 'string' && typeof source === 'object' && source !== null) {\r\n return hasOwnProperty.call(source, item);\r\n }\r\n return false;\r\n }\r\n serialize() {\r\n return `${this.key} in '${this.valueKey}'`;\r\n }\r\n keys() {\r\n return [this.key, this.valueKey];\r\n }\r\n negate() {\r\n return ContextKeyNotInExpr.create(this);\r\n }\r\n}\r\nclass ContextKeyNotInExpr {\r\n constructor(_actual) {\r\n this._actual = _actual;\r\n this.type = 11 /* NotIn */;\r\n //\r\n }\r\n static create(actual) {\r\n return new ContextKeyNotInExpr(actual);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return this._actual.cmp(other._actual);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return this._actual.equals(other._actual);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return !this._actual.evaluate(context);\r\n }\r\n serialize() {\r\n throw new Error('Method not implemented.');\r\n }\r\n keys() {\r\n return this._actual.keys();\r\n }\r\n negate() {\r\n return this._actual;\r\n }\r\n}\r\nclass ContextKeyNotEqualsExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 5 /* NotEquals */;\r\n }\r\n static create(key, value) {\r\n if (typeof value === 'boolean') {\r\n if (value) {\r\n return ContextKeyNotExpr.create(key);\r\n }\r\n return ContextKeyDefinedExpr.create(key);\r\n }\r\n const staticValue = STATIC_VALUES.get(key);\r\n if (typeof staticValue === 'boolean') {\r\n const falseValue = staticValue ? 'true' : 'false';\r\n return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\r\n }\r\n return new ContextKeyNotEqualsExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n // Intentional !=\r\n // eslint-disable-next-line eqeqeq\r\n return (context.getValue(this.key) != this.value);\r\n }\r\n serialize() {\r\n return `${this.key} != '${this.value}'`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyEqualsExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeyNotExpr {\r\n constructor(key) {\r\n this.key = key;\r\n this.type = 3 /* Not */;\r\n }\r\n static create(key) {\r\n const staticValue = STATIC_VALUES.get(key);\r\n if (typeof staticValue === 'boolean') {\r\n return (staticValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\r\n }\r\n return new ContextKeyNotExpr(key);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp1(this.key, other.key);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (!context.getValue(this.key));\r\n }\r\n serialize() {\r\n return `!${this.key}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyDefinedExpr.create(this.key);\r\n }\r\n}\r\nclass ContextKeyGreaterExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 12 /* Greater */;\r\n }\r\n static create(key, value) {\r\n return new ContextKeyGreaterExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (parseFloat(context.getValue(this.key)) > parseFloat(this.value));\r\n }\r\n serialize() {\r\n return `${this.key} > ${this.value}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeySmallerEqualsExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeyGreaterEqualsExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 13 /* GreaterEquals */;\r\n }\r\n static create(key, value) {\r\n return new ContextKeyGreaterEqualsExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (parseFloat(context.getValue(this.key)) >= parseFloat(this.value));\r\n }\r\n serialize() {\r\n return `${this.key} >= ${this.value}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeySmallerExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeySmallerExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 14 /* Smaller */;\r\n }\r\n static create(key, value) {\r\n return new ContextKeySmallerExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (parseFloat(context.getValue(this.key)) < parseFloat(this.value));\r\n }\r\n serialize() {\r\n return `${this.key} < ${this.value}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyGreaterEqualsExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeySmallerEqualsExpr {\r\n constructor(key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.type = 15 /* SmallerEquals */;\r\n }\r\n static create(key, value) {\r\n return new ContextKeySmallerEqualsExpr(key, value);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return cmp2(this.key, this.value, other.key, other.value);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return (this.key === other.key && this.value === other.value);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return (parseFloat(context.getValue(this.key)) <= parseFloat(this.value));\r\n }\r\n serialize() {\r\n return `${this.key} <= ${this.value}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyGreaterExpr.create(this.key, this.value);\r\n }\r\n}\r\nclass ContextKeyRegexExpr {\r\n constructor(key, regexp) {\r\n this.key = key;\r\n this.regexp = regexp;\r\n this.type = 7 /* Regex */;\r\n //\r\n }\r\n static create(key, regexp) {\r\n return new ContextKeyRegexExpr(key, regexp);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n if (this.key < other.key) {\r\n return -1;\r\n }\r\n if (this.key > other.key) {\r\n return 1;\r\n }\r\n const thisSource = this.regexp ? this.regexp.source : '';\r\n const otherSource = other.regexp ? other.regexp.source : '';\r\n if (thisSource < otherSource) {\r\n return -1;\r\n }\r\n if (thisSource > otherSource) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n const thisSource = this.regexp ? this.regexp.source : '';\r\n const otherSource = other.regexp ? other.regexp.source : '';\r\n return (this.key === other.key && thisSource === otherSource);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n let value = context.getValue(this.key);\r\n return this.regexp ? this.regexp.test(value) : false;\r\n }\r\n serialize() {\r\n const value = this.regexp\r\n ? `/${this.regexp.source}/${this.regexp.ignoreCase ? 'i' : ''}`\r\n : '/invalid/';\r\n return `${this.key} =~ ${value}`;\r\n }\r\n keys() {\r\n return [this.key];\r\n }\r\n negate() {\r\n return ContextKeyNotRegexExpr.create(this);\r\n }\r\n}\r\nclass ContextKeyNotRegexExpr {\r\n constructor(_actual) {\r\n this._actual = _actual;\r\n this.type = 8 /* NotRegex */;\r\n //\r\n }\r\n static create(actual) {\r\n return new ContextKeyNotRegexExpr(actual);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n return this._actual.cmp(other._actual);\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n return this._actual.equals(other._actual);\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n return !this._actual.evaluate(context);\r\n }\r\n serialize() {\r\n throw new Error('Method not implemented.');\r\n }\r\n keys() {\r\n return this._actual.keys();\r\n }\r\n negate() {\r\n return this._actual;\r\n }\r\n}\r\nclass ContextKeyAndExpr {\r\n constructor(expr) {\r\n this.expr = expr;\r\n this.type = 6 /* And */;\r\n }\r\n static create(_expr) {\r\n return ContextKeyAndExpr._normalizeArr(_expr);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n if (this.expr.length < other.expr.length) {\r\n return -1;\r\n }\r\n if (this.expr.length > other.expr.length) {\r\n return 1;\r\n }\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n const r = cmp(this.expr[i], other.expr[i]);\r\n if (r !== 0) {\r\n return r;\r\n }\r\n }\r\n return 0;\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n if (this.expr.length !== other.expr.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n if (!this.expr[i].equals(other.expr[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n if (!this.expr[i].evaluate(context)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _normalizeArr(arr) {\r\n const expr = [];\r\n let hasTrue = false;\r\n for (const e of arr) {\r\n if (!e) {\r\n continue;\r\n }\r\n if (e.type === 1 /* True */) {\r\n // anything && true ==> anything\r\n hasTrue = true;\r\n continue;\r\n }\r\n if (e.type === 0 /* False */) {\r\n // anything && false ==> false\r\n return ContextKeyFalseExpr.INSTANCE;\r\n }\r\n if (e.type === 6 /* And */) {\r\n expr.push(...e.expr);\r\n continue;\r\n }\r\n expr.push(e);\r\n }\r\n if (expr.length === 0 && hasTrue) {\r\n return ContextKeyTrueExpr.INSTANCE;\r\n }\r\n if (expr.length === 0) {\r\n return undefined;\r\n }\r\n if (expr.length === 1) {\r\n return expr[0];\r\n }\r\n expr.sort(cmp);\r\n // We must distribute any OR expression because we don't support parens\r\n // OR extensions will be at the end (due to sorting rules)\r\n while (expr.length > 1) {\r\n const lastElement = expr[expr.length - 1];\r\n if (lastElement.type !== 9 /* Or */) {\r\n break;\r\n }\r\n // pop the last element\r\n expr.pop();\r\n // pop the second to last element\r\n const secondToLastElement = expr.pop();\r\n // distribute `lastElement` over `secondToLastElement`\r\n const resultElement = ContextKeyOrExpr.create(lastElement.expr.map(el => ContextKeyAndExpr.create([el, secondToLastElement])));\r\n if (resultElement) {\r\n expr.push(resultElement);\r\n expr.sort(cmp);\r\n }\r\n }\r\n if (expr.length === 1) {\r\n return expr[0];\r\n }\r\n return new ContextKeyAndExpr(expr);\r\n }\r\n serialize() {\r\n return this.expr.map(e => e.serialize()).join(' && ');\r\n }\r\n keys() {\r\n const result = [];\r\n for (let expr of this.expr) {\r\n result.push(...expr.keys());\r\n }\r\n return result;\r\n }\r\n negate() {\r\n let result = [];\r\n for (let expr of this.expr) {\r\n result.push(expr.negate());\r\n }\r\n return ContextKeyOrExpr.create(result);\r\n }\r\n}\r\nclass ContextKeyOrExpr {\r\n constructor(expr) {\r\n this.expr = expr;\r\n this.type = 9 /* Or */;\r\n }\r\n static create(_expr) {\r\n const expr = ContextKeyOrExpr._normalizeArr(_expr);\r\n if (expr.length === 0) {\r\n return undefined;\r\n }\r\n if (expr.length === 1) {\r\n return expr[0];\r\n }\r\n return new ContextKeyOrExpr(expr);\r\n }\r\n cmp(other) {\r\n if (other.type !== this.type) {\r\n return this.type - other.type;\r\n }\r\n if (this.expr.length < other.expr.length) {\r\n return -1;\r\n }\r\n if (this.expr.length > other.expr.length) {\r\n return 1;\r\n }\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n const r = cmp(this.expr[i], other.expr[i]);\r\n if (r !== 0) {\r\n return r;\r\n }\r\n }\r\n return 0;\r\n }\r\n equals(other) {\r\n if (other.type === this.type) {\r\n if (this.expr.length !== other.expr.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n if (!this.expr[i].equals(other.expr[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n evaluate(context) {\r\n for (let i = 0, len = this.expr.length; i < len; i++) {\r\n if (this.expr[i].evaluate(context)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n static _normalizeArr(arr) {\r\n let expr = [];\r\n let hasFalse = false;\r\n if (arr) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n const e = arr[i];\r\n if (!e) {\r\n continue;\r\n }\r\n if (e.type === 0 /* False */) {\r\n // anything || false ==> anything\r\n hasFalse = true;\r\n continue;\r\n }\r\n if (e.type === 1 /* True */) {\r\n // anything || true ==> true\r\n return [ContextKeyTrueExpr.INSTANCE];\r\n }\r\n if (e.type === 9 /* Or */) {\r\n expr = expr.concat(e.expr);\r\n continue;\r\n }\r\n expr.push(e);\r\n }\r\n if (expr.length === 0 && hasFalse) {\r\n return [ContextKeyFalseExpr.INSTANCE];\r\n }\r\n expr.sort(cmp);\r\n }\r\n return expr;\r\n }\r\n serialize() {\r\n return this.expr.map(e => e.serialize()).join(' || ');\r\n }\r\n keys() {\r\n const result = [];\r\n for (let expr of this.expr) {\r\n result.push(...expr.keys());\r\n }\r\n return result;\r\n }\r\n negate() {\r\n let result = [];\r\n for (let expr of this.expr) {\r\n result.push(expr.negate());\r\n }\r\n const terminals = (node) => {\r\n if (node.type === 9 /* Or */) {\r\n return node.expr;\r\n }\r\n return [node];\r\n };\r\n // We don't support parens, so here we distribute the AND over the OR terminals\r\n // We always take the first 2 AND pairs and distribute them\r\n while (result.length > 1) {\r\n const LEFT = result.shift();\r\n const RIGHT = result.shift();\r\n const all = [];\r\n for (const left of terminals(LEFT)) {\r\n for (const right of terminals(RIGHT)) {\r\n all.push(ContextKeyExpr.and(left, right));\r\n }\r\n }\r\n result.unshift(ContextKeyExpr.or(...all));\r\n }\r\n return result[0];\r\n }\r\n}\r\nclass RawContextKey extends ContextKeyDefinedExpr {\r\n constructor(key, defaultValue, metaOrHide) {\r\n super(key);\r\n this.key = key;\r\n this._defaultValue = defaultValue;\r\n // collect all context keys into a central place\r\n if (typeof metaOrHide === 'object') {\r\n RawContextKey._info.push(Object.assign(Object.assign({}, metaOrHide), { key }));\r\n }\r\n else if (metaOrHide !== true) {\r\n RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });\r\n }\r\n }\r\n static all() {\r\n return RawContextKey._info.values();\r\n }\r\n bindTo(target) {\r\n return target.createKey(this.key, this._defaultValue);\r\n }\r\n getValue(target) {\r\n return target.getContextKeyValue(this.key);\r\n }\r\n toNegated() {\r\n return ContextKeyExpr.not(this.key);\r\n }\r\n isEqualTo(value) {\r\n return ContextKeyExpr.equals(this.key, value);\r\n }\r\n}\r\nRawContextKey._info = [];\r\nconst IContextKeyService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.createDecorator)('contextKeyService');\r\nconst SET_CONTEXT_COMMAND_ID = 'setContext';\r\nfunction cmp1(key1, key2) {\r\n if (key1 < key2) {\r\n return -1;\r\n }\r\n if (key1 > key2) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\nfunction cmp2(key1, value1, key2, value2) {\r\n if (key1 < key2) {\r\n return -1;\r\n }\r\n if (key1 > key2) {\r\n return 1;\r\n }\r\n if (value1 < value2) {\r\n return -1;\r\n }\r\n if (value1 > value2) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IsWindowsContext\": () => (/* binding */ IsWindowsContext),\n/* harmony export */ \"InputFocusedContextKey\": () => (/* binding */ InputFocusedContextKey)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst IsWindowsContext = new _contextkey_js__WEBPACK_IMPORTED_MODULE_1__.RawContextKey('isWindows', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.isWindows, (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('isWindows', \"Whether the operating system is Windows\"));\r\nconst InputFocusedContextKey = 'inputFocus';\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContextMenuHandler\": () => (/* binding */ ContextMenuHandler)\n/* harmony export */ });\n/* harmony import */ var _contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextMenuHandler.css */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css\");\n/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/actions.js */ \"./node_modules/monaco-editor/esm/vs/base/common/actions.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_ui_menu_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/menu/menu.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/common/styler.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js\");\n/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/event.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/event.js\");\n/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/mouseEvent.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass ContextMenuHandler {\r\n constructor(contextViewService, telemetryService, notificationService, keybindingService, themeService) {\r\n this.contextViewService = contextViewService;\r\n this.telemetryService = telemetryService;\r\n this.notificationService = notificationService;\r\n this.keybindingService = keybindingService;\r\n this.themeService = themeService;\r\n this.focusToReturn = null;\r\n this.block = null;\r\n this.options = { blockMouse: true };\r\n }\r\n configure(options) {\r\n this.options = options;\r\n }\r\n showContextMenu(delegate) {\r\n const actions = delegate.getActions();\r\n if (!actions.length) {\r\n return; // Don't render an empty context menu\r\n }\r\n this.focusToReturn = document.activeElement;\r\n let menu;\r\n let shadowRootElement = (0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(delegate.domForShadowRoot) ? delegate.domForShadowRoot : undefined;\r\n this.contextViewService.showContextView({\r\n getAnchor: () => delegate.getAnchor(),\r\n canRelayout: false,\r\n anchorAlignment: delegate.anchorAlignment,\r\n anchorAxisAlignment: delegate.anchorAxisAlignment,\r\n render: (container) => {\r\n let className = delegate.getMenuClassName ? delegate.getMenuClassName() : '';\r\n if (className) {\r\n container.className += ' ' + className;\r\n }\r\n // Render invisible div to block mouse interaction in the rest of the UI\r\n if (this.options.blockMouse) {\r\n this.block = container.appendChild((0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__.$)('.context-view-block'));\r\n this.block.style.position = 'fixed';\r\n this.block.style.cursor = 'initial';\r\n this.block.style.left = '0';\r\n this.block.style.top = '0';\r\n this.block.style.width = '100%';\r\n this.block.style.height = '100%';\r\n this.block.style.zIndex = '-1';\r\n (0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__.domEvent)(this.block, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_DOWN)((e) => e.stopPropagation());\r\n }\r\n const menuDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.DisposableStore();\r\n const actionRunner = delegate.actionRunner || new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__.ActionRunner();\r\n actionRunner.onBeforeRun(this.onActionRun, this, menuDisposables);\r\n actionRunner.onDidRun(this.onDidActionRun, this, menuDisposables);\r\n menu = new _base_browser_ui_menu_menu_js__WEBPACK_IMPORTED_MODULE_3__.Menu(container, actions, {\r\n actionViewItemProvider: delegate.getActionViewItem,\r\n context: delegate.getActionsContext ? delegate.getActionsContext() : null,\r\n actionRunner,\r\n getKeyBinding: delegate.getKeyBinding ? delegate.getKeyBinding : action => this.keybindingService.lookupKeybinding(action.id)\r\n });\r\n menuDisposables.add((0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.attachMenuStyler)(menu, this.themeService));\r\n menu.onDidCancel(() => this.contextViewService.hideContextView(true), null, menuDisposables);\r\n menu.onDidBlur(() => this.contextViewService.hideContextView(true), null, menuDisposables);\r\n (0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__.domEvent)(window, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.BLUR)(() => { this.contextViewService.hideContextView(true); }, null, menuDisposables);\r\n (0,_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__.domEvent)(window, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__.EventType.MOUSE_DOWN)((e) => {\r\n if (e.defaultPrevented) {\r\n return;\r\n }\r\n let event = new _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_7__.StandardMouseEvent(e);\r\n let element = event.target;\r\n // Don't do anything as we are likely creating a context menu\r\n if (event.rightButton) {\r\n return;\r\n }\r\n while (element) {\r\n if (element === container) {\r\n return;\r\n }\r\n element = element.parentElement;\r\n }\r\n this.contextViewService.hideContextView(true);\r\n }, null, menuDisposables);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.combinedDisposable)(menuDisposables, menu);\r\n },\r\n focus: () => {\r\n if (menu) {\r\n menu.focus(!!delegate.autoSelectFirstItem);\r\n }\r\n },\r\n onHide: (didCancel) => {\r\n if (delegate.onHide) {\r\n delegate.onHide(!!didCancel);\r\n }\r\n if (this.block) {\r\n this.block.remove();\r\n this.block = null;\r\n }\r\n if (this.focusToReturn) {\r\n this.focusToReturn.focus();\r\n }\r\n }\r\n }, shadowRootElement, !!shadowRootElement);\r\n }\r\n onActionRun(e) {\r\n if (this.telemetryService) {\r\n this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });\r\n }\r\n this.contextViewService.hideContextView(false);\r\n // Restore focus here\r\n if (this.focusToReturn) {\r\n this.focusToReturn.focus();\r\n }\r\n }\r\n onDidActionRun(e) {\r\n if (e.error) {\r\n this.notificationService.error(e.error);\r\n }\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContextMenuService\": () => (/* binding */ ContextMenuService)\n/* harmony export */ });\n/* harmony import */ var _contextMenuHandler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextMenuHandler.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js\");\n/* harmony import */ var _contextView_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contextView.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js\");\n/* harmony import */ var _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet ContextMenuService = class ContextMenuService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__.Disposable {\r\n constructor(telemetryService, notificationService, contextViewService, keybindingService, themeService) {\r\n super();\r\n this.contextMenuHandler = new _contextMenuHandler_js__WEBPACK_IMPORTED_MODULE_0__.ContextMenuHandler(contextViewService, telemetryService, notificationService, keybindingService, themeService);\r\n }\r\n configure(options) {\r\n this.contextMenuHandler.configure(options);\r\n }\r\n // ContextMenu\r\n showContextMenu(delegate) {\r\n this.contextMenuHandler.showContextMenu(delegate);\r\n _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__.ModifierKeyEmitter.getInstance().resetKeyStatus();\r\n }\r\n};\r\nContextMenuService = __decorate([\r\n __param(0, _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_2__.ITelemetryService),\r\n __param(1, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_3__.INotificationService),\r\n __param(2, _contextView_js__WEBPACK_IMPORTED_MODULE_1__.IContextViewService),\r\n __param(3, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_5__.IKeybindingService),\r\n __param(4, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__.IThemeService)\r\n], ContextMenuService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IContextViewService\": () => (/* binding */ IContextViewService),\n/* harmony export */ \"IContextMenuService\": () => (/* binding */ IContextMenuService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IContextViewService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('contextViewService');\r\nconst IContextMenuService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('contextMenuService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContextViewService\": () => (/* binding */ ContextViewService)\n/* harmony export */ });\n/* harmony import */ var _base_browser_ui_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/contextview/contextview.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../layout/browser/layoutService.js */ \"./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\nlet ContextViewService = class ContextViewService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(layoutService) {\r\n super();\r\n this.layoutService = layoutService;\r\n this.currentViewDisposable = _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable.None;\r\n this.container = layoutService.container;\r\n this.contextView = this._register(new _base_browser_ui_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_0__.ContextView(this.container, 1 /* ABSOLUTE */));\r\n this.layout();\r\n this._register(layoutService.onDidLayout(() => this.layout()));\r\n }\r\n // ContextView\r\n setContainer(container, domPosition) {\r\n this.contextView.setContainer(container, domPosition || 1 /* ABSOLUTE */);\r\n }\r\n showContextView(delegate, container, shadowRoot) {\r\n if (container) {\r\n if (container !== this.container) {\r\n this.container = container;\r\n this.setContainer(container, shadowRoot ? 3 /* FIXED_SHADOW */ : 2 /* FIXED */);\r\n }\r\n }\r\n else {\r\n if (this.container !== this.layoutService.container) {\r\n this.container = this.layoutService.container;\r\n this.setContainer(this.container, 1 /* ABSOLUTE */);\r\n }\r\n }\r\n this.contextView.show(delegate);\r\n const disposable = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n if (this.currentViewDisposable === disposable) {\r\n this.hideContextView();\r\n }\r\n });\r\n this.currentViewDisposable = disposable;\r\n return disposable;\r\n }\r\n getContextViewElement() {\r\n return this.contextView.getViewElement();\r\n }\r\n layout() {\r\n this.contextView.layout();\r\n }\r\n hideContextView(data) {\r\n this.contextView.hide(data);\r\n }\r\n};\r\nContextViewService = __decorate([\r\n __param(0, _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_2__.ILayoutService)\r\n], ContextViewService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IDialogService\": () => (/* binding */ IDialogService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IDialogService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('dialogService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EditorOpenContext\": () => (/* binding */ EditorOpenContext)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar EditorOpenContext;\r\n(function (EditorOpenContext) {\r\n /**\r\n * Default: the editor is opening via a programmatic call\r\n * to the editor service API.\r\n */\r\n EditorOpenContext[EditorOpenContext[\"API\"] = 0] = \"API\";\r\n /**\r\n * Indicates that a user action triggered the opening, e.g.\r\n * via mouse or keyboard use.\r\n */\r\n EditorOpenContext[EditorOpenContext[\"USER\"] = 1] = \"USER\";\r\n})(EditorOpenContext || (EditorOpenContext = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExtensionIdentifier\": () => (/* binding */ ExtensionIdentifier)\n/* harmony export */ });\n/**\r\n * **!Do not construct directly!**\r\n *\r\n * **!Only static methods because it gets serialized!**\r\n *\r\n * This represents the \"canonical\" version for an extension identifier. Extension ids\r\n * have to be case-insensitive (due to the marketplace), but we must ensure case\r\n * preservation because the extension API is already public at this time.\r\n *\r\n * For example, given an extension with the publisher `\"Hello\"` and the name `\"World\"`,\r\n * its canonical extension identifier is `\"Hello.World\"`. This extension could be\r\n * referenced in some other extension's dependencies using the string `\"hello.world\"`.\r\n *\r\n * To make matters more complicated, an extension can optionally have an UUID. When two\r\n * extensions have the same UUID, they are considered equal even if their identifier is different.\r\n */\r\nclass ExtensionIdentifier {\r\n constructor(value) {\r\n this.value = value;\r\n this._lower = value.toLowerCase();\r\n }\r\n /**\r\n * Gives the value by which to index (for equality).\r\n */\r\n static toKey(id) {\r\n if (typeof id === 'string') {\r\n return id.toLowerCase();\r\n }\r\n return id._lower;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/files/common/files.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/files/common/files.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FileKind\": () => (/* binding */ FileKind)\n/* harmony export */ });\nvar FileKind;\r\n(function (FileKind) {\r\n FileKind[FileKind[\"FILE\"] = 0] = \"FILE\";\r\n FileKind[FileKind[\"FOLDER\"] = 1] = \"FOLDER\";\r\n FileKind[FileKind[\"ROOT_FOLDER\"] = 2] = \"ROOT_FOLDER\";\r\n})(FileKind || (FileKind = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/files/common/files.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SyncDescriptor\": () => (/* binding */ SyncDescriptor)\n/* harmony export */ });\nclass SyncDescriptor {\r\n constructor(ctor, staticArguments = [], supportsDelayedInstantiation = false) {\r\n this.ctor = ctor;\r\n this.staticArguments = staticArguments;\r\n this.supportsDelayedInstantiation = supportsDelayedInstantiation;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"registerSingleton\": () => (/* binding */ registerSingleton),\n/* harmony export */ \"getSingletonServiceDescriptors\": () => (/* binding */ getSingletonServiceDescriptors)\n/* harmony export */ });\n/* harmony import */ var _descriptors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./descriptors.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst _registry = [];\r\nfunction registerSingleton(id, ctorOrDescriptor, supportsDelayedInstantiation) {\r\n if (!(ctorOrDescriptor instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_0__.SyncDescriptor)) {\r\n ctorOrDescriptor = new _descriptors_js__WEBPACK_IMPORTED_MODULE_0__.SyncDescriptor(ctorOrDescriptor, [], supportsDelayedInstantiation);\r\n }\r\n _registry.push([id, ctorOrDescriptor]);\r\n}\r\nfunction getSingletonServiceDescriptors() {\r\n return _registry;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Node\": () => (/* binding */ Node),\n/* harmony export */ \"Graph\": () => (/* binding */ Graph)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass Node {\r\n constructor(data) {\r\n this.incoming = new Map();\r\n this.outgoing = new Map();\r\n this.data = data;\r\n }\r\n}\r\nclass Graph {\r\n constructor(_hashFn) {\r\n this._hashFn = _hashFn;\r\n this._nodes = new Map();\r\n // empty\r\n }\r\n roots() {\r\n const ret = [];\r\n for (let node of this._nodes.values()) {\r\n if (node.outgoing.size === 0) {\r\n ret.push(node);\r\n }\r\n }\r\n return ret;\r\n }\r\n insertEdge(from, to) {\r\n const fromNode = this.lookupOrInsertNode(from);\r\n const toNode = this.lookupOrInsertNode(to);\r\n fromNode.outgoing.set(this._hashFn(to), toNode);\r\n toNode.incoming.set(this._hashFn(from), fromNode);\r\n }\r\n removeNode(data) {\r\n const key = this._hashFn(data);\r\n this._nodes.delete(key);\r\n for (let node of this._nodes.values()) {\r\n node.outgoing.delete(key);\r\n node.incoming.delete(key);\r\n }\r\n }\r\n lookupOrInsertNode(data) {\r\n const key = this._hashFn(data);\r\n let node = this._nodes.get(key);\r\n if (!node) {\r\n node = new Node(data);\r\n this._nodes.set(key, node);\r\n }\r\n return node;\r\n }\r\n isEmpty() {\r\n return this._nodes.size === 0;\r\n }\r\n toString() {\r\n let data = [];\r\n for (let [key, value] of this._nodes) {\r\n data.push(`${key}, (incoming)[${[...value.incoming.keys()].join(', ')}], (outgoing)[${[...value.outgoing.keys()].join(',')}]`);\r\n }\r\n return data.join('\\n');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"_util\": () => (/* binding */ _util),\n/* harmony export */ \"IInstantiationService\": () => (/* binding */ IInstantiationService),\n/* harmony export */ \"createDecorator\": () => (/* binding */ createDecorator),\n/* harmony export */ \"optional\": () => (/* binding */ optional)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// ------ internal util\r\nvar _util;\r\n(function (_util) {\r\n _util.serviceIds = new Map();\r\n _util.DI_TARGET = '$di$target';\r\n _util.DI_DEPENDENCIES = '$di$dependencies';\r\n function getServiceDependencies(ctor) {\r\n return ctor[_util.DI_DEPENDENCIES] || [];\r\n }\r\n _util.getServiceDependencies = getServiceDependencies;\r\n})(_util || (_util = {}));\r\nconst IInstantiationService = createDecorator('instantiationService');\r\nfunction storeServiceDependency(id, target, index, optional) {\r\n if (target[_util.DI_TARGET] === target) {\r\n target[_util.DI_DEPENDENCIES].push({ id, index, optional });\r\n }\r\n else {\r\n target[_util.DI_DEPENDENCIES] = [{ id, index, optional }];\r\n target[_util.DI_TARGET] = target;\r\n }\r\n}\r\n/**\r\n * The *only* valid way to create a {{ServiceIdentifier}}.\r\n */\r\nfunction createDecorator(serviceId) {\r\n if (_util.serviceIds.has(serviceId)) {\r\n return _util.serviceIds.get(serviceId);\r\n }\r\n const id = function (target, key, index) {\r\n if (arguments.length !== 3) {\r\n throw new Error('@IServiceName-decorator can only be used to decorate a parameter');\r\n }\r\n storeServiceDependency(id, target, index, false);\r\n };\r\n id.toString = () => serviceId;\r\n _util.serviceIds.set(serviceId, id);\r\n return id;\r\n}\r\n/**\r\n * Mark a service dependency as optional.\r\n */\r\nfunction optional(serviceIdentifier) {\r\n return function (target, key, index) {\r\n if (arguments.length !== 3) {\r\n throw new Error('@optional-decorator can only be used to decorate a parameter');\r\n }\r\n storeServiceDependency(serviceIdentifier, target, index, true);\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js":
|
||
/*!*************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js ***!
|
||
\*************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InstantiationService\": () => (/* binding */ InstantiationService)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./graph.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js\");\n/* harmony import */ var _descriptors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descriptors.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js\");\n/* harmony import */ var _instantiation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _serviceCollection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./serviceCollection.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n// TRACING\r\nconst _enableTracing = false;\r\nclass CyclicDependencyError extends Error {\r\n constructor(graph) {\r\n super('cyclic dependency between services');\r\n this.message = graph.toString();\r\n }\r\n}\r\nclass InstantiationService {\r\n constructor(services = new _serviceCollection_js__WEBPACK_IMPORTED_MODULE_4__.ServiceCollection(), strict = false, parent) {\r\n this._activeInstantiations = new Set();\r\n this._services = services;\r\n this._strict = strict;\r\n this._parent = parent;\r\n this._services.set(_instantiation_js__WEBPACK_IMPORTED_MODULE_3__.IInstantiationService, this);\r\n }\r\n createChild(services) {\r\n return new InstantiationService(services, this._strict, this);\r\n }\r\n invokeFunction(fn, ...args) {\r\n let _trace = Trace.traceInvocation(fn);\r\n let _done = false;\r\n try {\r\n const accessor = {\r\n get: (id, isOptional) => {\r\n if (_done) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.illegalState)('service accessor is only valid during the invocation of its target method');\r\n }\r\n const result = this._getOrCreateServiceInstance(id, _trace);\r\n if (!result && isOptional !== _instantiation_js__WEBPACK_IMPORTED_MODULE_3__.optional) {\r\n throw new Error(`[invokeFunction] unknown service '${id}'`);\r\n }\r\n return result;\r\n }\r\n };\r\n return fn(accessor, ...args);\r\n }\r\n finally {\r\n _done = true;\r\n _trace.stop();\r\n }\r\n }\r\n createInstance(ctorOrDescriptor, ...rest) {\r\n let _trace;\r\n let result;\r\n if (ctorOrDescriptor instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n _trace = Trace.traceCreation(ctorOrDescriptor.ctor);\r\n result = this._createInstance(ctorOrDescriptor.ctor, ctorOrDescriptor.staticArguments.concat(rest), _trace);\r\n }\r\n else {\r\n _trace = Trace.traceCreation(ctorOrDescriptor);\r\n result = this._createInstance(ctorOrDescriptor, rest, _trace);\r\n }\r\n _trace.stop();\r\n return result;\r\n }\r\n _createInstance(ctor, args = [], _trace) {\r\n // arguments defined by service decorators\r\n let serviceDependencies = _instantiation_js__WEBPACK_IMPORTED_MODULE_3__._util.getServiceDependencies(ctor).sort((a, b) => a.index - b.index);\r\n let serviceArgs = [];\r\n for (const dependency of serviceDependencies) {\r\n let service = this._getOrCreateServiceInstance(dependency.id, _trace);\r\n if (!service && this._strict && !dependency.optional) {\r\n throw new Error(`[createInstance] ${ctor.name} depends on UNKNOWN service ${dependency.id}.`);\r\n }\r\n serviceArgs.push(service);\r\n }\r\n let firstServiceArgPos = serviceDependencies.length > 0 ? serviceDependencies[0].index : args.length;\r\n // check for argument mismatches, adjust static args if needed\r\n if (args.length !== firstServiceArgPos) {\r\n console.warn(`[createInstance] First service dependency of ${ctor.name} at position ${firstServiceArgPos + 1} conflicts with ${args.length} static arguments`);\r\n let delta = firstServiceArgPos - args.length;\r\n if (delta > 0) {\r\n args = args.concat(new Array(delta));\r\n }\r\n else {\r\n args = args.slice(0, firstServiceArgPos);\r\n }\r\n }\r\n // now create the instance\r\n return new ctor(...[...args, ...serviceArgs]);\r\n }\r\n _setServiceInstance(id, instance) {\r\n if (this._services.get(id) instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n this._services.set(id, instance);\r\n }\r\n else if (this._parent) {\r\n this._parent._setServiceInstance(id, instance);\r\n }\r\n else {\r\n throw new Error('illegalState - setting UNKNOWN service instance');\r\n }\r\n }\r\n _getServiceInstanceOrDescriptor(id) {\r\n let instanceOrDesc = this._services.get(id);\r\n if (!instanceOrDesc && this._parent) {\r\n return this._parent._getServiceInstanceOrDescriptor(id);\r\n }\r\n else {\r\n return instanceOrDesc;\r\n }\r\n }\r\n _getOrCreateServiceInstance(id, _trace) {\r\n let thing = this._getServiceInstanceOrDescriptor(id);\r\n if (thing instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n return this._safeCreateAndCacheServiceInstance(id, thing, _trace.branch(id, true));\r\n }\r\n else {\r\n _trace.branch(id, false);\r\n return thing;\r\n }\r\n }\r\n _safeCreateAndCacheServiceInstance(id, desc, _trace) {\r\n if (this._activeInstantiations.has(id)) {\r\n throw new Error(`illegal state - RECURSIVELY instantiating service '${id}'`);\r\n }\r\n this._activeInstantiations.add(id);\r\n try {\r\n return this._createAndCacheServiceInstance(id, desc, _trace);\r\n }\r\n finally {\r\n this._activeInstantiations.delete(id);\r\n }\r\n }\r\n _createAndCacheServiceInstance(id, desc, _trace) {\r\n const graph = new _graph_js__WEBPACK_IMPORTED_MODULE_1__.Graph(data => data.id.toString());\r\n let cycleCount = 0;\r\n const stack = [{ id, desc, _trace }];\r\n while (stack.length) {\r\n const item = stack.pop();\r\n graph.lookupOrInsertNode(item);\r\n // a weak but working heuristic for cycle checks\r\n if (cycleCount++ > 1000) {\r\n throw new CyclicDependencyError(graph);\r\n }\r\n // check all dependencies for existence and if they need to be created first\r\n for (let dependency of _instantiation_js__WEBPACK_IMPORTED_MODULE_3__._util.getServiceDependencies(item.desc.ctor)) {\r\n let instanceOrDesc = this._getServiceInstanceOrDescriptor(dependency.id);\r\n if (!instanceOrDesc && !dependency.optional) {\r\n console.warn(`[createInstance] ${id} depends on ${dependency.id} which is NOT registered.`);\r\n }\r\n if (instanceOrDesc instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n const d = { id: dependency.id, desc: instanceOrDesc, _trace: item._trace.branch(dependency.id, true) };\r\n graph.insertEdge(item, d);\r\n stack.push(d);\r\n }\r\n }\r\n }\r\n while (true) {\r\n const roots = graph.roots();\r\n // if there is no more roots but still\r\n // nodes in the graph we have a cycle\r\n if (roots.length === 0) {\r\n if (!graph.isEmpty()) {\r\n throw new CyclicDependencyError(graph);\r\n }\r\n break;\r\n }\r\n for (const { data } of roots) {\r\n // Repeat the check for this still being a service sync descriptor. That's because\r\n // instantiating a dependency might have side-effect and recursively trigger instantiation\r\n // so that some dependencies are now fullfilled already.\r\n const instanceOrDesc = this._getServiceInstanceOrDescriptor(data.id);\r\n if (instanceOrDesc instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n // create instance and overwrite the service collections\r\n const instance = this._createServiceInstanceWithOwner(data.id, data.desc.ctor, data.desc.staticArguments, data.desc.supportsDelayedInstantiation, data._trace);\r\n this._setServiceInstance(data.id, instance);\r\n }\r\n graph.removeNode(data);\r\n }\r\n }\r\n return this._getServiceInstanceOrDescriptor(id);\r\n }\r\n _createServiceInstanceWithOwner(id, ctor, args = [], supportsDelayedInstantiation, _trace) {\r\n if (this._services.get(id) instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__.SyncDescriptor) {\r\n return this._createServiceInstance(ctor, args, supportsDelayedInstantiation, _trace);\r\n }\r\n else if (this._parent) {\r\n return this._parent._createServiceInstanceWithOwner(id, ctor, args, supportsDelayedInstantiation, _trace);\r\n }\r\n else {\r\n throw new Error(`illegalState - creating UNKNOWN service instance ${ctor.name}`);\r\n }\r\n }\r\n _createServiceInstance(ctor, args = [], _supportsDelayedInstantiation, _trace) {\r\n if (!_supportsDelayedInstantiation) {\r\n // eager instantiation\r\n return this._createInstance(ctor, args, _trace);\r\n }\r\n else {\r\n // Return a proxy object that's backed by an idle value. That\r\n // strategy is to instantiate services in our idle time or when actually\r\n // needed but not when injected into a consumer\r\n const idle = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__.IdleValue(() => this._createInstance(ctor, args, _trace));\r\n return new Proxy(Object.create(null), {\r\n get(target, key) {\r\n if (key in target) {\r\n return target[key];\r\n }\r\n let obj = idle.value;\r\n let prop = obj[key];\r\n if (typeof prop !== 'function') {\r\n return prop;\r\n }\r\n prop = prop.bind(obj);\r\n target[key] = prop;\r\n return prop;\r\n },\r\n set(_target, p, value) {\r\n idle.value[p] = value;\r\n return true;\r\n }\r\n });\r\n }\r\n }\r\n}\r\nclass Trace {\r\n constructor(type, name) {\r\n this.type = type;\r\n this.name = name;\r\n this._start = Date.now();\r\n this._dep = [];\r\n }\r\n static traceInvocation(ctor) {\r\n return !_enableTracing ? Trace._None : new Trace(1 /* Invocation */, ctor.name || ctor.toString().substring(0, 42).replace(/\\n/g, ''));\r\n }\r\n static traceCreation(ctor) {\r\n return !_enableTracing ? Trace._None : new Trace(0 /* Creation */, ctor.name);\r\n }\r\n branch(id, first) {\r\n let child = new Trace(2 /* Branch */, id.toString());\r\n this._dep.push([id, first, child]);\r\n return child;\r\n }\r\n stop() {\r\n let dur = Date.now() - this._start;\r\n Trace._totals += dur;\r\n let causedCreation = false;\r\n function printChild(n, trace) {\r\n let res = [];\r\n let prefix = new Array(n + 1).join('\\t');\r\n for (const [id, first, child] of trace._dep) {\r\n if (first && child) {\r\n causedCreation = true;\r\n res.push(`${prefix}CREATES -> ${id}`);\r\n let nested = printChild(n + 1, child);\r\n if (nested) {\r\n res.push(nested);\r\n }\r\n }\r\n else {\r\n res.push(`${prefix}uses -> ${id}`);\r\n }\r\n }\r\n return res.join('\\n');\r\n }\r\n let lines = [\r\n `${this.type === 0 /* Creation */ ? 'CREATE' : 'CALL'} ${this.name}`,\r\n `${printChild(1, this)}`,\r\n `DONE, took ${dur.toFixed(2)}ms (grand total ${Trace._totals.toFixed(2)}ms)`\r\n ];\r\n if (dur > 2 || causedCreation) {\r\n console.log(lines.join('\\n'));\r\n }\r\n }\r\n}\r\nTrace._None = new class extends Trace {\r\n constructor() { super(-1, null); }\r\n stop() { }\r\n branch() { return this; }\r\n};\r\nTrace._totals = 0;\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ServiceCollection\": () => (/* binding */ ServiceCollection)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ServiceCollection {\r\n constructor(...entries) {\r\n this._entries = new Map();\r\n for (let [id, service] of entries) {\r\n this.set(id, service);\r\n }\r\n }\r\n set(id, instanceOrDescriptor) {\r\n const result = this._entries.get(id);\r\n this._entries.set(id, instanceOrDescriptor);\r\n return result;\r\n }\r\n has(id) {\r\n return this._entries.has(id);\r\n }\r\n get(id) {\r\n return this._entries.get(id);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions)\n/* harmony export */ });\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst Extensions = {\r\n JSONContribution: 'base.contributions.json'\r\n};\r\nfunction normalizeId(id) {\r\n if (id.length > 0 && id.charAt(id.length - 1) === '#') {\r\n return id.substring(0, id.length - 1);\r\n }\r\n return id;\r\n}\r\nclass JSONContributionRegistry {\r\n constructor() {\r\n this._onDidChangeSchema = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\r\n this.schemasById = {};\r\n }\r\n registerSchema(uri, unresolvedSchemaContent) {\r\n this.schemasById[normalizeId(uri)] = unresolvedSchemaContent;\r\n this._onDidChangeSchema.fire(uri);\r\n }\r\n notifySchemaChanged(uri) {\r\n this._onDidChangeSchema.fire(uri);\r\n }\r\n}\r\nconst jsonContributionRegistry = new JSONContributionRegistry();\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.add(Extensions.JSONContribution, jsonContributionRegistry);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js":
|
||
/*!***************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js ***!
|
||
\***************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractKeybindingService\": () => (/* binding */ AbstractKeybindingService)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass AbstractKeybindingService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__.Disposable {\r\n constructor(_contextKeyService, _commandService, _telemetryService, _notificationService, _logService) {\r\n super();\r\n this._contextKeyService = _contextKeyService;\r\n this._commandService = _commandService;\r\n this._telemetryService = _telemetryService;\r\n this._notificationService = _notificationService;\r\n this._logService = _logService;\r\n this._onDidUpdateKeybindings = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n this._currentChord = null;\r\n this._currentChordChecker = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.IntervalTimer();\r\n this._currentChordStatusMessage = null;\r\n this._currentSingleModifier = null;\r\n this._currentSingleModifierClearTimeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__.TimeoutTimer();\r\n this._logging = false;\r\n }\r\n get onDidUpdateKeybindings() {\r\n return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Event.None; // Sinon stubbing walks properties on prototype\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _log(str) {\r\n if (this._logging) {\r\n this._logService.info(`[KeybindingService]: ${str}`);\r\n }\r\n }\r\n getKeybindings() {\r\n return this._getResolver().getKeybindings();\r\n }\r\n lookupKeybinding(commandId) {\r\n const result = this._getResolver().lookupPrimaryKeybinding(commandId);\r\n if (!result) {\r\n return undefined;\r\n }\r\n return result.resolvedKeybinding;\r\n }\r\n dispatchEvent(e, target) {\r\n return this._dispatch(e, target);\r\n }\r\n softDispatch(e, target) {\r\n const keybinding = this.resolveKeyboardEvent(e);\r\n if (keybinding.isChord()) {\r\n console.warn('Unexpected keyboard event mapped to a chord');\r\n return null;\r\n }\r\n const [firstPart,] = keybinding.getDispatchParts();\r\n if (firstPart === null) {\r\n // cannot be dispatched, probably only modifier keys\r\n return null;\r\n }\r\n const contextValue = this._contextKeyService.getContext(target);\r\n const currentChord = this._currentChord ? this._currentChord.keypress : null;\r\n return this._getResolver().resolve(contextValue, currentChord, firstPart);\r\n }\r\n _enterChordMode(firstPart, keypressLabel) {\r\n this._currentChord = {\r\n keypress: firstPart,\r\n label: keypressLabel\r\n };\r\n this._currentChordStatusMessage = this._notificationService.status(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('first.chord', \"({0}) was pressed. Waiting for second key of chord...\", keypressLabel));\r\n const chordEnterTime = Date.now();\r\n this._currentChordChecker.cancelAndSet(() => {\r\n if (!this._documentHasFocus()) {\r\n // Focus has been lost => leave chord mode\r\n this._leaveChordMode();\r\n return;\r\n }\r\n if (Date.now() - chordEnterTime > 5000) {\r\n // 5 seconds elapsed => leave chord mode\r\n this._leaveChordMode();\r\n }\r\n }, 500);\r\n }\r\n _leaveChordMode() {\r\n if (this._currentChordStatusMessage) {\r\n this._currentChordStatusMessage.dispose();\r\n this._currentChordStatusMessage = null;\r\n }\r\n this._currentChordChecker.cancel();\r\n this._currentChord = null;\r\n }\r\n _dispatch(e, target) {\r\n return this._doDispatch(this.resolveKeyboardEvent(e), target, /*isSingleModiferChord*/ false);\r\n }\r\n _singleModifierDispatch(e, target) {\r\n const keybinding = this.resolveKeyboardEvent(e);\r\n const [singleModifier,] = keybinding.getSingleModifierDispatchParts();\r\n if (singleModifier !== null && this._currentSingleModifier === null) {\r\n // we have a valid `singleModifier`, store it for the next keyup, but clear it in 300ms\r\n this._log(`+ Storing single modifier for possible chord ${singleModifier}.`);\r\n this._currentSingleModifier = singleModifier;\r\n this._currentSingleModifierClearTimeout.cancelAndSet(() => {\r\n this._log(`+ Clearing single modifier due to 300ms elapsed.`);\r\n this._currentSingleModifier = null;\r\n }, 300);\r\n return false;\r\n }\r\n if (singleModifier !== null && singleModifier === this._currentSingleModifier) {\r\n // bingo!\r\n this._log(`/ Dispatching single modifier chord ${singleModifier} ${singleModifier}`);\r\n this._currentSingleModifierClearTimeout.cancel();\r\n this._currentSingleModifier = null;\r\n return this._doDispatch(keybinding, target, /*isSingleModiferChord*/ true);\r\n }\r\n this._currentSingleModifierClearTimeout.cancel();\r\n this._currentSingleModifier = null;\r\n return false;\r\n }\r\n _doDispatch(keybinding, target, isSingleModiferChord = false) {\r\n let shouldPreventDefault = false;\r\n if (keybinding.isChord()) {\r\n console.warn('Unexpected keyboard event mapped to a chord');\r\n return false;\r\n }\r\n let firstPart = null; // the first keybinding i.e. Ctrl+K\r\n let currentChord = null; // the \"second\" keybinding i.e. Ctrl+K \"Ctrl+D\"\r\n if (isSingleModiferChord) {\r\n const [dispatchKeyname,] = keybinding.getSingleModifierDispatchParts();\r\n firstPart = dispatchKeyname;\r\n currentChord = dispatchKeyname;\r\n }\r\n else {\r\n [firstPart,] = keybinding.getDispatchParts();\r\n currentChord = this._currentChord ? this._currentChord.keypress : null;\r\n }\r\n if (firstPart === null) {\r\n this._log(`\\\\ Keyboard event cannot be dispatched in keydown phase.`);\r\n // cannot be dispatched, probably only modifier keys\r\n return shouldPreventDefault;\r\n }\r\n const contextValue = this._contextKeyService.getContext(target);\r\n const keypressLabel = keybinding.getLabel();\r\n const resolveResult = this._getResolver().resolve(contextValue, currentChord, firstPart);\r\n this._logService.trace('KeybindingService#dispatch', keypressLabel, resolveResult === null || resolveResult === void 0 ? void 0 : resolveResult.commandId);\r\n if (resolveResult && resolveResult.enterChord) {\r\n shouldPreventDefault = true;\r\n this._enterChordMode(firstPart, keypressLabel);\r\n return shouldPreventDefault;\r\n }\r\n if (this._currentChord) {\r\n if (!resolveResult || !resolveResult.commandId) {\r\n this._notificationService.status(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('missing.chord', \"The key combination ({0}, {1}) is not a command.\", this._currentChord.label, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });\r\n shouldPreventDefault = true;\r\n }\r\n }\r\n this._leaveChordMode();\r\n if (resolveResult && resolveResult.commandId) {\r\n if (!resolveResult.bubble) {\r\n shouldPreventDefault = true;\r\n }\r\n if (typeof resolveResult.commandArgs === 'undefined') {\r\n this._commandService.executeCommand(resolveResult.commandId).then(undefined, err => this._notificationService.warn(err));\r\n }\r\n else {\r\n this._commandService.executeCommand(resolveResult.commandId, resolveResult.commandArgs).then(undefined, err => this._notificationService.warn(err));\r\n }\r\n this._telemetryService.publicLog2('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' });\r\n }\r\n return shouldPreventDefault;\r\n }\r\n mightProducePrintableCharacter(event) {\r\n if (event.ctrlKey || event.metaKey) {\r\n // ignore ctrl/cmd-combination but not shift/alt-combinatios\r\n return false;\r\n }\r\n // weak check for certain ranges. this is properly implemented in a subclass\r\n // with access to the KeyboardMapperFactory.\r\n if ((event.keyCode >= 31 /* KEY_A */ && event.keyCode <= 56 /* KEY_Z */)\r\n || (event.keyCode >= 21 /* KEY_0 */ && event.keyCode <= 30 /* KEY_9 */)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseResolvedKeybinding\": () => (/* binding */ BaseResolvedKeybinding)\n/* harmony export */ });\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keybindingLabels.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js\");\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nclass BaseResolvedKeybinding extends _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.ResolvedKeybinding {\r\n constructor(os, parts) {\r\n super();\r\n if (parts.length === 0) {\r\n throw (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__.illegalArgument)(`parts`);\r\n }\r\n this._os = os;\r\n this._parts = parts;\r\n }\r\n getLabel() {\r\n return _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__.UILabelProvider.toLabel(this._os, this._parts, (keybinding) => this._getLabel(keybinding));\r\n }\r\n getAriaLabel() {\r\n return _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__.AriaLabelProvider.toLabel(this._os, this._parts, (keybinding) => this._getAriaLabel(keybinding));\r\n }\r\n isChord() {\r\n return (this._parts.length > 1);\r\n }\r\n getParts() {\r\n return this._parts.map((keybinding) => this._getPart(keybinding));\r\n }\r\n _getPart(keybinding) {\r\n return new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__.ResolvedKeybindingPart(keybinding.ctrlKey, keybinding.shiftKey, keybinding.altKey, keybinding.metaKey, this._getLabel(keybinding), this._getAriaLabel(keybinding));\r\n }\r\n getDispatchParts() {\r\n return this._parts.map((keybinding) => this._getDispatchPart(keybinding));\r\n }\r\n getSingleModifierDispatchParts() {\r\n return this._parts.map((keybinding) => this._getSingleModifierDispatchPart(keybinding));\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IKeybindingService\": () => (/* binding */ IKeybindingService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IKeybindingService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('keybindingService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KeybindingResolver\": () => (/* binding */ KeybindingResolver)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass KeybindingResolver {\r\n constructor(defaultKeybindings, overrides, log) {\r\n this._log = log;\r\n this._defaultKeybindings = defaultKeybindings;\r\n this._defaultBoundCommands = new Map();\r\n for (let i = 0, len = defaultKeybindings.length; i < len; i++) {\r\n const command = defaultKeybindings[i].command;\r\n if (command) {\r\n this._defaultBoundCommands.set(command, true);\r\n }\r\n }\r\n this._map = new Map();\r\n this._lookupMap = new Map();\r\n this._keybindings = KeybindingResolver.combine(defaultKeybindings, overrides);\r\n for (let i = 0, len = this._keybindings.length; i < len; i++) {\r\n let k = this._keybindings[i];\r\n if (k.keypressParts.length === 0) {\r\n // unbound\r\n continue;\r\n }\r\n if (k.when && k.when.type === 0 /* False */) {\r\n // when condition is false\r\n continue;\r\n }\r\n // TODO@chords\r\n this._addKeyPress(k.keypressParts[0], k);\r\n }\r\n }\r\n static _isTargetedForRemoval(defaultKb, keypressFirstPart, keypressChordPart, command, when) {\r\n if (defaultKb.command !== command) {\r\n return false;\r\n }\r\n // TODO@chords\r\n if (keypressFirstPart && defaultKb.keypressParts[0] !== keypressFirstPart) {\r\n return false;\r\n }\r\n // TODO@chords\r\n if (keypressChordPart && defaultKb.keypressParts[1] !== keypressChordPart) {\r\n return false;\r\n }\r\n if (when) {\r\n if (!defaultKb.when) {\r\n return false;\r\n }\r\n if (!when.equals(defaultKb.when)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Looks for rules containing -command in `overrides` and removes them directly from `defaults`.\r\n */\r\n static combine(defaults, rawOverrides) {\r\n defaults = defaults.slice(0);\r\n let overrides = [];\r\n for (const override of rawOverrides) {\r\n if (!override.command || override.command.length === 0 || override.command.charAt(0) !== '-') {\r\n overrides.push(override);\r\n continue;\r\n }\r\n const command = override.command.substr(1);\r\n // TODO@chords\r\n const keypressFirstPart = override.keypressParts[0];\r\n const keypressChordPart = override.keypressParts[1];\r\n const when = override.when;\r\n for (let j = defaults.length - 1; j >= 0; j--) {\r\n if (this._isTargetedForRemoval(defaults[j], keypressFirstPart, keypressChordPart, command, when)) {\r\n defaults.splice(j, 1);\r\n }\r\n }\r\n }\r\n return defaults.concat(overrides);\r\n }\r\n _addKeyPress(keypress, item) {\r\n const conflicts = this._map.get(keypress);\r\n if (typeof conflicts === 'undefined') {\r\n // There is no conflict so far\r\n this._map.set(keypress, [item]);\r\n this._addToLookupMap(item);\r\n return;\r\n }\r\n for (let i = conflicts.length - 1; i >= 0; i--) {\r\n let conflict = conflicts[i];\r\n if (conflict.command === item.command) {\r\n continue;\r\n }\r\n const conflictIsChord = (conflict.keypressParts.length > 1);\r\n const itemIsChord = (item.keypressParts.length > 1);\r\n // TODO@chords\r\n if (conflictIsChord && itemIsChord && conflict.keypressParts[1] !== item.keypressParts[1]) {\r\n // The conflict only shares the chord start with this command\r\n continue;\r\n }\r\n if (KeybindingResolver.whenIsEntirelyIncluded(conflict.when, item.when)) {\r\n // `item` completely overwrites `conflict`\r\n // Remove conflict from the lookupMap\r\n this._removeFromLookupMap(conflict);\r\n }\r\n }\r\n conflicts.push(item);\r\n this._addToLookupMap(item);\r\n }\r\n _addToLookupMap(item) {\r\n if (!item.command) {\r\n return;\r\n }\r\n let arr = this._lookupMap.get(item.command);\r\n if (typeof arr === 'undefined') {\r\n arr = [item];\r\n this._lookupMap.set(item.command, arr);\r\n }\r\n else {\r\n arr.push(item);\r\n }\r\n }\r\n _removeFromLookupMap(item) {\r\n if (!item.command) {\r\n return;\r\n }\r\n let arr = this._lookupMap.get(item.command);\r\n if (typeof arr === 'undefined') {\r\n return;\r\n }\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (arr[i] === item) {\r\n arr.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n /**\r\n * Returns true if it is provable `a` implies `b`.\r\n */\r\n static whenIsEntirelyIncluded(a, b) {\r\n if (!b) {\r\n return true;\r\n }\r\n if (!a) {\r\n return false;\r\n }\r\n return this._implies(a, b);\r\n }\r\n /**\r\n * Returns true if it is provable `p` implies `q`.\r\n */\r\n static _implies(p, q) {\r\n const notP = p.negate();\r\n const terminals = (node) => {\r\n if (node.type === 9 /* Or */) {\r\n return node.expr;\r\n }\r\n return [node];\r\n };\r\n let expr = terminals(notP).concat(terminals(q));\r\n for (let i = 0; i < expr.length; i++) {\r\n const a = expr[i];\r\n const notA = a.negate();\r\n for (let j = i + 1; j < expr.length; j++) {\r\n const b = expr[j];\r\n if (notA.equals(b)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n getKeybindings() {\r\n return this._keybindings;\r\n }\r\n lookupPrimaryKeybinding(commandId) {\r\n let items = this._lookupMap.get(commandId);\r\n if (typeof items === 'undefined' || items.length === 0) {\r\n return null;\r\n }\r\n return items[items.length - 1];\r\n }\r\n resolve(context, currentChord, keypress) {\r\n this._log(`| Resolving ${keypress}${currentChord ? ` chorded from ${currentChord}` : ``}`);\r\n let lookupMap = null;\r\n if (currentChord !== null) {\r\n // Fetch all chord bindings for `currentChord`\r\n const candidates = this._map.get(currentChord);\r\n if (typeof candidates === 'undefined') {\r\n // No chords starting with `currentChord`\r\n this._log(`\\\\ No keybinding entries.`);\r\n return null;\r\n }\r\n lookupMap = [];\r\n for (let i = 0, len = candidates.length; i < len; i++) {\r\n let candidate = candidates[i];\r\n // TODO@chords\r\n if (candidate.keypressParts[1] === keypress) {\r\n lookupMap.push(candidate);\r\n }\r\n }\r\n }\r\n else {\r\n const candidates = this._map.get(keypress);\r\n if (typeof candidates === 'undefined') {\r\n // No bindings with `keypress`\r\n this._log(`\\\\ No keybinding entries.`);\r\n return null;\r\n }\r\n lookupMap = candidates;\r\n }\r\n let result = this._findCommand(context, lookupMap);\r\n if (!result) {\r\n this._log(`\\\\ From ${lookupMap.length} keybinding entries, no when clauses matched the context.`);\r\n return null;\r\n }\r\n // TODO@chords\r\n if (currentChord === null && result.keypressParts.length > 1 && result.keypressParts[1] !== null) {\r\n this._log(`\\\\ From ${lookupMap.length} keybinding entries, matched chord, when: ${printWhenExplanation(result.when)}, source: ${printSourceExplanation(result)}.`);\r\n return {\r\n enterChord: true,\r\n leaveChord: false,\r\n commandId: null,\r\n commandArgs: null,\r\n bubble: false\r\n };\r\n }\r\n this._log(`\\\\ From ${lookupMap.length} keybinding entries, matched ${result.command}, when: ${printWhenExplanation(result.when)}, source: ${printSourceExplanation(result)}.`);\r\n return {\r\n enterChord: false,\r\n leaveChord: result.keypressParts.length > 1,\r\n commandId: result.command,\r\n commandArgs: result.commandArgs,\r\n bubble: result.bubble\r\n };\r\n }\r\n _findCommand(context, matches) {\r\n for (let i = matches.length - 1; i >= 0; i--) {\r\n let k = matches[i];\r\n if (!KeybindingResolver.contextMatchesRules(context, k.when)) {\r\n continue;\r\n }\r\n return k;\r\n }\r\n return null;\r\n }\r\n static contextMatchesRules(context, rules) {\r\n if (!rules) {\r\n return true;\r\n }\r\n return rules.evaluate(context);\r\n }\r\n}\r\nfunction printWhenExplanation(when) {\r\n if (!when) {\r\n return `no when condition`;\r\n }\r\n return `${when.serialize()}`;\r\n}\r\nfunction printSourceExplanation(kb) {\r\n return (kb.extensionId\r\n ? (kb.isBuiltinExtension ? `built-in extension ${kb.extensionId}` : `user extension ${kb.extensionId}`)\r\n : (kb.isDefault ? `built-in` : `user`));\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js":
|
||
/*!*********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js ***!
|
||
\*********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KeybindingsRegistry\": () => (/* binding */ KeybindingsRegistry),\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions)\n/* harmony export */ });\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/base/common/platform.js\");\n/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nclass KeybindingsRegistryImpl {\r\n constructor() {\r\n this._coreKeybindings = [];\r\n this._extensionKeybindings = [];\r\n this._cachedMergedKeybindings = null;\r\n }\r\n /**\r\n * Take current platform into account and reduce to primary & secondary.\r\n */\r\n static bindToCurrentPlatform(kb) {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.OS === 1 /* Windows */) {\r\n if (kb && kb.win) {\r\n return kb.win;\r\n }\r\n }\r\n else if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.OS === 2 /* Macintosh */) {\r\n if (kb && kb.mac) {\r\n return kb.mac;\r\n }\r\n }\r\n else {\r\n if (kb && kb.linux) {\r\n return kb.linux;\r\n }\r\n }\r\n return kb;\r\n }\r\n registerKeybindingRule(rule) {\r\n const actualKb = KeybindingsRegistryImpl.bindToCurrentPlatform(rule);\r\n if (actualKb && actualKb.primary) {\r\n const kk = (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__.createKeybinding)(actualKb.primary, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.OS);\r\n if (kk) {\r\n this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, 0, rule.when);\r\n }\r\n }\r\n if (actualKb && Array.isArray(actualKb.secondary)) {\r\n for (let i = 0, len = actualKb.secondary.length; i < len; i++) {\r\n const k = actualKb.secondary[i];\r\n const kk = (0,_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__.createKeybinding)(k, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.OS);\r\n if (kk) {\r\n this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, -i - 1, rule.when);\r\n }\r\n }\r\n }\r\n }\r\n registerCommandAndKeybindingRule(desc) {\r\n this.registerKeybindingRule(desc);\r\n _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__.CommandsRegistry.registerCommand(desc);\r\n }\r\n static _mightProduceChar(keyCode) {\r\n if (keyCode >= 21 /* KEY_0 */ && keyCode <= 30 /* KEY_9 */) {\r\n return true;\r\n }\r\n if (keyCode >= 31 /* KEY_A */ && keyCode <= 56 /* KEY_Z */) {\r\n return true;\r\n }\r\n return (keyCode === 80 /* US_SEMICOLON */\r\n || keyCode === 81 /* US_EQUAL */\r\n || keyCode === 82 /* US_COMMA */\r\n || keyCode === 83 /* US_MINUS */\r\n || keyCode === 84 /* US_DOT */\r\n || keyCode === 85 /* US_SLASH */\r\n || keyCode === 86 /* US_BACKTICK */\r\n || keyCode === 110 /* ABNT_C1 */\r\n || keyCode === 111 /* ABNT_C2 */\r\n || keyCode === 87 /* US_OPEN_SQUARE_BRACKET */\r\n || keyCode === 88 /* US_BACKSLASH */\r\n || keyCode === 89 /* US_CLOSE_SQUARE_BRACKET */\r\n || keyCode === 90 /* US_QUOTE */\r\n || keyCode === 91 /* OEM_8 */\r\n || keyCode === 92 /* OEM_102 */);\r\n }\r\n _assertNoCtrlAlt(keybinding, commandId) {\r\n if (keybinding.ctrlKey && keybinding.altKey && !keybinding.metaKey) {\r\n if (KeybindingsRegistryImpl._mightProduceChar(keybinding.keyCode)) {\r\n console.warn('Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ', keybinding, ' for ', commandId);\r\n }\r\n }\r\n }\r\n _registerDefaultKeybinding(keybinding, commandId, commandArgs, weight1, weight2, when) {\r\n if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__.OS === 1 /* Windows */) {\r\n this._assertNoCtrlAlt(keybinding.parts[0], commandId);\r\n }\r\n this._coreKeybindings.push({\r\n keybinding: keybinding,\r\n command: commandId,\r\n commandArgs: commandArgs,\r\n when: when,\r\n weight1: weight1,\r\n weight2: weight2,\r\n extensionId: null,\r\n isBuiltinExtension: false\r\n });\r\n this._cachedMergedKeybindings = null;\r\n }\r\n getDefaultKeybindings() {\r\n if (!this._cachedMergedKeybindings) {\r\n this._cachedMergedKeybindings = [].concat(this._coreKeybindings).concat(this._extensionKeybindings);\r\n this._cachedMergedKeybindings.sort(sorter);\r\n }\r\n return this._cachedMergedKeybindings.slice(0);\r\n }\r\n}\r\nconst KeybindingsRegistry = new KeybindingsRegistryImpl();\r\n// Define extension point ids\r\nconst Extensions = {\r\n EditorModes: 'platform.keybindingsRegistry'\r\n};\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__.Registry.add(Extensions.EditorModes, KeybindingsRegistry);\r\nfunction sorter(a, b) {\r\n if (a.weight1 !== b.weight1) {\r\n return a.weight1 - b.weight1;\r\n }\r\n if (a.command < b.command) {\r\n return -1;\r\n }\r\n if (a.command > b.command) {\r\n return 1;\r\n }\r\n return a.weight2 - b.weight2;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResolvedKeybindingItem\": () => (/* binding */ ResolvedKeybindingItem),\n/* harmony export */ \"removeElementsAfterNulls\": () => (/* binding */ removeElementsAfterNulls)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nclass ResolvedKeybindingItem {\r\n constructor(resolvedKeybinding, command, commandArgs, when, isDefault, extensionId, isBuiltinExtension) {\r\n this.resolvedKeybinding = resolvedKeybinding;\r\n this.keypressParts = resolvedKeybinding ? removeElementsAfterNulls(resolvedKeybinding.getDispatchParts()) : [];\r\n if (resolvedKeybinding && this.keypressParts.length === 0) {\r\n // handle possible single modifier chord keybindings\r\n this.keypressParts = removeElementsAfterNulls(resolvedKeybinding.getSingleModifierDispatchParts());\r\n }\r\n this.bubble = (command ? command.charCodeAt(0) === 94 /* Caret */ : false);\r\n this.command = this.bubble ? command.substr(1) : command;\r\n this.commandArgs = commandArgs;\r\n this.when = when;\r\n this.isDefault = isDefault;\r\n this.extensionId = extensionId;\r\n this.isBuiltinExtension = isBuiltinExtension;\r\n }\r\n}\r\nfunction removeElementsAfterNulls(arr) {\r\n let result = [];\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n const element = arr[i];\r\n if (!element) {\r\n // stop processing at first encountered null\r\n return result;\r\n }\r\n result.push(element);\r\n }\r\n return result;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js":
|
||
/*!****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js ***!
|
||
\****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"USLayoutResolvedKeybinding\": () => (/* binding */ USLayoutResolvedKeybinding)\n/* harmony export */ });\n/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ \"./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js\");\n/* harmony import */ var _baseResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./baseResolvedKeybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/**\r\n * Do not instantiate. Use KeybindingService to get a ResolvedKeybinding seeded with information about the current kb layout.\r\n */\r\nclass USLayoutResolvedKeybinding extends _baseResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_1__.BaseResolvedKeybinding {\r\n constructor(actual, os) {\r\n super(os, actual.parts);\r\n }\r\n _keyCodeToUILabel(keyCode) {\r\n if (this._os === 2 /* Macintosh */) {\r\n switch (keyCode) {\r\n case 15 /* LeftArrow */:\r\n return '←';\r\n case 16 /* UpArrow */:\r\n return '↑';\r\n case 17 /* RightArrow */:\r\n return '→';\r\n case 18 /* DownArrow */:\r\n return '↓';\r\n }\r\n }\r\n return _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__.KeyCodeUtils.toString(keyCode);\r\n }\r\n _getLabel(keybinding) {\r\n if (keybinding.isDuplicateModifierCase()) {\r\n return '';\r\n }\r\n return this._keyCodeToUILabel(keybinding.keyCode);\r\n }\r\n _getAriaLabel(keybinding) {\r\n if (keybinding.isDuplicateModifierCase()) {\r\n return '';\r\n }\r\n return _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__.KeyCodeUtils.toString(keybinding.keyCode);\r\n }\r\n _getDispatchPart(keybinding) {\r\n return USLayoutResolvedKeybinding.getDispatchStr(keybinding);\r\n }\r\n static getDispatchStr(keybinding) {\r\n if (keybinding.isModifierKey()) {\r\n return null;\r\n }\r\n let result = '';\r\n if (keybinding.ctrlKey) {\r\n result += 'ctrl+';\r\n }\r\n if (keybinding.shiftKey) {\r\n result += 'shift+';\r\n }\r\n if (keybinding.altKey) {\r\n result += 'alt+';\r\n }\r\n if (keybinding.metaKey) {\r\n result += 'meta+';\r\n }\r\n result += _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__.KeyCodeUtils.toString(keybinding.keyCode);\r\n return result;\r\n }\r\n _getSingleModifierDispatchPart(keybinding) {\r\n if (keybinding.keyCode === 5 /* Ctrl */ && !keybinding.shiftKey && !keybinding.altKey && !keybinding.metaKey) {\r\n return 'ctrl';\r\n }\r\n if (keybinding.keyCode === 4 /* Shift */ && !keybinding.ctrlKey && !keybinding.altKey && !keybinding.metaKey) {\r\n return 'shift';\r\n }\r\n if (keybinding.keyCode === 6 /* Alt */ && !keybinding.ctrlKey && !keybinding.shiftKey && !keybinding.metaKey) {\r\n return 'alt';\r\n }\r\n if (keybinding.keyCode === 57 /* Meta */ && !keybinding.ctrlKey && !keybinding.shiftKey && !keybinding.altKey) {\r\n return 'meta';\r\n }\r\n return null;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/label/common/label.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ILabelService\": () => (/* binding */ ILabelService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ILabelService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('labelService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/label/common/label.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ILayoutService\": () => (/* binding */ ILayoutService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ILayoutService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('layoutService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IListService\": () => (/* binding */ IListService),\n/* harmony export */ \"ListService\": () => (/* binding */ ListService),\n/* harmony export */ \"WorkbenchListSupportsMultiSelectContextKey\": () => (/* binding */ WorkbenchListSupportsMultiSelectContextKey),\n/* harmony export */ \"WorkbenchListFocusContextKey\": () => (/* binding */ WorkbenchListFocusContextKey),\n/* harmony export */ \"WorkbenchListHasSelectionOrFocus\": () => (/* binding */ WorkbenchListHasSelectionOrFocus),\n/* harmony export */ \"WorkbenchListDoubleSelection\": () => (/* binding */ WorkbenchListDoubleSelection),\n/* harmony export */ \"WorkbenchListMultiSelection\": () => (/* binding */ WorkbenchListMultiSelection),\n/* harmony export */ \"WorkbenchListSupportsKeyboardNavigation\": () => (/* binding */ WorkbenchListSupportsKeyboardNavigation),\n/* harmony export */ \"WorkbenchListAutomaticKeyboardNavigationKey\": () => (/* binding */ WorkbenchListAutomaticKeyboardNavigationKey),\n/* harmony export */ \"WorkbenchListAutomaticKeyboardNavigation\": () => (/* binding */ WorkbenchListAutomaticKeyboardNavigation),\n/* harmony export */ \"didBindWorkbenchListAutomaticKeyboardNavigation\": () => (/* binding */ didBindWorkbenchListAutomaticKeyboardNavigation),\n/* harmony export */ \"WorkbenchList\": () => (/* binding */ WorkbenchList),\n/* harmony export */ \"WorkbenchPagedList\": () => (/* binding */ WorkbenchPagedList),\n/* harmony export */ \"WorkbenchTable\": () => (/* binding */ WorkbenchTable),\n/* harmony export */ \"WorkbenchObjectTree\": () => (/* binding */ WorkbenchObjectTree),\n/* harmony export */ \"WorkbenchCompressibleObjectTree\": () => (/* binding */ WorkbenchCompressibleObjectTree),\n/* harmony export */ \"WorkbenchDataTree\": () => (/* binding */ WorkbenchDataTree),\n/* harmony export */ \"WorkbenchAsyncDataTree\": () => (/* binding */ WorkbenchAsyncDataTree),\n/* harmony export */ \"WorkbenchCompressibleAsyncDataTree\": () => (/* binding */ WorkbenchCompressibleAsyncDataTree)\n/* harmony export */ });\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_browser_ui_list_listPaging_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/list/listPaging.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js\");\n/* harmony import */ var _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/list/listWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../configuration/common/configurationRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../theme/common/styler.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../contextkey/common/contextkeys.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js\");\n/* harmony import */ var _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/browser/ui/tree/objectTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js\");\n/* harmony import */ var _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/browser/ui/tree/asyncDataTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js\");\n/* harmony import */ var _base_browser_ui_tree_dataTree_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/tree/dataTree.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js\");\n/* harmony import */ var _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _base_browser_ui_table_tableWidget_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/browser/ui/table/tableWidget.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst IListService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__.createDecorator)('listService');\r\nlet ListService = class ListService {\r\n constructor(_themeService) {\r\n this._themeService = _themeService;\r\n this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this.lists = [];\r\n this._lastFocusedWidget = undefined;\r\n this._hasCreatedStyleController = false;\r\n }\r\n get lastFocusedList() {\r\n return this._lastFocusedWidget;\r\n }\r\n register(widget, extraContextKeys) {\r\n if (!this._hasCreatedStyleController) {\r\n this._hasCreatedStyleController = true;\r\n // create a shared default tree style sheet for performance reasons\r\n const styleController = new _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.DefaultStyleController((0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__.createStyleSheet)(), '');\r\n this.disposables.add((0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(styleController, this._themeService));\r\n }\r\n if (this.lists.some(l => l.widget === widget)) {\r\n throw new Error('Cannot register the same widget multiple times');\r\n }\r\n // Keep in our lists list\r\n const registeredList = { widget, extraContextKeys };\r\n this.lists.push(registeredList);\r\n // Check for currently being focused\r\n if (widget.getHTMLElement() === document.activeElement) {\r\n this._lastFocusedWidget = widget;\r\n }\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.combinedDisposable)(widget.onDidFocus(() => this._lastFocusedWidget = widget), (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.toDisposable)(() => this.lists.splice(this.lists.indexOf(registeredList), 1)), widget.onDidDispose(() => {\r\n this.lists = this.lists.filter(l => l !== registeredList);\r\n if (this._lastFocusedWidget === widget) {\r\n this._lastFocusedWidget = undefined;\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this.disposables.dispose();\r\n }\r\n};\r\nListService = __decorate([\r\n __param(0, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService)\r\n], ListService);\r\n\r\nconst RawWorkbenchListFocusContextKey = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listFocus', true);\r\nconst WorkbenchListSupportsMultiSelectContextKey = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listSupportsMultiselect', true);\r\nconst WorkbenchListFocusContextKey = _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.ContextKeyExpr.and(RawWorkbenchListFocusContextKey, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.ContextKeyExpr.not(_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__.InputFocusedContextKey));\r\nconst WorkbenchListHasSelectionOrFocus = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listHasSelectionOrFocus', false);\r\nconst WorkbenchListDoubleSelection = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listDoubleSelection', false);\r\nconst WorkbenchListMultiSelection = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listMultiSelection', false);\r\nconst WorkbenchListSupportsKeyboardNavigation = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey('listSupportsKeyboardNavigation', true);\r\nconst WorkbenchListAutomaticKeyboardNavigationKey = 'listAutomaticKeyboardNavigation';\r\nconst WorkbenchListAutomaticKeyboardNavigation = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.RawContextKey(WorkbenchListAutomaticKeyboardNavigationKey, true);\r\nlet didBindWorkbenchListAutomaticKeyboardNavigation = false;\r\nfunction createScopedContextKeyService(contextKeyService, widget) {\r\n const result = contextKeyService.createScoped(widget.getHTMLElement());\r\n RawWorkbenchListFocusContextKey.bindTo(result);\r\n return result;\r\n}\r\nconst multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier';\r\nconst openModeSettingKey = 'workbench.list.openMode';\r\nconst horizontalScrollingKey = 'workbench.list.horizontalScrolling';\r\nconst keyboardNavigationSettingKey = 'workbench.list.keyboardNavigation';\r\nconst automaticKeyboardNavigationSettingKey = 'workbench.list.automaticKeyboardNavigation';\r\nconst treeIndentKey = 'workbench.tree.indent';\r\nconst treeRenderIndentGuidesKey = 'workbench.tree.renderIndentGuides';\r\nconst listSmoothScrolling = 'workbench.list.smoothScrolling';\r\nconst treeExpandMode = 'workbench.tree.expandMode';\r\nfunction useAltAsMultipleSelectionModifier(configurationService) {\r\n return configurationService.getValue(multiSelectModifierSettingKey) === 'alt';\r\n}\r\nclass MultipleSelectionController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(configurationService) {\r\n super();\r\n this.configurationService = configurationService;\r\n this.useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n this.registerListeners();\r\n }\r\n registerListeners() {\r\n this._register(this.configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\r\n this.useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(this.configurationService);\r\n }\r\n }));\r\n }\r\n isSelectionSingleChangeEvent(event) {\r\n if (this.useAltAsMultipleSelectionModifier) {\r\n return event.browserEvent.altKey;\r\n }\r\n return (0,_base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isSelectionSingleChangeEvent)(event);\r\n }\r\n isSelectionRangeChangeEvent(event) {\r\n return (0,_base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.isSelectionRangeChangeEvent)(event);\r\n }\r\n}\r\nfunction toWorkbenchListOptions(options, configurationService, keybindingService) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n const result = Object.assign({}, options);\r\n if (options.multipleSelectionSupport !== false && !options.multipleSelectionController) {\r\n const multipleSelectionController = new MultipleSelectionController(configurationService);\r\n result.multipleSelectionController = multipleSelectionController;\r\n disposables.add(multipleSelectionController);\r\n }\r\n result.keyboardNavigationDelegate = {\r\n mightProducePrintableCharacter(e) {\r\n return keybindingService.mightProducePrintableCharacter(e);\r\n }\r\n };\r\n result.smoothScrolling = configurationService.getValue(listSmoothScrolling);\r\n return [result, disposables];\r\n}\r\nlet WorkbenchList = class WorkbenchList extends _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__.List {\r\n constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService) {\r\n const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey);\r\n const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);\r\n super(user, container, delegate, renderers, Object.assign(Object.assign(Object.assign({ keyboardSupport: false }, (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.computeStyles)(themeService.getColorTheme(), _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.defaultListStyles)), workbenchListOptions), { horizontalScrolling }));\r\n this.disposables.add(workbenchListOptionsDisposable);\r\n this.contextKeyService = createScopedContextKeyService(contextKeyService, this);\r\n this.themeService = themeService;\r\n const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);\r\n listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false));\r\n this.listHasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);\r\n this.listDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService);\r\n this.listMultiSelection = WorkbenchListMultiSelection.bindTo(this.contextKeyService);\r\n this.horizontalScrolling = options.horizontalScrolling;\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n this.disposables.add(this.contextKeyService);\r\n this.disposables.add(listService.register(this));\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n this.disposables.add(this.onDidChangeSelection(() => {\r\n const selection = this.getSelection();\r\n const focus = this.getFocus();\r\n this.contextKeyService.bufferChangeEvents(() => {\r\n this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n this.listMultiSelection.set(selection.length > 1);\r\n this.listDoubleSelection.set(selection.length === 2);\r\n });\r\n }));\r\n this.disposables.add(this.onDidChangeFocus(() => {\r\n const selection = this.getSelection();\r\n const focus = this.getFocus();\r\n this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n }));\r\n this.disposables.add(configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n }\r\n let options = {};\r\n if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {\r\n const horizontalScrolling = configurationService.getValue(horizontalScrollingKey);\r\n options = Object.assign(Object.assign({}, options), { horizontalScrolling });\r\n }\r\n if (e.affectsConfiguration(listSmoothScrolling)) {\r\n const smoothScrolling = configurationService.getValue(listSmoothScrolling);\r\n options = Object.assign(Object.assign({}, options), { smoothScrolling });\r\n }\r\n if (Object.keys(options).length > 0) {\r\n this.updateOptions(options);\r\n }\r\n }));\r\n this.navigator = new ListResourceNavigator(this, Object.assign({ configurationService }, options));\r\n this.disposables.add(this.navigator);\r\n }\r\n updateOptions(options) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n }\r\n updateStyles(styles) {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._styler = (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this, this.themeService, styles);\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n super.dispose();\r\n }\r\n};\r\nWorkbenchList = __decorate([\r\n __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(6, IListService),\r\n __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService)\r\n], WorkbenchList);\r\n\r\nlet WorkbenchPagedList = class WorkbenchPagedList extends _base_browser_ui_list_listPaging_js__WEBPACK_IMPORTED_MODULE_1__.PagedList {\r\n constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService) {\r\n const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey);\r\n const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);\r\n super(user, container, delegate, renderers, Object.assign(Object.assign(Object.assign({ keyboardSupport: false }, (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.computeStyles)(themeService.getColorTheme(), _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.defaultListStyles)), workbenchListOptions), { horizontalScrolling }));\r\n this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this.disposables.add(workbenchListOptionsDisposable);\r\n this.contextKeyService = createScopedContextKeyService(contextKeyService, this);\r\n this.themeService = themeService;\r\n this.horizontalScrolling = options.horizontalScrolling;\r\n const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);\r\n listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false));\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n this.disposables.add(this.contextKeyService);\r\n this.disposables.add(listService.register(this));\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n if (options.overrideStyles) {\r\n this.disposables.add((0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this, themeService, options.overrideStyles));\r\n }\r\n this.disposables.add(configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n }\r\n let options = {};\r\n if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {\r\n const horizontalScrolling = configurationService.getValue(horizontalScrollingKey);\r\n options = Object.assign(Object.assign({}, options), { horizontalScrolling });\r\n }\r\n if (e.affectsConfiguration(listSmoothScrolling)) {\r\n const smoothScrolling = configurationService.getValue(listSmoothScrolling);\r\n options = Object.assign(Object.assign({}, options), { smoothScrolling });\r\n }\r\n if (Object.keys(options).length > 0) {\r\n this.updateOptions(options);\r\n }\r\n }));\r\n this.navigator = new ListResourceNavigator(this, Object.assign({ configurationService }, options));\r\n this.disposables.add(this.navigator);\r\n }\r\n updateOptions(options) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n }\r\n updateStyles(styles) {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._styler = (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this, this.themeService, styles);\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.disposables.dispose();\r\n super.dispose();\r\n }\r\n};\r\nWorkbenchPagedList = __decorate([\r\n __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(6, IListService),\r\n __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService)\r\n], WorkbenchPagedList);\r\n\r\nlet WorkbenchTable = class WorkbenchTable extends _base_browser_ui_table_tableWidget_js__WEBPACK_IMPORTED_MODULE_19__.Table {\r\n constructor(user, container, delegate, columns, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService) {\r\n const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey);\r\n const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService);\r\n super(user, container, delegate, columns, renderers, Object.assign(Object.assign(Object.assign({ keyboardSupport: false }, (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.computeStyles)(themeService.getColorTheme(), _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.defaultListStyles)), workbenchListOptions), { horizontalScrolling }));\r\n this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n this.disposables.add(workbenchListOptionsDisposable);\r\n this.contextKeyService = createScopedContextKeyService(contextKeyService, this);\r\n this.themeService = themeService;\r\n const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);\r\n listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false));\r\n this.listHasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);\r\n this.listDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService);\r\n this.listMultiSelection = WorkbenchListMultiSelection.bindTo(this.contextKeyService);\r\n this.horizontalScrolling = options.horizontalScrolling;\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n this.disposables.add(this.contextKeyService);\r\n this.disposables.add(listService.register(this));\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n this.disposables.add(this.onDidChangeSelection(() => {\r\n const selection = this.getSelection();\r\n const focus = this.getFocus();\r\n this.contextKeyService.bufferChangeEvents(() => {\r\n this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n this.listMultiSelection.set(selection.length > 1);\r\n this.listDoubleSelection.set(selection.length === 2);\r\n });\r\n }));\r\n this.disposables.add(this.onDidChangeFocus(() => {\r\n const selection = this.getSelection();\r\n const focus = this.getFocus();\r\n this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n }));\r\n this.disposables.add(configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n }\r\n let options = {};\r\n if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) {\r\n const horizontalScrolling = configurationService.getValue(horizontalScrollingKey);\r\n options = Object.assign(Object.assign({}, options), { horizontalScrolling });\r\n }\r\n if (e.affectsConfiguration(listSmoothScrolling)) {\r\n const smoothScrolling = configurationService.getValue(listSmoothScrolling);\r\n options = Object.assign(Object.assign({}, options), { smoothScrolling });\r\n }\r\n if (Object.keys(options).length > 0) {\r\n this.updateOptions(options);\r\n }\r\n }));\r\n this.navigator = new TableResourceNavigator(this, Object.assign({ configurationService }, options));\r\n this.disposables.add(this.navigator);\r\n }\r\n updateOptions(options) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.updateStyles(options.overrideStyles);\r\n }\r\n }\r\n updateStyles(styles) {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._styler = (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this, this.themeService, styles);\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this._styler) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.disposables.dispose();\r\n super.dispose();\r\n }\r\n};\r\nWorkbenchTable = __decorate([\r\n __param(6, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(7, IListService),\r\n __param(8, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(9, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(10, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService)\r\n], WorkbenchTable);\r\n\r\nclass ResourceNavigator extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable {\r\n constructor(widget, options) {\r\n var _a, _b;\r\n super();\r\n this.widget = widget;\r\n this._onDidOpen = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter());\r\n this.onDidOpen = this._onDidOpen.event;\r\n this.openOnFocus = (_a = options === null || options === void 0 ? void 0 : options.openOnFocus) !== null && _a !== void 0 ? _a : false;\r\n this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.filter(this.widget.onDidChangeSelection, e => e.browserEvent instanceof KeyboardEvent)(e => this.onSelectionFromKeyboard(e)));\r\n this._register(this.widget.onPointer((e) => this.onPointer(e.element, e.browserEvent)));\r\n this._register(this.widget.onMouseDblClick((e) => this.onMouseDblClick(e.element, e.browserEvent)));\r\n if (this.openOnFocus) {\r\n this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.filter(this.widget.onDidChangeFocus, e => e.browserEvent instanceof KeyboardEvent)(e => this.onFocusFromKeyboard(e)));\r\n }\r\n if (typeof (options === null || options === void 0 ? void 0 : options.openOnSingleClick) !== 'boolean' && (options === null || options === void 0 ? void 0 : options.configurationService)) {\r\n this.openOnSingleClick = (options === null || options === void 0 ? void 0 : options.configurationService.getValue(openModeSettingKey)) !== 'doubleClick';\r\n this._register(options === null || options === void 0 ? void 0 : options.configurationService.onDidChangeConfiguration(() => {\r\n this.openOnSingleClick = (options === null || options === void 0 ? void 0 : options.configurationService.getValue(openModeSettingKey)) !== 'doubleClick';\r\n }));\r\n }\r\n else {\r\n this.openOnSingleClick = (_b = options === null || options === void 0 ? void 0 : options.openOnSingleClick) !== null && _b !== void 0 ? _b : true;\r\n }\r\n }\r\n onFocusFromKeyboard(event) {\r\n const focus = this.widget.getFocus();\r\n this.widget.setSelection(focus, event.browserEvent);\r\n const selectionKeyboardEvent = event.browserEvent;\r\n const preserveFocus = typeof selectionKeyboardEvent.preserveFocus === 'boolean' ? selectionKeyboardEvent.preserveFocus : true;\r\n const pinned = typeof selectionKeyboardEvent.pinned === 'boolean' ? selectionKeyboardEvent.pinned : !preserveFocus;\r\n const sideBySide = false;\r\n this._open(this.getSelectedElement(), preserveFocus, pinned, sideBySide, event.browserEvent);\r\n }\r\n onSelectionFromKeyboard(event) {\r\n if (event.elements.length !== 1) {\r\n return;\r\n }\r\n const selectionKeyboardEvent = event.browserEvent;\r\n const preserveFocus = typeof selectionKeyboardEvent.preserveFocus === 'boolean' ? selectionKeyboardEvent.preserveFocus : true;\r\n const pinned = typeof selectionKeyboardEvent.pinned === 'boolean' ? selectionKeyboardEvent.pinned : !preserveFocus;\r\n const sideBySide = false;\r\n this._open(this.getSelectedElement(), preserveFocus, pinned, sideBySide, event.browserEvent);\r\n }\r\n onPointer(element, browserEvent) {\r\n if (!this.openOnSingleClick) {\r\n return;\r\n }\r\n const isDoubleClick = browserEvent.detail === 2;\r\n if (isDoubleClick) {\r\n return;\r\n }\r\n const isMiddleClick = browserEvent.button === 1;\r\n const preserveFocus = true;\r\n const pinned = isMiddleClick;\r\n const sideBySide = browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey;\r\n this._open(element, preserveFocus, pinned, sideBySide, browserEvent);\r\n }\r\n onMouseDblClick(element, browserEvent) {\r\n if (!browserEvent) {\r\n return;\r\n }\r\n const preserveFocus = false;\r\n const pinned = true;\r\n const sideBySide = (browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey);\r\n this._open(element, preserveFocus, pinned, sideBySide, browserEvent);\r\n }\r\n _open(element, preserveFocus, pinned, sideBySide, browserEvent) {\r\n if (!element) {\r\n return;\r\n }\r\n this._onDidOpen.fire({\r\n editorOptions: {\r\n preserveFocus,\r\n pinned,\r\n revealIfVisible: true\r\n },\r\n sideBySide,\r\n element,\r\n browserEvent\r\n });\r\n }\r\n}\r\nclass ListResourceNavigator extends ResourceNavigator {\r\n constructor(widget, options) {\r\n super(widget, options);\r\n this.widget = widget;\r\n }\r\n getSelectedElement() {\r\n return this.widget.getSelectedElements()[0];\r\n }\r\n}\r\nclass TableResourceNavigator extends ResourceNavigator {\r\n constructor(widget, options) {\r\n super(widget, options);\r\n this.widget = widget;\r\n }\r\n getSelectedElement() {\r\n return this.widget.getSelectedElements()[0];\r\n }\r\n}\r\nclass TreeResourceNavigator extends ResourceNavigator {\r\n constructor(widget, options) {\r\n super(widget, options);\r\n this.widget = widget;\r\n }\r\n getSelectedElement() {\r\n var _a;\r\n return (_a = this.widget.getSelection()[0]) !== null && _a !== void 0 ? _a : undefined;\r\n }\r\n}\r\nfunction createKeyboardNavigationEventFilter(container, keybindingService) {\r\n let inChord = false;\r\n return event => {\r\n if (inChord) {\r\n inChord = false;\r\n return false;\r\n }\r\n const result = keybindingService.softDispatch(event, container);\r\n if (result && result.enterChord) {\r\n inChord = true;\r\n return false;\r\n }\r\n inChord = false;\r\n return true;\r\n };\r\n}\r\nlet WorkbenchObjectTree = class WorkbenchObjectTree extends _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__.ObjectTree {\r\n constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) {\r\n const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService);\r\n super(user, container, delegate, renderers, treeOptions);\r\n this.disposables.add(disposable);\r\n this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);\r\n this.disposables.add(this.internals);\r\n }\r\n};\r\nWorkbenchObjectTree = __decorate([\r\n __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(6, IListService),\r\n __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService),\r\n __param(10, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchObjectTree);\r\n\r\nlet WorkbenchCompressibleObjectTree = class WorkbenchCompressibleObjectTree extends _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__.CompressibleObjectTree {\r\n constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) {\r\n const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService);\r\n super(user, container, delegate, renderers, treeOptions);\r\n this.disposables.add(disposable);\r\n this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);\r\n this.disposables.add(this.internals);\r\n }\r\n updateOptions(options = {}) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.internals.updateStyleOverrides(options.overrideStyles);\r\n }\r\n }\r\n};\r\nWorkbenchCompressibleObjectTree = __decorate([\r\n __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(6, IListService),\r\n __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService),\r\n __param(10, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchCompressibleObjectTree);\r\n\r\nlet WorkbenchDataTree = class WorkbenchDataTree extends _base_browser_ui_tree_dataTree_js__WEBPACK_IMPORTED_MODULE_17__.DataTree {\r\n constructor(user, container, delegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) {\r\n const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService);\r\n super(user, container, delegate, renderers, dataSource, treeOptions);\r\n this.disposables.add(disposable);\r\n this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);\r\n this.disposables.add(this.internals);\r\n }\r\n updateOptions(options = {}) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.internals.updateStyleOverrides(options.overrideStyles);\r\n }\r\n }\r\n};\r\nWorkbenchDataTree = __decorate([\r\n __param(6, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(7, IListService),\r\n __param(8, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(9, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(10, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService),\r\n __param(11, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchDataTree);\r\n\r\nlet WorkbenchAsyncDataTree = class WorkbenchAsyncDataTree extends _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__.AsyncDataTree {\r\n constructor(user, container, delegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) {\r\n const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService);\r\n super(user, container, delegate, renderers, dataSource, treeOptions);\r\n this.disposables.add(disposable);\r\n this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);\r\n this.disposables.add(this.internals);\r\n }\r\n get onDidOpen() { return this.internals.onDidOpen; }\r\n updateOptions(options = {}) {\r\n super.updateOptions(options);\r\n if (options.overrideStyles) {\r\n this.internals.updateStyleOverrides(options.overrideStyles);\r\n }\r\n }\r\n};\r\nWorkbenchAsyncDataTree = __decorate([\r\n __param(6, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(7, IListService),\r\n __param(8, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(9, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(10, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService),\r\n __param(11, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchAsyncDataTree);\r\n\r\nlet WorkbenchCompressibleAsyncDataTree = class WorkbenchCompressibleAsyncDataTree extends _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__.CompressibleAsyncDataTree {\r\n constructor(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) {\r\n const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService);\r\n super(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, treeOptions);\r\n this.disposables.add(disposable);\r\n this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService);\r\n this.disposables.add(this.internals);\r\n }\r\n};\r\nWorkbenchCompressibleAsyncDataTree = __decorate([\r\n __param(7, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(8, IListService),\r\n __param(9, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(10, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(11, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__.IKeybindingService),\r\n __param(12, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchCompressibleAsyncDataTree);\r\n\r\nfunction workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService) {\r\n var _a;\r\n WorkbenchListSupportsKeyboardNavigation.bindTo(contextKeyService);\r\n if (!didBindWorkbenchListAutomaticKeyboardNavigation) {\r\n WorkbenchListAutomaticKeyboardNavigation.bindTo(contextKeyService);\r\n didBindWorkbenchListAutomaticKeyboardNavigation = true;\r\n }\r\n const getAutomaticKeyboardNavigation = () => {\r\n // give priority to the context key value to disable this completely\r\n let automaticKeyboardNavigation = contextKeyService.getContextKeyValue(WorkbenchListAutomaticKeyboardNavigationKey);\r\n if (automaticKeyboardNavigation) {\r\n automaticKeyboardNavigation = configurationService.getValue(automaticKeyboardNavigationSettingKey);\r\n }\r\n return automaticKeyboardNavigation;\r\n };\r\n const accessibilityOn = accessibilityService.isScreenReaderOptimized();\r\n const keyboardNavigation = options.simpleKeyboardNavigation || accessibilityOn ? 'simple' : configurationService.getValue(keyboardNavigationSettingKey);\r\n const horizontalScrolling = options.horizontalScrolling !== undefined ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey);\r\n const [workbenchListOptions, disposable] = toWorkbenchListOptions(options, configurationService, keybindingService);\r\n const additionalScrollHeight = options.additionalScrollHeight;\r\n return {\r\n getAutomaticKeyboardNavigation,\r\n disposable,\r\n options: Object.assign(Object.assign({ \r\n // ...options, // TODO@Joao why is this not splatted here?\r\n keyboardSupport: false }, workbenchListOptions), { indent: configurationService.getValue(treeIndentKey), renderIndentGuides: configurationService.getValue(treeRenderIndentGuidesKey), smoothScrolling: configurationService.getValue(listSmoothScrolling), automaticKeyboardNavigation: getAutomaticKeyboardNavigation(), simpleKeyboardNavigation: keyboardNavigation === 'simple', filterOnType: keyboardNavigation === 'filter', horizontalScrolling, keyboardNavigationEventFilter: createKeyboardNavigationEventFilter(container, keybindingService), additionalScrollHeight, hideTwistiesOfChildlessElements: options.hideTwistiesOfChildlessElements, expandOnlyOnTwistieClick: (_a = options.expandOnlyOnTwistieClick) !== null && _a !== void 0 ? _a : (configurationService.getValue(treeExpandMode) === 'doubleClick') })\r\n };\r\n}\r\nlet WorkbenchTreeInternals = class WorkbenchTreeInternals {\r\n constructor(tree, options, getAutomaticKeyboardNavigation, overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService) {\r\n this.tree = tree;\r\n this.themeService = themeService;\r\n this.disposables = [];\r\n this.contextKeyService = createScopedContextKeyService(contextKeyService, tree);\r\n const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);\r\n listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false));\r\n this.hasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);\r\n this.hasDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService);\r\n this.hasMultiSelection = WorkbenchListMultiSelection.bindTo(this.contextKeyService);\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n const interestingContextKeys = new Set();\r\n interestingContextKeys.add(WorkbenchListAutomaticKeyboardNavigationKey);\r\n const updateKeyboardNavigation = () => {\r\n const accessibilityOn = accessibilityService.isScreenReaderOptimized();\r\n const keyboardNavigation = accessibilityOn ? 'simple' : configurationService.getValue(keyboardNavigationSettingKey);\r\n tree.updateOptions({\r\n simpleKeyboardNavigation: keyboardNavigation === 'simple',\r\n filterOnType: keyboardNavigation === 'filter'\r\n });\r\n };\r\n this.updateStyleOverrides(overrideStyles);\r\n this.disposables.push(this.contextKeyService, listService.register(tree), tree.onDidChangeSelection(() => {\r\n const selection = tree.getSelection();\r\n const focus = tree.getFocus();\r\n this.contextKeyService.bufferChangeEvents(() => {\r\n this.hasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n this.hasMultiSelection.set(selection.length > 1);\r\n this.hasDoubleSelection.set(selection.length === 2);\r\n });\r\n }), tree.onDidChangeFocus(() => {\r\n const selection = tree.getSelection();\r\n const focus = tree.getFocus();\r\n this.hasSelectionOrFocus.set(selection.length > 0 || focus.length > 0);\r\n }), configurationService.onDidChangeConfiguration(e => {\r\n let newOptions = {};\r\n if (e.affectsConfiguration(multiSelectModifierSettingKey)) {\r\n this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService);\r\n }\r\n if (e.affectsConfiguration(treeIndentKey)) {\r\n const indent = configurationService.getValue(treeIndentKey);\r\n newOptions = Object.assign(Object.assign({}, newOptions), { indent });\r\n }\r\n if (e.affectsConfiguration(treeRenderIndentGuidesKey)) {\r\n const renderIndentGuides = configurationService.getValue(treeRenderIndentGuidesKey);\r\n newOptions = Object.assign(Object.assign({}, newOptions), { renderIndentGuides });\r\n }\r\n if (e.affectsConfiguration(listSmoothScrolling)) {\r\n const smoothScrolling = configurationService.getValue(listSmoothScrolling);\r\n newOptions = Object.assign(Object.assign({}, newOptions), { smoothScrolling });\r\n }\r\n if (e.affectsConfiguration(keyboardNavigationSettingKey)) {\r\n updateKeyboardNavigation();\r\n }\r\n if (e.affectsConfiguration(automaticKeyboardNavigationSettingKey)) {\r\n newOptions = Object.assign(Object.assign({}, newOptions), { automaticKeyboardNavigation: getAutomaticKeyboardNavigation() });\r\n }\r\n if (e.affectsConfiguration(horizontalScrollingKey) && options.horizontalScrolling === undefined) {\r\n const horizontalScrolling = configurationService.getValue(horizontalScrollingKey);\r\n newOptions = Object.assign(Object.assign({}, newOptions), { horizontalScrolling });\r\n }\r\n if (e.affectsConfiguration(treeExpandMode) && options.expandOnlyOnTwistieClick === undefined) {\r\n newOptions = Object.assign(Object.assign({}, newOptions), { expandOnlyOnTwistieClick: configurationService.getValue(treeExpandMode) === 'doubleClick' });\r\n }\r\n if (Object.keys(newOptions).length > 0) {\r\n tree.updateOptions(newOptions);\r\n }\r\n }), this.contextKeyService.onDidChangeContext(e => {\r\n if (e.affectsSome(interestingContextKeys)) {\r\n tree.updateOptions({ automaticKeyboardNavigation: getAutomaticKeyboardNavigation() });\r\n }\r\n }), accessibilityService.onDidChangeScreenReaderOptimized(() => updateKeyboardNavigation()));\r\n this.navigator = new TreeResourceNavigator(tree, Object.assign({ configurationService }, options));\r\n this.disposables.push(this.navigator);\r\n }\r\n get onDidOpen() { return this.navigator.onDidOpen; }\r\n updateStyleOverrides(overrideStyles) {\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this.styler);\r\n this.styler = overrideStyles ? (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__.attachListStyler)(this.tree, this.themeService, overrideStyles) : _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.Disposable.None;\r\n }\r\n dispose() {\r\n this.disposables = (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this.disposables);\r\n (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.dispose)(this.styler);\r\n this.styler = undefined;\r\n }\r\n};\r\nWorkbenchTreeInternals = __decorate([\r\n __param(4, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__.IContextKeyService),\r\n __param(5, IListService),\r\n __param(6, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__.IThemeService),\r\n __param(7, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__.IConfigurationService),\r\n __param(8, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__.IAccessibilityService)\r\n], WorkbenchTreeInternals);\r\nconst configurationRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__.Registry.as(_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_7__.Extensions.Configuration);\r\nconfigurationRegistry.registerConfiguration({\r\n 'id': 'workbench',\r\n 'order': 7,\r\n 'title': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('workbenchConfigurationTitle', \"Workbench\"),\r\n 'type': 'object',\r\n 'properties': {\r\n [multiSelectModifierSettingKey]: {\r\n 'type': 'string',\r\n 'enum': ['ctrlCmd', 'alt'],\r\n 'enumDescriptions': [\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('multiSelectModifier.ctrlCmd', \"Maps to `Control` on Windows and Linux and to `Command` on macOS.\"),\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('multiSelectModifier.alt', \"Maps to `Alt` on Windows and Linux and to `Option` on macOS.\")\r\n ],\r\n 'default': 'ctrlCmd',\r\n 'description': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)({\r\n key: 'multiSelectModifier',\r\n comment: [\r\n '- `ctrlCmd` refers to a value the setting can take and should not be localized.',\r\n '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.'\r\n ]\r\n }, \"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.\")\r\n },\r\n [openModeSettingKey]: {\r\n 'type': 'string',\r\n 'enum': ['singleClick', 'doubleClick'],\r\n 'default': 'singleClick',\r\n 'description': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)({\r\n key: 'openModeModifier',\r\n comment: ['`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized.']\r\n }, \"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.\")\r\n },\r\n [horizontalScrollingKey]: {\r\n 'type': 'boolean',\r\n 'default': false,\r\n 'description': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('horizontalScrolling setting', \"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.\")\r\n },\r\n [treeIndentKey]: {\r\n 'type': 'number',\r\n 'default': 8,\r\n minimum: 0,\r\n maximum: 40,\r\n 'description': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('tree indent setting', \"Controls tree indentation in pixels.\")\r\n },\r\n [treeRenderIndentGuidesKey]: {\r\n type: 'string',\r\n enum: ['none', 'onHover', 'always'],\r\n default: 'onHover',\r\n description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('render tree indent guides', \"Controls whether the tree should render indent guides.\")\r\n },\r\n [listSmoothScrolling]: {\r\n type: 'boolean',\r\n default: false,\r\n description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('list smoothScrolling setting', \"Controls whether lists and trees have smooth scrolling.\"),\r\n },\r\n [keyboardNavigationSettingKey]: {\r\n 'type': 'string',\r\n 'enum': ['simple', 'highlight', 'filter'],\r\n 'enumDescriptions': [\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('keyboardNavigationSettingKey.simple', \"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes.\"),\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('keyboardNavigationSettingKey.highlight', \"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements.\"),\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('keyboardNavigationSettingKey.filter', \"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.\")\r\n ],\r\n 'default': 'highlight',\r\n 'description': (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('keyboardNavigationSettingKey', \"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.\")\r\n },\r\n [automaticKeyboardNavigationSettingKey]: {\r\n 'type': 'boolean',\r\n 'default': true,\r\n markdownDescription: (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('automatic keyboard navigation setting', \"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.\")\r\n },\r\n [treeExpandMode]: {\r\n type: 'string',\r\n enum: ['singleClick', 'doubleClick'],\r\n default: 'singleClick',\r\n description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_5__.localize)('expand mode', \"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.\"),\r\n }\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ILogService\": () => (/* binding */ ILogService),\n/* harmony export */ \"LogLevel\": () => (/* binding */ LogLevel),\n/* harmony export */ \"DEFAULT_LOG_LEVEL\": () => (/* binding */ DEFAULT_LOG_LEVEL),\n/* harmony export */ \"AbstractLogger\": () => (/* binding */ AbstractLogger),\n/* harmony export */ \"ConsoleLogger\": () => (/* binding */ ConsoleLogger),\n/* harmony export */ \"LogService\": () => (/* binding */ LogService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nconst ILogService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('logService');\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\r\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\r\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\r\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\r\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\r\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\r\n LogLevel[LogLevel[\"Off\"] = 6] = \"Off\";\r\n})(LogLevel || (LogLevel = {}));\r\nconst DEFAULT_LOG_LEVEL = LogLevel.Info;\r\nclass AbstractLogger extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor() {\r\n super(...arguments);\r\n this.level = DEFAULT_LOG_LEVEL;\r\n this._onDidChangeLogLevel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter());\r\n }\r\n setLevel(level) {\r\n if (this.level !== level) {\r\n this.level = level;\r\n this._onDidChangeLogLevel.fire(this.level);\r\n }\r\n }\r\n getLevel() {\r\n return this.level;\r\n }\r\n}\r\nclass ConsoleLogger extends AbstractLogger {\r\n constructor(logLevel = DEFAULT_LOG_LEVEL) {\r\n super();\r\n this.setLevel(logLevel);\r\n }\r\n trace(message, ...args) {\r\n if (this.getLevel() <= LogLevel.Trace) {\r\n console.log('%cTRACE', 'color: #888', message, ...args);\r\n }\r\n }\r\n debug(message, ...args) {\r\n if (this.getLevel() <= LogLevel.Debug) {\r\n console.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\r\n }\r\n }\r\n info(message, ...args) {\r\n if (this.getLevel() <= LogLevel.Info) {\r\n console.log('%c INFO', 'color: #33f', message, ...args);\r\n }\r\n }\r\n error(message, ...args) {\r\n if (this.getLevel() <= LogLevel.Error) {\r\n console.log('%c ERR', 'color: #f33', message, ...args);\r\n }\r\n }\r\n dispose() {\r\n // noop\r\n }\r\n}\r\nclass LogService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(logger) {\r\n super();\r\n this.logger = logger;\r\n this._register(logger);\r\n }\r\n getLevel() {\r\n return this.logger.getLevel();\r\n }\r\n trace(message, ...args) {\r\n this.logger.trace(message, ...args);\r\n }\r\n debug(message, ...args) {\r\n this.logger.debug(message, ...args);\r\n }\r\n info(message, ...args) {\r\n this.logger.info(message, ...args);\r\n }\r\n error(message, ...args) {\r\n this.logger.error(message, ...args);\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/log/common/log.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerService\": () => (/* binding */ MarkerService)\n/* harmony export */ });\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _markers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./markers.js */ \"./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/iterator.js */ \"./node_modules/monaco-editor/esm/vs/base/common/iterator.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass DoubleResourceMap {\r\n constructor() {\r\n this._byResource = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__.ResourceMap();\r\n this._byOwner = new Map();\r\n }\r\n set(resource, owner, value) {\r\n let ownerMap = this._byResource.get(resource);\r\n if (!ownerMap) {\r\n ownerMap = new Map();\r\n this._byResource.set(resource, ownerMap);\r\n }\r\n ownerMap.set(owner, value);\r\n let resourceMap = this._byOwner.get(owner);\r\n if (!resourceMap) {\r\n resourceMap = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__.ResourceMap();\r\n this._byOwner.set(owner, resourceMap);\r\n }\r\n resourceMap.set(resource, value);\r\n }\r\n get(resource, owner) {\r\n let ownerMap = this._byResource.get(resource);\r\n return ownerMap === null || ownerMap === void 0 ? void 0 : ownerMap.get(owner);\r\n }\r\n delete(resource, owner) {\r\n let removedA = false;\r\n let removedB = false;\r\n let ownerMap = this._byResource.get(resource);\r\n if (ownerMap) {\r\n removedA = ownerMap.delete(owner);\r\n }\r\n let resourceMap = this._byOwner.get(owner);\r\n if (resourceMap) {\r\n removedB = resourceMap.delete(resource);\r\n }\r\n if (removedA !== removedB) {\r\n throw new Error('illegal state');\r\n }\r\n return removedA && removedB;\r\n }\r\n values(key) {\r\n var _a, _b, _c, _d;\r\n if (typeof key === 'string') {\r\n return (_b = (_a = this._byOwner.get(key)) === null || _a === void 0 ? void 0 : _a.values()) !== null && _b !== void 0 ? _b : _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.empty();\r\n }\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.isUri(key)) {\r\n return (_d = (_c = this._byResource.get(key)) === null || _c === void 0 ? void 0 : _c.values()) !== null && _d !== void 0 ? _d : _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.empty();\r\n }\r\n return _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.map(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__.Iterable.concat(...this._byOwner.values()), map => map[1]);\r\n }\r\n}\r\nclass MarkerStats {\r\n constructor(service) {\r\n this.errors = 0;\r\n this.infos = 0;\r\n this.warnings = 0;\r\n this.unknowns = 0;\r\n this._data = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__.ResourceMap();\r\n this._service = service;\r\n this._subscription = service.onMarkerChanged(this._update, this);\r\n }\r\n dispose() {\r\n this._subscription.dispose();\r\n }\r\n _update(resources) {\r\n for (const resource of resources) {\r\n const oldStats = this._data.get(resource);\r\n if (oldStats) {\r\n this._substract(oldStats);\r\n }\r\n const newStats = this._resourceStats(resource);\r\n this._add(newStats);\r\n this._data.set(resource, newStats);\r\n }\r\n }\r\n _resourceStats(resource) {\r\n const result = { errors: 0, warnings: 0, infos: 0, unknowns: 0 };\r\n // TODO this is a hack\r\n if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.inMemory || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.walkThrough || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__.Schemas.walkThroughSnippet) {\r\n return result;\r\n }\r\n for (const { severity } of this._service.read({ resource })) {\r\n if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Error) {\r\n result.errors += 1;\r\n }\r\n else if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Warning) {\r\n result.warnings += 1;\r\n }\r\n else if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__.MarkerSeverity.Info) {\r\n result.infos += 1;\r\n }\r\n else {\r\n result.unknowns += 1;\r\n }\r\n }\r\n return result;\r\n }\r\n _substract(op) {\r\n this.errors -= op.errors;\r\n this.warnings -= op.warnings;\r\n this.infos -= op.infos;\r\n this.unknowns -= op.unknowns;\r\n }\r\n _add(op) {\r\n this.errors += op.errors;\r\n this.warnings += op.warnings;\r\n this.infos += op.infos;\r\n this.unknowns += op.unknowns;\r\n }\r\n}\r\nclass MarkerService {\r\n constructor() {\r\n this._onMarkerChanged = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n this.onMarkerChanged = _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Event.debounce(this._onMarkerChanged.event, MarkerService._debouncer, 0);\r\n this._data = new DoubleResourceMap();\r\n this._stats = new MarkerStats(this);\r\n }\r\n dispose() {\r\n this._stats.dispose();\r\n this._onMarkerChanged.dispose();\r\n }\r\n remove(owner, resources) {\r\n for (const resource of resources || []) {\r\n this.changeOne(owner, resource, []);\r\n }\r\n }\r\n changeOne(owner, resource, markerData) {\r\n if ((0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__.isFalsyOrEmpty)(markerData)) {\r\n // remove marker for this (owner,resource)-tuple\r\n const removed = this._data.delete(resource, owner);\r\n if (removed) {\r\n this._onMarkerChanged.fire([resource]);\r\n }\r\n }\r\n else {\r\n // insert marker for this (owner,resource)-tuple\r\n const markers = [];\r\n for (const data of markerData) {\r\n const marker = MarkerService._toMarker(owner, resource, data);\r\n if (marker) {\r\n markers.push(marker);\r\n }\r\n }\r\n this._data.set(resource, owner, markers);\r\n this._onMarkerChanged.fire([resource]);\r\n }\r\n }\r\n static _toMarker(owner, resource, data) {\r\n let { code, severity, message, source, startLineNumber, startColumn, endLineNumber, endColumn, relatedInformation, tags, } = data;\r\n if (!message) {\r\n return undefined;\r\n }\r\n // santize data\r\n startLineNumber = startLineNumber > 0 ? startLineNumber : 1;\r\n startColumn = startColumn > 0 ? startColumn : 1;\r\n endLineNumber = endLineNumber >= startLineNumber ? endLineNumber : startLineNumber;\r\n endColumn = endColumn > 0 ? endColumn : startColumn;\r\n return {\r\n resource,\r\n owner,\r\n code,\r\n severity,\r\n message,\r\n source,\r\n startLineNumber,\r\n startColumn,\r\n endLineNumber,\r\n endColumn,\r\n relatedInformation,\r\n tags,\r\n };\r\n }\r\n read(filter = Object.create(null)) {\r\n let { owner, resource, severities, take } = filter;\r\n if (!take || take < 0) {\r\n take = -1;\r\n }\r\n if (owner && resource) {\r\n // exactly one owner AND resource\r\n const data = this._data.get(resource, owner);\r\n if (!data) {\r\n return [];\r\n }\r\n else {\r\n const result = [];\r\n for (const marker of data) {\r\n if (MarkerService._accept(marker, severities)) {\r\n const newLen = result.push(marker);\r\n if (take > 0 && newLen === take) {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n }\r\n else if (!owner && !resource) {\r\n // all\r\n const result = [];\r\n for (let markers of this._data.values()) {\r\n for (let data of markers) {\r\n if (MarkerService._accept(data, severities)) {\r\n const newLen = result.push(data);\r\n if (take > 0 && newLen === take) {\r\n return result;\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n else {\r\n // of one resource OR owner\r\n const iterable = this._data.values(resource !== null && resource !== void 0 ? resource : owner);\r\n const result = [];\r\n for (const markers of iterable) {\r\n for (const data of markers) {\r\n if (MarkerService._accept(data, severities)) {\r\n const newLen = result.push(data);\r\n if (take > 0 && newLen === take) {\r\n return result;\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n }\r\n static _accept(marker, severities) {\r\n return severities === undefined || (severities & marker.severity) === marker.severity;\r\n }\r\n static _debouncer(last, event) {\r\n if (!last) {\r\n MarkerService._dedupeMap = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__.ResourceMap();\r\n last = [];\r\n }\r\n for (const uri of event) {\r\n if (!MarkerService._dedupeMap.has(uri)) {\r\n MarkerService._dedupeMap.set(uri, true);\r\n last.push(uri);\r\n }\r\n }\r\n return last;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MarkerSeverity\": () => (/* binding */ MarkerSeverity),\n/* harmony export */ \"IMarkerData\": () => (/* binding */ IMarkerData),\n/* harmony export */ \"IMarkerService\": () => (/* binding */ IMarkerService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nvar MarkerSeverity;\r\n(function (MarkerSeverity) {\r\n MarkerSeverity[MarkerSeverity[\"Hint\"] = 1] = \"Hint\";\r\n MarkerSeverity[MarkerSeverity[\"Info\"] = 2] = \"Info\";\r\n MarkerSeverity[MarkerSeverity[\"Warning\"] = 4] = \"Warning\";\r\n MarkerSeverity[MarkerSeverity[\"Error\"] = 8] = \"Error\";\r\n})(MarkerSeverity || (MarkerSeverity = {}));\r\n(function (MarkerSeverity) {\r\n function compare(a, b) {\r\n return b - a;\r\n }\r\n MarkerSeverity.compare = compare;\r\n const _displayStrings = Object.create(null);\r\n _displayStrings[MarkerSeverity.Error] = (0,_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize)('sev.error', \"Error\");\r\n _displayStrings[MarkerSeverity.Warning] = (0,_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize)('sev.warning', \"Warning\");\r\n _displayStrings[MarkerSeverity.Info] = (0,_nls_js__WEBPACK_IMPORTED_MODULE_1__.localize)('sev.info', \"Info\");\r\n function toString(a) {\r\n return _displayStrings[a] || '';\r\n }\r\n MarkerSeverity.toString = toString;\r\n function fromSeverity(severity) {\r\n switch (severity) {\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Error: return MarkerSeverity.Error;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Warning: return MarkerSeverity.Warning;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Info: return MarkerSeverity.Info;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Ignore: return MarkerSeverity.Hint;\r\n }\r\n }\r\n MarkerSeverity.fromSeverity = fromSeverity;\r\n function toSeverity(severity) {\r\n switch (severity) {\r\n case MarkerSeverity.Error: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Error;\r\n case MarkerSeverity.Warning: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Warning;\r\n case MarkerSeverity.Info: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Info;\r\n case MarkerSeverity.Hint: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__.default.Ignore;\r\n }\r\n }\r\n MarkerSeverity.toSeverity = toSeverity;\r\n})(MarkerSeverity || (MarkerSeverity = {}));\r\nvar IMarkerData;\r\n(function (IMarkerData) {\r\n const emptyString = '';\r\n function makeKey(markerData) {\r\n return makeKeyOptionalMessage(markerData, true);\r\n }\r\n IMarkerData.makeKey = makeKey;\r\n function makeKeyOptionalMessage(markerData, useMessage) {\r\n let result = [emptyString];\r\n if (markerData.source) {\r\n result.push(markerData.source.replace('¦', '\\\\¦'));\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.code) {\r\n if (typeof markerData.code === 'string') {\r\n result.push(markerData.code.replace('¦', '\\\\¦'));\r\n }\r\n else {\r\n result.push(markerData.code.value.replace('¦', '\\\\¦'));\r\n }\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.severity !== undefined && markerData.severity !== null) {\r\n result.push(MarkerSeverity.toString(markerData.severity));\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n // Modifed to not include the message as part of the marker key to work around\r\n // https://github.com/microsoft/vscode/issues/77475\r\n if (markerData.message && useMessage) {\r\n result.push(markerData.message.replace('¦', '\\\\¦'));\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.startLineNumber !== undefined && markerData.startLineNumber !== null) {\r\n result.push(markerData.startLineNumber.toString());\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.startColumn !== undefined && markerData.startColumn !== null) {\r\n result.push(markerData.startColumn.toString());\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.endLineNumber !== undefined && markerData.endLineNumber !== null) {\r\n result.push(markerData.endLineNumber.toString());\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n if (markerData.endColumn !== undefined && markerData.endColumn !== null) {\r\n result.push(markerData.endColumn.toString());\r\n }\r\n else {\r\n result.push(emptyString);\r\n }\r\n result.push(emptyString);\r\n return result.join('¦');\r\n }\r\n IMarkerData.makeKeyOptionalMessage = makeKeyOptionalMessage;\r\n})(IMarkerData || (IMarkerData = {}));\r\nconst IMarkerService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('markerService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Severity\": () => (/* binding */ Severity),\n/* harmony export */ \"INotificationService\": () => (/* binding */ INotificationService),\n/* harmony export */ \"NoOpNotification\": () => (/* binding */ NoOpNotification)\n/* harmony export */ });\n/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nvar Severity = _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__.default;\r\nconst INotificationService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.createDecorator)('notificationService');\r\nclass NoOpNotification {\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IOpenerService\": () => (/* binding */ IOpenerService),\n/* harmony export */ \"NullOpenerService\": () => (/* binding */ NullOpenerService),\n/* harmony export */ \"matchesScheme\": () => (/* binding */ matchesScheme)\n/* harmony export */ });\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ \"./node_modules/monaco-editor/esm/vs/base/common/strings.js\");\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\nconst IOpenerService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_3__.createDecorator)('openerService');\r\nconst NullOpenerService = Object.freeze({\r\n _serviceBrand: undefined,\r\n registerOpener() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable.None; },\r\n registerValidator() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable.None; },\r\n registerExternalUriResolver() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable.None; },\r\n setDefaultExternalOpener() { },\r\n registerExternalOpener() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__.Disposable.None; },\r\n open() {\r\n return __awaiter(this, void 0, void 0, function* () { return false; });\r\n },\r\n resolveExternalUri(uri) {\r\n return __awaiter(this, void 0, void 0, function* () { return { resolved: uri, dispose() { } }; });\r\n },\r\n});\r\nfunction matchesScheme(target, scheme) {\r\n if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__.URI.isUri(target)) {\r\n return (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.equalsIgnoreCase)(target.scheme, scheme);\r\n }\r\n else {\r\n return (0,_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__.startsWithIgnoreCase)(target, scheme + ':');\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Progress\": () => (/* binding */ Progress),\n/* harmony export */ \"IEditorProgressService\": () => (/* binding */ IEditorProgressService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nclass Progress {\r\n constructor(callback) {\r\n this.callback = callback;\r\n }\r\n report(item) {\r\n this._value = item;\r\n this.callback(this._value);\r\n }\r\n}\r\nProgress.None = Object.freeze({ report() { } });\r\nconst IEditorProgressService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('editorProgressService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AbstractCommandsQuickAccessProvider\": () => (/* binding */ AbstractCommandsQuickAccessProvider),\n/* harmony export */ \"CommandsHistory\": () => (/* binding */ CommandsHistory)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _pickerQuickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pickerQuickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/filters.js */ \"./node_modules/monaco-editor/esm/vs/base/common/filters.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/* harmony import */ var _storage_common_storage_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js\");\n/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ \"./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ \"./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js\");\n/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../commands/common/commands.js */ \"./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js\");\n/* harmony import */ var _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../telemetry/common/telemetry.js */ \"./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _base_common_errorMessage_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errorMessage.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends _pickerQuickAccess_js__WEBPACK_IMPORTED_MODULE_1__.PickerQuickAccessProvider {\r\n constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) {\r\n super(AbstractCommandsQuickAccessProvider.PREFIX, options);\r\n this.options = options;\r\n this.instantiationService = instantiationService;\r\n this.keybindingService = keybindingService;\r\n this.commandService = commandService;\r\n this.telemetryService = telemetryService;\r\n this.notificationService = notificationService;\r\n this.commandsHistory = this._register(this.instantiationService.createInstance(CommandsHistory));\r\n }\r\n getPicks(filter, disposables, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // Ask subclass for all command picks\r\n const allCommandPicks = yield this.getCommandPicks(disposables, token);\r\n if (token.isCancellationRequested) {\r\n return [];\r\n }\r\n // Filter\r\n const filteredCommandPicks = [];\r\n for (const commandPick of allCommandPicks) {\r\n const labelHighlights = (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__.withNullAsUndefined)(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label));\r\n const aliasHighlights = commandPick.commandAlias ? (0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__.withNullAsUndefined)(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias)) : undefined;\r\n // Add if matching in label or alias\r\n if (labelHighlights || aliasHighlights) {\r\n commandPick.highlights = {\r\n label: labelHighlights,\r\n detail: this.options.showAlias ? aliasHighlights : undefined\r\n };\r\n filteredCommandPicks.push(commandPick);\r\n }\r\n // Also add if we have a 100% command ID match\r\n else if (filter === commandPick.commandId) {\r\n filteredCommandPicks.push(commandPick);\r\n }\r\n }\r\n // Add description to commands that have duplicate labels\r\n const mapLabelToCommand = new Map();\r\n for (const commandPick of filteredCommandPicks) {\r\n const existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\r\n if (existingCommandForLabel) {\r\n commandPick.description = commandPick.commandId;\r\n existingCommandForLabel.description = existingCommandForLabel.commandId;\r\n }\r\n else {\r\n mapLabelToCommand.set(commandPick.label, commandPick);\r\n }\r\n }\r\n // Sort by MRU order and fallback to name otherwise\r\n filteredCommandPicks.sort((commandPickA, commandPickB) => {\r\n const commandACounter = this.commandsHistory.peek(commandPickA.commandId);\r\n const commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\r\n if (commandACounter && commandBCounter) {\r\n return commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\r\n }\r\n if (commandACounter) {\r\n return -1; // first command was used, so it wins over the non used one\r\n }\r\n if (commandBCounter) {\r\n return 1; // other command was used so it wins over the command\r\n }\r\n // both commands were never used, so we sort by name\r\n return commandPickA.label.localeCompare(commandPickB.label);\r\n });\r\n const commandPicks = [];\r\n let addSeparator = false;\r\n for (let i = 0; i < filteredCommandPicks.length; i++) {\r\n const commandPick = filteredCommandPicks[i];\r\n const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\r\n const ariaLabel = keybinding ?\r\n (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\r\n commandPick.label;\r\n // Separator: recently used\r\n if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\r\n commandPicks.push({ type: 'separator', label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('recentlyUsed', \"recently used\") });\r\n addSeparator = true;\r\n }\r\n // Separator: other commands\r\n if (i !== 0 && addSeparator && !this.commandsHistory.peek(commandPick.commandId)) {\r\n commandPicks.push({ type: 'separator', label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('morecCommands', \"other commands\") });\r\n addSeparator = false; // only once\r\n }\r\n // Command\r\n commandPicks.push(Object.assign(Object.assign({}, commandPick), { ariaLabel, detail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined, keybinding, accept: () => __awaiter(this, void 0, void 0, function* () {\r\n // Add to history\r\n this.commandsHistory.push(commandPick.commandId);\r\n // Telementry\r\n this.telemetryService.publicLog2('workbenchActionExecuted', {\r\n id: commandPick.commandId,\r\n from: 'quick open'\r\n });\r\n // Run\r\n try {\r\n yield this.commandService.executeCommand(commandPick.commandId);\r\n }\r\n catch (error) {\r\n if (!(0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__.isPromiseCanceledError)(error)) {\r\n this.notificationService.error((0,_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize)('canNotRun', \"Command '{0}' resulted in an error ({1})\", commandPick.label, (0,_base_common_errorMessage_js__WEBPACK_IMPORTED_MODULE_14__.toErrorMessage)(error)));\r\n }\r\n }\r\n }) }));\r\n }\r\n return commandPicks;\r\n });\r\n }\r\n};\r\nAbstractCommandsQuickAccessProvider.PREFIX = '>';\r\nAbstractCommandsQuickAccessProvider.WORD_FILTER = (0,_base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__.or)(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__.matchesPrefix, _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__.matchesWords, _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__.matchesContiguousSubString);\r\nAbstractCommandsQuickAccessProvider = __decorate([\r\n __param(1, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__.IInstantiationService),\r\n __param(2, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__.IKeybindingService),\r\n __param(3, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__.ICommandService),\r\n __param(4, _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__.ITelemetryService),\r\n __param(5, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__.INotificationService)\r\n], AbstractCommandsQuickAccessProvider);\r\n\r\nlet CommandsHistory = class CommandsHistory extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(storageService, configurationService) {\r\n super();\r\n this.storageService = storageService;\r\n this.configurationService = configurationService;\r\n this.configuredCommandsHistoryLength = 0;\r\n this.updateConfiguration();\r\n this.load();\r\n this.registerListeners();\r\n }\r\n registerListeners() {\r\n this._register(this.configurationService.onDidChangeConfiguration(() => this.updateConfiguration()));\r\n }\r\n updateConfiguration() {\r\n this.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\r\n if (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\r\n CommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\r\n CommandsHistory.saveState(this.storageService);\r\n }\r\n }\r\n load() {\r\n const raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, 0 /* GLOBAL */);\r\n let serializedCache;\r\n if (raw) {\r\n try {\r\n serializedCache = JSON.parse(raw);\r\n }\r\n catch (error) {\r\n // invalid data\r\n }\r\n }\r\n const cache = CommandsHistory.cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__.LRUCache(this.configuredCommandsHistoryLength, 1);\r\n if (serializedCache) {\r\n let entries;\r\n if (serializedCache.usesLRU) {\r\n entries = serializedCache.entries;\r\n }\r\n else {\r\n entries = serializedCache.entries.sort((a, b) => a.value - b.value);\r\n }\r\n entries.forEach(entry => cache.set(entry.key, entry.value));\r\n }\r\n CommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, 0 /* GLOBAL */, CommandsHistory.counter);\r\n }\r\n push(commandId) {\r\n if (!CommandsHistory.cache) {\r\n return;\r\n }\r\n CommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\r\n CommandsHistory.saveState(this.storageService);\r\n }\r\n peek(commandId) {\r\n var _a;\r\n return (_a = CommandsHistory.cache) === null || _a === void 0 ? void 0 : _a.peek(commandId);\r\n }\r\n static saveState(storageService) {\r\n if (!CommandsHistory.cache) {\r\n return;\r\n }\r\n const serializedCache = { usesLRU: true, entries: [] };\r\n CommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\r\n storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), 0 /* GLOBAL */, 0 /* USER */);\r\n storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n static getConfiguredCommandHistoryLength(configurationService) {\r\n var _a, _b;\r\n const config = configurationService.getValue();\r\n const configuredCommandHistoryLength = (_b = (_a = config.workbench) === null || _a === void 0 ? void 0 : _a.commandPalette) === null || _b === void 0 ? void 0 : _b.history;\r\n if (typeof configuredCommandHistoryLength === 'number') {\r\n return configuredCommandHistoryLength;\r\n }\r\n return CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\r\n }\r\n};\r\nCommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\r\nCommandsHistory.PREF_KEY_CACHE = 'commandPalette.mru.cache';\r\nCommandsHistory.PREF_KEY_COUNTER = 'commandPalette.mru.counter';\r\nCommandsHistory.counter = 1;\r\nCommandsHistory = __decorate([\r\n __param(0, _storage_common_storage_js__WEBPACK_IMPORTED_MODULE_6__.IStorageService),\r\n __param(1, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__.IConfigurationService)\r\n], CommandsHistory);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HelpQuickAccessProvider\": () => (/* binding */ HelpQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/* harmony import */ var _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\nlet HelpQuickAccessProvider = class HelpQuickAccessProvider {\r\n constructor(quickInputService) {\r\n this.quickInputService = quickInputService;\r\n this.registry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.Registry.as(_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__.Extensions.Quickaccess);\r\n }\r\n provide(picker) {\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__.DisposableStore();\r\n // Open a picker with the selected value if picked\r\n disposables.add(picker.onDidAccept(() => {\r\n const [item] = picker.selectedItems;\r\n if (item) {\r\n this.quickInputService.quickAccess.show(item.prefix, { preserveValue: true });\r\n }\r\n }));\r\n // Also open a picker when we detect the user typed the exact\r\n // name of a provider (e.g. `?term` for terminals)\r\n disposables.add(picker.onDidChangeValue(value => {\r\n const providerDescriptor = this.registry.getQuickAccessProvider(value.substr(HelpQuickAccessProvider.PREFIX.length));\r\n if (providerDescriptor && providerDescriptor.prefix && providerDescriptor.prefix !== HelpQuickAccessProvider.PREFIX) {\r\n this.quickInputService.quickAccess.show(providerDescriptor.prefix, { preserveValue: true });\r\n }\r\n }));\r\n // Fill in all providers separated by editor/global scope\r\n const { editorProviders, globalProviders } = this.getQuickAccessProviders();\r\n picker.items = editorProviders.length === 0 || globalProviders.length === 0 ?\r\n // Without groups\r\n [\r\n ...(editorProviders.length === 0 ? globalProviders : editorProviders)\r\n ] :\r\n // With groups\r\n [\r\n { label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('globalCommands', \"global commands\"), type: 'separator' },\r\n ...globalProviders,\r\n { label: (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('editorCommands', \"editor commands\"), type: 'separator' },\r\n ...editorProviders\r\n ];\r\n return disposables;\r\n }\r\n getQuickAccessProviders() {\r\n const globalProviders = [];\r\n const editorProviders = [];\r\n for (const provider of this.registry.getQuickAccessProviders().sort((providerA, providerB) => providerA.prefix.localeCompare(providerB.prefix))) {\r\n if (provider.prefix === HelpQuickAccessProvider.PREFIX) {\r\n continue; // exclude help which is already active\r\n }\r\n for (const helpEntry of provider.helpEntries) {\r\n const prefix = helpEntry.prefix || provider.prefix;\r\n const label = prefix || '\\u2026' /* ... */;\r\n (helpEntry.needsEditor ? editorProviders : globalProviders).push({\r\n prefix,\r\n label,\r\n ariaLabel: (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('helpPickAriaLabel', \"{0}, {1}\", label, helpEntry.description),\r\n description: helpEntry.description\r\n });\r\n }\r\n }\r\n return { editorProviders, globalProviders };\r\n }\r\n};\r\nHelpQuickAccessProvider.PREFIX = '?';\r\nHelpQuickAccessProvider = __decorate([\r\n __param(0, _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__.IQuickInputService)\r\n], HelpQuickAccessProvider);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TriggerAction\": () => (/* binding */ TriggerAction),\n/* harmony export */ \"PickerQuickAccessProvider\": () => (/* binding */ PickerQuickAccessProvider)\n/* harmony export */ });\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\nvar TriggerAction;\r\n(function (TriggerAction) {\r\n /**\r\n * Do nothing after the button was clicked.\r\n */\r\n TriggerAction[TriggerAction[\"NO_ACTION\"] = 0] = \"NO_ACTION\";\r\n /**\r\n * Close the picker.\r\n */\r\n TriggerAction[TriggerAction[\"CLOSE_PICKER\"] = 1] = \"CLOSE_PICKER\";\r\n /**\r\n * Update the results of the picker.\r\n */\r\n TriggerAction[TriggerAction[\"REFRESH_PICKER\"] = 2] = \"REFRESH_PICKER\";\r\n /**\r\n * Remove the item from the picker.\r\n */\r\n TriggerAction[TriggerAction[\"REMOVE_ITEM\"] = 3] = \"REMOVE_ITEM\";\r\n})(TriggerAction || (TriggerAction = {}));\r\nfunction isPicksWithActive(obj) {\r\n const candidate = obj;\r\n return Array.isArray(candidate.items);\r\n}\r\nfunction isFastAndSlowPicks(obj) {\r\n const candidate = obj;\r\n return !!candidate.picks && candidate.additionalPicks instanceof Promise;\r\n}\r\nclass PickerQuickAccessProvider extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(prefix, options) {\r\n super();\r\n this.prefix = prefix;\r\n this.options = options;\r\n }\r\n provide(picker, token) {\r\n var _a;\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n // Apply options if any\r\n picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground);\r\n // Disable filtering & sorting, we control the results\r\n picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false;\r\n // Set initial picks and update on type\r\n let picksCts = undefined;\r\n const picksDisposable = disposables.add(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.MutableDisposable());\r\n const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () {\r\n const picksDisposables = picksDisposable.value = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n // Cancel any previous ask for picks and busy\r\n picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true);\r\n picker.busy = false;\r\n // Create new cancellation source for this run\r\n picksCts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__.CancellationTokenSource(token);\r\n // Collect picks and support both long running and short or combined\r\n const picksToken = picksCts.token;\r\n const picksFilter = picker.value.substr(this.prefix.length).trim();\r\n const providedPicks = this.getPicks(picksFilter, picksDisposables, picksToken);\r\n const applyPicks = (picks, skipEmpty) => {\r\n var _a;\r\n let items;\r\n let activeItem = undefined;\r\n if (isPicksWithActive(picks)) {\r\n items = picks.items;\r\n activeItem = picks.active;\r\n }\r\n else {\r\n items = picks;\r\n }\r\n if (items.length === 0) {\r\n if (skipEmpty) {\r\n return false;\r\n }\r\n if (picksFilter.length > 0 && ((_a = this.options) === null || _a === void 0 ? void 0 : _a.noResultsPick)) {\r\n items = [this.options.noResultsPick];\r\n }\r\n }\r\n picker.items = items;\r\n if (activeItem) {\r\n picker.activeItems = [activeItem];\r\n }\r\n return true;\r\n };\r\n // No Picks\r\n if (providedPicks === null) {\r\n // Ignore\r\n }\r\n // Fast and Slow Picks\r\n else if (isFastAndSlowPicks(providedPicks)) {\r\n let fastPicksApplied = false;\r\n let slowPicksApplied = false;\r\n yield Promise.all([\r\n // Fast Picks: to reduce amount of flicker, we race against\r\n // the slow picks over 500ms and then set the fast picks.\r\n // If the slow picks are faster, we reduce the flicker by\r\n // only setting the items once.\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n yield (0,_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__.timeout)(PickerQuickAccessProvider.FAST_PICKS_RACE_DELAY);\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n if (!slowPicksApplied) {\r\n fastPicksApplied = applyPicks(providedPicks.picks, true /* skip over empty to reduce flicker */);\r\n }\r\n }))(),\r\n // Slow Picks: we await the slow picks and then set them at\r\n // once together with the fast picks, but only if we actually\r\n // have additional results.\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n picker.busy = true;\r\n try {\r\n const awaitedAdditionalPicks = yield providedPicks.additionalPicks;\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n let picks;\r\n let activePick = undefined;\r\n if (isPicksWithActive(providedPicks.picks)) {\r\n picks = providedPicks.picks.items;\r\n activePick = providedPicks.picks.active;\r\n }\r\n else {\r\n picks = providedPicks.picks;\r\n }\r\n let additionalPicks;\r\n let additionalActivePick = undefined;\r\n if (isPicksWithActive(awaitedAdditionalPicks)) {\r\n additionalPicks = awaitedAdditionalPicks.items;\r\n additionalActivePick = awaitedAdditionalPicks.active;\r\n }\r\n else {\r\n additionalPicks = awaitedAdditionalPicks;\r\n }\r\n if (additionalPicks.length > 0 || !fastPicksApplied) {\r\n // If we do not have any activePick or additionalActivePick\r\n // we try to preserve the currently active pick from the\r\n // fast results. This fixes an issue where the user might\r\n // have made a pick active before the additional results\r\n // kick in.\r\n // See https://github.com/microsoft/vscode/issues/102480\r\n let fallbackActivePick = undefined;\r\n if (!activePick && !additionalActivePick) {\r\n const fallbackActivePickCandidate = picker.activeItems[0];\r\n if (fallbackActivePickCandidate && picks.indexOf(fallbackActivePickCandidate) !== -1) {\r\n fallbackActivePick = fallbackActivePickCandidate;\r\n }\r\n }\r\n applyPicks({\r\n items: [...picks, ...additionalPicks],\r\n active: activePick || additionalActivePick || fallbackActivePick\r\n });\r\n }\r\n }\r\n finally {\r\n if (!picksToken.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n slowPicksApplied = true;\r\n }\r\n }))()\r\n ]);\r\n }\r\n // Fast Picks\r\n else if (!(providedPicks instanceof Promise)) {\r\n applyPicks(providedPicks);\r\n }\r\n // Slow Picks\r\n else {\r\n picker.busy = true;\r\n try {\r\n const awaitedPicks = yield providedPicks;\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n applyPicks(awaitedPicks);\r\n }\r\n finally {\r\n if (!picksToken.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n }\r\n }\r\n });\r\n disposables.add(picker.onDidChangeValue(() => updatePickerItems()));\r\n updatePickerItems();\r\n // Accept the pick on accept and hide picker\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (typeof (item === null || item === void 0 ? void 0 : item.accept) === 'function') {\r\n if (!event.inBackground) {\r\n picker.hide(); // hide picker unless we accept in background\r\n }\r\n item.accept(picker.keyMods, event);\r\n }\r\n }));\r\n // Trigger the pick with button index if button triggered\r\n disposables.add(picker.onDidTriggerItemButton(({ button, item }) => __awaiter(this, void 0, void 0, function* () {\r\n var _b, _c;\r\n if (typeof item.trigger === 'function') {\r\n const buttonIndex = (_c = (_b = item.buttons) === null || _b === void 0 ? void 0 : _b.indexOf(button)) !== null && _c !== void 0 ? _c : -1;\r\n if (buttonIndex >= 0) {\r\n const result = item.trigger(buttonIndex, picker.keyMods);\r\n const action = (typeof result === 'number') ? result : yield result;\r\n if (token.isCancellationRequested) {\r\n return;\r\n }\r\n switch (action) {\r\n case TriggerAction.NO_ACTION:\r\n break;\r\n case TriggerAction.CLOSE_PICKER:\r\n picker.hide();\r\n break;\r\n case TriggerAction.REFRESH_PICKER:\r\n updatePickerItems();\r\n break;\r\n case TriggerAction.REMOVE_ITEM:\r\n const index = picker.items.indexOf(item);\r\n if (index !== -1) {\r\n const items = picker.items.slice();\r\n items.splice(index, 1);\r\n picker.items = items;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n })));\r\n return disposables;\r\n }\r\n}\r\nPickerQuickAccessProvider.FAST_PICKS_RACE_DELAY = 200; // timeout before we accept fast results before slow results are present\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickAccessController\": () => (/* binding */ QuickAccessController)\n/* harmony export */ });\n/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/functional.js */ \"./node_modules/monaco-editor/esm/vs/base/common/functional.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet QuickAccessController = class QuickAccessController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(quickInputService, instantiationService) {\r\n super();\r\n this.quickInputService = quickInputService;\r\n this.instantiationService = instantiationService;\r\n this.registry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__.Registry.as(_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__.Extensions.Quickaccess);\r\n this.mapProviderToDescriptor = new Map();\r\n this.lastAcceptedPickerValues = new Map();\r\n this.visibleQuickAccess = undefined;\r\n }\r\n show(value = '', options) {\r\n var _a;\r\n // Find provider for the value to show\r\n const [provider, descriptor] = this.getOrInstantiateProvider(value);\r\n // Return early if quick access is already showing on that same prefix\r\n const visibleQuickAccess = this.visibleQuickAccess;\r\n const visibleDescriptor = visibleQuickAccess === null || visibleQuickAccess === void 0 ? void 0 : visibleQuickAccess.descriptor;\r\n if (visibleQuickAccess && descriptor && visibleDescriptor === descriptor) {\r\n // Apply value only if it is more specific than the prefix\r\n // from the provider and we are not instructed to preserve\r\n if (value !== descriptor.prefix && !(options === null || options === void 0 ? void 0 : options.preserveValue)) {\r\n visibleQuickAccess.picker.value = value;\r\n }\r\n // Always adjust selection\r\n this.adjustValueSelection(visibleQuickAccess.picker, descriptor, options);\r\n return;\r\n }\r\n // Rewrite the filter value based on certain rules unless disabled\r\n if (descriptor && !(options === null || options === void 0 ? void 0 : options.preserveValue)) {\r\n let newValue = undefined;\r\n // If we have a visible provider with a value, take it's filter value but\r\n // rewrite to new provider prefix in case they differ\r\n if (visibleQuickAccess && visibleDescriptor && visibleDescriptor !== descriptor) {\r\n const newValueCandidateWithoutPrefix = visibleQuickAccess.value.substr(visibleDescriptor.prefix.length);\r\n if (newValueCandidateWithoutPrefix) {\r\n newValue = `${descriptor.prefix}${newValueCandidateWithoutPrefix}`;\r\n }\r\n }\r\n // Otherwise, take a default value as instructed\r\n if (!newValue) {\r\n const defaultFilterValue = provider === null || provider === void 0 ? void 0 : provider.defaultFilterValue;\r\n if (defaultFilterValue === _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__.DefaultQuickAccessFilterValue.LAST) {\r\n newValue = this.lastAcceptedPickerValues.get(descriptor);\r\n }\r\n else if (typeof defaultFilterValue === 'string') {\r\n newValue = `${descriptor.prefix}${defaultFilterValue}`;\r\n }\r\n }\r\n if (typeof newValue === 'string') {\r\n value = newValue;\r\n }\r\n }\r\n // Create a picker for the provider to use with the initial value\r\n // and adjust the filtering to exclude the prefix from filtering\r\n const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.DisposableStore();\r\n const picker = disposables.add(this.quickInputService.createQuickPick());\r\n picker.value = value;\r\n this.adjustValueSelection(picker, descriptor, options);\r\n picker.placeholder = descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder;\r\n picker.quickNavigate = options === null || options === void 0 ? void 0 : options.quickNavigateConfiguration;\r\n picker.hideInput = !!picker.quickNavigate && !visibleQuickAccess; // only hide input if there was no picker opened already\r\n if (typeof (options === null || options === void 0 ? void 0 : options.itemActivation) === 'number' || (options === null || options === void 0 ? void 0 : options.quickNavigateConfiguration)) {\r\n picker.itemActivation = (_a = options === null || options === void 0 ? void 0 : options.itemActivation) !== null && _a !== void 0 ? _a : _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__.ItemActivation.SECOND /* quick nav is always second */;\r\n }\r\n picker.contextKey = descriptor === null || descriptor === void 0 ? void 0 : descriptor.contextKey;\r\n picker.filterValue = (value) => value.substring(descriptor ? descriptor.prefix.length : 0);\r\n if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder) {\r\n picker.ariaLabel = descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder;\r\n }\r\n // Register listeners\r\n const cancellationToken = this.registerPickerListeners(picker, provider, descriptor, value, disposables);\r\n // Ask provider to fill the picker as needed if we have one\r\n if (provider) {\r\n disposables.add(provider.provide(picker, cancellationToken));\r\n }\r\n // Finally, show the picker. This is important because a provider\r\n // may not call this and then our disposables would leak that rely\r\n // on the onDidHide event.\r\n picker.show();\r\n }\r\n adjustValueSelection(picker, descriptor, options) {\r\n var _a;\r\n let valueSelection;\r\n // Preserve: just always put the cursor at the end\r\n if (options === null || options === void 0 ? void 0 : options.preserveValue) {\r\n valueSelection = [picker.value.length, picker.value.length];\r\n }\r\n // Otherwise: select the value up until the prefix\r\n else {\r\n valueSelection = [(_a = descriptor === null || descriptor === void 0 ? void 0 : descriptor.prefix.length) !== null && _a !== void 0 ? _a : 0, picker.value.length];\r\n }\r\n picker.valueSelection = valueSelection;\r\n }\r\n registerPickerListeners(picker, provider, descriptor, value, disposables) {\r\n // Remember as last visible picker and clean up once picker get's disposed\r\n const visibleQuickAccess = this.visibleQuickAccess = { picker, descriptor, value };\r\n disposables.add((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n if (visibleQuickAccess === this.visibleQuickAccess) {\r\n this.visibleQuickAccess = undefined;\r\n }\r\n }));\r\n // Whenever the value changes, check if the provider has\r\n // changed and if so - re-create the picker from the beginning\r\n disposables.add(picker.onDidChangeValue(value => {\r\n const [providerForValue] = this.getOrInstantiateProvider(value);\r\n if (providerForValue !== provider) {\r\n this.show(value, { preserveValue: true } /* do not rewrite value from user typing! */);\r\n }\r\n else {\r\n visibleQuickAccess.value = value; // remember the value in our visible one\r\n }\r\n }));\r\n // Remember picker input for future use when accepting\r\n if (descriptor) {\r\n disposables.add(picker.onDidAccept(() => {\r\n this.lastAcceptedPickerValues.set(descriptor, picker.value);\r\n }));\r\n }\r\n // Create a cancellation token source that is valid as long as the\r\n // picker has not been closed without picking an item\r\n const cts = disposables.add(new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__.CancellationTokenSource());\r\n (0,_base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__.once)(picker.onDidHide)(() => {\r\n if (picker.selectedItems.length === 0) {\r\n cts.cancel();\r\n }\r\n // Start to dispose once picker hides\r\n disposables.dispose();\r\n });\r\n return cts.token;\r\n }\r\n getOrInstantiateProvider(value) {\r\n const providerDescriptor = this.registry.getQuickAccessProvider(value);\r\n if (!providerDescriptor) {\r\n return [undefined, undefined];\r\n }\r\n let provider = this.mapProviderToDescriptor.get(providerDescriptor);\r\n if (!provider) {\r\n provider = this.instantiationService.createInstance(providerDescriptor.ctor);\r\n this.mapProviderToDescriptor.set(providerDescriptor, provider);\r\n }\r\n return [provider, providerDescriptor];\r\n }\r\n};\r\nQuickAccessController = __decorate([\r\n __param(0, _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__.IQuickInputService),\r\n __param(1, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__.IInstantiationService)\r\n], QuickAccessController);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QuickInputService\": () => (/* binding */ QuickInputService)\n/* harmony export */ });\n/* harmony import */ var _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/browser/layoutService.js */ \"./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js\");\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ \"./node_modules/monaco-editor/esm/vs/base/common/cancellation.js\");\n/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/common/styler.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js\");\n/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ \"./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js\");\n/* harmony import */ var _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../accessibility/common/accessibility.js */ \"./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js\");\n/* harmony import */ var _base_parts_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/parts/quickinput/browser/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js\");\n/* harmony import */ var _list_browser_listService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../list/browser/listService.js */ \"./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js\");\n/* harmony import */ var _quickAccess_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./quickAccess.js */ \"./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet QuickInputService = class QuickInputService extends _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__.Themable {\r\n constructor(instantiationService, contextKeyService, themeService, accessibilityService, layoutService) {\r\n super(themeService);\r\n this.instantiationService = instantiationService;\r\n this.contextKeyService = contextKeyService;\r\n this.accessibilityService = accessibilityService;\r\n this.layoutService = layoutService;\r\n this.contexts = new Map();\r\n }\r\n get controller() {\r\n if (!this._controller) {\r\n this._controller = this._register(this.createController());\r\n }\r\n return this._controller;\r\n }\r\n get quickAccess() {\r\n if (!this._quickAccess) {\r\n this._quickAccess = this._register(this.instantiationService.createInstance(_quickAccess_js__WEBPACK_IMPORTED_MODULE_10__.QuickAccessController));\r\n }\r\n return this._quickAccess;\r\n }\r\n createController(host = this.layoutService, options) {\r\n var _a, _b;\r\n const defaultOptions = {\r\n idPrefix: 'quickInput_',\r\n container: host.container,\r\n ignoreFocusOut: () => false,\r\n isScreenReaderOptimized: () => this.accessibilityService.isScreenReaderOptimized(),\r\n backKeybindingLabel: () => undefined,\r\n setContextKey: (id) => this.setContextKey(id),\r\n returnFocus: () => host.focus(),\r\n createList: (user, container, delegate, renderers, options) => this.instantiationService.createInstance(_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_9__.WorkbenchList, user, container, delegate, renderers, options),\r\n styles: this.computeStyles()\r\n };\r\n const controller = this._register(new _base_parts_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_8__.QuickInputController(Object.assign(Object.assign({}, defaultOptions), options)));\r\n controller.layout(host.dimension, (_b = (_a = host.offset) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0);\r\n // Layout changes\r\n this._register(host.onDidLayout(dimension => { var _a, _b; return controller.layout(dimension, (_b = (_a = host.offset) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0); }));\r\n // Context keys\r\n this._register(controller.onShow(() => this.resetContextKeys()));\r\n this._register(controller.onHide(() => this.resetContextKeys()));\r\n return controller;\r\n }\r\n setContextKey(id) {\r\n let key;\r\n if (id) {\r\n key = this.contexts.get(id);\r\n if (!key) {\r\n key = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.RawContextKey(id, false)\r\n .bindTo(this.contextKeyService);\r\n this.contexts.set(id, key);\r\n }\r\n }\r\n if (key && key.get()) {\r\n return; // already active context\r\n }\r\n this.resetContextKeys();\r\n if (key) {\r\n key.set(true);\r\n }\r\n }\r\n resetContextKeys() {\r\n this.contexts.forEach(context => {\r\n if (context.get()) {\r\n context.reset();\r\n }\r\n });\r\n }\r\n pick(picks, options = {}, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__.CancellationToken.None) {\r\n return this.controller.pick(picks, options, token);\r\n }\r\n createQuickPick() {\r\n return this.controller.createQuickPick();\r\n }\r\n updateStyles() {\r\n this.controller.applyStyles(this.computeStyles());\r\n }\r\n computeStyles() {\r\n return {\r\n widget: Object.assign({}, (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n quickInputBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.quickInputBackground,\r\n quickInputForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.quickInputForeground,\r\n quickInputTitleBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.quickInputTitleBackground,\r\n contrastBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.contrastBorder,\r\n widgetShadow: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.widgetShadow\r\n })),\r\n inputBox: (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n inputForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputForeground,\r\n inputBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputBackground,\r\n inputBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputBorder,\r\n inputValidationInfoBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationInfoBackground,\r\n inputValidationInfoForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationInfoForeground,\r\n inputValidationInfoBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationInfoBorder,\r\n inputValidationWarningBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationWarningBackground,\r\n inputValidationWarningForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationWarningForeground,\r\n inputValidationWarningBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationWarningBorder,\r\n inputValidationErrorBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationErrorBackground,\r\n inputValidationErrorForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationErrorForeground,\r\n inputValidationErrorBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.inputValidationErrorBorder\r\n }),\r\n countBadge: (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n badgeBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.badgeBackground,\r\n badgeForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.badgeForeground,\r\n badgeBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.contrastBorder\r\n }),\r\n button: (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n buttonForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.buttonForeground,\r\n buttonBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.buttonBackground,\r\n buttonHoverBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.buttonHoverBackground,\r\n buttonBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.contrastBorder\r\n }),\r\n progressBar: (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n progressBarBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.progressBarBackground\r\n }),\r\n list: (0,_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__.computeStyles)(this.theme, {\r\n listBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.quickInputBackground,\r\n // Look like focused when inactive.\r\n listInactiveFocusForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.listFocusForeground,\r\n listInactiveFocusBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.quickInputListFocusBackground,\r\n listFocusOutline: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.activeContrastBorder,\r\n listInactiveFocusOutline: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.activeContrastBorder,\r\n pickerGroupBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.pickerGroupBorder,\r\n pickerGroupForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__.pickerGroupForeground\r\n })\r\n };\r\n }\r\n};\r\nQuickInputService = __decorate([\r\n __param(0, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__.IInstantiationService),\r\n __param(1, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__.IContextKeyService),\r\n __param(2, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__.IThemeService),\r\n __param(3, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_7__.IAccessibilityService),\r\n __param(4, _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_0__.ILayoutService)\r\n], QuickInputService);\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DefaultQuickAccessFilterValue\": () => (/* binding */ DefaultQuickAccessFilterValue),\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"QuickAccessRegistry\": () => (/* binding */ QuickAccessRegistry)\n/* harmony export */ });\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ \"./node_modules/monaco-editor/esm/vs/base/common/arrays.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\nvar DefaultQuickAccessFilterValue;\r\n(function (DefaultQuickAccessFilterValue) {\r\n /**\r\n * Keep the value as it is given to quick access.\r\n */\r\n DefaultQuickAccessFilterValue[DefaultQuickAccessFilterValue[\"PRESERVE\"] = 0] = \"PRESERVE\";\r\n /**\r\n * Use the value that was used last time something was accepted from the picker.\r\n */\r\n DefaultQuickAccessFilterValue[DefaultQuickAccessFilterValue[\"LAST\"] = 1] = \"LAST\";\r\n})(DefaultQuickAccessFilterValue || (DefaultQuickAccessFilterValue = {}));\r\nconst Extensions = {\r\n Quickaccess: 'workbench.contributions.quickaccess'\r\n};\r\nclass QuickAccessRegistry {\r\n constructor() {\r\n this.providers = [];\r\n this.defaultProvider = undefined;\r\n }\r\n registerQuickAccessProvider(provider) {\r\n // Extract the default provider when no prefix is present\r\n if (provider.prefix.length === 0) {\r\n this.defaultProvider = provider;\r\n }\r\n else {\r\n this.providers.push(provider);\r\n }\r\n // sort the providers by decreasing prefix length, such that longer\r\n // prefixes take priority: 'ext' vs 'ext install' - the latter should win\r\n this.providers.sort((providerA, providerB) => providerB.prefix.length - providerA.prefix.length);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.toDisposable)(() => {\r\n this.providers.splice(this.providers.indexOf(provider), 1);\r\n if (this.defaultProvider === provider) {\r\n this.defaultProvider = undefined;\r\n }\r\n });\r\n }\r\n getQuickAccessProviders() {\r\n return (0,_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__.coalesce)([this.defaultProvider, ...this.providers]);\r\n }\r\n getQuickAccessProvider(prefix) {\r\n const result = prefix ? (this.providers.find(provider => prefix.startsWith(provider.prefix)) || undefined) : undefined;\r\n return result || this.defaultProvider;\r\n }\r\n}\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.add(Extensions.Quickaccess, new QuickAccessRegistry());\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ItemActivation\": () => (/* reexport safe */ _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.ItemActivation),\n/* harmony export */ \"NO_KEY_MODS\": () => (/* reexport safe */ _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__.NO_KEY_MODS),\n/* harmony export */ \"IQuickInputService\": () => (/* binding */ IQuickInputService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/parts/quickinput/common/quickInput.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js\");\n\r\n\r\nconst IQuickInputService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('quickInputService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Registry\": () => (/* binding */ Registry)\n/* harmony export */ });\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/assert.js */ \"./node_modules/monaco-editor/esm/vs/base/common/assert.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nclass RegistryImpl {\r\n constructor() {\r\n this.data = new Map();\r\n }\r\n add(id, data) {\r\n _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__.ok(_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isString(id));\r\n _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__.ok(_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__.isObject(data));\r\n _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__.ok(!this.data.has(id), 'There is already an extension with this id');\r\n this.data.set(id, data);\r\n }\r\n as(id) {\r\n return this.data.get(id) || null;\r\n }\r\n}\r\nconst Registry = new RegistryImpl();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SeverityIcon\": () => (/* binding */ SeverityIcon)\n/* harmony export */ });\n/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/common/colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nvar SeverityIcon;\r\n(function (SeverityIcon) {\r\n function className(severity) {\r\n switch (severity) {\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__.default.Ignore:\r\n return 'severity-ignore ' + _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.info.classNames;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__.default.Info:\r\n return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.info.classNames;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__.default.Warning:\r\n return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.warning.classNames;\r\n case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__.default.Error:\r\n return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.error.classNames;\r\n default:\r\n return '';\r\n }\r\n }\r\n SeverityIcon.className = className;\r\n})(SeverityIcon || (SeverityIcon = {}));\r\n(0,_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__.registerThemingParticipant)((theme, collector) => {\r\n const errorIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.problemsErrorIconForeground);\r\n if (errorIconForeground) {\r\n const errorCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.error.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${errorCodiconSelector},\n\t\t\t.markers-panel .marker-icon${errorCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${errorCodiconSelector} {\n\t\t\t\tcolor: ${errorIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n const warningIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.problemsWarningIconForeground);\r\n if (warningIconForeground) {\r\n const warningCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.warning.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${warningCodiconSelector},\n\t\t\t.markers-panel .marker-icon${warningCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${warningCodiconSelector},\n\t\t\t.extension-editor ${warningCodiconSelector} {\n\t\t\t\tcolor: ${warningIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n const infoIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__.problemsInfoIconForeground);\r\n if (infoIconForeground) {\r\n const infoCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__.Codicon.info.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${infoCodiconSelector},\n\t\t\t.markers-panel .marker-icon${infoCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${infoCodiconSelector},\n\t\t\t.extension-editor ${infoCodiconSelector} {\n\t\t\t\tcolor: ${infoIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n});\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IStorageService\": () => (/* binding */ IStorageService),\n/* harmony export */ \"WillSaveStateReason\": () => (/* binding */ WillSaveStateReason),\n/* harmony export */ \"AbstractStorageService\": () => (/* binding */ AbstractStorageService),\n/* harmony export */ \"InMemoryStorageService\": () => (/* binding */ InMemoryStorageService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/types.js */ \"./node_modules/monaco-editor/esm/vs/base/common/types.js\");\n/* harmony import */ var _base_parts_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/parts/storage/common/storage.js */ \"./node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\nconst TARGET_KEY = '__$__targetStorageMarker';\r\nconst IStorageService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('storageService');\r\nvar WillSaveStateReason;\r\n(function (WillSaveStateReason) {\r\n /**\r\n * No specific reason to save state.\r\n */\r\n WillSaveStateReason[WillSaveStateReason[\"NONE\"] = 0] = \"NONE\";\r\n /**\r\n * A hint that the workbench is about to shutdown.\r\n */\r\n WillSaveStateReason[WillSaveStateReason[\"SHUTDOWN\"] = 1] = \"SHUTDOWN\";\r\n})(WillSaveStateReason || (WillSaveStateReason = {}));\r\nclass AbstractStorageService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__.Disposable {\r\n constructor(options = { flushInterval: AbstractStorageService.DEFAULT_FLUSH_INTERVAL }) {\r\n super();\r\n this.options = options;\r\n this._onDidChangeValue = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.PauseableEmitter());\r\n this._onDidChangeTarget = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.PauseableEmitter());\r\n this._onWillSaveState = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__.Emitter());\r\n this.onWillSaveState = this._onWillSaveState.event;\r\n this._workspaceKeyTargets = undefined;\r\n this._globalKeyTargets = undefined;\r\n }\r\n emitDidChangeValue(scope, key) {\r\n // Specially handle `TARGET_KEY`\r\n if (key === TARGET_KEY) {\r\n // Clear our cached version which is now out of date\r\n if (scope === 0 /* GLOBAL */) {\r\n this._globalKeyTargets = undefined;\r\n }\r\n else if (scope === 1 /* WORKSPACE */) {\r\n this._workspaceKeyTargets = undefined;\r\n }\r\n // Emit as `didChangeTarget` event\r\n this._onDidChangeTarget.fire({ scope });\r\n }\r\n // Emit any other key to outside\r\n else {\r\n this._onDidChangeValue.fire({ scope, key, target: this.getKeyTargets(scope)[key] });\r\n }\r\n }\r\n get(key, scope, fallbackValue) {\r\n var _a;\r\n return (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.get(key, fallbackValue);\r\n }\r\n getBoolean(key, scope, fallbackValue) {\r\n var _a;\r\n return (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.getBoolean(key, fallbackValue);\r\n }\r\n getNumber(key, scope, fallbackValue) {\r\n var _a;\r\n return (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.getNumber(key, fallbackValue);\r\n }\r\n store(key, value, scope, target) {\r\n // We remove the key for undefined/null values\r\n if ((0,_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__.isUndefinedOrNull)(value)) {\r\n this.remove(key, scope);\r\n return;\r\n }\r\n // Update our datastructures but send events only after\r\n this.withPausedEmitters(() => {\r\n var _a;\r\n // Update key-target map\r\n this.updateKeyTarget(key, scope, target);\r\n // Store actual value\r\n (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.set(key, value);\r\n });\r\n }\r\n remove(key, scope) {\r\n // Update our datastructures but send events only after\r\n this.withPausedEmitters(() => {\r\n var _a;\r\n // Update key-target map\r\n this.updateKeyTarget(key, scope, undefined);\r\n // Remove actual key\r\n (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.delete(key);\r\n });\r\n }\r\n withPausedEmitters(fn) {\r\n // Pause emitters\r\n this._onDidChangeValue.pause();\r\n this._onDidChangeTarget.pause();\r\n try {\r\n fn();\r\n }\r\n finally {\r\n // Resume emitters\r\n this._onDidChangeValue.resume();\r\n this._onDidChangeTarget.resume();\r\n }\r\n }\r\n updateKeyTarget(key, scope, target) {\r\n var _a, _b;\r\n // Add\r\n const keyTargets = this.getKeyTargets(scope);\r\n if (typeof target === 'number') {\r\n if (keyTargets[key] !== target) {\r\n keyTargets[key] = target;\r\n (_a = this.getStorage(scope)) === null || _a === void 0 ? void 0 : _a.set(TARGET_KEY, JSON.stringify(keyTargets));\r\n }\r\n }\r\n // Remove\r\n else {\r\n if (typeof keyTargets[key] === 'number') {\r\n delete keyTargets[key];\r\n (_b = this.getStorage(scope)) === null || _b === void 0 ? void 0 : _b.set(TARGET_KEY, JSON.stringify(keyTargets));\r\n }\r\n }\r\n }\r\n get workspaceKeyTargets() {\r\n if (!this._workspaceKeyTargets) {\r\n this._workspaceKeyTargets = this.loadKeyTargets(1 /* WORKSPACE */);\r\n }\r\n return this._workspaceKeyTargets;\r\n }\r\n get globalKeyTargets() {\r\n if (!this._globalKeyTargets) {\r\n this._globalKeyTargets = this.loadKeyTargets(0 /* GLOBAL */);\r\n }\r\n return this._globalKeyTargets;\r\n }\r\n getKeyTargets(scope) {\r\n return scope === 0 /* GLOBAL */ ? this.globalKeyTargets : this.workspaceKeyTargets;\r\n }\r\n loadKeyTargets(scope) {\r\n const keysRaw = this.get(TARGET_KEY, scope);\r\n if (keysRaw) {\r\n try {\r\n return JSON.parse(keysRaw);\r\n }\r\n catch (error) {\r\n // Fail gracefully\r\n }\r\n }\r\n return Object.create(null);\r\n }\r\n}\r\nAbstractStorageService.DEFAULT_FLUSH_INTERVAL = 60 * 1000; // every minute\r\nclass InMemoryStorageService extends AbstractStorageService {\r\n constructor() {\r\n super();\r\n this.globalStorage = new _base_parts_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.Storage(new _base_parts_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.InMemoryStorageDatabase());\r\n this.workspaceStorage = new _base_parts_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.Storage(new _base_parts_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__.InMemoryStorageDatabase());\r\n this._register(this.workspaceStorage.onDidChangeStorage(key => this.emitDidChangeValue(1 /* WORKSPACE */, key)));\r\n this._register(this.globalStorage.onDidChangeStorage(key => this.emitDidChangeValue(0 /* GLOBAL */, key)));\r\n }\r\n getStorage(scope) {\r\n return scope === 0 /* GLOBAL */ ? this.globalStorage : this.workspaceStorage;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ITelemetryService\": () => (/* binding */ ITelemetryService)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst ITelemetryService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('telemetryService');\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getIconsStyleSheet\": () => (/* binding */ getIconsStyleSheet)\n/* harmony export */ });\n/* harmony import */ var _common_themeService_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/iconRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js\");\n/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ \"./node_modules/monaco-editor/esm/vs/base/browser/dom.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nfunction getIconsStyleSheet() {\r\n const onDidChangeEmmiter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n const iconRegistry = (0,_common_iconRegistry_js__WEBPACK_IMPORTED_MODULE_1__.getIconRegistry)();\r\n iconRegistry.onDidChange(() => onDidChangeEmmiter.fire());\r\n return {\r\n onDidChange: onDidChangeEmmiter.event,\r\n getCSS() {\r\n const usedFontIds = {};\r\n const formatIconRule = (contribution) => {\r\n let definition = contribution.defaults;\r\n while (_common_themeService_js__WEBPACK_IMPORTED_MODULE_0__.ThemeIcon.isThemeIcon(definition)) {\r\n const c = iconRegistry.getIcon(definition.id);\r\n if (!c) {\r\n return undefined;\r\n }\r\n definition = c.defaults;\r\n }\r\n const fontId = definition.fontId;\r\n if (fontId) {\r\n const fontContribution = iconRegistry.getIconFont(fontId);\r\n if (fontContribution) {\r\n usedFontIds[fontId] = fontContribution;\r\n return `.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; font-family: ${(0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.asCSSPropertyValue)(fontId)}; }`;\r\n }\r\n }\r\n return `.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; }`;\r\n };\r\n const rules = [];\r\n for (let contribution of iconRegistry.getIcons()) {\r\n const rule = formatIconRule(contribution);\r\n if (rule) {\r\n rules.push(rule);\r\n }\r\n }\r\n for (let id in usedFontIds) {\r\n const fontContribution = usedFontIds[id];\r\n const src = fontContribution.definition.src.map(l => `${(0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.asCSSUrl)(l.location)} format('${l.format}')`).join(', ');\r\n rules.push(`@font-face { src: ${src}; font-family: ${(0,_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__.asCSSPropertyValue)(id)}; }`);\r\n }\r\n return rules.join('\\n');\r\n }\r\n };\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"registerColor\": () => (/* binding */ registerColor),\n/* harmony export */ \"foreground\": () => (/* binding */ foreground),\n/* harmony export */ \"errorForeground\": () => (/* binding */ errorForeground),\n/* harmony export */ \"iconForeground\": () => (/* binding */ iconForeground),\n/* harmony export */ \"focusBorder\": () => (/* binding */ focusBorder),\n/* harmony export */ \"contrastBorder\": () => (/* binding */ contrastBorder),\n/* harmony export */ \"activeContrastBorder\": () => (/* binding */ activeContrastBorder),\n/* harmony export */ \"textLinkForeground\": () => (/* binding */ textLinkForeground),\n/* harmony export */ \"textCodeBlockBackground\": () => (/* binding */ textCodeBlockBackground),\n/* harmony export */ \"widgetShadow\": () => (/* binding */ widgetShadow),\n/* harmony export */ \"inputBackground\": () => (/* binding */ inputBackground),\n/* harmony export */ \"inputForeground\": () => (/* binding */ inputForeground),\n/* harmony export */ \"inputBorder\": () => (/* binding */ inputBorder),\n/* harmony export */ \"inputActiveOptionBorder\": () => (/* binding */ inputActiveOptionBorder),\n/* harmony export */ \"inputActiveOptionBackground\": () => (/* binding */ inputActiveOptionBackground),\n/* harmony export */ \"inputActiveOptionForeground\": () => (/* binding */ inputActiveOptionForeground),\n/* harmony export */ \"inputValidationInfoBackground\": () => (/* binding */ inputValidationInfoBackground),\n/* harmony export */ \"inputValidationInfoForeground\": () => (/* binding */ inputValidationInfoForeground),\n/* harmony export */ \"inputValidationInfoBorder\": () => (/* binding */ inputValidationInfoBorder),\n/* harmony export */ \"inputValidationWarningBackground\": () => (/* binding */ inputValidationWarningBackground),\n/* harmony export */ \"inputValidationWarningForeground\": () => (/* binding */ inputValidationWarningForeground),\n/* harmony export */ \"inputValidationWarningBorder\": () => (/* binding */ inputValidationWarningBorder),\n/* harmony export */ \"inputValidationErrorBackground\": () => (/* binding */ inputValidationErrorBackground),\n/* harmony export */ \"inputValidationErrorForeground\": () => (/* binding */ inputValidationErrorForeground),\n/* harmony export */ \"inputValidationErrorBorder\": () => (/* binding */ inputValidationErrorBorder),\n/* harmony export */ \"selectBackground\": () => (/* binding */ selectBackground),\n/* harmony export */ \"selectForeground\": () => (/* binding */ selectForeground),\n/* harmony export */ \"buttonForeground\": () => (/* binding */ buttonForeground),\n/* harmony export */ \"buttonBackground\": () => (/* binding */ buttonBackground),\n/* harmony export */ \"buttonHoverBackground\": () => (/* binding */ buttonHoverBackground),\n/* harmony export */ \"badgeBackground\": () => (/* binding */ badgeBackground),\n/* harmony export */ \"badgeForeground\": () => (/* binding */ badgeForeground),\n/* harmony export */ \"scrollbarShadow\": () => (/* binding */ scrollbarShadow),\n/* harmony export */ \"scrollbarSliderBackground\": () => (/* binding */ scrollbarSliderBackground),\n/* harmony export */ \"scrollbarSliderHoverBackground\": () => (/* binding */ scrollbarSliderHoverBackground),\n/* harmony export */ \"scrollbarSliderActiveBackground\": () => (/* binding */ scrollbarSliderActiveBackground),\n/* harmony export */ \"progressBarBackground\": () => (/* binding */ progressBarBackground),\n/* harmony export */ \"editorErrorBackground\": () => (/* binding */ editorErrorBackground),\n/* harmony export */ \"editorErrorForeground\": () => (/* binding */ editorErrorForeground),\n/* harmony export */ \"editorErrorBorder\": () => (/* binding */ editorErrorBorder),\n/* harmony export */ \"editorWarningBackground\": () => (/* binding */ editorWarningBackground),\n/* harmony export */ \"editorWarningForeground\": () => (/* binding */ editorWarningForeground),\n/* harmony export */ \"editorWarningBorder\": () => (/* binding */ editorWarningBorder),\n/* harmony export */ \"editorInfoBackground\": () => (/* binding */ editorInfoBackground),\n/* harmony export */ \"editorInfoForeground\": () => (/* binding */ editorInfoForeground),\n/* harmony export */ \"editorInfoBorder\": () => (/* binding */ editorInfoBorder),\n/* harmony export */ \"editorHintForeground\": () => (/* binding */ editorHintForeground),\n/* harmony export */ \"editorHintBorder\": () => (/* binding */ editorHintBorder),\n/* harmony export */ \"editorBackground\": () => (/* binding */ editorBackground),\n/* harmony export */ \"editorForeground\": () => (/* binding */ editorForeground),\n/* harmony export */ \"editorWidgetBackground\": () => (/* binding */ editorWidgetBackground),\n/* harmony export */ \"editorWidgetForeground\": () => (/* binding */ editorWidgetForeground),\n/* harmony export */ \"editorWidgetBorder\": () => (/* binding */ editorWidgetBorder),\n/* harmony export */ \"editorWidgetResizeBorder\": () => (/* binding */ editorWidgetResizeBorder),\n/* harmony export */ \"quickInputBackground\": () => (/* binding */ quickInputBackground),\n/* harmony export */ \"quickInputForeground\": () => (/* binding */ quickInputForeground),\n/* harmony export */ \"quickInputTitleBackground\": () => (/* binding */ quickInputTitleBackground),\n/* harmony export */ \"quickInputListFocusBackground\": () => (/* binding */ quickInputListFocusBackground),\n/* harmony export */ \"pickerGroupForeground\": () => (/* binding */ pickerGroupForeground),\n/* harmony export */ \"pickerGroupBorder\": () => (/* binding */ pickerGroupBorder),\n/* harmony export */ \"editorSelectionBackground\": () => (/* binding */ editorSelectionBackground),\n/* harmony export */ \"editorSelectionForeground\": () => (/* binding */ editorSelectionForeground),\n/* harmony export */ \"editorInactiveSelection\": () => (/* binding */ editorInactiveSelection),\n/* harmony export */ \"editorSelectionHighlight\": () => (/* binding */ editorSelectionHighlight),\n/* harmony export */ \"editorSelectionHighlightBorder\": () => (/* binding */ editorSelectionHighlightBorder),\n/* harmony export */ \"editorFindMatch\": () => (/* binding */ editorFindMatch),\n/* harmony export */ \"editorFindMatchHighlight\": () => (/* binding */ editorFindMatchHighlight),\n/* harmony export */ \"editorFindRangeHighlight\": () => (/* binding */ editorFindRangeHighlight),\n/* harmony export */ \"editorFindMatchBorder\": () => (/* binding */ editorFindMatchBorder),\n/* harmony export */ \"editorFindMatchHighlightBorder\": () => (/* binding */ editorFindMatchHighlightBorder),\n/* harmony export */ \"editorFindRangeHighlightBorder\": () => (/* binding */ editorFindRangeHighlightBorder),\n/* harmony export */ \"editorHoverHighlight\": () => (/* binding */ editorHoverHighlight),\n/* harmony export */ \"editorHoverBackground\": () => (/* binding */ editorHoverBackground),\n/* harmony export */ \"editorHoverForeground\": () => (/* binding */ editorHoverForeground),\n/* harmony export */ \"editorHoverBorder\": () => (/* binding */ editorHoverBorder),\n/* harmony export */ \"editorHoverStatusBarBackground\": () => (/* binding */ editorHoverStatusBarBackground),\n/* harmony export */ \"editorActiveLinkForeground\": () => (/* binding */ editorActiveLinkForeground),\n/* harmony export */ \"editorInlineHintForeground\": () => (/* binding */ editorInlineHintForeground),\n/* harmony export */ \"editorInlineHintBackground\": () => (/* binding */ editorInlineHintBackground),\n/* harmony export */ \"editorLightBulbForeground\": () => (/* binding */ editorLightBulbForeground),\n/* harmony export */ \"editorLightBulbAutoFixForeground\": () => (/* binding */ editorLightBulbAutoFixForeground),\n/* harmony export */ \"defaultInsertColor\": () => (/* binding */ defaultInsertColor),\n/* harmony export */ \"defaultRemoveColor\": () => (/* binding */ defaultRemoveColor),\n/* harmony export */ \"diffInserted\": () => (/* binding */ diffInserted),\n/* harmony export */ \"diffRemoved\": () => (/* binding */ diffRemoved),\n/* harmony export */ \"diffInsertedOutline\": () => (/* binding */ diffInsertedOutline),\n/* harmony export */ \"diffRemovedOutline\": () => (/* binding */ diffRemovedOutline),\n/* harmony export */ \"diffBorder\": () => (/* binding */ diffBorder),\n/* harmony export */ \"diffDiagonalFill\": () => (/* binding */ diffDiagonalFill),\n/* harmony export */ \"listFocusBackground\": () => (/* binding */ listFocusBackground),\n/* harmony export */ \"listFocusForeground\": () => (/* binding */ listFocusForeground),\n/* harmony export */ \"listFocusOutline\": () => (/* binding */ listFocusOutline),\n/* harmony export */ \"listActiveSelectionBackground\": () => (/* binding */ listActiveSelectionBackground),\n/* harmony export */ \"listActiveSelectionForeground\": () => (/* binding */ listActiveSelectionForeground),\n/* harmony export */ \"listInactiveSelectionBackground\": () => (/* binding */ listInactiveSelectionBackground),\n/* harmony export */ \"listInactiveSelectionForeground\": () => (/* binding */ listInactiveSelectionForeground),\n/* harmony export */ \"listInactiveFocusBackground\": () => (/* binding */ listInactiveFocusBackground),\n/* harmony export */ \"listInactiveFocusOutline\": () => (/* binding */ listInactiveFocusOutline),\n/* harmony export */ \"listHoverBackground\": () => (/* binding */ listHoverBackground),\n/* harmony export */ \"listHoverForeground\": () => (/* binding */ listHoverForeground),\n/* harmony export */ \"listDropBackground\": () => (/* binding */ listDropBackground),\n/* harmony export */ \"listHighlightForeground\": () => (/* binding */ listHighlightForeground),\n/* harmony export */ \"listFilterWidgetBackground\": () => (/* binding */ listFilterWidgetBackground),\n/* harmony export */ \"listFilterWidgetOutline\": () => (/* binding */ listFilterWidgetOutline),\n/* harmony export */ \"listFilterWidgetNoMatchesOutline\": () => (/* binding */ listFilterWidgetNoMatchesOutline),\n/* harmony export */ \"treeIndentGuidesStroke\": () => (/* binding */ treeIndentGuidesStroke),\n/* harmony export */ \"tableColumnsBorder\": () => (/* binding */ tableColumnsBorder),\n/* harmony export */ \"menuBorder\": () => (/* binding */ menuBorder),\n/* harmony export */ \"menuForeground\": () => (/* binding */ menuForeground),\n/* harmony export */ \"menuBackground\": () => (/* binding */ menuBackground),\n/* harmony export */ \"menuSelectionForeground\": () => (/* binding */ menuSelectionForeground),\n/* harmony export */ \"menuSelectionBackground\": () => (/* binding */ menuSelectionBackground),\n/* harmony export */ \"menuSelectionBorder\": () => (/* binding */ menuSelectionBorder),\n/* harmony export */ \"menuSeparatorBackground\": () => (/* binding */ menuSeparatorBackground),\n/* harmony export */ \"snippetTabstopHighlightBackground\": () => (/* binding */ snippetTabstopHighlightBackground),\n/* harmony export */ \"snippetTabstopHighlightBorder\": () => (/* binding */ snippetTabstopHighlightBorder),\n/* harmony export */ \"snippetFinalTabstopHighlightBackground\": () => (/* binding */ snippetFinalTabstopHighlightBackground),\n/* harmony export */ \"snippetFinalTabstopHighlightBorder\": () => (/* binding */ snippetFinalTabstopHighlightBorder),\n/* harmony export */ \"overviewRulerFindMatchForeground\": () => (/* binding */ overviewRulerFindMatchForeground),\n/* harmony export */ \"overviewRulerSelectionHighlightForeground\": () => (/* binding */ overviewRulerSelectionHighlightForeground),\n/* harmony export */ \"minimapFindMatch\": () => (/* binding */ minimapFindMatch),\n/* harmony export */ \"minimapSelection\": () => (/* binding */ minimapSelection),\n/* harmony export */ \"minimapError\": () => (/* binding */ minimapError),\n/* harmony export */ \"minimapWarning\": () => (/* binding */ minimapWarning),\n/* harmony export */ \"minimapBackground\": () => (/* binding */ minimapBackground),\n/* harmony export */ \"minimapSliderBackground\": () => (/* binding */ minimapSliderBackground),\n/* harmony export */ \"minimapSliderHoverBackground\": () => (/* binding */ minimapSliderHoverBackground),\n/* harmony export */ \"minimapSliderActiveBackground\": () => (/* binding */ minimapSliderActiveBackground),\n/* harmony export */ \"problemsErrorIconForeground\": () => (/* binding */ problemsErrorIconForeground),\n/* harmony export */ \"problemsWarningIconForeground\": () => (/* binding */ problemsWarningIconForeground),\n/* harmony export */ \"problemsInfoIconForeground\": () => (/* binding */ problemsInfoIconForeground),\n/* harmony export */ \"darken\": () => (/* binding */ darken),\n/* harmony export */ \"lighten\": () => (/* binding */ lighten),\n/* harmony export */ \"transparent\": () => (/* binding */ transparent),\n/* harmony export */ \"oneOf\": () => (/* binding */ oneOf),\n/* harmony export */ \"resolveColorValue\": () => (/* binding */ resolveColorValue),\n/* harmony export */ \"workbenchColorsSchemaId\": () => (/* binding */ workbenchColorsSchemaId)\n/* harmony export */ });\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ \"./node_modules/monaco-editor/esm/vs/base/common/color.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../jsonschemas/common/jsonContributionRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n// color registry\r\nconst Extensions = {\r\n ColorContribution: 'base.contributions.colors'\r\n};\r\nclass ColorRegistry {\r\n constructor() {\r\n this._onDidChangeSchema = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this.onDidChangeSchema = this._onDidChangeSchema.event;\r\n this.colorSchema = { type: 'object', properties: {} };\r\n this.colorReferenceSchema = { type: 'string', enum: [], enumDescriptions: [] };\r\n this.colorsById = {};\r\n }\r\n registerColor(id, defaults, description, needsTransparency = false, deprecationMessage) {\r\n let colorContribution = { id, description, defaults, needsTransparency, deprecationMessage };\r\n this.colorsById[id] = colorContribution;\r\n let propertySchema = { type: 'string', description, format: 'color-hex', defaultSnippets: [{ body: '${1:#ff0000}' }] };\r\n if (deprecationMessage) {\r\n propertySchema.deprecationMessage = deprecationMessage;\r\n }\r\n this.colorSchema.properties[id] = propertySchema;\r\n this.colorReferenceSchema.enum.push(id);\r\n this.colorReferenceSchema.enumDescriptions.push(description);\r\n this._onDidChangeSchema.fire();\r\n return id;\r\n }\r\n resolveDefaultColor(id, theme) {\r\n const colorDesc = this.colorsById[id];\r\n if (colorDesc && colorDesc.defaults) {\r\n const colorValue = colorDesc.defaults[theme.type];\r\n return resolveColorValue(colorValue, theme);\r\n }\r\n return undefined;\r\n }\r\n getColorSchema() {\r\n return this.colorSchema;\r\n }\r\n toString() {\r\n let sorter = (a, b) => {\r\n let cat1 = a.indexOf('.') === -1 ? 0 : 1;\r\n let cat2 = b.indexOf('.') === -1 ? 0 : 1;\r\n if (cat1 !== cat2) {\r\n return cat1 - cat2;\r\n }\r\n return a.localeCompare(b);\r\n };\r\n return Object.keys(this.colorsById).sort(sorter).map(k => `- \\`${k}\\`: ${this.colorsById[k].description}`).join('\\n');\r\n }\r\n}\r\nconst colorRegistry = new ColorRegistry();\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.add(Extensions.ColorContribution, colorRegistry);\r\nfunction registerColor(id, defaults, description, needsTransparency, deprecationMessage) {\r\n return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage);\r\n}\r\n// ----- base colors\r\nconst foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('foreground', \"Overall foreground color. This color is only used if not overridden by a component.\"));\r\nconst errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('errorForeground', \"Overall foreground color for error messages. This color is only used if not overridden by a component.\"));\r\nconst iconForeground = registerColor('icon.foreground', { dark: '#C5C5C5', light: '#424242', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('iconForeground', \"The default color for icons in the workbench.\"));\r\nconst focusBorder = registerColor('focusBorder', { dark: '#007FD4', light: '#0090F1', hc: '#F38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('focusBorder', \"Overall border color for focused elements. This color is only used if not overridden by a component.\"));\r\nconst contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('contrastBorder', \"An extra border around elements to separate them from others for greater contrast.\"));\r\nconst activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('activeContrastBorder', \"An extra border around active elements to separate them from others for greater contrast.\"));\r\nconst textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('textLinkForeground', \"Foreground color for links in text.\"));\r\nconst textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('textCodeBlockBackground', \"Background color for code blocks in text.\"));\r\n// ----- widgets\r\nconst widgetShadow = registerColor('widget.shadow', { dark: transparent(_base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black, .36), light: transparent(_base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black, .16), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.'));\r\nconst inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputBoxBackground', \"Input box background.\"));\r\nconst inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputBoxForeground', \"Input box foreground.\"));\r\nconst inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputBoxBorder', \"Input box border.\"));\r\nconst inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC00', light: '#007ACC00', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputBoxActiveOptionBorder', \"Border color of activated options in input fields.\"));\r\nconst inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.4), light: transparent(focusBorder, 0.2), hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.transparent }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputOption.activeBackground', \"Background color of activated options in input fields.\"));\r\nconst inputActiveOptionForeground = registerColor('inputOption.activeForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputOption.activeForeground', \"Foreground color of activated options in input fields.\"));\r\nconst inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationInfoBackground', \"Input validation background color for information severity.\"));\r\nconst inputValidationInfoForeground = registerColor('inputValidation.infoForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationInfoForeground', \"Input validation foreground color for information severity.\"));\r\nconst inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationInfoBorder', \"Input validation border color for information severity.\"));\r\nconst inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationWarningBackground', \"Input validation background color for warning severity.\"));\r\nconst inputValidationWarningForeground = registerColor('inputValidation.warningForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationWarningForeground', \"Input validation foreground color for warning severity.\"));\r\nconst inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationWarningBorder', \"Input validation border color for warning severity.\"));\r\nconst inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationErrorBackground', \"Input validation background color for error severity.\"));\r\nconst inputValidationErrorForeground = registerColor('inputValidation.errorForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationErrorForeground', \"Input validation foreground color for error severity.\"));\r\nconst inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('inputValidationErrorBorder', \"Input validation border color for error severity.\"));\r\nconst selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('dropdownBackground', \"Dropdown background.\"));\r\nconst selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('dropdownForeground', \"Dropdown foreground.\"));\r\nconst buttonForeground = registerColor('button.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('buttonForeground', \"Button foreground color.\"));\r\nconst buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('buttonBackground', \"Button background color.\"));\r\nconst buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('buttonHoverBackground', \"Button background color when hovering.\"));\r\nconst badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#C4C4C4', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('badgeBackground', \"Badge background color. Badges are small information labels, e.g. for search results count.\"));\r\nconst badgeForeground = registerColor('badge.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, light: '#333', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('badgeForeground', \"Badge foreground color. Badges are small information labels, e.g. for search results count.\"));\r\nconst scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('scrollbarShadow', \"Scrollbar shadow to indicate that the view is scrolled.\"));\r\nconst scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#797979').transparent(0.4), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('scrollbarSliderBackground', \"Scrollbar slider background color.\"));\r\nconst scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#646464').transparent(0.7), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('scrollbarSliderHoverBackground', \"Scrollbar slider background color when hovering.\"));\r\nconst scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#BFBFBF').transparent(0.4), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#000000').transparent(0.6), hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('scrollbarSliderActiveBackground', \"Scrollbar slider background color when clicked on.\"));\r\nconst progressBarBackground = registerColor('progressBar.background', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#0E70C0'), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#0E70C0'), hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('progressBarBackground', \"Background color of the progress bar that can show for long running operations.\"));\r\nconst editorErrorBackground = registerColor('editorError.background', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorError.background', 'Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorErrorForeground = registerColor('editorError.foreground', { dark: '#F48771', light: '#E51400', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorError.foreground', 'Foreground color of error squigglies in the editor.'));\r\nconst editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#E47777').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('errorBorder', 'Border color of error boxes in the editor.'));\r\nconst editorWarningBackground = registerColor('editorWarning.background', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorWarning.background', 'Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#BF8803', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));\r\nconst editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#FFCC00').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('warningBorder', 'Border color of warning boxes in the editor.'));\r\nconst editorInfoBackground = registerColor('editorInfo.background', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorInfo.background', 'Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#75BEFF', light: '#75BEFF', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.'));\r\nconst editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#75BEFF').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('infoBorder', 'Border color of info boxes in the editor.'));\r\nconst editorHintForeground = registerColor('editorHint.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.'));\r\nconst editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex('#eeeeee').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('hintBorder', 'Border color of hint boxes in the editor.'));\r\n/**\r\n * Editor background color.\r\n * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254\r\n * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white.\r\n */\r\nconst editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorBackground', \"Editor background color.\"));\r\n/**\r\n * Editor foreground color.\r\n */\r\nconst editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorForeground', \"Editor default foreground color.\"));\r\n/**\r\n * Editor widgets\r\n */\r\nconst editorWidgetBackground = registerColor('editorWidget.background', { dark: '#252526', light: '#F3F3F3', hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.'));\r\nconst editorWidgetForeground = registerColor('editorWidget.foreground', { dark: foreground, light: foreground, hc: foreground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorWidgetForeground', 'Foreground color of editor widgets, such as find/replace.'));\r\nconst editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.'));\r\nconst editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\n/**\r\n * Quick pick widget\r\n */\r\nconst quickInputBackground = registerColor('quickInput.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('pickerBackground', \"Quick picker background color. The quick picker widget is the container for pickers like the command palette.\"));\r\nconst quickInputForeground = registerColor('quickInput.foreground', { dark: editorWidgetForeground, light: editorWidgetForeground, hc: editorWidgetForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('pickerForeground', \"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.\"));\r\nconst quickInputTitleBackground = registerColor('quickInputTitle.background', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 255, 255, 0.105)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(0, 0, 0, 0.06)), hc: '#000000' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('pickerTitleBackground', \"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.\"));\r\nconst quickInputListFocusBackground = registerColor('quickInput.list.focusBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('quickInput.listFocusBackground', \"Quick picker background color for the focused item.\"));\r\nconst pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('pickerGroupForeground', \"Quick picker color for grouping labels.\"));\r\nconst pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('pickerGroupBorder', \"Quick picker color for grouping borders.\"));\r\n/**\r\n * Editor selection colors.\r\n */\r\nconst editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSelectionBackground', \"Color of the editor selection.\"));\r\nconst editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hc: '#000000' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSelectionForeground', \"Color of the selected text for high contrast.\"));\r\nconst editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorInactiveSelection', \"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\nconst editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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);\r\nconst editorSelectionHighlightBorder = registerColor('editor.selectionHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorSelectionHighlightBorder', \"Border color for regions with the same content as the selection.\"));\r\n/**\r\n * Editor find match colors.\r\n */\r\nconst editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorFindMatch', \"Color of the current search match.\"));\r\nconst editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('findMatchHighlight', \"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\nconst editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('findRangeHighlight', \"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\nconst editorFindMatchBorder = registerColor('editor.findMatchBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorFindMatchBorder', \"Border color of the current search match.\"));\r\nconst editorFindMatchHighlightBorder = registerColor('editor.findMatchHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('findMatchHighlightBorder', \"Border color of the other search matches.\"));\r\nconst editorFindRangeHighlightBorder = registerColor('editor.findRangeHighlightBorder', { dark: null, light: null, hc: transparent(activeContrastBorder, 0.4) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('findRangeHighlightBorder', \"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\n/**\r\n * Editor hover\r\n */\r\nconst editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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);\r\nconst editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('hoverBackground', 'Background color of the editor hover.'));\r\nconst editorHoverForeground = registerColor('editorHoverWidget.foreground', { light: editorWidgetForeground, dark: editorWidgetForeground, hc: editorWidgetForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('hoverForeground', 'Foreground color of the editor hover.'));\r\nconst editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('hoverBorder', 'Border color of the editor hover.'));\r\nconst editorHoverStatusBarBackground = registerColor('editorHoverWidget.statusBarBackground', { dark: lighten(editorHoverBackground, 0.2), light: darken(editorHoverBackground, 0.05), hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('statusBarBackground', \"Background color of the editor hover status bar.\"));\r\n/**\r\n * Editor link colors\r\n */\r\nconst editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.blue, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.cyan }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('activeLinkForeground', 'Color of active links.'));\r\n/**\r\n * Inline hints\r\n */\r\nconst editorInlineHintForeground = registerColor('editorInlineHint.foreground', { dark: editorWidgetBackground, light: editorWidgetForeground, hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorInlineHintForeground', 'Foreground color of inline hints'));\r\nconst editorInlineHintBackground = registerColor('editorInlineHint.background', { dark: editorWidgetForeground, light: editorWidgetBackground, hc: editorWidgetForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorInlineHintBackground', 'Background color of inline hints'));\r\n/**\r\n * Editor lighbulb icon colors\r\n */\r\nconst editorLightBulbForeground = registerColor('editorLightBulb.foreground', { dark: '#FFCC00', light: '#DDB100', hc: '#FFCC00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorLightBulbForeground', \"The color used for the lightbulb actions icon.\"));\r\nconst editorLightBulbAutoFixForeground = registerColor('editorLightBulbAutoFix.foreground', { dark: '#75BEFF', light: '#007ACC', hc: '#75BEFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('editorLightBulbAutoFixForeground', \"The color used for the lightbulb auto fix actions icon.\"));\r\n/**\r\n * Diff Editor Colors\r\n */\r\nconst defaultInsertColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(155, 185, 85, 0.2));\r\nconst defaultRemoveColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 0, 0, 0.2));\r\nconst diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffEditorInserted', 'Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffEditorRemoved', 'Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.'));\r\nconst diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.'));\r\nconst diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffEditorBorder', 'Border color between the two text editors.'));\r\nconst diffDiagonalFill = registerColor('diffEditor.diagonalFill', { dark: '#cccccc33', light: '#22222233', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('diffDiagonalFill', \"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.\"));\r\n/**\r\n * List and tree colors\r\n */\r\nconst listFocusBackground = registerColor('list.focusBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listFocusOutline = registerColor('list.focusOutline', { dark: focusBorder, light: focusBorder, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listFocusOutline', \"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.\"));\r\nconst listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#0060C0', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.white, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#E4E6F1', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.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.\"));\r\nconst listInactiveFocusOutline = registerColor('list.inactiveFocusOutline', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listInactiveFocusOutline', \"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.\"));\r\nconst listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listHoverBackground', \"List/Tree background when hovering over items using the mouse.\"));\r\nconst listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listHoverForeground', \"List/Tree foreground when hovering over items using the mouse.\"));\r\nconst listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listDropBackground', \"List/Tree drag and drop background when moving items around using the mouse.\"));\r\nconst listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#0066BF', hc: focusBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.'));\r\nconst listFilterWidgetBackground = registerColor('listFilterWidget.background', { light: '#efc1ad', dark: '#653723', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listFilterWidgetBackground', 'Background color of the type filter widget in lists and trees.'));\r\nconst listFilterWidgetOutline = registerColor('listFilterWidget.outline', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.transparent, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.transparent, hc: '#f38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listFilterWidgetOutline', 'Outline color of the type filter widget in lists and trees.'));\r\nconst listFilterWidgetNoMatchesOutline = registerColor('listFilterWidget.noMatchesOutline', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('listFilterWidgetNoMatchesOutline', 'Outline color of the type filter widget in lists and trees, when there are no matches.'));\r\nconst treeIndentGuidesStroke = registerColor('tree.indentGuidesStroke', { dark: '#585858', light: '#a9a9a9', hc: '#a9a9a9' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('treeIndentGuidesStroke', \"Tree stroke color for the indentation guides.\"));\r\nconst tableColumnsBorder = registerColor('tree.tableColumnsBorder', { dark: '#CCCCCC20', light: '#61616120', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('treeIndentGuidesStroke', \"Tree stroke color for the indentation guides.\"));\r\n/**\r\n * Menu colors\r\n */\r\nconst menuBorder = registerColor('menu.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuBorder', \"Border color of menus.\"));\r\nconst menuForeground = registerColor('menu.foreground', { dark: selectForeground, light: foreground, hc: selectForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuForeground', \"Foreground color of menu items.\"));\r\nconst menuBackground = registerColor('menu.background', { dark: selectBackground, light: selectBackground, hc: selectBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuBackground', \"Background color of menu items.\"));\r\nconst menuSelectionForeground = registerColor('menu.selectionForeground', { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hc: listActiveSelectionForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuSelectionForeground', \"Foreground color of the selected menu item in menus.\"));\r\nconst menuSelectionBackground = registerColor('menu.selectionBackground', { dark: listActiveSelectionBackground, light: listActiveSelectionBackground, hc: listActiveSelectionBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuSelectionBackground', \"Background color of the selected menu item in menus.\"));\r\nconst menuSelectionBorder = registerColor('menu.selectionBorder', { dark: null, light: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuSelectionBorder', \"Border color of the selected menu item in menus.\"));\r\nconst menuSeparatorBackground = registerColor('menu.separatorBackground', { dark: '#BBBBBB', light: '#888888', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('menuSeparatorBackground', \"Color of a separator menu item in menus.\"));\r\n/**\r\n * Snippet placeholder colors\r\n */\r\nconst snippetTabstopHighlightBackground = registerColor('editor.snippetTabstopHighlightBackground', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(124, 124, 124, 0.3)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(10, 50, 100, 0.2)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(124, 124, 124, 0.3)) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('snippetTabstopHighlightBackground', \"Highlight background color of a snippet tabstop.\"));\r\nconst snippetTabstopHighlightBorder = registerColor('editor.snippetTabstopHighlightBorder', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('snippetTabstopHighlightBorder', \"Highlight border color of a snippet tabstop.\"));\r\nconst snippetFinalTabstopHighlightBackground = registerColor('editor.snippetFinalTabstopHighlightBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('snippetFinalTabstopHighlightBackground', \"Highlight background color of the final tabstop of a snippet.\"));\r\nconst snippetFinalTabstopHighlightBorder = registerColor('editor.snippetFinalTabstopHighlightBorder', { dark: '#525252', light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(10, 50, 100, 0.5)), hc: '#525252' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('snippetFinalTabstopHighlightBorder', \"Highlight border color of the final tabstop of a snippet.\"));\r\nconst overviewRulerFindMatchForeground = registerColor('editorOverviewRuler.findMatchForeground', { dark: '#d186167e', light: '#d186167e', hc: '#AB5A00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('overviewRulerFindMatchForeground', 'Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst overviewRulerSelectionHighlightForeground = registerColor('editorOverviewRuler.selectionHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('overviewRulerSelectionHighlightForeground', 'Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst minimapFindMatch = registerColor('minimap.findMatchHighlight', { light: '#d18616', dark: '#d18616', hc: '#AB5A00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapFindMatchHighlight', 'Minimap marker color for find matches.'), true);\r\nconst minimapSelection = registerColor('minimap.selectionHighlight', { light: '#ADD6FF', dark: '#264F78', hc: '#ffffff' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapSelectionHighlight', 'Minimap marker color for the editor selection.'), true);\r\nconst minimapError = registerColor('minimap.errorHighlight', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 18, 18, 0.7)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 18, 18, 0.7)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color(new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.RGBA(255, 50, 50, 1)) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapError', 'Minimap marker color for errors.'));\r\nconst minimapWarning = registerColor('minimap.warningHighlight', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('overviewRuleWarning', 'Minimap marker color for warnings.'));\r\nconst minimapBackground = registerColor('minimap.background', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapBackground', \"Minimap background color.\"));\r\nconst minimapSliderBackground = registerColor('minimapSlider.background', { light: transparent(scrollbarSliderBackground, 0.5), dark: transparent(scrollbarSliderBackground, 0.5), hc: transparent(scrollbarSliderBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapSliderBackground', \"Minimap slider background color.\"));\r\nconst minimapSliderHoverBackground = registerColor('minimapSlider.hoverBackground', { light: transparent(scrollbarSliderHoverBackground, 0.5), dark: transparent(scrollbarSliderHoverBackground, 0.5), hc: transparent(scrollbarSliderHoverBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapSliderHoverBackground', \"Minimap slider background color when hovering.\"));\r\nconst minimapSliderActiveBackground = registerColor('minimapSlider.activeBackground', { light: transparent(scrollbarSliderActiveBackground, 0.5), dark: transparent(scrollbarSliderActiveBackground, 0.5), hc: transparent(scrollbarSliderActiveBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('minimapSliderActiveBackground', \"Minimap slider background color when clicked on.\"));\r\nconst problemsErrorIconForeground = registerColor('problemsErrorIcon.foreground', { dark: editorErrorForeground, light: editorErrorForeground, hc: editorErrorForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('problemsErrorIconForeground', \"The color used for the problems error icon.\"));\r\nconst problemsWarningIconForeground = registerColor('problemsWarningIcon.foreground', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('problemsWarningIconForeground', \"The color used for the problems warning icon.\"));\r\nconst problemsInfoIconForeground = registerColor('problemsInfoIcon.foreground', { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__.localize('problemsInfoIconForeground', \"The color used for the problems info icon.\"));\r\n// ----- color functions\r\nfunction darken(colorValue, factor) {\r\n return (theme) => {\r\n let color = resolveColorValue(colorValue, theme);\r\n if (color) {\r\n return color.darken(factor);\r\n }\r\n return undefined;\r\n };\r\n}\r\nfunction lighten(colorValue, factor) {\r\n return (theme) => {\r\n let color = resolveColorValue(colorValue, theme);\r\n if (color) {\r\n return color.lighten(factor);\r\n }\r\n return undefined;\r\n };\r\n}\r\nfunction transparent(colorValue, factor) {\r\n return (theme) => {\r\n let color = resolveColorValue(colorValue, theme);\r\n if (color) {\r\n return color.transparent(factor);\r\n }\r\n return undefined;\r\n };\r\n}\r\nfunction oneOf(...colorValues) {\r\n return (theme) => {\r\n for (let colorValue of colorValues) {\r\n let color = resolveColorValue(colorValue, theme);\r\n if (color) {\r\n return color;\r\n }\r\n }\r\n return undefined;\r\n };\r\n}\r\nfunction lessProminent(colorValue, backgroundColorValue, factor, transparency) {\r\n return (theme) => {\r\n let from = resolveColorValue(colorValue, theme);\r\n if (from) {\r\n let backgroundColor = resolveColorValue(backgroundColorValue, theme);\r\n if (backgroundColor) {\r\n if (from.isDarkerThan(backgroundColor)) {\r\n return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.getLighterColor(from, backgroundColor, factor).transparent(transparency);\r\n }\r\n return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.getDarkerColor(from, backgroundColor, factor).transparent(transparency);\r\n }\r\n return from.transparent(factor * transparency);\r\n }\r\n return undefined;\r\n };\r\n}\r\n// ----- implementation\r\n/**\r\n * @param colorValue Resolve a color value in the context of a theme\r\n */\r\nfunction resolveColorValue(colorValue, theme) {\r\n if (colorValue === null) {\r\n return undefined;\r\n }\r\n else if (typeof colorValue === 'string') {\r\n if (colorValue[0] === '#') {\r\n return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color.fromHex(colorValue);\r\n }\r\n return theme.getColor(colorValue);\r\n }\r\n else if (colorValue instanceof _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__.Color) {\r\n return colorValue;\r\n }\r\n else if (typeof colorValue === 'function') {\r\n return colorValue(theme);\r\n }\r\n return undefined;\r\n}\r\nconst workbenchColorsSchemaId = 'vscode://schemas/workbench-colors';\r\nlet schemaRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__.Extensions.JSONContribution);\r\nschemaRegistry.registerSchema(workbenchColorsSchemaId, colorRegistry.getColorSchema());\r\nconst delayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__.RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId), 200);\r\ncolorRegistry.onDidChangeSchema(() => {\r\n if (!delayer.isScheduled()) {\r\n delayer.schedule();\r\n }\r\n});\r\n// setTimeout(_ => console.log(colorRegistry.toString()), 5000);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"registerIcon\": () => (/* binding */ registerIcon),\n/* harmony export */ \"getIconRegistry\": () => (/* binding */ getIconRegistry),\n/* harmony export */ \"iconsSchemaId\": () => (/* binding */ iconsSchemaId),\n/* harmony export */ \"widgetClose\": () => (/* binding */ widgetClose)\n/* harmony export */ });\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./themeService.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../jsonschemas/common/jsonContributionRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js\");\n/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ \"./node_modules/monaco-editor/esm/vs/base/common/async.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// ------ API types\r\n// icon registry\r\nconst Extensions = {\r\n IconContribution: 'base.contributions.icons'\r\n};\r\nclass IconRegistry {\r\n constructor() {\r\n this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__.Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this.iconSchema = {\r\n definitions: {\r\n icons: {\r\n type: 'object',\r\n properties: {\r\n fontId: { type: 'string', description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('iconDefintion.fontId', 'The id of the font to use. If not set, the font that is defined first is used.') },\r\n fontCharacter: { type: 'string', description: (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('iconDefintion.fontCharacter', 'The font character associated with the icon definition.') }\r\n },\r\n additionalProperties: false,\r\n defaultSnippets: [{ body: { fontCharacter: '\\\\\\\\e030' } }]\r\n }\r\n },\r\n type: 'object',\r\n properties: {}\r\n };\r\n this.iconReferenceSchema = { type: 'string', pattern: `^${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__.CSSIcon.iconNameExpression}$`, enum: [], enumDescriptions: [] };\r\n this.iconsById = {};\r\n this.iconFontsById = {};\r\n }\r\n registerIcon(id, defaults, description, deprecationMessage) {\r\n const existing = this.iconsById[id];\r\n if (existing) {\r\n if (description && !existing.description) {\r\n existing.description = description;\r\n this.iconSchema.properties[id].markdownDescription = `${description} $(${id})`;\r\n const enumIndex = this.iconReferenceSchema.enum.indexOf(id);\r\n if (enumIndex !== -1) {\r\n this.iconReferenceSchema.enumDescriptions[enumIndex] = description;\r\n }\r\n this._onDidChange.fire();\r\n }\r\n return existing;\r\n }\r\n let iconContribution = { id, description, defaults, deprecationMessage };\r\n this.iconsById[id] = iconContribution;\r\n let propertySchema = { $ref: '#/definitions/icons' };\r\n if (deprecationMessage) {\r\n propertySchema.deprecationMessage = deprecationMessage;\r\n }\r\n if (description) {\r\n propertySchema.markdownDescription = `${description}: $(${id})`;\r\n }\r\n this.iconSchema.properties[id] = propertySchema;\r\n this.iconReferenceSchema.enum.push(id);\r\n this.iconReferenceSchema.enumDescriptions.push(description || '');\r\n this._onDidChange.fire();\r\n return { id };\r\n }\r\n getIcons() {\r\n return Object.keys(this.iconsById).map(id => this.iconsById[id]);\r\n }\r\n getIcon(id) {\r\n return this.iconsById[id];\r\n }\r\n getIconSchema() {\r\n return this.iconSchema;\r\n }\r\n getIconFont(id) {\r\n return this.iconFontsById[id];\r\n }\r\n toString() {\r\n const sorter = (i1, i2) => {\r\n return i1.id.localeCompare(i2.id);\r\n };\r\n const classNames = (i) => {\r\n while (_themeService_js__WEBPACK_IMPORTED_MODULE_1__.ThemeIcon.isThemeIcon(i.defaults)) {\r\n i = this.iconsById[i.defaults.id];\r\n }\r\n return `codicon codicon-${i ? i.id : ''}`;\r\n };\r\n let reference = [];\r\n reference.push(`| preview | identifier | default codicon ID | description`);\r\n reference.push(`| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |`);\r\n const contributions = Object.keys(this.iconsById).map(key => this.iconsById[key]);\r\n for (const i of contributions.filter(i => !!i.description).sort(sorter)) {\r\n reference.push(`|<i class=\"${classNames(i)}\"></i>|${i.id}|${_themeService_js__WEBPACK_IMPORTED_MODULE_1__.ThemeIcon.isThemeIcon(i.defaults) ? i.defaults.id : i.id}|${i.description || ''}|`);\r\n }\r\n reference.push(`| preview | identifier `);\r\n reference.push(`| ----------- | --------------------------------- |`);\r\n for (const i of contributions.filter(i => !_themeService_js__WEBPACK_IMPORTED_MODULE_1__.ThemeIcon.isThemeIcon(i.defaults)).sort(sorter)) {\r\n reference.push(`|<i class=\"${classNames(i)}\"></i>|${i.id}|`);\r\n }\r\n return reference.join('\\n');\r\n }\r\n}\r\nconst iconRegistry = new IconRegistry();\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.add(Extensions.IconContribution, iconRegistry);\r\nfunction registerIcon(id, defaults, description, deprecationMessage) {\r\n return iconRegistry.registerIcon(id, defaults, description, deprecationMessage);\r\n}\r\nfunction getIconRegistry() {\r\n return iconRegistry;\r\n}\r\nfunction initialize() {\r\n for (const icon of _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__.iconRegistry.all) {\r\n iconRegistry.registerIcon(icon.id, icon.definition, icon.description);\r\n }\r\n _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__.iconRegistry.onDidRegister(icon => iconRegistry.registerIcon(icon.id, icon.definition, icon.description));\r\n}\r\ninitialize();\r\nconst iconsSchemaId = 'vscode://schemas/icons';\r\nlet schemaRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__.Registry.as(_jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__.Extensions.JSONContribution);\r\nschemaRegistry.registerSchema(iconsSchemaId, iconRegistry.getIconSchema());\r\nconst delayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__.RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(iconsSchemaId), 200);\r\niconRegistry.onDidChange(() => {\r\n if (!delayer.isScheduled()) {\r\n delayer.schedule();\r\n }\r\n});\r\n//setTimeout(_ => console.log(iconRegistry.toString()), 5000);\r\n// common icons\r\nconst widgetClose = registerIcon('widget-close', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_6__.Codicon.close, (0,_nls_js__WEBPACK_IMPORTED_MODULE_3__.localize)('widgetClose', 'Icon for the close action in widgets.'));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"computeStyles\": () => (/* binding */ computeStyles),\n/* harmony export */ \"attachStyler\": () => (/* binding */ attachStyler),\n/* harmony export */ \"attachBadgeStyler\": () => (/* binding */ attachBadgeStyler),\n/* harmony export */ \"attachListStyler\": () => (/* binding */ attachListStyler),\n/* harmony export */ \"defaultListStyles\": () => (/* binding */ defaultListStyles),\n/* harmony export */ \"defaultMenuStyles\": () => (/* binding */ defaultMenuStyles),\n/* harmony export */ \"attachMenuStyler\": () => (/* binding */ attachMenuStyler)\n/* harmony export */ });\n/* harmony import */ var _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorRegistry.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction computeStyles(theme, styleMap) {\r\n const styles = Object.create(null);\r\n for (let key in styleMap) {\r\n const value = styleMap[key];\r\n if (value) {\r\n styles[key] = (0,_colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.resolveColorValue)(value, theme);\r\n }\r\n }\r\n return styles;\r\n}\r\nfunction attachStyler(themeService, styleMap, widgetOrCallback) {\r\n function applyStyles(theme) {\r\n const styles = computeStyles(themeService.getColorTheme(), styleMap);\r\n if (typeof widgetOrCallback === 'function') {\r\n widgetOrCallback(styles);\r\n }\r\n else {\r\n widgetOrCallback.style(styles);\r\n }\r\n }\r\n applyStyles(themeService.getColorTheme());\r\n return themeService.onDidColorThemeChange(applyStyles);\r\n}\r\nfunction attachBadgeStyler(widget, themeService, style) {\r\n return attachStyler(themeService, {\r\n badgeBackground: (style && style.badgeBackground) || _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.badgeBackground,\r\n badgeForeground: (style && style.badgeForeground) || _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.badgeForeground,\r\n badgeBorder: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.contrastBorder\r\n }, widget);\r\n}\r\nfunction attachListStyler(widget, themeService, overrides) {\r\n return attachStyler(themeService, Object.assign(Object.assign({}, defaultListStyles), (overrides || {})), widget);\r\n}\r\nconst defaultListStyles = {\r\n listFocusBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFocusBackground,\r\n listFocusForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFocusForeground,\r\n listFocusOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFocusOutline,\r\n listActiveSelectionBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listActiveSelectionBackground,\r\n listActiveSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listActiveSelectionForeground,\r\n listFocusAndSelectionBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listActiveSelectionBackground,\r\n listFocusAndSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listActiveSelectionForeground,\r\n listInactiveSelectionBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listInactiveSelectionBackground,\r\n listInactiveSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listInactiveSelectionForeground,\r\n listInactiveFocusBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listInactiveFocusBackground,\r\n listInactiveFocusOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listInactiveFocusOutline,\r\n listHoverBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listHoverBackground,\r\n listHoverForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listHoverForeground,\r\n listDropBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listDropBackground,\r\n listSelectionOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.activeContrastBorder,\r\n listHoverOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.activeContrastBorder,\r\n listFilterWidgetBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFilterWidgetBackground,\r\n listFilterWidgetOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFilterWidgetOutline,\r\n listFilterWidgetNoMatchesOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.listFilterWidgetNoMatchesOutline,\r\n listMatchesShadow: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.widgetShadow,\r\n treeIndentGuidesStroke: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.treeIndentGuidesStroke,\r\n tableColumnsBorder: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.tableColumnsBorder\r\n};\r\nconst defaultMenuStyles = {\r\n shadowColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.widgetShadow,\r\n borderColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuBorder,\r\n foregroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuForeground,\r\n backgroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuBackground,\r\n selectionForegroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuSelectionForeground,\r\n selectionBackgroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuSelectionBackground,\r\n selectionBorderColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuSelectionBorder,\r\n separatorColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__.menuSeparatorBackground\r\n};\r\nfunction attachMenuStyler(widget, themeService, style) {\r\n return attachStyler(themeService, Object.assign(Object.assign({}, defaultMenuStyles), style), widget);\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ColorScheme\": () => (/* binding */ ColorScheme)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Color scheme used by the OS and by color themes.\r\n */\r\nvar ColorScheme;\r\n(function (ColorScheme) {\r\n ColorScheme[\"DARK\"] = \"dark\";\r\n ColorScheme[\"LIGHT\"] = \"light\";\r\n ColorScheme[\"HIGH_CONTRAST\"] = \"hc\";\r\n})(ColorScheme || (ColorScheme = {}));\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IThemeService\": () => (/* binding */ IThemeService),\n/* harmony export */ \"ThemeColor\": () => (/* binding */ ThemeColor),\n/* harmony export */ \"themeColorFromId\": () => (/* binding */ themeColorFromId),\n/* harmony export */ \"ThemeIcon\": () => (/* binding */ ThemeIcon),\n/* harmony export */ \"getThemeTypeSelector\": () => (/* binding */ getThemeTypeSelector),\n/* harmony export */ \"Extensions\": () => (/* binding */ Extensions),\n/* harmony export */ \"registerThemingParticipant\": () => (/* binding */ registerThemingParticipant),\n/* harmony export */ \"Themable\": () => (/* binding */ Themable)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ \"./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js\");\n/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ \"./node_modules/monaco-editor/esm/vs/base/common/event.js\");\n/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./theme.js */ \"./node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js\");\n/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/codicons.js */ \"./node_modules/monaco-editor/esm/vs/base/common/codicons.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst IThemeService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('themeService');\r\nvar ThemeColor;\r\n(function (ThemeColor) {\r\n function isThemeColor(obj) {\r\n return obj && typeof obj === 'object' && typeof obj.id === 'string';\r\n }\r\n ThemeColor.isThemeColor = isThemeColor;\r\n})(ThemeColor || (ThemeColor = {}));\r\nfunction themeColorFromId(id) {\r\n return { id };\r\n}\r\nvar ThemeIcon;\r\n(function (ThemeIcon) {\r\n function isThemeIcon(obj) {\r\n return obj && typeof obj === 'object' && typeof obj.id === 'string' && (typeof obj.color === 'undefined' || ThemeColor.isThemeColor(obj.color));\r\n }\r\n ThemeIcon.isThemeIcon = isThemeIcon;\r\n const _regexFromString = new RegExp(`^\\\\$\\\\((${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.CSSIcon.iconNameExpression}(?:${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.CSSIcon.iconModifierExpression})?)\\\\)$`);\r\n function fromString(str) {\r\n const match = _regexFromString.exec(str);\r\n if (!match) {\r\n return undefined;\r\n }\r\n let [, name] = match;\r\n return { id: name };\r\n }\r\n ThemeIcon.fromString = fromString;\r\n function modify(icon, modifier) {\r\n let id = icon.id;\r\n const tildeIndex = id.lastIndexOf('~');\r\n if (tildeIndex !== -1) {\r\n id = id.substring(0, tildeIndex);\r\n }\r\n if (modifier) {\r\n id = `${id}~${modifier}`;\r\n }\r\n return { id };\r\n }\r\n ThemeIcon.modify = modify;\r\n function isEqual(ti1, ti2) {\r\n var _a, _b;\r\n return ti1.id === ti2.id && ((_a = ti1.color) === null || _a === void 0 ? void 0 : _a.id) === ((_b = ti2.color) === null || _b === void 0 ? void 0 : _b.id);\r\n }\r\n ThemeIcon.isEqual = isEqual;\r\n ThemeIcon.asClassNameArray = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.CSSIcon.asClassNameArray;\r\n ThemeIcon.asClassName = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.CSSIcon.asClassName;\r\n ThemeIcon.asCSSSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__.CSSIcon.asCSSSelector;\r\n})(ThemeIcon || (ThemeIcon = {}));\r\nfunction getThemeTypeSelector(type) {\r\n switch (type) {\r\n case _theme_js__WEBPACK_IMPORTED_MODULE_4__.ColorScheme.DARK: return 'vs-dark';\r\n case _theme_js__WEBPACK_IMPORTED_MODULE_4__.ColorScheme.HIGH_CONTRAST: return 'hc-black';\r\n default: return 'vs';\r\n }\r\n}\r\n// static theming participant\r\nconst Extensions = {\r\n ThemingContribution: 'base.contributions.theming'\r\n};\r\nclass ThemingRegistry {\r\n constructor() {\r\n this.themingParticipants = [];\r\n this.themingParticipants = [];\r\n this.onThemingParticipantAddedEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__.Emitter();\r\n }\r\n onColorThemeChange(participant) {\r\n this.themingParticipants.push(participant);\r\n this.onThemingParticipantAddedEmitter.fire(participant);\r\n return (0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.toDisposable)(() => {\r\n const idx = this.themingParticipants.indexOf(participant);\r\n this.themingParticipants.splice(idx, 1);\r\n });\r\n }\r\n getThemingParticipants() {\r\n return this.themingParticipants;\r\n }\r\n}\r\nlet themingRegistry = new ThemingRegistry();\r\n_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__.Registry.add(Extensions.ThemingContribution, themingRegistry);\r\nfunction registerThemingParticipant(participant) {\r\n return themingRegistry.onColorThemeChange(participant);\r\n}\r\n/**\r\n * Utility base class for all themable components.\r\n */\r\nclass Themable extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__.Disposable {\r\n constructor(themeService) {\r\n super();\r\n this.themeService = themeService;\r\n this.theme = themeService.getColorTheme();\r\n // Hook up to theme changes\r\n this._register(this.themeService.onDidColorThemeChange(theme => this.onThemeChange(theme)));\r\n }\r\n onThemeChange(theme) {\r\n this.theme = theme;\r\n this.updateStyles();\r\n }\r\n updateStyles() {\r\n // Subclasses to override\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js":
|
||
/*!********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IUndoRedoService\": () => (/* binding */ IUndoRedoService),\n/* harmony export */ \"ResourceEditStackSnapshot\": () => (/* binding */ ResourceEditStackSnapshot),\n/* harmony export */ \"UndoRedoGroup\": () => (/* binding */ UndoRedoGroup),\n/* harmony export */ \"UndoRedoSource\": () => (/* binding */ UndoRedoSource)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nconst IUndoRedoService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('undoRedoService');\r\nclass ResourceEditStackSnapshot {\r\n constructor(resource, elements) {\r\n this.resource = resource;\r\n this.elements = elements;\r\n }\r\n}\r\nclass UndoRedoGroup {\r\n constructor() {\r\n this.id = UndoRedoGroup._ID++;\r\n this.order = 1;\r\n }\r\n nextOrder() {\r\n if (this.id === 0) {\r\n return 0;\r\n }\r\n return this.order++;\r\n }\r\n}\r\nUndoRedoGroup._ID = 0;\r\nUndoRedoGroup.None = new UndoRedoGroup();\r\nclass UndoRedoSource {\r\n constructor() {\r\n this.id = UndoRedoSource._ID++;\r\n this.order = 1;\r\n }\r\n nextOrder() {\r\n if (this.id === 0) {\r\n return 0;\r\n }\r\n return this.order++;\r\n }\r\n}\r\nUndoRedoSource._ID = 0;\r\nUndoRedoSource.None = new UndoRedoSource();\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UndoRedoService\": () => (/* binding */ UndoRedoService)\n/* harmony export */ });\n/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ \"./node_modules/monaco-editor/esm/vs/nls.js\");\n/* harmony import */ var _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./undoRedo.js */ \"./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js\");\n/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ \"./node_modules/monaco-editor/esm/vs/base/common/errors.js\");\n/* harmony import */ var _instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../instantiation/common/extensions.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js\");\n/* harmony import */ var _dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dialogs/common/dialogs.js */ \"./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js\");\n/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/severity.js */ \"./node_modules/monaco-editor/esm/vs/base/common/severity.js\");\n/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/network.js */ \"./node_modules/monaco-editor/esm/vs/base/common/network.js\");\n/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../notification/common/notification.js */ \"./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js\");\n/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ \"./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (undefined && undefined.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst DEBUG = false;\r\nfunction getResourceLabel(resource) {\r\n return resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__.Schemas.file ? resource.fsPath : resource.path;\r\n}\r\nlet stackElementCounter = 0;\r\nclass ResourceStackElement {\r\n constructor(actual, resourceLabel, strResource, groupId, groupOrder, sourceId, sourceOrder) {\r\n this.id = (++stackElementCounter);\r\n this.type = 0 /* Resource */;\r\n this.actual = actual;\r\n this.label = actual.label;\r\n this.confirmBeforeUndo = actual.confirmBeforeUndo || false;\r\n this.resourceLabel = resourceLabel;\r\n this.strResource = strResource;\r\n this.resourceLabels = [this.resourceLabel];\r\n this.strResources = [this.strResource];\r\n this.groupId = groupId;\r\n this.groupOrder = groupOrder;\r\n this.sourceId = sourceId;\r\n this.sourceOrder = sourceOrder;\r\n this.isValid = true;\r\n }\r\n setValid(isValid) {\r\n this.isValid = isValid;\r\n }\r\n toString() {\r\n return `[id:${this.id}] [group:${this.groupId}] [${this.isValid ? ' VALID' : 'INVALID'}] ${this.actual.constructor.name} - ${this.actual}`;\r\n }\r\n}\r\nclass ResourceReasonPair {\r\n constructor(resourceLabel, reason) {\r\n this.resourceLabel = resourceLabel;\r\n this.reason = reason;\r\n }\r\n}\r\nclass RemovedResources {\r\n constructor() {\r\n this.elements = new Map();\r\n }\r\n createMessage() {\r\n const externalRemoval = [];\r\n const noParallelUniverses = [];\r\n for (const [, element] of this.elements) {\r\n const dest = (element.reason === 0 /* ExternalRemoval */\r\n ? externalRemoval\r\n : noParallelUniverses);\r\n dest.push(element.resourceLabel);\r\n }\r\n let messages = [];\r\n if (externalRemoval.length > 0) {\r\n messages.push(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'externalRemoval', comment: ['{0} is a list of filenames'] }, \"The following files have been closed and modified on disk: {0}.\", externalRemoval.join(', ')));\r\n }\r\n if (noParallelUniverses.length > 0) {\r\n messages.push(_nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'noParallelUniverses', comment: ['{0} is a list of filenames'] }, \"The following files have been modified in an incompatible way: {0}.\", noParallelUniverses.join(', ')));\r\n }\r\n return messages.join('\\n');\r\n }\r\n get size() {\r\n return this.elements.size;\r\n }\r\n has(strResource) {\r\n return this.elements.has(strResource);\r\n }\r\n set(strResource, value) {\r\n this.elements.set(strResource, value);\r\n }\r\n delete(strResource) {\r\n return this.elements.delete(strResource);\r\n }\r\n}\r\nclass WorkspaceStackElement {\r\n constructor(actual, resourceLabels, strResources, groupId, groupOrder, sourceId, sourceOrder) {\r\n this.id = (++stackElementCounter);\r\n this.type = 1 /* Workspace */;\r\n this.actual = actual;\r\n this.label = actual.label;\r\n this.confirmBeforeUndo = actual.confirmBeforeUndo || false;\r\n this.resourceLabels = resourceLabels;\r\n this.strResources = strResources;\r\n this.groupId = groupId;\r\n this.groupOrder = groupOrder;\r\n this.sourceId = sourceId;\r\n this.sourceOrder = sourceOrder;\r\n this.removedResources = null;\r\n this.invalidatedResources = null;\r\n }\r\n canSplit() {\r\n return (typeof this.actual.split === 'function');\r\n }\r\n removeResource(resourceLabel, strResource, reason) {\r\n if (!this.removedResources) {\r\n this.removedResources = new RemovedResources();\r\n }\r\n if (!this.removedResources.has(strResource)) {\r\n this.removedResources.set(strResource, new ResourceReasonPair(resourceLabel, reason));\r\n }\r\n }\r\n setValid(resourceLabel, strResource, isValid) {\r\n if (isValid) {\r\n if (this.invalidatedResources) {\r\n this.invalidatedResources.delete(strResource);\r\n if (this.invalidatedResources.size === 0) {\r\n this.invalidatedResources = null;\r\n }\r\n }\r\n }\r\n else {\r\n if (!this.invalidatedResources) {\r\n this.invalidatedResources = new RemovedResources();\r\n }\r\n if (!this.invalidatedResources.has(strResource)) {\r\n this.invalidatedResources.set(strResource, new ResourceReasonPair(resourceLabel, 0 /* ExternalRemoval */));\r\n }\r\n }\r\n }\r\n toString() {\r\n return `[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources ? 'INVALID' : ' VALID'}] ${this.actual.constructor.name} - ${this.actual}`;\r\n }\r\n}\r\nclass ResourceEditStack {\r\n constructor(resourceLabel, strResource) {\r\n this.resourceLabel = resourceLabel;\r\n this.strResource = strResource;\r\n this._past = [];\r\n this._future = [];\r\n this.locked = false;\r\n this.versionId = 1;\r\n }\r\n dispose() {\r\n for (const element of this._past) {\r\n if (element.type === 1 /* Workspace */) {\r\n element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */);\r\n }\r\n }\r\n for (const element of this._future) {\r\n if (element.type === 1 /* Workspace */) {\r\n element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */);\r\n }\r\n }\r\n this.versionId++;\r\n }\r\n toString() {\r\n let result = [];\r\n result.push(`* ${this.strResource}:`);\r\n for (let i = 0; i < this._past.length; i++) {\r\n result.push(` * [UNDO] ${this._past[i]}`);\r\n }\r\n for (let i = this._future.length - 1; i >= 0; i--) {\r\n result.push(` * [REDO] ${this._future[i]}`);\r\n }\r\n return result.join('\\n');\r\n }\r\n flushAllElements() {\r\n this._past = [];\r\n this._future = [];\r\n this.versionId++;\r\n }\r\n _setElementValidFlag(element, isValid) {\r\n if (element.type === 1 /* Workspace */) {\r\n element.setValid(this.resourceLabel, this.strResource, isValid);\r\n }\r\n else {\r\n element.setValid(isValid);\r\n }\r\n }\r\n setElementsValidFlag(isValid, filter) {\r\n for (const element of this._past) {\r\n if (filter(element.actual)) {\r\n this._setElementValidFlag(element, isValid);\r\n }\r\n }\r\n for (const element of this._future) {\r\n if (filter(element.actual)) {\r\n this._setElementValidFlag(element, isValid);\r\n }\r\n }\r\n }\r\n pushElement(element) {\r\n // remove the future\r\n for (const futureElement of this._future) {\r\n if (futureElement.type === 1 /* Workspace */) {\r\n futureElement.removeResource(this.resourceLabel, this.strResource, 1 /* NoParallelUniverses */);\r\n }\r\n }\r\n this._future = [];\r\n this._past.push(element);\r\n this.versionId++;\r\n }\r\n createSnapshot(resource) {\r\n const elements = [];\r\n for (let i = 0, len = this._past.length; i < len; i++) {\r\n elements.push(this._past[i].id);\r\n }\r\n for (let i = this._future.length - 1; i >= 0; i--) {\r\n elements.push(this._future[i].id);\r\n }\r\n return new _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.ResourceEditStackSnapshot(resource, elements);\r\n }\r\n restoreSnapshot(snapshot) {\r\n const snapshotLength = snapshot.elements.length;\r\n let isOK = true;\r\n let snapshotIndex = 0;\r\n let removePastAfter = -1;\r\n for (let i = 0, len = this._past.length; i < len; i++, snapshotIndex++) {\r\n const element = this._past[i];\r\n if (isOK && (snapshotIndex >= snapshotLength || element.id !== snapshot.elements[snapshotIndex])) {\r\n isOK = false;\r\n removePastAfter = 0;\r\n }\r\n if (!isOK && element.type === 1 /* Workspace */) {\r\n element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */);\r\n }\r\n }\r\n let removeFutureBefore = -1;\r\n for (let i = this._future.length - 1; i >= 0; i--, snapshotIndex++) {\r\n const element = this._future[i];\r\n if (isOK && (snapshotIndex >= snapshotLength || element.id !== snapshot.elements[snapshotIndex])) {\r\n isOK = false;\r\n removeFutureBefore = i;\r\n }\r\n if (!isOK && element.type === 1 /* Workspace */) {\r\n element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */);\r\n }\r\n }\r\n if (removePastAfter !== -1) {\r\n this._past = this._past.slice(0, removePastAfter);\r\n }\r\n if (removeFutureBefore !== -1) {\r\n this._future = this._future.slice(removeFutureBefore + 1);\r\n }\r\n this.versionId++;\r\n }\r\n getElements() {\r\n const past = [];\r\n const future = [];\r\n for (const element of this._past) {\r\n past.push(element.actual);\r\n }\r\n for (const element of this._future) {\r\n future.push(element.actual);\r\n }\r\n return { past, future };\r\n }\r\n getClosestPastElement() {\r\n if (this._past.length === 0) {\r\n return null;\r\n }\r\n return this._past[this._past.length - 1];\r\n }\r\n getSecondClosestPastElement() {\r\n if (this._past.length < 2) {\r\n return null;\r\n }\r\n return this._past[this._past.length - 2];\r\n }\r\n getClosestFutureElement() {\r\n if (this._future.length === 0) {\r\n return null;\r\n }\r\n return this._future[this._future.length - 1];\r\n }\r\n hasPastElements() {\r\n return (this._past.length > 0);\r\n }\r\n hasFutureElements() {\r\n return (this._future.length > 0);\r\n }\r\n splitPastWorkspaceElement(toRemove, individualMap) {\r\n for (let j = this._past.length - 1; j >= 0; j--) {\r\n if (this._past[j] === toRemove) {\r\n if (individualMap.has(this.strResource)) {\r\n // gets replaced\r\n this._past[j] = individualMap.get(this.strResource);\r\n }\r\n else {\r\n // gets deleted\r\n this._past.splice(j, 1);\r\n }\r\n break;\r\n }\r\n }\r\n this.versionId++;\r\n }\r\n splitFutureWorkspaceElement(toRemove, individualMap) {\r\n for (let j = this._future.length - 1; j >= 0; j--) {\r\n if (this._future[j] === toRemove) {\r\n if (individualMap.has(this.strResource)) {\r\n // gets replaced\r\n this._future[j] = individualMap.get(this.strResource);\r\n }\r\n else {\r\n // gets deleted\r\n this._future.splice(j, 1);\r\n }\r\n break;\r\n }\r\n }\r\n this.versionId++;\r\n }\r\n moveBackward(element) {\r\n this._past.pop();\r\n this._future.push(element);\r\n this.versionId++;\r\n }\r\n moveForward(element) {\r\n this._future.pop();\r\n this._past.push(element);\r\n this.versionId++;\r\n }\r\n}\r\nclass EditStackSnapshot {\r\n constructor(editStacks) {\r\n this.editStacks = editStacks;\r\n this._versionIds = [];\r\n for (let i = 0, len = this.editStacks.length; i < len; i++) {\r\n this._versionIds[i] = this.editStacks[i].versionId;\r\n }\r\n }\r\n isValid() {\r\n for (let i = 0, len = this.editStacks.length; i < len; i++) {\r\n if (this._versionIds[i] !== this.editStacks[i].versionId) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nconst missingEditStack = new ResourceEditStack('', '');\r\nmissingEditStack.locked = true;\r\nlet UndoRedoService = class UndoRedoService {\r\n constructor(_dialogService, _notificationService) {\r\n this._dialogService = _dialogService;\r\n this._notificationService = _notificationService;\r\n this._editStacks = new Map();\r\n this._uriComparisonKeyComputers = [];\r\n }\r\n getUriComparisonKey(resource) {\r\n for (const uriComparisonKeyComputer of this._uriComparisonKeyComputers) {\r\n if (uriComparisonKeyComputer[0] === resource.scheme) {\r\n return uriComparisonKeyComputer[1].getComparisonKey(resource);\r\n }\r\n }\r\n return resource.toString();\r\n }\r\n _print(label) {\r\n console.log(`------------------------------------`);\r\n console.log(`AFTER ${label}: `);\r\n let str = [];\r\n for (const element of this._editStacks) {\r\n str.push(element[1].toString());\r\n }\r\n console.log(str.join('\\n'));\r\n }\r\n pushElement(element, group = _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoGroup.None, source = _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoSource.None) {\r\n if (element.type === 0 /* Resource */) {\r\n const resourceLabel = getResourceLabel(element.resource);\r\n const strResource = this.getUriComparisonKey(element.resource);\r\n this._pushElement(new ResourceStackElement(element, resourceLabel, strResource, group.id, group.nextOrder(), source.id, source.nextOrder()));\r\n }\r\n else {\r\n const seen = new Set();\r\n const resourceLabels = [];\r\n const strResources = [];\r\n for (const resource of element.resources) {\r\n const resourceLabel = getResourceLabel(resource);\r\n const strResource = this.getUriComparisonKey(resource);\r\n if (seen.has(strResource)) {\r\n continue;\r\n }\r\n seen.add(strResource);\r\n resourceLabels.push(resourceLabel);\r\n strResources.push(strResource);\r\n }\r\n if (resourceLabels.length === 1) {\r\n this._pushElement(new ResourceStackElement(element, resourceLabels[0], strResources[0], group.id, group.nextOrder(), source.id, source.nextOrder()));\r\n }\r\n else {\r\n this._pushElement(new WorkspaceStackElement(element, resourceLabels, strResources, group.id, group.nextOrder(), source.id, source.nextOrder()));\r\n }\r\n }\r\n if (DEBUG) {\r\n this._print('pushElement');\r\n }\r\n }\r\n _pushElement(element) {\r\n for (let i = 0, len = element.strResources.length; i < len; i++) {\r\n const resourceLabel = element.resourceLabels[i];\r\n const strResource = element.strResources[i];\r\n let editStack;\r\n if (this._editStacks.has(strResource)) {\r\n editStack = this._editStacks.get(strResource);\r\n }\r\n else {\r\n editStack = new ResourceEditStack(resourceLabel, strResource);\r\n this._editStacks.set(strResource, editStack);\r\n }\r\n editStack.pushElement(element);\r\n }\r\n }\r\n getLastElement(resource) {\r\n const strResource = this.getUriComparisonKey(resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n if (editStack.hasFutureElements()) {\r\n return null;\r\n }\r\n const closestPastElement = editStack.getClosestPastElement();\r\n return closestPastElement ? closestPastElement.actual : null;\r\n }\r\n return null;\r\n }\r\n _splitPastWorkspaceElement(toRemove, ignoreResources) {\r\n const individualArr = toRemove.actual.split();\r\n const individualMap = new Map();\r\n for (const _element of individualArr) {\r\n const resourceLabel = getResourceLabel(_element.resource);\r\n const strResource = this.getUriComparisonKey(_element.resource);\r\n const element = new ResourceStackElement(_element, resourceLabel, strResource, 0, 0, 0, 0);\r\n individualMap.set(element.strResource, element);\r\n }\r\n for (const strResource of toRemove.strResources) {\r\n if (ignoreResources && ignoreResources.has(strResource)) {\r\n continue;\r\n }\r\n const editStack = this._editStacks.get(strResource);\r\n editStack.splitPastWorkspaceElement(toRemove, individualMap);\r\n }\r\n }\r\n _splitFutureWorkspaceElement(toRemove, ignoreResources) {\r\n const individualArr = toRemove.actual.split();\r\n const individualMap = new Map();\r\n for (const _element of individualArr) {\r\n const resourceLabel = getResourceLabel(_element.resource);\r\n const strResource = this.getUriComparisonKey(_element.resource);\r\n const element = new ResourceStackElement(_element, resourceLabel, strResource, 0, 0, 0, 0);\r\n individualMap.set(element.strResource, element);\r\n }\r\n for (const strResource of toRemove.strResources) {\r\n if (ignoreResources && ignoreResources.has(strResource)) {\r\n continue;\r\n }\r\n const editStack = this._editStacks.get(strResource);\r\n editStack.splitFutureWorkspaceElement(toRemove, individualMap);\r\n }\r\n }\r\n removeElements(resource) {\r\n const strResource = typeof resource === 'string' ? resource : this.getUriComparisonKey(resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n editStack.dispose();\r\n this._editStacks.delete(strResource);\r\n }\r\n if (DEBUG) {\r\n this._print('removeElements');\r\n }\r\n }\r\n setElementsValidFlag(resource, isValid, filter) {\r\n const strResource = this.getUriComparisonKey(resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n editStack.setElementsValidFlag(isValid, filter);\r\n }\r\n if (DEBUG) {\r\n this._print('setElementsValidFlag');\r\n }\r\n }\r\n createSnapshot(resource) {\r\n const strResource = this.getUriComparisonKey(resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n return editStack.createSnapshot(resource);\r\n }\r\n return new _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.ResourceEditStackSnapshot(resource, []);\r\n }\r\n restoreSnapshot(snapshot) {\r\n const strResource = this.getUriComparisonKey(snapshot.resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n editStack.restoreSnapshot(snapshot);\r\n if (!editStack.hasPastElements() && !editStack.hasFutureElements()) {\r\n // the edit stack is now empty, just remove it entirely\r\n editStack.dispose();\r\n this._editStacks.delete(strResource);\r\n }\r\n }\r\n if (DEBUG) {\r\n this._print('restoreSnapshot');\r\n }\r\n }\r\n getElements(resource) {\r\n const strResource = this.getUriComparisonKey(resource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n return editStack.getElements();\r\n }\r\n return { past: [], future: [] };\r\n }\r\n _findClosestUndoElementWithSource(sourceId) {\r\n if (!sourceId) {\r\n return [null, null];\r\n }\r\n // find an element with the sourceId and with the highest sourceOrder ready to be undone\r\n let matchedElement = null;\r\n let matchedStrResource = null;\r\n for (const [strResource, editStack] of this._editStacks) {\r\n const candidate = editStack.getClosestPastElement();\r\n if (!candidate) {\r\n continue;\r\n }\r\n if (candidate.sourceId === sourceId) {\r\n if (!matchedElement || candidate.sourceOrder > matchedElement.sourceOrder) {\r\n matchedElement = candidate;\r\n matchedStrResource = strResource;\r\n }\r\n }\r\n }\r\n return [matchedElement, matchedStrResource];\r\n }\r\n canUndo(resourceOrSource) {\r\n if (resourceOrSource instanceof _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoSource) {\r\n const [, matchedStrResource] = this._findClosestUndoElementWithSource(resourceOrSource.id);\r\n return matchedStrResource ? true : false;\r\n }\r\n const strResource = this.getUriComparisonKey(resourceOrSource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n return editStack.hasPastElements();\r\n }\r\n return false;\r\n }\r\n _onError(err, element) {\r\n (0,_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__.onUnexpectedError)(err);\r\n // An error occured while undoing or redoing => drop the undo/redo stack for all affected resources\r\n for (const strResource of element.strResources) {\r\n this.removeElements(strResource);\r\n }\r\n this._notificationService.error(err);\r\n }\r\n _acquireLocks(editStackSnapshot) {\r\n // first, check if all locks can be acquired\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n if (editStack.locked) {\r\n throw new Error('Cannot acquire edit stack lock');\r\n }\r\n }\r\n // can acquire all locks\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n editStack.locked = true;\r\n }\r\n return () => {\r\n // release all locks\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n editStack.locked = false;\r\n }\r\n };\r\n }\r\n _safeInvokeWithLocks(element, invoke, editStackSnapshot, cleanup, continuation) {\r\n const releaseLocks = this._acquireLocks(editStackSnapshot);\r\n let result;\r\n try {\r\n result = invoke();\r\n }\r\n catch (err) {\r\n releaseLocks();\r\n cleanup.dispose();\r\n return this._onError(err, element);\r\n }\r\n if (result) {\r\n // result is Promise<void>\r\n return result.then(() => {\r\n releaseLocks();\r\n cleanup.dispose();\r\n return continuation();\r\n }, (err) => {\r\n releaseLocks();\r\n cleanup.dispose();\r\n return this._onError(err, element);\r\n });\r\n }\r\n else {\r\n // result is void\r\n releaseLocks();\r\n cleanup.dispose();\r\n return continuation();\r\n }\r\n }\r\n _invokeWorkspacePrepare(element) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (typeof element.actual.prepareUndoRedo === 'undefined') {\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.Disposable.None;\r\n }\r\n const result = element.actual.prepareUndoRedo();\r\n if (typeof result === 'undefined') {\r\n return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.Disposable.None;\r\n }\r\n return result;\r\n });\r\n }\r\n _invokeResourcePrepare(element, callback) {\r\n if (element.actual.type !== 1 /* Workspace */ || typeof element.actual.prepareUndoRedo === 'undefined') {\r\n // no preparation needed\r\n return callback(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.Disposable.None);\r\n }\r\n const r = element.actual.prepareUndoRedo();\r\n if (!r) {\r\n // nothing to clean up\r\n return callback(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.Disposable.None);\r\n }\r\n if ((0,_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__.isDisposable)(r)) {\r\n return callback(r);\r\n }\r\n return r.then((disposable) => {\r\n return callback(disposable);\r\n });\r\n }\r\n _getAffectedEditStacks(element) {\r\n const affectedEditStacks = [];\r\n for (const strResource of element.strResources) {\r\n affectedEditStacks.push(this._editStacks.get(strResource) || missingEditStack);\r\n }\r\n return new EditStackSnapshot(affectedEditStacks);\r\n }\r\n _tryToSplitAndUndo(strResource, element, ignoreResources, message) {\r\n if (element.canSplit()) {\r\n this._splitPastWorkspaceElement(element, ignoreResources);\r\n this._notificationService.info(message);\r\n return new WorkspaceVerificationError(this._undo(strResource, 0, true));\r\n }\r\n else {\r\n // Cannot safely split this workspace element => flush all undo/redo stacks\r\n for (const strResource of element.strResources) {\r\n this.removeElements(strResource);\r\n }\r\n this._notificationService.info(message);\r\n return new WorkspaceVerificationError();\r\n }\r\n }\r\n _checkWorkspaceUndo(strResource, element, editStackSnapshot, checkInvalidatedResources) {\r\n if (element.removedResources) {\r\n return this._tryToSplitAndUndo(strResource, element, element.removedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceUndo', comment: ['{0} is a label for an operation. {1} is another message.'] }, \"Could not undo '{0}' across all files. {1}\", element.label, element.removedResources.createMessage()));\r\n }\r\n if (checkInvalidatedResources && element.invalidatedResources) {\r\n return this._tryToSplitAndUndo(strResource, element, element.invalidatedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceUndo', comment: ['{0} is a label for an operation. {1} is another message.'] }, \"Could not undo '{0}' across all files. {1}\", element.label, element.invalidatedResources.createMessage()));\r\n }\r\n // this must be the last past element in all the impacted resources!\r\n const cannotUndoDueToResources = [];\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n if (editStack.getClosestPastElement() !== element) {\r\n cannotUndoDueToResources.push(editStack.resourceLabel);\r\n }\r\n }\r\n if (cannotUndoDueToResources.length > 0) {\r\n return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceUndoDueToChanges', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not undo '{0}' across all files because changes were made to {1}\", element.label, cannotUndoDueToResources.join(', ')));\r\n }\r\n const cannotLockDueToResources = [];\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n if (editStack.locked) {\r\n cannotLockDueToResources.push(editStack.resourceLabel);\r\n }\r\n }\r\n if (cannotLockDueToResources.length > 0) {\r\n return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceUndoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}\", element.label, cannotLockDueToResources.join(', ')));\r\n }\r\n // check if new stack elements were added in the meantime...\r\n if (!editStackSnapshot.isValid()) {\r\n return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceUndoDueToInMeantimeUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime\", element.label));\r\n }\r\n return null;\r\n }\r\n _workspaceUndo(strResource, element, undoConfirmed) {\r\n const affectedEditStacks = this._getAffectedEditStacks(element);\r\n const verificationError = this._checkWorkspaceUndo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/ false);\r\n if (verificationError) {\r\n return verificationError.returnValue;\r\n }\r\n return this._confirmAndExecuteWorkspaceUndo(strResource, element, affectedEditStacks, undoConfirmed);\r\n }\r\n _isPartOfUndoGroup(element) {\r\n if (!element.groupId) {\r\n return false;\r\n }\r\n // check that there is at least another element with the same groupId ready to be undone\r\n for (const [, editStack] of this._editStacks) {\r\n const pastElement = editStack.getClosestPastElement();\r\n if (!pastElement) {\r\n continue;\r\n }\r\n if (pastElement === element) {\r\n const secondPastElement = editStack.getSecondClosestPastElement();\r\n if (secondPastElement && secondPastElement.groupId === element.groupId) {\r\n // there is another element with the same group id in the same stack!\r\n return true;\r\n }\r\n }\r\n if (pastElement.groupId === element.groupId) {\r\n // there is another element with the same group id in another stack!\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _confirmAndExecuteWorkspaceUndo(strResource, element, editStackSnapshot, undoConfirmed) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (element.canSplit() && !this._isPartOfUndoGroup(element)) {\r\n // this element can be split\r\n const result = yield this._dialogService.show(_base_common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Info, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('confirmWorkspace', \"Would you like to undo '{0}' across all files?\", element.label), [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'ok', comment: ['{0} denotes a number that is > 1'] }, \"Undo in {0} Files\", editStackSnapshot.editStacks.length),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('nok', \"Undo this File\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cancel', \"Cancel\"),\r\n ], {\r\n cancelId: 2\r\n });\r\n if (result.choice === 2) {\r\n // choice: cancel\r\n return;\r\n }\r\n if (result.choice === 1) {\r\n // choice: undo this file\r\n this._splitPastWorkspaceElement(element, null);\r\n return this._undo(strResource, 0, true);\r\n }\r\n // choice: undo in all files\r\n // At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await)\r\n const verificationError1 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*invalidated resources will be checked after the prepare call*/ false);\r\n if (verificationError1) {\r\n return verificationError1.returnValue;\r\n }\r\n undoConfirmed = true;\r\n }\r\n // prepare\r\n let cleanup;\r\n try {\r\n cleanup = yield this._invokeWorkspacePrepare(element);\r\n }\r\n catch (err) {\r\n return this._onError(err, element);\r\n }\r\n // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)\r\n const verificationError2 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/ true);\r\n if (verificationError2) {\r\n cleanup.dispose();\r\n return verificationError2.returnValue;\r\n }\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n editStack.moveBackward(element);\r\n }\r\n return this._safeInvokeWithLocks(element, () => element.actual.undo(), editStackSnapshot, cleanup, () => this._continueUndoInGroup(element.groupId, undoConfirmed));\r\n });\r\n }\r\n _resourceUndo(editStack, element, undoConfirmed) {\r\n if (!element.isValid) {\r\n // invalid element => immediately flush edit stack!\r\n editStack.flushAllElements();\r\n return;\r\n }\r\n if (editStack.locked) {\r\n const message = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotResourceUndoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation.'] }, \"Could not undo '{0}' because there is already an undo or redo operation running.\", element.label);\r\n this._notificationService.info(message);\r\n return;\r\n }\r\n return this._invokeResourcePrepare(element, (cleanup) => {\r\n editStack.moveBackward(element);\r\n return this._safeInvokeWithLocks(element, () => element.actual.undo(), new EditStackSnapshot([editStack]), cleanup, () => this._continueUndoInGroup(element.groupId, undoConfirmed));\r\n });\r\n }\r\n _findClosestUndoElementInGroup(groupId) {\r\n if (!groupId) {\r\n return [null, null];\r\n }\r\n // find another element with the same groupId and with the highest groupOrder ready to be undone\r\n let matchedElement = null;\r\n let matchedStrResource = null;\r\n for (const [strResource, editStack] of this._editStacks) {\r\n const candidate = editStack.getClosestPastElement();\r\n if (!candidate) {\r\n continue;\r\n }\r\n if (candidate.groupId === groupId) {\r\n if (!matchedElement || candidate.groupOrder > matchedElement.groupOrder) {\r\n matchedElement = candidate;\r\n matchedStrResource = strResource;\r\n }\r\n }\r\n }\r\n return [matchedElement, matchedStrResource];\r\n }\r\n _continueUndoInGroup(groupId, undoConfirmed) {\r\n if (!groupId) {\r\n return;\r\n }\r\n const [, matchedStrResource] = this._findClosestUndoElementInGroup(groupId);\r\n if (matchedStrResource) {\r\n return this._undo(matchedStrResource, 0, undoConfirmed);\r\n }\r\n }\r\n undo(resourceOrSource) {\r\n if (resourceOrSource instanceof _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoSource) {\r\n const [, matchedStrResource] = this._findClosestUndoElementWithSource(resourceOrSource.id);\r\n return matchedStrResource ? this._undo(matchedStrResource, resourceOrSource.id, false) : undefined;\r\n }\r\n if (typeof resourceOrSource === 'string') {\r\n return this._undo(resourceOrSource, 0, false);\r\n }\r\n return this._undo(this.getUriComparisonKey(resourceOrSource), 0, false);\r\n }\r\n _undo(strResource, sourceId = 0, undoConfirmed) {\r\n if (!this._editStacks.has(strResource)) {\r\n return;\r\n }\r\n const editStack = this._editStacks.get(strResource);\r\n const element = editStack.getClosestPastElement();\r\n if (!element) {\r\n return;\r\n }\r\n if (element.groupId) {\r\n // this element is a part of a group, we need to make sure undoing in a group is in order\r\n const [matchedElement, matchedStrResource] = this._findClosestUndoElementInGroup(element.groupId);\r\n if (element !== matchedElement && matchedStrResource) {\r\n // there is an element in the same group that should be undone before this one\r\n return this._undo(matchedStrResource, sourceId, undoConfirmed);\r\n }\r\n }\r\n const shouldPromptForConfirmation = (element.sourceId !== sourceId || element.confirmBeforeUndo);\r\n if (shouldPromptForConfirmation && !undoConfirmed) {\r\n // Hit a different source or the element asks for prompt before undo, prompt for confirmation\r\n return this._confirmAndContinueUndo(strResource, sourceId, element);\r\n }\r\n try {\r\n if (element.type === 1 /* Workspace */) {\r\n return this._workspaceUndo(strResource, element, undoConfirmed);\r\n }\r\n else {\r\n return this._resourceUndo(editStack, element, undoConfirmed);\r\n }\r\n }\r\n finally {\r\n if (DEBUG) {\r\n this._print('undo');\r\n }\r\n }\r\n }\r\n _confirmAndContinueUndo(strResource, sourceId, element) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const result = yield this._dialogService.show(_base_common_severity_js__WEBPACK_IMPORTED_MODULE_5__.default.Info, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('confirmDifferentSource', \"Would you like to undo '{0}'?\", element.label), [\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('confirmDifferentSource.ok', \"Undo\"),\r\n _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize('cancel', \"Cancel\"),\r\n ], {\r\n cancelId: 1\r\n });\r\n if (result.choice === 1) {\r\n // choice: cancel\r\n return;\r\n }\r\n // choice: undo\r\n return this._undo(strResource, sourceId, true);\r\n });\r\n }\r\n _findClosestRedoElementWithSource(sourceId) {\r\n if (!sourceId) {\r\n return [null, null];\r\n }\r\n // find an element with sourceId and with the lowest sourceOrder ready to be redone\r\n let matchedElement = null;\r\n let matchedStrResource = null;\r\n for (const [strResource, editStack] of this._editStacks) {\r\n const candidate = editStack.getClosestFutureElement();\r\n if (!candidate) {\r\n continue;\r\n }\r\n if (candidate.sourceId === sourceId) {\r\n if (!matchedElement || candidate.sourceOrder < matchedElement.sourceOrder) {\r\n matchedElement = candidate;\r\n matchedStrResource = strResource;\r\n }\r\n }\r\n }\r\n return [matchedElement, matchedStrResource];\r\n }\r\n canRedo(resourceOrSource) {\r\n if (resourceOrSource instanceof _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoSource) {\r\n const [, matchedStrResource] = this._findClosestRedoElementWithSource(resourceOrSource.id);\r\n return matchedStrResource ? true : false;\r\n }\r\n const strResource = this.getUriComparisonKey(resourceOrSource);\r\n if (this._editStacks.has(strResource)) {\r\n const editStack = this._editStacks.get(strResource);\r\n return editStack.hasFutureElements();\r\n }\r\n return false;\r\n }\r\n _tryToSplitAndRedo(strResource, element, ignoreResources, message) {\r\n if (element.canSplit()) {\r\n this._splitFutureWorkspaceElement(element, ignoreResources);\r\n this._notificationService.info(message);\r\n return new WorkspaceVerificationError(this._redo(strResource));\r\n }\r\n else {\r\n // Cannot safely split this workspace element => flush all undo/redo stacks\r\n for (const strResource of element.strResources) {\r\n this.removeElements(strResource);\r\n }\r\n this._notificationService.info(message);\r\n return new WorkspaceVerificationError();\r\n }\r\n }\r\n _checkWorkspaceRedo(strResource, element, editStackSnapshot, checkInvalidatedResources) {\r\n if (element.removedResources) {\r\n return this._tryToSplitAndRedo(strResource, element, element.removedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceRedo', comment: ['{0} is a label for an operation. {1} is another message.'] }, \"Could not redo '{0}' across all files. {1}\", element.label, element.removedResources.createMessage()));\r\n }\r\n if (checkInvalidatedResources && element.invalidatedResources) {\r\n return this._tryToSplitAndRedo(strResource, element, element.invalidatedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceRedo', comment: ['{0} is a label for an operation. {1} is another message.'] }, \"Could not redo '{0}' across all files. {1}\", element.label, element.invalidatedResources.createMessage()));\r\n }\r\n // this must be the last future element in all the impacted resources!\r\n const cannotRedoDueToResources = [];\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n if (editStack.getClosestFutureElement() !== element) {\r\n cannotRedoDueToResources.push(editStack.resourceLabel);\r\n }\r\n }\r\n if (cannotRedoDueToResources.length > 0) {\r\n return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceRedoDueToChanges', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not redo '{0}' across all files because changes were made to {1}\", element.label, cannotRedoDueToResources.join(', ')));\r\n }\r\n const cannotLockDueToResources = [];\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n if (editStack.locked) {\r\n cannotLockDueToResources.push(editStack.resourceLabel);\r\n }\r\n }\r\n if (cannotLockDueToResources.length > 0) {\r\n return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceRedoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}\", element.label, cannotLockDueToResources.join(', ')));\r\n }\r\n // check if new stack elements were added in the meantime...\r\n if (!editStackSnapshot.isValid()) {\r\n return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotWorkspaceRedoDueToInMeantimeUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, \"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime\", element.label));\r\n }\r\n return null;\r\n }\r\n _workspaceRedo(strResource, element) {\r\n const affectedEditStacks = this._getAffectedEditStacks(element);\r\n const verificationError = this._checkWorkspaceRedo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/ false);\r\n if (verificationError) {\r\n return verificationError.returnValue;\r\n }\r\n return this._executeWorkspaceRedo(strResource, element, affectedEditStacks);\r\n }\r\n _executeWorkspaceRedo(strResource, element, editStackSnapshot) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // prepare\r\n let cleanup;\r\n try {\r\n cleanup = yield this._invokeWorkspacePrepare(element);\r\n }\r\n catch (err) {\r\n return this._onError(err, element);\r\n }\r\n // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await)\r\n const verificationError = this._checkWorkspaceRedo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/ true);\r\n if (verificationError) {\r\n cleanup.dispose();\r\n return verificationError.returnValue;\r\n }\r\n for (const editStack of editStackSnapshot.editStacks) {\r\n editStack.moveForward(element);\r\n }\r\n return this._safeInvokeWithLocks(element, () => element.actual.redo(), editStackSnapshot, cleanup, () => this._continueRedoInGroup(element.groupId));\r\n });\r\n }\r\n _resourceRedo(editStack, element) {\r\n if (!element.isValid) {\r\n // invalid element => immediately flush edit stack!\r\n editStack.flushAllElements();\r\n return;\r\n }\r\n if (editStack.locked) {\r\n const message = _nls_js__WEBPACK_IMPORTED_MODULE_0__.localize({ key: 'cannotResourceRedoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation.'] }, \"Could not redo '{0}' because there is already an undo or redo operation running.\", element.label);\r\n this._notificationService.info(message);\r\n return;\r\n }\r\n return this._invokeResourcePrepare(element, (cleanup) => {\r\n editStack.moveForward(element);\r\n return this._safeInvokeWithLocks(element, () => element.actual.redo(), new EditStackSnapshot([editStack]), cleanup, () => this._continueRedoInGroup(element.groupId));\r\n });\r\n }\r\n _findClosestRedoElementInGroup(groupId) {\r\n if (!groupId) {\r\n return [null, null];\r\n }\r\n // find another element with the same groupId and with the lowest groupOrder ready to be redone\r\n let matchedElement = null;\r\n let matchedStrResource = null;\r\n for (const [strResource, editStack] of this._editStacks) {\r\n const candidate = editStack.getClosestFutureElement();\r\n if (!candidate) {\r\n continue;\r\n }\r\n if (candidate.groupId === groupId) {\r\n if (!matchedElement || candidate.groupOrder < matchedElement.groupOrder) {\r\n matchedElement = candidate;\r\n matchedStrResource = strResource;\r\n }\r\n }\r\n }\r\n return [matchedElement, matchedStrResource];\r\n }\r\n _continueRedoInGroup(groupId) {\r\n if (!groupId) {\r\n return;\r\n }\r\n const [, matchedStrResource] = this._findClosestRedoElementInGroup(groupId);\r\n if (matchedStrResource) {\r\n return this._redo(matchedStrResource);\r\n }\r\n }\r\n redo(resourceOrSource) {\r\n if (resourceOrSource instanceof _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.UndoRedoSource) {\r\n const [, matchedStrResource] = this._findClosestRedoElementWithSource(resourceOrSource.id);\r\n return matchedStrResource ? this._redo(matchedStrResource) : undefined;\r\n }\r\n if (typeof resourceOrSource === 'string') {\r\n return this._redo(resourceOrSource);\r\n }\r\n return this._redo(this.getUriComparisonKey(resourceOrSource));\r\n }\r\n _redo(strResource) {\r\n if (!this._editStacks.has(strResource)) {\r\n return;\r\n }\r\n const editStack = this._editStacks.get(strResource);\r\n const element = editStack.getClosestFutureElement();\r\n if (!element) {\r\n return;\r\n }\r\n if (element.groupId) {\r\n // this element is a part of a group, we need to make sure redoing in a group is in order\r\n const [matchedElement, matchedStrResource] = this._findClosestRedoElementInGroup(element.groupId);\r\n if (element !== matchedElement && matchedStrResource) {\r\n // there is an element in the same group that should be redone before this one\r\n return this._redo(matchedStrResource);\r\n }\r\n }\r\n try {\r\n if (element.type === 1 /* Workspace */) {\r\n return this._workspaceRedo(strResource, element);\r\n }\r\n else {\r\n return this._resourceRedo(editStack, element);\r\n }\r\n }\r\n finally {\r\n if (DEBUG) {\r\n this._print('redo');\r\n }\r\n }\r\n }\r\n};\r\nUndoRedoService = __decorate([\r\n __param(0, _dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__.IDialogService),\r\n __param(1, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_7__.INotificationService)\r\n], UndoRedoService);\r\n\r\nclass WorkspaceVerificationError {\r\n constructor(returnValue) {\r\n this.returnValue = returnValue;\r\n }\r\n}\r\n(0,_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_3__.registerSingleton)(_undoRedo_js__WEBPACK_IMPORTED_MODULE_1__.IUndoRedoService, UndoRedoService);\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IWorkspaceContextService\": () => (/* binding */ IWorkspaceContextService),\n/* harmony export */ \"Workspace\": () => (/* binding */ Workspace),\n/* harmony export */ \"WorkspaceFolder\": () => (/* binding */ WorkspaceFolder)\n/* harmony export */ });\n/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ \"./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js\");\n/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/map.js */ \"./node_modules/monaco-editor/esm/vs/base/common/map.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nconst IWorkspaceContextService = (0,_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__.createDecorator)('contextService');\r\nclass Workspace {\r\n constructor(_id, folders, _configuration, _ignorePathCasing) {\r\n this._id = _id;\r\n this._configuration = _configuration;\r\n this._ignorePathCasing = _ignorePathCasing;\r\n this._foldersMap = _base_common_map_js__WEBPACK_IMPORTED_MODULE_1__.TernarySearchTree.forUris(this._ignorePathCasing);\r\n this.folders = folders;\r\n }\r\n get folders() {\r\n return this._folders;\r\n }\r\n set folders(folders) {\r\n this._folders = folders;\r\n this.updateFoldersMap();\r\n }\r\n get id() {\r\n return this._id;\r\n }\r\n get configuration() {\r\n return this._configuration;\r\n }\r\n set configuration(configuration) {\r\n this._configuration = configuration;\r\n }\r\n getFolder(resource) {\r\n if (!resource) {\r\n return null;\r\n }\r\n return this._foldersMap.findSubstr(resource.with({\r\n scheme: resource.scheme,\r\n authority: resource.authority,\r\n path: resource.path\r\n })) || null;\r\n }\r\n updateFoldersMap() {\r\n this._foldersMap = _base_common_map_js__WEBPACK_IMPORTED_MODULE_1__.TernarySearchTree.forUris(this._ignorePathCasing);\r\n for (const folder of this.folders) {\r\n this._foldersMap.set(folder.uri, folder);\r\n }\r\n }\r\n toJSON() {\r\n return { id: this.id, folders: this.folders, configuration: this.configuration };\r\n }\r\n}\r\nclass WorkspaceFolder {\r\n constructor(data, raw) {\r\n this.raw = raw;\r\n this.uri = data.uri;\r\n this.index = data.index;\r\n this.name = data.name;\r\n }\r\n toJSON() {\r\n return { uri: this.uri, name: this.name, index: this.index };\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WORKSPACE_EXTENSION\": () => (/* binding */ WORKSPACE_EXTENSION),\n/* harmony export */ \"isSingleFolderWorkspaceIdentifier\": () => (/* binding */ isSingleFolderWorkspaceIdentifier),\n/* harmony export */ \"toWorkspaceIdentifier\": () => (/* binding */ toWorkspaceIdentifier)\n/* harmony export */ });\n/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ \"./node_modules/monaco-editor/esm/vs/base/common/uri.js\");\n\r\nconst WORKSPACE_EXTENSION = 'code-workspace';\r\nfunction isSingleFolderWorkspaceIdentifier(obj) {\r\n const singleFolderIdentifier = obj;\r\n return typeof (singleFolderIdentifier === null || singleFolderIdentifier === void 0 ? void 0 : singleFolderIdentifier.id) === 'string' && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__.URI.isUri(singleFolderIdentifier.uri);\r\n}\r\nfunction toWorkspaceIdentifier(workspace) {\r\n // Multi root\r\n if (workspace.configuration) {\r\n return {\r\n id: workspace.id,\r\n configPath: workspace.configuration\r\n };\r\n }\r\n // Single folder\r\n if (workspace.folders.length === 1) {\r\n return {\r\n id: workspace.id,\r\n uri: workspace.folders[0].uri\r\n };\r\n }\r\n // Empty workspace\r\n return undefined;\r\n}\r\n//#endregion\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./actionbar.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./aria.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./button.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./checkbox.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_codicon_modifiers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../../css-loader/dist/cjs.js!./codicon-modifiers.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_modifiers_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_codicon_modifiers_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../../css-loader/dist/cjs.js!./codicon.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./contextview.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./countBadge.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./dropdown.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./findInput.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./hover.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./iconlabel.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css ***!
|
||
\*********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./inputBox.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./keybindingLabel.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./list.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./mouseCursor.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css ***!
|
||
\***************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./progressbar.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./sash.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css ***!
|
||
\******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../../css-loader/dist/cjs.js!./scrollbars.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css":
|
||
/*!***********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css ***!
|
||
\***********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./splitview.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css":
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_table_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./table.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_table_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_table_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css ***!
|
||
\*******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../../css-loader/dist/cjs.js!./tree.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../../css-loader/dist/cjs.js!./quickInput.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./textAreaHandler.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css":
|
||
/*!******************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css ***!
|
||
\******************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./currentLineHighlight.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./decorations.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./glyphMargin.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css":
|
||
/*!**************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css ***!
|
||
\**************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_indentGuides_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./indentGuides.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_indentGuides_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_indentGuides_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./lineNumbers.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./viewLines.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css":
|
||
/*!**********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css ***!
|
||
\**********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./linesDecorations.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css":
|
||
/*!************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css ***!
|
||
\************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_marginDecorations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./marginDecorations.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_marginDecorations_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_marginDecorations_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./minimap.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css":
|
||
/*!******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css ***!
|
||
\******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./overlayWidgets.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./rulers.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css":
|
||
/*!**********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css ***!
|
||
\**********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./scrollDecoration.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./selections.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./viewCursors.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./diffEditor.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./diffReview.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css ***!
|
||
\**********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./editor.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./anchorSelect.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./bracketMatching.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css ***!
|
||
\*****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./lightBulbWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./codelensWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./colorPicker.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css ***!
|
||
\**********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./dnd.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./findWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css":
|
||
/*!******************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css ***!
|
||
\******************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./folding.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css":
|
||
/*!**********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css ***!
|
||
\**********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./gotoErrorWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css":
|
||
/*!*******************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css ***!
|
||
\*******************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./goToDefinitionAtPosition.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./referencesWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./links.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css":
|
||
/*!****************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css ***!
|
||
\****************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./messageController.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./parameterHints.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css":
|
||
/*!********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css ***!
|
||
\********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./peekViewWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css ***!
|
||
\**************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./renameInputField.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css ***!
|
||
\*************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./snippetSession.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./suggest.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css":
|
||
/*!************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css ***!
|
||
\************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./zoneWidget.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css":
|
||
/*!*************************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css ***!
|
||
\*************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./accessibilityHelp.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css":
|
||
/*!***********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***!
|
||
\***********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./iPadShowKeyboard.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css":
|
||
/*!*****************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css ***!
|
||
\*****************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./inspectTokens.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css":
|
||
/*!*********************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css ***!
|
||
\*********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../css-loader/dist/cjs.js!./standaloneQuickInput.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css ***!
|
||
\*******************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./standalone-tokens.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css":
|
||
/*!************************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css ***!
|
||
\************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_menuEntryActionViewItem_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./menuEntryActionViewItem.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_menuEntryActionViewItem_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_menuEntryActionViewItem_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css":
|
||
/*!***********************************************************************************************!*\
|
||
!*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css ***!
|
||
\***********************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../css-loader/dist/cjs.js!./contextMenuHandler.css */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css?");
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
|
||
/*!****************************************************************************!*\
|
||
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?");
|
||
|
||
/***/ })
|
||
|
||
/******/ });
|
||
/************************************************************************/
|
||
/******/ // The module cache
|
||
/******/ var __webpack_module_cache__ = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/ // Check if module is in cache
|
||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||
/******/ if (cachedModule !== undefined) {
|
||
/******/ return cachedModule.exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||
/******/ id: moduleId,
|
||
/******/ // no module.loaded needed
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = __webpack_modules__;
|
||
/******/
|
||
/************************************************************************/
|
||
/******/ /* webpack/runtime/amd options */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.amdO = {};
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/compat get default export */
|
||
/******/ (() => {
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = (module) => {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ () => (module['default']) :
|
||
/******/ () => (module);
|
||
/******/ __webpack_require__.d(getter, { a: getter });
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/define property getters */
|
||
/******/ (() => {
|
||
/******/ // define getter functions for harmony exports
|
||
/******/ __webpack_require__.d = (exports, definition) => {
|
||
/******/ for(var key in definition) {
|
||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||
/******/ }
|
||
/******/ }
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/ensure chunk */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.f = {};
|
||
/******/ // This file contains only the entry chunk.
|
||
/******/ // The chunk loading function for additional chunks
|
||
/******/ __webpack_require__.e = (chunkId) => {
|
||
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
||
/******/ __webpack_require__.f[key](chunkId, promises);
|
||
/******/ return promises;
|
||
/******/ }, []));
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/get javascript chunk filename */
|
||
/******/ (() => {
|
||
/******/ // This function allow to reference async chunks
|
||
/******/ __webpack_require__.u = (chunkId) => {
|
||
/******/ // return url for filenames based on template
|
||
/******/ return "" + chunkId + ".bundle.js";
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/global */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.g = (function() {
|
||
/******/ if (typeof globalThis === 'object') return globalThis;
|
||
/******/ try {
|
||
/******/ return this || new Function('return this')();
|
||
/******/ } catch (e) {
|
||
/******/ if (typeof window === 'object') return window;
|
||
/******/ }
|
||
/******/ })();
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/load script */
|
||
/******/ (() => {
|
||
/******/ var inProgress = {};
|
||
/******/ var dataWebpackPrefix = "browser-esm-webpack:";
|
||
/******/ // loadScript function to load a script via script tag
|
||
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
||
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
||
/******/ var script, needAttach;
|
||
/******/ if(key !== undefined) {
|
||
/******/ var scripts = document.getElementsByTagName("script");
|
||
/******/ for(var i = 0; i < scripts.length; i++) {
|
||
/******/ var s = scripts[i];
|
||
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(!script) {
|
||
/******/ needAttach = true;
|
||
/******/ script = document.createElement('script');
|
||
/******/
|
||
/******/ script.charset = 'utf-8';
|
||
/******/ script.timeout = 120;
|
||
/******/ if (__webpack_require__.nc) {
|
||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||
/******/ }
|
||
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
||
/******/ script.src = url;
|
||
/******/ }
|
||
/******/ inProgress[url] = [done];
|
||
/******/ var onScriptComplete = (prev, event) => {
|
||
/******/ // avoid mem leaks in IE.
|
||
/******/ script.onerror = script.onload = null;
|
||
/******/ clearTimeout(timeout);
|
||
/******/ var doneFns = inProgress[url];
|
||
/******/ delete inProgress[url];
|
||
/******/ script.parentNode && script.parentNode.removeChild(script);
|
||
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
||
/******/ if(prev) return prev(event);
|
||
/******/ }
|
||
/******/ ;
|
||
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
||
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
||
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
||
/******/ needAttach && document.head.appendChild(script);
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/make namespace object */
|
||
/******/ (() => {
|
||
/******/ // define __esModule on exports
|
||
/******/ __webpack_require__.r = (exports) => {
|
||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
/******/ }
|
||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/publicPath */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.p = __monaco_public_path__;
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||
/******/ (() => {
|
||
/******/ // no baseURI
|
||
/******/
|
||
/******/ // object to store loaded and loading chunks
|
||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||
/******/ var installedChunks = {
|
||
/******/ "app": 0
|
||
/******/ };
|
||
/******/
|
||
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
||
/******/ // JSONP chunk loading for javascript
|
||
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
||
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
||
/******/
|
||
/******/ // a Promise means "currently loading".
|
||
/******/ if(installedChunkData) {
|
||
/******/ promises.push(installedChunkData[2]);
|
||
/******/ } else {
|
||
/******/ if(true) { // all chunks have JS
|
||
/******/ // setup Promise in chunk cache
|
||
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
||
/******/ promises.push(installedChunkData[2] = promise);
|
||
/******/
|
||
/******/ // start chunk loading
|
||
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
||
/******/ // create error before stack unwound to get useful stacktrace later
|
||
/******/ var error = new Error();
|
||
/******/ var loadingEnded = (event) => {
|
||
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
||
/******/ installedChunkData = installedChunks[chunkId];
|
||
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
||
/******/ if(installedChunkData) {
|
||
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
||
/******/ var realSrc = event && event.target && event.target.src;
|
||
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
||
/******/ error.name = 'ChunkLoadError';
|
||
/******/ error.type = errorType;
|
||
/******/ error.request = realSrc;
|
||
/******/ installedChunkData[1](error);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ };
|
||
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
||
/******/ } else installedChunks[chunkId] = 0;
|
||
/******/ }
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // no prefetching
|
||
/******/
|
||
/******/ // no preloaded
|
||
/******/
|
||
/******/ // no HMR
|
||
/******/
|
||
/******/ // no HMR manifest
|
||
/******/
|
||
/******/ // no on chunks loaded
|
||
/******/
|
||
/******/ // install a JSONP callback for chunk loading
|
||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||
/******/ // add "moreModules" to the modules object,
|
||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||
/******/ var moduleId, chunkId, i = 0;
|
||
/******/ for(moduleId in moreModules) {
|
||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(runtime) runtime(__webpack_require__);
|
||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||
/******/ for(;i < chunkIds.length; i++) {
|
||
/******/ chunkId = chunkIds[i];
|
||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||
/******/ installedChunks[chunkId][0]();
|
||
/******/ }
|
||
/******/ installedChunks[chunkIds[i]] = 0;
|
||
/******/ }
|
||
/******/
|
||
/******/ }
|
||
/******/
|
||
/******/ var chunkLoadingGlobal = self["webpackChunkbrowser_esm_webpack"] = self["webpackChunkbrowser_esm_webpack"] || [];
|
||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||
/******/ })();
|
||
/******/
|
||
/************************************************************************/
|
||
/******/
|
||
/******/ // startup
|
||
/******/ // Load entry module and return exports
|
||
/******/ // This entry module can't be inlined because the eval devtool is used.
|
||
/******/ var __webpack_exports__ = __webpack_require__("./index.js");
|
||
/******/
|
||
/******/ })()
|
||
; |